Linearization

(adapted from material written by Dr. Donald Spickler)

The linearization of a function f(x) at x = a is simply the tangent line to f(x) at x = a.  This is also called the linear approximation to f(x) since if the value x is close to a then f(x) is approximately equal to the tangent line.

Recall that the equation of the tangent line is

y - f(a) = f'(a) (x - a)

and solving for y gives

y = f(a) + f'(a) (x - a)

If x is close to a then the value of tangent line at x will be close to f (x).  For example, the tangent line to x^(1/2) at a = 100 is L[x] below:

f[x_]:=Sqrt[x]

L[x_]:=f[100]+f'[100](x-100)

Now if we take a number that is close to 100 the tangent line approximation should be close to the actual value.  For example 99.5,

f[99.5]

L[99.5]

So the error in the approximation is,

L[99.5]-f[99.5]

One question when using a linear approximation to a function is how long does the approximation stay good?  More specifically, what interval around x = a has the difference between the tangent line and the curve less than some specified error?  If we can answer that, then we know where the tangent line approximation is within that error of the actual function value.  For example, say we want to find the interval in which the tangent line approximation to f(x) = cos(x) at x = 1 has error less than 0.05.  To visualize this, plot four functions all on the same axes.  The functions will be f(x), f(x)+0.05, f(x)-0.05 and the tangent line equation.

f[x_]:=Cos[x]

Plot[{f[x],f[x]+0.05, f[x]-0.05, f[1]+f'[1](x-1)},{x,0,2}]

What you are looking for is when the tangent line is between f(x)-0.05 and f(x)+0.05.  The interval in which this happens is the interval where the tangent line approximation has error less than 0.05.  As we can see the endpoints to that interval will be where the tangent line intersects the upper curve (f(x)+0.05).  So we will need to set them equal to each other and solve the equation.

Solve[f[x]+0.05==f[1]+f'[1](x-1), x]

Notice that the Solve command was not able to find the solutions.  Remember that the Solve command tries to find the exact solutions to the equation and when you have trigonometric functions set equal to polynomial functions it is rare to be able to find exact solutions.  Hence we must rely on numeric approximations.  One Mathematica command that works well here is the FindRoot command.  The syntax is similar to the Solve command but instead of solving for x we give it a place to start, that is, a value close to the solution.  As you can see from the graph the left endpoint of our interval is close to 1/2, so we start the FindRoot command at 0.5.

FindRoot[f[x]+0.05==f[1]+f'[1](x-1),{x,0.5}]

The other endpoint is close to 1.5 so we will start the FindRoot command there.

FindRoot[f[x]+0.05==f[1]+f'[1](x-1),{x,1.5}]

This says that the tangent line at 1 is within 0.05 of the cosine curve on the interval [0.605665, 1.50749].  So for any x value in this interval the tangent line approximation has an error less than 0.05.

Open a new notebook and complete the following:
A.  Find linearizations for the following functions at the indicated points.  Then determine the interval for which the linear approximation will be within .1 of the function.
1.  (x^(1/3))at x = 1
2.  (e^x) at x = 0
3.  ln(x) at x = 1
B.  Use the linearizations you found above to approximate the following.  Then have Mathemaitca compute them and calculate the "error".
1.  (0.9^(1/3))
2.   (e^(1/5))  (that is, (e^0.2))
3.  ln(1.1)