<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [
  <!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>13.1 Newton's Method</title>
  <link rel="stylesheet" type="text/css" href="../calculus.css" />
  <link rel="stylesheet" type="text/css" href="../mathml.css" />
<!-- Meta tag goes here -->
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="navbar">
      <p>
      <a href="http://ocw.mit.edu/OcwWeb/Mathematics/18-013ASpring-2005/Readings/index.htm">Home</a>
      |
      <a href="../index.xhtml">18.013A</a>
      |
      <a href="contents.xhtml">Chapter 13</a>
      </p>
    </td>
    <td class="navbar">&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td class="navbar">
      <p class="text-right">
      <a href="../tools/contents.xhtml">Tools</a>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <a href="../glossary_notations/contents.xhtml">Glossary</a>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <a href="../word_index/contents.xhtml">Index</a>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <a href="contents.xhtml">Up</a>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <a href="section00.xhtml">Previous</a>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <a href="section02.xhtml">Next</a>
      </p>
    </td>
  </tr>
  <tr>
    <td colspan="3">
      <hr />
    </td>
  </tr>
</table>
<h2>13.1 Newton's Method</h2>
<p>
This method, as just noted, consists of iterating the process of setting the linear approximation of 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>f</mi>
  </math>
</span>
 to 0 to improve guesses at the solution to 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mi>f</mi>
      <mo>=</mo>
      <mn>0</mn>
    </mrow>
  </math>
</span>
.
</p>
<p>
The linear approximation to 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mi>f</mi>
      <mo stretchy="false">(</mo>
      <mi>x</mi>
      <mo stretchy="false">)</mo>
    </mrow>
  </math>
</span>
 at argument 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
    </mrow>
  </math>
</span>
 which we will call 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mi>f</mi>
      <mi>L</mi>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
      <mo stretchy="false">(</mo>
      <mi>x</mi>
      <mo stretchy="false">)</mo>
    </mrow>
  </math>
</span>
 can be described by the equation
</p>
<div class="math-block-normal">
  <math display="block" xmlns="&mathml;">
    <mrow>
      <mi>f</mi>
      <mi>L</mi>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
      <mo stretchy="false">(</mo>
      <mi>x</mi>
      <mo stretchy="false">)</mo>
      <mo>=</mo>
      <mi>f</mi>
      <mo stretchy="false">(</mo>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
      <mo stretchy="false">)</mo>
      <mo>+</mo>
      <mi>f</mi>
      <mo>&#x0027;</mo>
      <mo stretchy="false">(</mo>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
      <mo stretchy="false">)</mo>
      <mo stretchy="false">(</mo>
      <mi>x</mi>
      <mo>&#x2212;</mo>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
      <mo stretchy="false">)</mo>
    </mrow>
  </math>
</div>
<p>
if we set 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mi>f</mi>
      <mi>L</mi>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
      <mo stretchy="false">(</mo>
      <mi>x</mi>
      <mo stretchy="false">)</mo>
      <mo>=</mo>
      <mn>0</mn>
    </mrow>
  </math>
</span>
, and solve for 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>x</mi>
  </math>
</span>
, we obtain
</p>
<div class="math-block-normal">
  <math display="block" xmlns="&mathml;">
    <mrow>
      <mi>x</mi>
      <mo>&#x2212;</mo>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
      <mo>=</mo>
      <mo>&#x2212;</mo>
      <mfrac>
        <mrow>
          <mi>f</mi>
          <mo stretchy="false">(</mo>
          <msub>
            <mi>x</mi>
            <mn>0</mn>
          </msub>
          <mo stretchy="false">)</mo>
        </mrow>
        <mrow>
          <mi>f</mi>
          <mo>&#x0027;</mo>
          <mo stretchy="false">(</mo>
          <msub>
            <mi>x</mi>
            <mn>0</mn>
          </msub>
          <mo stretchy="false">)</mo>
        </mrow>
      </mfrac>
    </mrow>
  </math>
</div>
<p>
and so we obtain 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mn>1</mn>
      </msub>
      <mo>=</mo>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
      <mo>&#x2212;</mo>
      <mfrac>
        <mrow>
          <mi>f</mi>
          <mo stretchy="false">(</mo>
          <msub>
            <mi>x</mi>
            <mn>0</mn>
          </msub>
          <mo stretchy="false">)</mo>
        </mrow>
        <mrow>
          <mi>f</mi>
          <mo>&#x0027;</mo>
          <mo stretchy="false">(</mo>
          <msub>
            <mi>x</mi>
            <mn>0</mn>
          </msub>
          <mo stretchy="false">)</mo>
        </mrow>
      </mfrac>
    </mrow>
  </math>
</span>
, and in general can define
</p>
<div class="math-block-bold">
  <math display="block" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mrow>
          <mi>j</mi>
          <mo>+</mo>
          <mn>1</mn>
        </mrow>
      </msub>
      <mo>=</mo>
      <msub>
        <mi>x</mi>
        <mi>j</mi>
      </msub>
      <mo>&#x2212;</mo>
      <mfrac>
        <mrow>
          <mi>f</mi>
          <mo stretchy="false">(</mo>
          <msub>
            <mi>x</mi>
            <mi>j</mi>
          </msub>
          <mo stretchy="false">)</mo>
        </mrow>
        <mrow>
          <mi>f</mi>
          <mo>&#x0027;</mo>
          <mo stretchy="false">(</mo>
          <msub>
            <mi>x</mi>
            <mi>j</mi>
          </msub>
          <mo stretchy="false">)</mo>
        </mrow>
      </mfrac>
    </mrow>
  </math>
</div>
<p>
In the applet that follows you can enter a standard function, choose the number (nb points) of iterations that can be shown, adjust 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
    </mrow>
  </math>
</span>
 with the second slider, and look at each iteration with the first slider. You will see the function and the effects of the iterations.
</p>
<p>
You will notice that with this method you may arrive at a nearby 0, or a far away one, depending a bit on luck.
</p>
<p class="text-center">
&nbsp;
</p>
<p class="text-center">
<a id="NewtonsMethod" class="doclink"></a>
<object classid="java:NewtonsMethod.class" width="760" height="450">
  <param name="archive" value="newtonsMethod.jar, mk_lib.jar, parser_math.jar, jcbwt363.jar" />
  <param name="codebase" value="../applets/" />
</object>
</p>
<p class="text-center">
&nbsp;
</p>
<p>
In the old days the tedium of performing the steps of finding the 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mi>j</mi>
      </msub>
    </mrow>
  </math>
</span>
 's was so formidable that it could not be safely inflicted on students.
</p>
<p>
Now, with a spreadsheet, we can set this up and do it with even a messy function 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>f</mi>
  </math>
</span>
, in approximately a minute.
</p>
<p>
<strong>To do so put your initial guess,
<span class="math-inline-normal">
    <math display="inline" xmlns="&mathml;">
      <mrow>
        <msub>
          <mi>x</mi>
          <mn>0</mn>
        </msub>
      </mrow>
    </math>
  </span> in one box say a2, put &quot;= 
  f(a2)&quot; in b2, and &quot;= f '(a2)&quot; in c2. Then put &quot;= a2-b2/c2&quot; 
  in a3 and copy a3, b2 and c2 down as far as you like.</strong>
(Of course you have to spell out what 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>f</mi>
  </math>
</span>
 and 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mi>f</mi>
      <mo>&#x0027;</mo>
    </mrow>
  </math>
</span>
 are in doing this.)
</p>
<p>
That's all there is to it.
</p>
<p>
If column b goes to zero, the entries in column a will have converged to an answer.
</p>
<p>
If you want to change your initial guess you need only enter something else in a2; to solve a different equation you need only change b2 and c2 and copy them down.
</p>
<p>
This raises some interesting questions; namely,
<strong>can we say anything about 
  when this method will work and when it will not?</strong>
</p>
<p>
First you should realize that many functions have more than one argument for which their values are 0. Thus you may not get the solution you want.
</p>
<p>
Also, if the function 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>f</mi>
  </math>
</span>
 has no zero, like 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msup>
        <mi>x</mi>
        <mn>2</mn>
      </msup>
      <mo>+</mo>
      <mn>1</mn>
    </mrow>
  </math>
</span>
, you will never get anywhere.
</p>
<p>
Here is another problem: if your initial guess, 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
    </mrow>
  </math>
</span>
 (or any subsequent 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mi>j</mi>
      </msub>
    </mrow>
  </math>
</span>
 ) is near a critical point of 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>f</mi>
  </math>
</span>
 (at which 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mi>f</mi>
      <mo>&#x0027;</mo>
      <mo>=</mo>
      <mn>0</mn>
    </mrow>
  </math>
</span>
 ) the quantity 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mo>&#x2212;</mo>
      <mfrac>
        <mi>f</mi>
        <mrow>
          <mi>f</mi>
          <mo>&#x0027;</mo>
        </mrow>
      </mfrac>
    </mrow>
  </math>
</span>
 may become huge at that argument, and you may be led to looking at arguments very far from what you are looking for.
</p>
<p>
And if 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>f</mi>
  </math>
</span>
 is implicitly defined you may find that some new guess 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mi>j</mi>
      </msub>
    </mrow>
  </math>
</span>
 in which 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>f</mi>
  </math>
</span>
 is not even defined, and the iteration will dead end.
</p>
<p>
<strong>Can we say anything positive about the use of the method?</strong>
</p>
<p>
Yes!
<strong>If
<span class="math-inline-bold">
    <math display="inline" xmlns="&mathml;">
      <mi>f</mi>
    </math>
  </span> goes from negative to positive at the true solution
<span class="math-inline-bold">
    <math display="inline" xmlns="&mathml;">
      <mi>x</mi>
    </math>
  </span>, and
<span class="math-inline-bold">
    <math display="inline" xmlns="&mathml;">
      <mrow>
        <mi>f</mi>
        <mo>&#x0027;</mo>
      </mrow>
    </math>
  </span> is increasing between
<span class="math-inline-bold">
    <math display="inline" xmlns="&mathml;">
      <mi>x</mi>
    </math>
  </span> and your guess
<span class="math-inline-bold">
    <math display="inline" xmlns="&mathml;">
      <mrow>
        <msub>
          <mi>x</mi>
          <mn>0</mn>
        </msub>
      </mrow>
    </math>
  </span>, which is greater than</strong>
<span class="math-inline-bold">
  <math display="inline" xmlns="&mathml;">
    <mi>x</mi>
  </math>
</span>
, then the method will always converge. Similar statements hold when 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>f</mi>
  </math>
</span>
 goes from positive to negative, and under many other circumstances.
</p>
<p>
<strong>Why is this?</strong>
</p>
<p>
If 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mi>f</mi>
      <mo>&#x0027;</mo>
    </mrow>
  </math>
</span>
 is increasing, then the tangent line to 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>f</mi>
  </math>
</span>
 at 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
    </mrow>
  </math>
</span>
 will go under the 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>f</mi>
  </math>
</span>
 curve at between 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>x</mi>
  </math>
</span>
 and 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
    </mrow>
  </math>
</span>
, so that the linear approximation, whose curve it is, will hit zero between 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>x</mi>
  </math>
</span>
 and 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msub>
        <mi>x</mi>
        <mn>0</mn>
      </msub>
    </mrow>
  </math>
</span>
, and the same thing will be true in each iteration. Thus the 
<span class="math-inline-normal">
  <math display="inline" xmlns="&mathml;">
    <mi>x</mi>
  </math>
</span>
 's will march off toward the true solution without hope of escape and will eventually get there.
</p>
<p>
Another virtue of the method is that as one gets closer to the solution, the differentiable function will tend to look more and more like its linear approximation between the current guess and the true solution. Thus the method tends to converge very rapidly once that current guess is near a solution.
</p>
<p>
<strong>Exercises:</strong>
</p>
<p>
<strong>Set up a spread sheet to apply it to the following functions:</strong>
</p>
<p>
<strong>13.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong>
<span class="math-inline-bold">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mi>exp</mi>
      <mo>&#x2061;</mo>
      <mo stretchy="false">(</mo>
      <mi>x</mi>
      <mo stretchy="false">)</mo>
      <mo>&#x2212;</mo>
      <mn>27</mn>
    </mrow>
  </math>
</span>
</p>
<p>
<strong>13.2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong>
<span class="math-inline-bold">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mi>sin</mi>
      <mo>&#x2061;</mo>
      <mo stretchy="false">(</mo>
      <mi>x</mi>
      <mo stretchy="false">)</mo>
      <mo>&#x2212;</mo>
      <mn>0.1</mn>
    </mrow>
  </math>
</span>
</p>
<p>
<strong>13.3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong>
<span class="math-inline-bold">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msup>
        <mi>x</mi>
        <mn>2</mn>
      </msup>
    </mrow>
  </math>
</span>
</p>
<p>
<strong>13.4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong>
<span class="math-inline-bold">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <mi>tan</mi>
      <mo>&#x2061;</mo>
      <mi>x</mi>
    </mrow>
  </math>
</span>
</p>
<p>
<strong>13.5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong>
<span class="math-inline-bold">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msup>
        <mi>x</mi>
        <mrow>
          <mn>1</mn>
          <mo>/</mo>
          <mn>3</mn>
        </mrow>
      </msup>
    </mrow>
  </math>
</span>
</p>
<p>
<strong>13.6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong>
<span class="math-inline-bold">
  <math display="inline" xmlns="&mathml;">
    <mrow>
      <msup>
        <mi>x</mi>
        <mrow>
          <mn>1</mn>
          <mo>/</mo>
          <mn>3</mn>
        </mrow>
      </msup>
      <mo>&#x2212;</mo>
      <mn>1</mn>
    </mrow>
  </math>
</span>
</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
      <hr />
    </td>
  </tr>
  <tr>
    <td class="navbar">
      <p class="text-right">
      <a href="contents.xhtml">Up</a>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <a href="section00.xhtml">Previous</a>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <a href="section02.xhtml">Next</a>
      </p>
    </td>
  </tr>
</table>
</body>
</html>
