A Root-Finding Workshop
Newton's method turns a root problem into a sequence of tangent-line calculations. The formula is short, but a successful computation requires more than repeatedly substituting numbers: the initial value must be sensible, the derivative must not vanish at an iterate, and the resulting values must be checked against the original equation.
This workshop brings those decisions together for polynomial and transcendental functions. Each run will track both the iterates and the residuals. A small residual is useful evidence, but it is not by itself a guarantee that the computed value is close to a root.
What Each Iteration Does
At \(x_n\), the tangent line to the graph of \(y=f(x)\) has equation \(y=f(x_n)+f'(x_n)(x-x_n)\). Its \(x\)-intercept is found by setting \(y=0\) and solving for \(x\). This gives the Newton update above. Thus, each new iterate is where the current tangent line meets the \(x\)-axis, not necessarily where the graph itself meets that axis.
That distinction explains both the speed and the risk of the method. When the tangent gives a good local representation of the graph, its intercept can be a much better approximation to a root. When the tangent is nearly horizontal or points away from the desired root, the update may be very large or may send the iteration into an unhelpful region.
Worked Example: A Polynomial Root With Exact Iterates
Worked Example: Approximating the Positive Root of \(x^2-2\)
Let \(f(x)=x^2-2\). The values \(f(1)=-1\) and \(f(2)=2\) have opposite signs, so continuity gives a root between \(1\) and \(2\). Since \(f'(x)=2x\), the Newton update for positive \(x\) is $$ x_{n+1}=x_n-\frac{x_n^2-2}{2x_n} =\frac{x_n}{2}+\frac{1}{x_n}. $$ Choose \(x_0=1.5=3/2\), which lies in the interval containing the positive root.
At the starting value, $$ f(x_0)=\left(\frac32\right)^2-2=\frac94-\frac84=\frac14, \qquad f'(x_0)=2\left(\frac32\right)=3. $$ Therefore, $$ x_1=\frac32-\frac{1/4}{3} =\frac32-\frac1{12} =\frac{18}{12}-\frac1{12} =\frac{17}{12} \approx 1.416666667. $$
Check this iterate in the original function: $$ f(x_1)=\left(\frac{17}{12}\right)^2-2 =\frac{289}{144}-\frac{288}{144} =\frac1{144} \approx 0.006944444. $$ The residual has decreased from \(1/4\) to \(1/144\).
For the next update, \(f'(x_1)=2(17/12)=17/6\). Hence $$ x_2=\frac{17}{12}-\frac{1/144}{17/6} =\frac{17}{12}-\frac1{408} =\frac{578}{408}-\frac1{408} =\frac{577}{408} \approx 1.414215686. $$ Substitution checks the result: $$ f(x_2)=\left(\frac{577}{408}\right)^2-2 =\frac{332929}{166464}-\frac{332928}{166464} =\frac1{166464} \approx 0.000006007. $$ The positive root is approximately \(1.414213562\), so these iterates are closing in on it. The displayed residuals are also consistent with that improvement; the exact root is not needed to compute or check either update.
Why This Starting Value Behaves Well
For this particular equation, the good behavior can be explained exactly rather than inferred from a few decimals. Write the positive root as \(r\), so \(r^2=2\). For \(x>r\), the update is \(N(x)=x/2+1/x\), and direct subtraction gives $$ x-N(x)=\frac{x^2-2}{2x}>0, \qquad N(x)-r=\frac{x^2+2-2xr}{2x} =\frac{(x-r)^2}{2x}>0. $$ The first inequality says the next value is smaller than \(x\); the second says it remains above \(r\). Thus, starting above \(r\), the iterates decrease and remain bounded below by \(r\). They have a limit \(L\ge r\). Since the update is continuous for positive \(x\), taking limits in \(x_{n+1}=N(x_n)\) gives \(L=N(L)\), which implies \(L^2=2\). The only positive possibility is \(L=r\). This proves convergence for this chosen range of starting values. It is a special argument for this equation, not a guarantee that every Newton run behaves this way.
Worked Example: A Transcendental Equation
Worked Example: Solving \(e^x=2\)
Set \(f(x)=e^x-2\). A root solves the original equation, and \(f'(x)=e^x\), which is positive for every real \(x\). Choose \(x_0=0\), for which \(f(0)=1-2=-1\) and \(f'(0)=1\). The first update is $$ x_1=0-\frac{-1}{1}=1. $$ Checking by substitution gives $$ f(x_1)=e^1-2=e-2\approx 2.718281828-2=0.718281828. $$
At \(x_1=1\), the derivative is \(e\), so $$ x_2=1-\frac{e-2}{e} =1-1+\frac2e =\frac2e \approx 0.735758882. $$ Substituting this value into the original function gives $$ f(x_2)=e^{2/e}-2\approx 2.087066-2=0.087066. $$ The residual is smaller than at \(x_1\), and the step from \(x_1\) to \(x_2\) is approximately \(0.264241118\). This computation illustrates the practical workflow: evaluate the function and derivative at the current value, calculate the update, then check the new residual in the original equation. The root is \(\ln 2\), approximately \(0.693147\), so the iterates shown are approaching it.
Choosing and Checking an Initial Value
There is no single starting-value rule that guarantees success for every function. A useful first step is to identify the root of interest and inspect the function near it. A sign change across an interval \([a,b]\), meaning \(f(a)f(b)<0\), guarantees at least one root in that interval when \(f\) is continuous there. It does not guarantee that Newton's method will stay inside the interval, or that the interval contains only one root.
Before iterating, check that the starting value is in the domain of \(f\), that \(f'(x_0)\ne 0\), and that the update is not obviously sending the computation far from the root region. Then continue to check the derivative at every iterate: a derivative that vanishes at a later value also makes the next Newton update undefined. If there are multiple roots, be explicit about which one is being targeted; a starting value near one root can still converge to another or fail to converge.
Residuals, Steps, and What They Can Tell You
A residual measures how closely the current value satisfies the equation \(f(x)=0\). A step measures how much the latest update changed the iterate. Both are worth monitoring. A small step can occur because the derivative is very large even when the residual is not yet small. A small residual can also be misleading when the function is scaled so that its values are tiny.
For example, take \(f(x)=10^{-6}(x-1)\). At \(x=0\), $$ f(0)=10^{-6}(0-1)=-10^{-6}, \qquad |f(0)|=10^{-6}, \qquad |0-1|=1. $$ The absolute residual is small, but the distance to the root \(1\) is \(1\). This is not a Newton failure—Newton's update reaches the root in one step here—but it is a warning against interpreting residual size as distance to a root without further information.
There is a useful conditional connection between those quantities. Suppose \(x\) and a root \(r\) lie in an interval on which \(f\) is differentiable and \(|f'(t)|\ge m>0\) for every \(t\) between them. The Mean Value Theorem gives some \(c\) between \(x\) and \(r\) such that \(f(x)-f(r)=f'(c)(x-r)\). Since \(f(r)=0\), $$ |f(x)|=|f'(c)|\,|x-r|\ge m|x-r|. $$ Therefore, $$ |x-r|\le \frac{|f(x)|}{m}. $$ The bound requires a root in the relevant interval and a derivative bounded away from zero throughout it. Without those conditions, a small residual alone does not establish a small root error.
Worked Example: An Exact Cycle
Worked Example: Newton's Method Can Return to Its Starting Value
Consider \(f(x)=x^3-2x+2\), so \(f'(x)=3x^2-2\). Start at \(x_0=0\). Then $$ f(0)=2,\qquad f'(0)=-2, \qquad x_1=0-\frac{2}{-2}=1. $$ Check the new value: $$ f(1)=1-2+2=1,\qquad f'(1)=3-2=1, \qquad x_2=1-\frac11=0. $$ Thus \(x_2=x_0\): the iteration repeats the two values \(0,1,0,1,\ldots\). The residuals alternate between \(2\) and \(1\), so they do not approach zero. This is a genuine failure to converge to a root, even though each individual update is defined.
The polynomial does have a real root: \(f(-2)=-8+4+2=-2\), while \(f(-1)=-1+2+2=3\), so continuity gives a root between \(-2\) and \(-1\). The cycle starting at \(0\) does not find it. The example shows why a root's existence and a valid derivative at each step do not, by themselves, guarantee that a chosen Newton run will succeed.
Common Stopping and Failure Checks
Stopping rules should be stated in terms of the precision needed for the problem. A typical numerical check requires both a sufficiently small step and a sufficiently small absolute residual. If either is still large, continue only if the iteration remains defined and behaves plausibly. A stopping rule is a practical decision, not a proof of convergence; interpretation still depends on the function and the root being sought.
Write it as \(f(x)=0\), and specify the root of interest if more than one is possible.
Use a root interval, function values, and the domain to select \(x_0\); check that the derivative is nonzero there.
Evaluate \(f(x_n)\) and \(f'(x_n)\), apply the formula, then substitute \(x_{n+1}\) into \(f\) to find its residual.
Record the step size and absolute residual. Watch for a zero derivative, very large jumps, repeated values, or residuals that fail to decrease.
State the approximation and the checks supporting it. Do not claim convergence merely because a few iterates look close.
A Frequent Misreading
A common mistake is to compute an iterate accurately but report it without checking the original equation. Another is to confuse the signed residual \(f(x_n)\) with its absolute size \(|f(x_n)|\). The sign records whether the function value lies above or below zero; the magnitude records its size. In the scaled example, \(f(0)=-10^{-6}\), while the absolute residual is \(10^{-6}\). Keeping these quantities distinct prevents sign errors and makes a run easier to interpret.
Newton's method is powerful because tangent updates can rapidly improve an approximation when the local geometry is favorable. A complete root-finding calculation therefore includes more than the update formula: it identifies the equation and intended root, justifies a starting value, checks every derivative and residual, and recognizes when the sequence offers evidence of failure rather than progress.
Check Your Understanding
Answer these questions by referring to the calculations and conditions in the workshop.
- For \(f(x)=x^2-2\), what are \(f(x_1)\) and \(x_2\) when \(x_0=3/2\)?
- Why does a sign change on an interval establish a root when the function is continuous, but not guarantee that Newton's method stays in the interval?
- For the equation \(e^x=2\), calculate the first Newton iterate from \(x_0=0\) and its residual.
- In the two-cycle example, what values repeat, and what do the residuals show?
- What additional condition on \(f'\) allows a residual bound to control distance to a root?