]> 12.1 Estimating a Function Value Using the Linear Approximation

12.1 Estimating a Function Value Using the Linear Approximation

Suppose we have a function f that we find difficult to evaluate, but we know a few things about it. We want to make use of what we know as much as possible to approximate its value at argument x knowing its value at some argument x 0 .

Suppose for example we want to evaluate the cube root of 28.

We know that the cube root of 27 is 3.

The simplest thing we can do is to make the "constant approximation", and approximate the cube root of 28 by 3, as if the cube root function were a constant.

The next thing we can try, if we want to do better, is to apply the linear approximation

f 1 ( x ) = f ( x 0 ) + ( x x 0 ) f ' ( x 0 )

in our case we have x = 28 , x 0 = 27 , f ( x 0 ) = 3 , and f ' ( x 0 ) = f ( x 0 ) 3 x 0 = 1 27 .

The linear approximation, f 1 ( 28 ) to the cube root of 28 is then 3 + 1 27 .

Given any function f for which we know f ( x 0 ) and f ' ( x 0 ) we can immediately evaluate this approximation. Using it involves pretending that the graph of the function f were its tangent line at x 0 , rather than whatever it is.

We can judge how good this approximation is by considering the second derivative of f .

Note that f " is negative in the range between 27 and 28, which means that the first derivative decreases in that interval. On the tangent line at 27 it stays constant.

This implies that the tangent line linear approximation at 27 overestimates the change in f over this interval and therefore we know

f ( 28 ) < 3 + 1 27

We can also observe that f 's third derivative is positive in the interval in question, so that the quadratic approximation, by the same argument underestimates the change in the second derivative and in all lower derivatives as well, so it is a lower bound to f ( 28 ) , and we get

f ( 28 ) > 3 + 1 27 1 27 * 81

Numerically, to six decimal places we get 3.03658 < f ( 28 ) < 3.03704 ; in fact we have f ( 28 ) = 3.03659 to this accuracy.

The cube root function considered here is the inverse function to one we know how to calculate directly, namely the cube. We can use the linear approximation to compute any such inverse function to the accuracy that our machine will allow, as we shall see next.