Tutorials › Calculus I › Comparing Newton Runs From Different Starting Values

Optimization and Newton's Method · Tutorial 895 of 1495

Comparing Newton Runs From Different Starting Values

Learn how to compare Newton runs fairly by tracking iterates and residuals, checking for breakdowns, and interpreting what the starting value changes.

Advanced 12 min read

What You'll Learn

  • Compute and compare Newton sequences from different initial values.
  • Track residuals alongside iterates and step sizes.
  • Explain why a smaller residual does not always mean a proportionally smaller root error.
  • Recognize when Newton’s update is undefined or a stopping decision is needed.
  • Compare runs using a common tolerance and a consistent stopping rule.

Why the Starting Value Matters

Newton’s method uses the tangent line at the current iterate to choose the next one. For a differentiable function \(f\), the update is

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

provided \(f'(x_n)\ne 0\). The formula depends on the current value, so changing the initial guess can change every later iterate. A run may approach one root, approach another, take more steps to meet a tolerance, or fail because the derivative vanishes.

Comparing runs therefore requires more than looking at their final answers. Record the iterates, check the residual \( |f(x_n)| \), and use the same stopping rule for each run. A small residual means that \(x_n\) nearly solves the equation in function value; it does not, by itself, guarantee that \(x_n\) is equally close to a root in the input variable.

Definition: For an iteration generated by Newton’s method, the residual at step \(n\) is \(r_n=|f(x_n)|\). The step size is \(s_n=|x_n-x_{n-1}|\) for \(n\ge 1\). A run is undefined at a step if \(f'(x_n)=0\), since that update would require division by zero.

A Comparison Framework

For each initial value, calculate enough of the sequence to see its behavior, and keep track of the same quantities. In particular, note which root the run approaches if convergence is apparent, how many iterations it takes to meet the chosen criterion, and whether the residual or step size behaves unexpectedly along the way.

Stopping rules based on steps and residuals answer different questions. A residual rule stops when \( |f(x_n)|\le\varepsilon_f \). A step rule stops when \( |x_n-x_{n-1}|\le\varepsilon_x \). These tests should not be treated as interchangeable: a small step can occur without a small residual, and a small residual can occur while the input is not yet as accurate as desired. The tolerances should be stated, and competing runs should be judged using the same rule.

1
Choose the same equation.
Runs are comparable only if they use the same function and the same Newton update.
2
Record the starting values.
Keep each initial guess visible so the source of each sequence is clear.
3
Compute iterates and diagnostics.
At each step, record \(x_n\), \( |f(x_n)| \), and, after the first update, \( |x_n-x_{n-1}| \).
4
Apply one stopping rule consistently.
Report the tolerance and the first step at which it is satisfied. Also report any undefined update or other failure.

Worked Example: Two Starting Values, Two Roots

Consider \(f(x)=x^3-2x\). Its roots are \(-\sqrt{2}\), \(0\), and \(\sqrt{2}\), since \(x^3-2x=x(x^2-2)\). The derivative is \(f'(x)=3x^2-2\), so Newton’s update, when \(3x^2-2\ne 0\), is

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

Start one run at \(x_0=\frac12\). The first update is

$$ x_1 =\frac{2(1/2)^3}{3(1/2)^2-2} =\frac{1/4}{3/4-2} =\frac{1/4}{-5/4} =-\frac15. $$

The next update is

$$ x_2 =\frac{2(-1/5)^3}{3(-1/5)^2-2} =\frac{-2/125}{3/25-2} =\frac{-2/125}{-47/25} =\frac{2}{235} \approx 0.00851064. $$

Its residual is

$$ r_2 =\left|\left(\frac{2}{235}\right)^3-2\left(\frac{2}{235}\right)\right| =\left|\frac{8-220900}{12977875}\right| =\frac{220892}{12977875} \approx 0.01702. $$

Here \(235^3=12977875\), and \(4/235=220900/12977875\). Thus the residual is about \(0.01702\), not a value obtained by subtracting an incorrectly converted fraction. The iterate is close to the root \(0\), but the residual is not yet especially small.

Continue once more:

$$ x_3 =\frac{2(2/235)^3}{3(2/235)^2-2} =\frac{16/12977875}{12/55225-2} =-\frac{8}{12976465} \approx -0.0000006165. $$

Substituting this value into \(f\) gives a residual of approximately \(0.000001233\). The run has moved very close to \(0\), and its residual has dropped substantially between steps 2 and 3.

Now start a second run at \(x_0=\frac32\). Its first iterate is

$$ x_1 =\frac{2(3/2)^3}{3(3/2)^2-2} =\frac{27/4}{19/4} =\frac{27}{19} \approx 1.42105263. $$

The residual at this iterate is exactly

$$ |f(27/19)| =\left|\frac{27}{19}\left(\frac{729}{361}-2\right)\right| =\frac{189}{6859} \approx 0.02756. $$

The next iterate is

$$ x_2 =\frac{2(27/19)^3}{3(27/19)^2-2} =\frac{39366/6859}{1465/361} =\frac{39366}{27835} \approx 1.41426263. $$

Since \(f(x)=x(x^2-2)\), this iterate has residual

$$ |f(x_2)| =\frac{39366(39366^2-2\cdot27835^2)}{27835^3} =\frac{4232081196}{27835^3} \approx 0.00019624. $$

This run is approaching \(\sqrt{2}\), while the run from \(\frac12\) is approaching \(0\). After two updates, the second run has a smaller residual, but the runs are targeting different roots. The comparison illustrates why the initial value can affect not only speed but also which solution is found.

Why Residuals Are Useful, but Not the Whole Story

The residual measures the value of the equation at an iterate. To relate it to distance from a root, suppose \(f(\alpha)=0\), and \(f\) is continuous on the interval between \(x\) and \(\alpha\) and differentiable inside it. The Mean Value Theorem gives a point \(\xi\) between \(x\) and \(\alpha\) such that

$$ f(x)-f(\alpha)=f'(\xi)(x-\alpha). $$

Because \(f(\alpha)=0\), this becomes

$$ |f(x)|=|f'(\xi)|\,|x-\alpha|. $$

Consequently, if throughout that interval the derivative satisfies \(m\le |f'(t)|\le M\) for constants \(0<m\le M\), then

$$ m|x-\alpha|\le |f(x)|\le M|x-\alpha|. $$

This proves that, in an interval where the derivative is bounded away from zero and also bounded above, residual and root error control one another up to those factors. Without such information, a small residual alone need not give a reliable estimate of distance to the root. Near a point where the derivative is small, the function can change slowly, so an iterate may have a modest residual while still being noticeably displaced.

Worked Example: Comparing Runs with a Common Tolerance

Use the two runs above and adopt the residual stopping rule \( |f(x_n)|\le 0.001 \). For the run from \(x_0=\frac12\), the residuals already computed include \(r_2\approx 0.01702\) and \(r_3\approx 0.000001233\). Since \(0.01702>0.001\) and \(0.000001233<0.001\), this run first meets the rule at step 3.

For the run from \(x_0=\frac32\), step 1 has residual about \(0.02756\), which exceeds the tolerance. Step 2 has residual about \(0.00019624\), which is below it. This run first meets the same rule at step 2. By this particular residual criterion, the run from \(\frac32\) takes fewer updates. That comparison does not mean it has found the same root as the other run: it is approaching \(\sqrt{2}\), not \(0\).

A useful comparison table keeps the iteration count, residual, and target root together:

Initial valueBehavior shown by the iteratesFirst step with residual at most \(0.001\)
\(\frac12\)Approaches \(0\); \(r_2\approx 0.01702\), \(r_3\approx 0.000001233\)3
\(\frac32\)Approaches \(\sqrt{2}\); \(r_1\approx 0.02756\), \(r_2\approx 0.00019624\)2

The comparison is meaningful because both runs use the same function, residual definition, and tolerance. If the intended application requires a particular root, the target must also be part of the assessment. A fast run to an unwanted root is not a successful solution to that task.

Worked Example: A Starting Value That Causes Failure

For \(f(x)=x^3-2x\), the derivative vanishes when \(3x^2-2=0\), or \(x=\pm\sqrt{2/3}\). Start at \(x_0=\sqrt{2/3}\). Then

$$ f'(x_0)=3\left(\frac23\right)-2=0. $$

But \(f(x_0)\ne 0\): using \(x_0^2=2/3\),

$$ f(x_0)=x_0\left(\frac23-2\right)=-\frac43x_0\ne 0. $$

Thus the Newton update would divide a nonzero number by zero, and the run cannot take its first step. This is a genuine breakdown, not convergence or a large residual. A practical comparison should report it as such rather than omit the starting value or replace it silently with a nearby one.

Interpreting a Set of Runs

Several features matter when comparing starting values:

  • Root reached: Different initial values may lead to different roots, even for the same equation.
  • Iterations to tolerance: Count updates using one stated stopping rule and one stated tolerance.
  • Residual history: Residuals need not decrease at every step, so inspect the sequence rather than only its last entry.
  • Step history: Small changes between iterates are useful information, but do not alone certify a small residual.
  • Breakdown: If \(f'(x_n)=0\) while \(f(x_n)\ne0\), the Newton update is undefined.

Near a simple root, under the local conditions for Newton convergence, the method can converge quadratically. In practical terms, once the iterates are sufficiently close and the assumptions for that local result hold, errors may shrink rapidly. This local behavior does not guarantee that an arbitrary starting value will enter the relevant neighborhood. The observed iteration counts from different initial values therefore reflect both how quickly Newton’s method works near a root and how the starting values behave before getting there.

A Common Mistake: Comparing Only the Final Residual

A tempting conclusion is that the run with the smallest final residual is always the best run. That conclusion ignores the number of iterations, which root was reached, whether the run encountered an undefined update, and whether both runs were stopped using the same rule. For instance, in the example, a residual below \(0.001\) is reached in two steps from \(\frac32\) and three steps from \(\frac12\), but those runs approach different roots. If the goal is specifically to find \(0\), the faster run to \(\sqrt{2}\) is not the desired result.

A related computational mistake is to compare rounded intermediate values as though they were exact. When a later update depends strongly on earlier values, rounding too early can distort the result. Keep exact fractions when practical, or carry sufficient precision through the iterations; round only when reporting the final approximate values and state the precision used.

Takeaway: A fair Newton-run comparison states the initial values, target or root reached, iteration rule, stopping tolerance, residuals, and any breakdown. No single diagnostic gives the whole picture.

Check Your Understanding

Use the definitions and comparison principles in this tutorial to answer the following questions.

  1. For Newton’s method, what condition must hold at \(x_n\) for the next update to be defined?
  2. For \(f(x)=x^3-2x\), why does the starting value \(x_0=\sqrt{2/3}\) cause a breakdown rather than produce a root?
  3. Using the residual tolerance \(0.001\), how many updates are needed for each of the two runs starting at \(\frac12\) and \(\frac32\)?
  4. Why does a small residual not always guarantee that an iterate is equally close to a root?
  5. Give two reasons, besides final residual size, that should be considered when comparing Newton runs.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon