Skip to main content
Mathematics LibreTexts

Newtons Method

  • Page ID
    219414
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Newton's Method

    Newton's Method


    Consider finding the root of

            y = ex - 4x

    Try as you may, there is no algebraic technique that finds this root.  We will approximate the solution as follows:

    The graph shows that a solution lies between 0 and 2.

    Graph of e^x - 4x.  It crosses the x-axis a little before 0.4

    Our initial guess is 

            x = 1  

    Now draw a tangent line through (1,f(1)).  Next see where the tangent line crosses the x-axis.  The tangent line is a close approximation to the curve for nearby values, hence the x-intercept of the tangent line is close to the x-intercept of the curve.  The tangent line has equation

            y - f(1) = f '(1)(x - 1)

    The x intercept occurs when y = 0, hence

            -f(1) = f '(1)(x - 1)

    solving for x,

                             f(1)
           
    x = 1 -                     
                            f '(1)


    This x will not be the true root, but will be a better guess than x = 1.  We will use this (call it x2)  as our second guess. Next play the same game:

                              f(x2)
           
    x3 = x2 -                     
                             f '(x2)

    The graph below shows this construction.  The blue line is the first tangent line and the purple line is the second tangent line.

            Graph of e^x - 4x and the tangent lines at the first two guesses.


    Continue this process to get

     

                     f(xn)
    xn+1 = xn -                     
                    f '(xn)


    For our example this expression is

             \( x_{n+1} = x_n - \frac{e^{x_n}-4x_n}{e^{x_n} - 4} \) 

    Use a calculator or computer to find the values.

            x1 = 1,     x2 = 0,     x3 =.3333,     x4 = .3572,     x5 =.3574,     x6 = .3574

    We see that .3574 is the root accurate to 4 decimal places.  

    Exercise

    Estimate 

            \( \sqrt{5} \)

     using Newton's method.  
    Hint:  Find the root of x2 - 5.
     


    When Newton's Method Fails

    1. If our first guess  (or any guesses thereafter) is a point at which there is a horizontal tangent line, then this line will never hit the x-axis, and Newton's Method will fail to locate a root.  If there is a horizontal tangent line then the derivative is zero, and we cannot divide by f '(x) as the formula requires.

    2. If our guesses oscillate back and forth then Newton's method will not work.

    3.  If there are two roots, we must have a first guess near the root that we are interested in, otherwise Newton's method will find the wrong root.

    4. If there are no roots, then Newton's method will fail to find it.  (This can be frustrating when you are using your calculator to find a root.  

    Example

    Explain why Newton's method fails to find the root of 

            f(x)  =  x1/3 

    with an initial guess of x  =  1.

    Solution

    We have

            f '(x)  =  1/3 x -2/3 

    so that 

                                     xn1/3
            xn+1 = xn -                          =  xn - 3xn  =  -2xn  
                                 1/3 x -2/3 

    This gives us

            x1  =  1,        x2  =  -2(1)  =  -2

            x3  =  -2(-2)  =  4,        x4  =  -2(4)  =  -8

    These numbers are growing (in absolute value) instead of converging.  In fact, we have

            xn  =  (-1)n 2n-1 

    Hence Newton's method fails.  However, it is clear that there is a root at x = 0.  Notice that at x = 0, the derivative is undefined.

     


    Back to Applications Page

     

     

    Newtons Method is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?