Skip to main content
K12 LibreTexts

8.2: Newton's Method

  • Page ID
    1202
  • We want to look at finding the roots of a polynomial. Sometimes the polynomial cannot be easily factored, and other algebraic methods (e.g., the quadratic equation) are not applicable, or do not work. When faced with a mathematical problem that cannot be solved with simple algebraic means, calculus sometimes provides a way of finding approximate solutions.


    Newton's Method

    A simple example will help introduce Newton’s Method for approximating the roots of a polynomial equation.

    Let's say you want to compute \( \sqrt{5} \nonumber\) without using a calculator or a table. Any ideas how this could be done? Try thinking about this problem in a different way, so that you make use of linearization.

    Assume that we are interested in solving the quadratic equation:

    \[ f(x)=x^2−5=0 \nonumber\]

    We know this equation has the roots \( x=± \sqrt{5} \nonumber\).

    The idea here is to find the linearization of f(x) at an appropriate point, and then solve the linear equation for x. This is an added twist to the linearization problem!

    How to choose the linearization point? Since \( \sqrt{4}<\sqrt{5}<\sqrt{9} \nonumber\), this mean \( 2<\sqrt{5}<3 \nonumber\).

    We choose the linear approximation of f(x) to be near \( x_0=2 \nonumber\) (but, \( x_0=3 \nonumber\) could also could be selected).

    \[ f(x)=x^2−5 \mbox{ and } f(2)=−1 \nonumber\]

    \[ f′(x)=2x \mbox{ and } f′(2)=4 \nonumber\]

    Using the linear approximation formula,

    \[ f(x)≈f(x_0)+f′(x_0)(x−x_0) \nonumber\]

    \[ ≈−1+(4)(x−2) \nonumber\]

    \[ ≈−1+4x−8 \nonumber\]

    \[ ≈4x−9 \nonumber\]

    Notice that this equation is much easier to solve than \( f(x)=x^2−5=0 \nonumber\).

    Setting f(x)=0 and solving for x, we obtain,

    \[ 4x−9=0 \nonumber\]

    \[ x=\frac{9}{4} \nonumber\]

    \[ =2.25 \nonumber\]

    This is a fairly good approximation, since a calculator would give x=2.23607, lower by 0.014. We can actually make this approximation to the root of f(x) even better by repeating what we have just done but using the latest estimate \( x_1=2.25= \frac{9}{4} \nonumber\), a number that is even closer to the actual value of \( \sqrt{5} \nonumber\).

    \[ f(x)=x^2−5 \mbox{ and } f(2.25)=\frac{1}{16} \nonumber\]

    \[ f′(x)=2x \mbox{ and } f′(2)= \frac{9}{2} \nonumber\]

    Using the linear approximation again,

    \[ f(x)≈f(x_1)+f′(x_1)(x−x_1) \nonumber\]

    \[ ≈ \frac{1}{16}+\frac{9}{2}(x−\frac{9}{4}) \nonumber\]

    \[ ≈\frac{9}{2}x−\frac{161}{16} \nonumber\].

    Solving for x by setting f(x)=0, we obtain

    \[ x=x_2=\frac{161}{72}=2.23611 \nonumber\]

    which is an even better approximation than \[ x_1=\frac{9}{4} \nonumber\].

    We could continue this process generating a better approximation to \( \sqrt{5} \nonumber\), as shown in the table, where the last estimate approximates the correct answer to 5 places. Thank goodness for calculators!

    n

    \( x_n \nonumber\)

    \( f(x_n) \nonumber\)

    \( f′(x-n) \nonumber\)

    \( \frac{f(x_n)}{f′(x_n)} \nonumber\)

    \( x_n−\frac{f(x_n)}{f′(x_n)} \nonumber\)

    1

    2

    -1

    4

    -0.25

    2.25

    2

    2.25

    0.0625

    4.5

    0.01389

    2.23611

    3

    2.23611

    0.00019

    4.47222

    0.00004

    2.23607

    4

    2.23607

    --

    --

    --

    --

    This is the basic idea of Newton’s Method. Here is a summary of the method:

    1. Given the function f(x), find f′(x).
    2. Estimate the first approximation, x0, to a solution of the equation f(x)=0. Use a graph to help in finding the first approximation if necessary (see Figure below).
    3. Use the current approximation xn to find the next approximation, xn+1, by using the recursion relation.

    \[ x_{n+1}=x_n−\frac{f(x_n)}{f′(x_n)} \nonumber\].

    1. Repeat the previous step until the desired level of convergence occurs.

    Note that in some cases, Newton’s Method does not converge.

    Screen Shot 2021-01-07 at 1.04.48 PM.png

    CC BY-NC-SA


    Examples

    Example 1

    Compare the solutions to f(x)=5x2+7x−52 in the interval [2, 3] from using the Quadratic formula and using Newton’s Method.

    The function is shown in the figure.

    For f(x)=5x2+7x−52=0, use of the quadratic formula gives the exact solution x=2.6 in the interval.

    Screen Shot 2021-01-07 at 1.05.36 PM.png

    CC BY-NC-SA

    Use of Newton’s Method with an initial estimate of x0=3, yields the results shown in the table.

    n

    \( x_n \nonumber\)

    \( f(x_n) \nonumber\)

    \( f′(x-n) \nonumber\)

    \( \frac{f(x_n)}{f′(x_n)} \nonumber\)

    \( x_n−\frac{f(x_n)}{f′(x_n)} \nonumber\)

    1

    3

    14

    37

    0.3784

    2.6216

    2

    2.6216

    0.7151

    33.216

    0.0215

    2.6001

    3

    2.6001

    0.0033

    33.001

    0.0001

    2.6000

    4

    2.6000

    --

    --

    --

    --

    The technique rapidly converges to a solution.

    Example 2

    Use Newton’s method to find the roots of the polynomial \( f(x)=x^3+x−1 \nonumber\).

    The problem is to solve the equation \( f(x)=x^3+x−1=0 \nonumber\).

    The equations we need are:

    \[ f(x)=x^3+x−1 \nonumber\]

    \[ f′(x)=3x^2+1 \nonumber\].

    Using the recursion relation,

    \[ x_{n+1}=x_n−\frac{f(x_n)}{f′(x_n)} \nonumber\]

    \[ =x_n−\frac{x^3_n+x_n−1}{3x^2_n+1} \nonumber\].

    To help us find the first approximation, we make a graph of f(x). As the figure suggests, set \( x_1=0.6 \nonumber\).

    Screen Shot 2021-01-07 at 1.26.08 PM.png

    CC BY-NC-SA

    Then using the recursion relation, we can generate x1:

    \[ x_{n+1}=x_n−\frac{x^3_n+x_n−1}{3x^2_n+1} \nonumber\]

    \[ x_2=0.6−\frac{(0.6)^3+(0.6)−1}{3(0.6)^2+1} \nonumber\]

    \[ =0.6884615 \nonumber\].

    By using the recursion relation several times, we can find x3 and x4 as shown in the table.

    n

    \( x_n \nonumber\)

    \( f(x_n) \nonumber\)

    \( f′(x-n) \nonumber\)

    \( \frac{f(x_n)}{f′(x_n)} \nonumber\)

    \( x_n−\frac{f(x_n)}{f′(x_n)} \nonumber\)

    1

    0.6

    -0.184

    2.08

    -0.0884615

    0.6884615

    2

    0.6884615

    0.01477796

    2.4219377

    0.0061017

    0.6823598

    3

    0.6823598

    0.00007669

    2.3968445

    0.0000320

    0.6823278

    4

    0.6823278

    --

    --

    --

    --

    We conclude that the solution to the equation \[ x^3+x−1=0 \nonumber\] is about 0.6823.

    Example 3

    Use Newton’s Method to show to find the root of \( f(x)=cos(2x)−x \nonumber\).

    The equations we need are:

    \( f(x)=cos(2x)−x \nonumber\)

    \( f(x)=−2sin(2x)−1 \nonumber\)

    Using the recursion relation,

    x_{n+1}=x_n\frac{f(x_n)}{f′(x_n)} \nonumber\)

    \( =x_n−\frac{cos(2x_n)−x_n}{−2sin(2x_n)−1} \nonumber\)

    To help us find the first approximation, we make a graph of f(x). As the figure suggests, set the first estimate at 0.5.

    Screen Shot 2021-01-08 at 10.49.52 AM.png

    CC BY-NC-SA

    Using the recursion relation several times gives the table values:

    n

    \( x_n \nonumber\)

    \( f(x_n) \nonumber\)

    \( \frac{f(x_n)}{f′(xn)} \nonumber\)

    1

    0.500000

    0.0403023

    -0.015216_8

    2

    0.515022

    -0.0002400

    0.0000884

    3

    0.514933

    -0.0000000

    0.0000000

    4

    0.514933

    --

    --

    We conclude that the solution to the equation cos(2x)−x=0 is 0.514933.


    Review

    For all the problems, use Newton’s Method to find the roots.

    1. \( x^3+3=0 \nonumber\).
    2. \( −x+3\sqrt{−1+x}=0 \nonumber\).
    3. \( 4x^2−x−2 \mbox{ in the interval } [-1, 0] \nonumber\).
    4. \( 4x^3−6x^2−1 \nonumber\).
    5. \( 5e^{−x}+x^3 \nonumber\).
    6. \( cosx−x \nonumber\).
    7. \( x^5−7x^2+2 \mbox{ in the interval} [-1, 0] \nonumber\).
    8. \( x^5−7x^2+2 \mbox{ in the interval } [0, 1] \nonumber\).
    9. \( x^2cosx−x \mbox{ in the interval } [4, 5] \nonumber\).
    10. \( x^2cosx−x \mbox{ in the interval } [7, 8] \nonumber\).
    11. \( f(x)=x−2sin(x) \mbox{ to five decimal places, starting with initial guess } x_0=3 \nonumber\).
    12. \( f(x)=6x^3−4x+1 \nonumber\) to three decimal places, starting with initial guess \( x_0=1.2 \nonumber\).
    13. \( f(x)=ln(x)×(ln(x)+4)+1 \nonumber\) to five decimal places, starting with initial guess \( x_0=1 \nonumber\).
    14. \( f(x)=tan(x)−csc(x) \nonumber\) to six digits of accuracy, starting with initial guess \( x_0=0.7 \nonumber\).
    15. \( f(x)=tan^{−1}(x)+cos(x) \nonumber\) to four digits of accuracy, starting with initial guess \( x_0=−2 \nonumber\).

    Review (Answers)

    To see the Review answers, open this PDF file and look for section 4.11. 


    Vocabulary

    Term Definition
    Newton's method Newton’s method is an iterative procedure for computing the root of an equation.

    Additional Resources

    PLIX: Play, Learn, Interact, eXplore - Newton's Method

    Video: Newton's Method for Solving Equations

    Practice: Newton's Method

    Real World: Getting to the Root of Things

    • Was this article helpful?