Holt.Blue
Back To Class Notes Menu
Newton's Method

Newton's Method is all about estimating roots (zeros) of general functions.

That is, Newton's Method helps us to solve equations of the form $f(x)=0.$



































Example

Solving cubic equations is much harder that quadratic equations.

Suppose we needed to solve the equation $f(x)=x^3-3x^2+3=0.$

Although there is a cubic formula, it's very complicated. What shall we do?





























Newton's Method: The Big Idea

$f(x)=x^3-3x^2+3$Initial Guess: $x_0=$
$y$

$x$














































Newton's Method
We see that the tangent line at $x_0$ is given by $y-f(x_0)=f'(x_0)(x-x_0).$

Since the point $(x_1,0)$ is on this line we have that $0-f(x_0)=f'(x_0)(x_1-x_0).$





























Newton's Method
Solving for $x_1$ we have $\displaystyle x_1=x_0-\frac{f(x_0)}{f'(x_0)}.$































Newton's Method
In similar fashion, $\displaystyle x_2=x_1-\frac{f(x_1)}{f'(x_1)}.$































Newton's Method

In general, we have $$\displaystyle x_n=x_{n-1}-\frac{f(x_{n-1})}{f'(x_{n-1})}.$$































Example

Let's return to our old friend $f(x)=x^3-3x^2+3.$ To employ Newton's Method, we note that $f'(x)=3x^2-6x.$ Then our formula becomes $\displaystyle x_n=x_{n-1}-\frac{x_{n-1}^3-3x_{n-1}^2+3}{3x_{n-1}^2-6x_{n-1}}.$ Like we did above, we take an initial guess of $x_0=5.$



$n$$\displaystyle x_n=x_{n-1}-\frac{x_{n-1}^3-3x_{n-1}^2+3}{3x_{n-1}^2-6x_{n-1}}$






























Finding Roots

Have you ever wondered how a calculator finds square roots?

Newton's Method is one way to do so. Suppose we wanted to find the square root of $3.$

We note that $\sqrt{3}$ is a root to the equation $x^2-3=0.$

We may now apply Newton's Method to this equation by taking $f(x)=x^2-3.$





























Example

We now find the root of the function $f(x)=x^2-3.$ To employ Newton's Method, we note that $f'(x)=2x.$ Then our formula becomes $\displaystyle x_n=x_{n-1}-\frac{x_{n-1}^2-3}{2x_{n-1}}.$ Let's take an initial guess of $x_0=1.5.$



$n$$\displaystyle x_n=x_{n-1}-\frac{x_{n-1}^2-3}{2x_{n-1}}$






























Finding Maxima and Minima

Since maxima and minima can occur where $f'(x)=0,$ we can apply Newton's Method to the equation $f'(x)=0$ to get $$\displaystyle x_n=x_{n-1}-\frac{f'(x_{n-1})}{f''(x_{n-1})}.$$

































Example

Use Newton's method to find the closest non-zero local minimum to $x=0$ of $\displaystyle f(x)=x^2 \sin x$ to three decimal places. Use the graph below to help make your guess for $x_0.$



































Example

We now find the root of the function $f(x)=x^2\sin x.$ To employ Newton's Method, we note that $f'(x)=2x\sin x+x^2\cos x$ and $f''(x)=2\sin x+2x\cos x+2x\cos x-x^2\sin x=2\sin x+4x\cos x-x^2\sin x.$ Then our formula becomes $\displaystyle x_n=x_{n-1}-\frac{2x_{n-1}\sin x_{n-1}+x_{n-1}^2\cos x_{n-1}}{2\sin x_{n-1}+4x_{n-1}\cos x_{n-1}-x_{n-1}^2\sin x_{n-1}}.$ Based upon the graph, let's take an initial guess of $x_0=-2.$



$n$$\displaystyle x_n=x_{n-1}-\frac{f'(x_{n-1})}{f''(x_{n-1})}$






























When Newton's Method Fails: Fail #1. At one of the approximations $x_n,$ the derivative $f'$ is zero at $x_n,$ but $f(x_n)\neq 0.$ As a result, the tangent line off at $x_n$ does not intersect the $x$-axis. Therefore, we cannot continue the iterative process. As an example, set $x_0=0$ as our initial guess.
$f(x)=x^3-3x^2+3$Initial Guess: $x_0=$
$y$

$x$








































When Newton's Method Fails: Fail #2. The approximations $x_0,$ $x_1,$ $x_2,\ldots$ may approach a different root. If the function $f$ has more than one root, it is possible that our approximations do not approach the root which we want, but approach a different root. This event most often occurs when we do not choose the approximation $x_0$ close enough to the desired root. As an example, set $x_0=0.1$ as our initial guess.
$f(x)=x^3-3x^2+3$Initial Guess: $x_0=$
$y$

$x$








































When Newton's Method Fails: Fail #3. The approximations may fail to approach a root entirely. As an example, compare the behavior of the sequence with $x_0=1.16$ and $x_0=1.17$ as our initial guesses.

$f(x)=x^3-2x+2$Initial Guess: $x_0=$
$y$

$x$








































Bonus Example! Remember the cubic equation $2x^3+3x^2+15x-11=0$ from Section $4.6?$

We can now solve this cubic!

To avoid confusion when referencing the last example of Section $4.6,$ we will say that $g(x)=2x^3+3x^2+15x-11$ so that $g'(x)=6x^2+6x+15.$

Then our recursion formula becomes $\displaystyle x_n=x_{n-1}-\frac{2x_{n-1}^3+3x_{n-1}^2+15x_{n-1}-11}{6x_{n-1}^2+6x_{n-1}+15}.$

Initial guess: $x_0=$



$n$$\displaystyle x_n=x_{n-1}-\frac{g(x_{n-1})}{g'(x_{n-1})}$