A nonlinear function can be approximated with an linear function in a certain operating point. The process of linearization, in mathematics, refers to the process of finding a linear approximation of a nonlinear function at a given point (x0, y0).
For a given nonlinear function, its linear approximation, in an operating point (x0, y0), will be the tangent line to the function in that point.
Linearization – theoretical background
A line is defined by a linear equation as:
m – the slope of the line
b – the vertical offset of the line
The slope m of the line can be defined as the tangent function of the angle (α) between the line and the horizontal axis:
where dy and dx are small variations in the coordinates of the line.
Another way of defining a line, is by specifying the slope m and a point (x0, y0) through which the line passes. The equation of the line will be:
Replacing equation (2) in (3) gives:
Equation (4) translates into: for a given nonlinear function, its linear approximation in an operating point (x0, y0) depends on the derivative of the function in that point.
In order to get a general expression of the linear approximation, we’ll consider a function f(x) and the x-coordinate of the function a. The y-coordinate of the function will be f(a).
Replacing these in equation (3) gives:
We can now write the general linear approximation L(x) of a nonlinear function f(x) in a point a as:
Linearization – practical example
Let’s find a linear approximation of the function f(x) in the point a = 1.
The graphical representation of the function is:
Step 1. Calculate f(a)
Step 2. Calculate the derivative of f(x)
Step 3. Calculate the slope of the linear approximation f'(a)
Step 4. Write the equation L(x) of the linear approximation
If we plot the linear approximation L(x) on the same graph, we get:
As expected, the linear approximation L(x) in the point (a, f(a)) is tangent to the nonlinear function.
If we consider an interval close to our linearization point a, we can see that the results of the linear approximation are very close to the ones of the nonlinear function. For example, let’s plot both nonlinear function f(x) and linear approximation L(x) between 0.9 and 1.1.
If we calculate the relative error between the results of the nonlinear and linear functions, we’ll notice small errors, below 0.5 %. This means that we can use our linear approximation to predict the behavior of the nonlinear function, but only around the linearization point (a, f(a)).
The Scilab instruction to plot the above graphical representations are: