<<

Linear

The line is the best local linear approximation to a 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 1 to 1). We know the of ln(x) is x , 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) = g0(0) = e0 = 1, so gˆ(x) = g0(0)(x − 0) + g(0) = 1 + x The values ofg ˆ(x) are close to those of g(x) near x = 0. For instance,g ˆ(0.1) = 1.1 whereas e0.1 ≈ 1.10507. At x = 0.15 we findg ˆ(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,g ˆ(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) = g0(1) = e ≈ 2.71828, so gˆ(x) = g0(1)(x − 1) + g(1) = e · x ≈ 2.71828x Here we find thatg ˆ(0.9) ≈ 2.44645 whereas e0.9 ≈ 2.4596. However, if we move all the way to x = 0, we find thatg ˆ(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ˆ (x) = (x − a) + f(a) s 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

0 gˆs(x) = (e − 1)(x − 0) + e = (e − 1)x + 1 ≈ 1.71828x + 1

Now we can compare the relative errors of our three to g(x) = ex over various points of the interval [0, 1]. For convenience, let us sayg ˆ0(x) is the tangent line at x = 0, and thatg ˆ1(x) is the tangent line at x = 1

t g(t) gˆ0(x) gˆ1(x) gˆs(x) 0.01 1.01005 1.01 0.02718 1.01718 0.10 1.10517 1.10 0.27182 1.17183 0.50 1.64872 1.50 1.35914 1.85914 0.90 2.45960 1.90 2.44645 2.54645 0.99 2.69123 1.99 2.69110 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.