Tangent Lines as Approximation

From www.norsemathology.org

Jump to: navigation, search

Contents

Tangent Lines 101

There are certainly two things that you should know about tangent lines:

  • They're graphs of linear functions, and
  • They do the best job of approximating a function at the point of tangency of any other linear function.

Tangent lines are generalized by Taylor Series as Approximations.

The Math

If we want the tangent line at the point (a,f(a)), it's the graph of

L(x)=f(a)+f^\prime(a)(x-a)

This makes perfect sense, showing that L(x) matches f(x) in terms of both the function values and derivatives at x = a:


\begin{cases} 
  L(a)=f(a)+f^\prime(a)(a-a)=f(a) \\
  L^\prime(a) = \left( f(a)+f^\prime(a)(x-a) \right)^\prime |_{x=a} = f^\prime(a)
\end{cases}

Application: Newton's Method

One of the most important applications of the linearization \left.L(x)\right. is in root-finding: that is, finding zeros of a non-linear function.

Given function \left.f(x)\right., and a guess for a root \left.x_0\right.. We would first check to see if \left.f(x_0)=0\right.. If it is, we're done; otherwise, we might try to improve the guess. How so?

Use the linearization L(x)=f(x_0)+f^\prime(x_0)(x-x_0), and find a zero of it:

L(x)=f(x_0)+f^\prime(x_0)(x-x_0)=0 \implies x=x_0-\frac{f(x_0)}{f^\prime(x_0)}

This is Newton's method, an iterative scheme for improving the approximation of a root: we need a good approximation for the root, \left.x=x_0\right., and then

x_1=x_0-\frac{f(x_0)}{f^\prime(x_0)}

Then we compute

x_2=x_1-\frac{f(x_1)}{f^\prime(x_1)}

and so on, computing a sequence which we hope will converge on the true root \left.x=r\right..

For example:

  • Let f(x)=\sqrt{x}-x; then f^\prime(x)=\frac{1}{2}x^{-1/2}-1
  • Guess: \left.x_0=4\right. (pretty bad guess!)
  • Improved guess: x_1=4-\frac{2-4}{\frac{1}{4}-1}=4-8/3=4/3
  • Now do it again! After another go, x_2 \approx 1.0182772543872314
  • Once more: x_3 \approx 1.0000812810399125
  • Once more: x_4 \approx 1.0000000016514505
  • Once more: x_5 \approx 1.0.

We check, and find that \left.f(1)=0\right. -- egads, we've found one! We've found a root: \left.r=1\right.

Starting guess: x0 = 4
Starting guess: x0 = 4
Improved: x1 = 4 / 3
Improved: x1 = 4 / 3
Even Better: x2 = 1.00008
Even Better: x2 = 1.00008
Wish I'd started here: x3 = 1.00000000165. I would have saved myself three steps!
Wish I'd started here: x3 = 1.00000000165. I would have saved myself three steps!

(Produced by this script)

It's like a miracle... but it's just mathematics!

Personal tools