Linear Approximation

advertisement
Linear Approximation
The tangent line is the best local linear approximation to a function at the point of tangency.
Why is this so? If we look closely enough at any function (or look at it over a small enough
interval) it begins to look like a line. The smaller the interval we consider the function over,
the more it looks like a line. Thus, if we are close enough to the point of tangency, a tangent
line will be a very good approximation to the function it is tangent to. We are interested in
making such an approximation in order to numerically solve problems that we cannot solve
analytically.
The equation of the line tangent to a function f (x) at a point a is given by
fˆ(x) = f 0 (a)(x − a) + f (a)
At the point of tangency a, fˆ(x) has the same value and slope as f (x).
Example 1 Estimate the value of ln(0.9) using the line tangent to ln(x) at x = 1.
Solution Since we know ln(1) = 0, this is a convenient point to find the tangent line, and it
will provide us with a reasonable approximation of the value of ln(0.9) (because 0.9 is close
to 1). We know the derivative of ln(x) is x1 , so we find the value of the first derivative of
ln(x) at x = 1 is just 1. Thus,
ˆ
ln(x)
= 1(x − 1) + 0 = x − 1
ˆ
We find that our approximation ln(0.9)
= −0.1, whereas the exact value is ln(0.9) ≈
−0.10536.
Example 2 Find the line tangent to g(x) = ex at x = 0.
Solution We find that g(0) = g 0 (0) = e0 = 1, so
ĝ(x) = g 0 (0)(x − 0) + g(0) = 1 + x
The values of ĝ(x) are close to those of g(x) near x = 0. For instance, ĝ(0.1) = 1.1 whereas
e0.1 ≈ 1.10507. At x = 0.15 we find ĝ(0.15) = 1.15, while e0.1 ≈ 1.1618. Thus, we see that
the error increases the further we are from x = 0. At x = 1, ĝ(1) = 2, while e ≈ 2.71828;
even at a distance as small as 1 this approximation becomes rather inaccurate.
Although the approximation became rather poor at x = 1, we can use the tangent line at
x = 1 for a better approximation.
Example 3 Find the line tangent to g(x) = ex at x = 1.
Solution We find that g(1) = g 0 (1) = e ≈ 2.71828, so
ĝ(x) = g 0 (1)(x − 1) + g(1) = e · x ≈ 2.71828x
Here we find that ĝ(0.9) ≈ 2.44645 whereas e0.9 ≈ 2.4596. However, if we move all the way
to x = 0, we find that ĝ(0) = 0, yet e0 = 1. Once again, this is a rather poor approximation.
Despite being the best linear approximation around the point of tangency, a tangent line
can become a rather poor approximation as the distance away from the point of tangency
increases. If we want to linearly approximate a function over a larger interval, we will need
to use another approach. If we use the average rate of change of a function over an interval,
although it will be less accurate than a tangent line near a point of tangency, it will provide
us a reasonable estimate of the function over the entire interval (provided the interval is not
too large). The line that will provide us with this approximation is the secant line between
the two endpoints of the interval. For a function f (x), on an interval [a, b], the secant line
that passes through a and b is given by
f (b) − f (a)
fˆs (x) =
(x − a) + f (a)
b−a
where we are using a as the base point for the secant line.
Example 4 Find secant line of g(x) = ex that passes through the points x = 0 and x = 1.
Solution First we must calculate the slope of the secant line,
e1 − e0
= e − 1 ≈ 1.71828
1−0
Since our base point is x = 0, we find e0 = 1, so
ĝs (x) = (e − 1)(x − 0) + e0 = (e − 1)x + 1 ≈ 1.71828x + 1
Now we can compare the relative errors of our three approximations to g(x) = ex over various
points of the interval [0, 1]. For convenience, let us say ĝ0 (x) is the tangent line at x = 0,
and that ĝ1 (x) is the tangent line at x = 1
t
0.01
0.10
0.50
0.90
0.99
g(t)
ĝ0 (x)
1.01005 1.01
1.10517 1.10
1.64872 1.50
2.45960 1.90
2.69123 1.99
ĝ1 (x)
0.02718
0.27182
1.35914
2.44645
2.69110
ĝs (x)
1.01718
1.17183
1.85914
2.54645
2.70110
The above data shows that the secant line is more accurate on average than a single tangent
line approximation over the entire interval, but also that at any of the above points one of
the two tangent line approximations is more accurate than the secant line. In practice, we
will generally use a tangent line rather than a secant line. Unlike the secant line, we only
need to choose a single point to construct a tangent line, whereas the need to choose an
interval complicates the usage of the secant line. Furthermore, the tangent line allows us to
make a very accurate estimate, whereas the secant line generally does not.
Download