Differential Calculus
Newton's Method
Newton's method is the standard fast algorithm for solving an equation when you cannot solve it exactly. It is the biggest payoff of the tangent line / linear approximation: replace the curve by its tangent, solve the linear equation instead, and repeat. It sits at the end of the derivative-applications block, alongside the IVT (which finds a bracket) and linear approximation (which supplies the step).
1. Derivation from the tangent line
Let be differentiable near a current guess , and suppose . The tangent line to at is
The curve is hard to zero; the line is not. Set and solve:
f(x_n)+f'(x_n)(x-x_n) &= 0 \\ x-x_n &= -\frac{f(x_n)}{f'(x_n)} \\ x &= x_n-\frac{f(x_n)}{f'(x_n)}. \end{aligned}$$ Call that number $x_{n+1}$. **Newton's iteration:** $$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)},\qquad n=0,1,2,\dots$$ Same thing via linear approximation: we want a step $h$ with $f(x_n+h)=0$; since $f(x_n+h)\approx f(x_n)+f'(x_n)h$, take $h=-f(x_n)/f'(x_n)$. **Hypotheses that must actually hold:** $f$ differentiable on an interval containing every iterate, and $f'(x_n)\ne 0$ at *every* step. If $f'(x_n)=0$ the tangent is horizontal, so it has no unique $x$-intercept and $x_{n+1}$ does not exist: when $f(x_n)\ne0$ the tangent is a horizontal line that never meets the $x$-axis, and in the edge case $f(x_n)=0$ the tangent *is* the $x$-axis (you are already standing on a root, so stop). Newton is the fixed-point iteration $x_{n+1}=N(x_n)$ with $N(x)=x-\dfrac{f(x)}{f'(x)}$. Note $$N'(x)=1-\frac{f'(x)^2-f(x)f''(x)}{f'(x)^2}=\frac{f(x)f''(x)}{f'(x)^2},$$ so at a root $r$ with $f'(r)\ne 0$ we get $N(r)=r$ and $N'(r)=0$. A fixed point with zero derivative is *super*attracting — that is exactly why Newton is fast. ### 2. Choosing $x_0$, and bracketing with IVT / bisection **Intermediate Value Theorem.** If $f$ is continuous on $[a,b]$ and $f(a)$ and $f(b)$ have opposite signs, then $f(c)=0$ for some $c\in(a,b)$. (Continuity is essential; differentiability is not needed.) If in addition $f'>0$ on $(a,b)$ (or $f'<0$ throughout), the root is unique. **Bisection.** Given a sign-change bracket $[a,b]$, test the midpoint $m=\frac{a+b}{2}$ and keep the half that still changes sign. After $n$ steps the bracket has length $\dfrac{b-a}{2^{n}}$, so the midpoint is within $\dfrac{b-a}{2^{\,n+1}}$ of a root. Bisection **always** works but gains only $\log_{10}2\approx 0.30$ decimal digits per step (about $3.3$ steps per digit). **Recommended workflow:** sketch or use IVT to bracket a root $\Rightarrow$ bisect two or three times $\Rightarrow$ start Newton from the midpoint $\Rightarrow$ stop when $|x_{n+1}-x_n|$ is below tolerance **and** $|f(x_{n+1})|$ is small. A useful sufficient condition (Fourier): if on $[a,b]$ we have $f(a)f(b)<0$ and $f'$, $f''$ are each of constant sign, then starting from the endpoint where $f(x_0)f''(x_0)>0$ makes Newton converge monotonically to the root. ### 3. Standard set-ups | Equation | $f(x)$ | $f'(x)$ | Simplified iteration | | --- | --- | --- | --- | | $x^2=a$, $a>0$ | $x^2-a$ | $2x$ | $x_{n+1}=\dfrac{1}{2}\left(x_n+\dfrac{a}{x_n}\right)$ | | $x^k=a$ | $x^k-a$ | $kx^{k-1}$ | $x_{n+1}=\dfrac{(k-1)x_n+a\,x_n^{1-k}}{k}$ | | $x=\dfrac{1}{a}$ | $\dfrac{1}{x}-a$ | $-\dfrac{1}{x^2}$ | $x_{n+1}=x_n(2-a x_n)$ — no division used | | $\cos x=x$ | $\cos x-x$ | $-\sin x-1$ | $x_{n+1}=x_n+\dfrac{\cos x_n-x_n}{\sin x_n+1}$ | | $e^{x}=c$ | $e^{x}-c$ | $e^{x}$ | $x_{n+1}=x_n-1+c\,e^{-x_n}$ | | critical point of $g$ | $g'(x)$ | $g''(x)$ | $x_{n+1}=x_n-\dfrac{g'(x_n)}{g''(x_n)}$ | ### 4. Worked example 1 — $\sqrt{2}$ from $x_0=1$ Take $f(x)=x^2-2$, $f'(x)=2x$. Then $$x_{n+1}=x_n-\frac{x_n^2-2}{2x_n}=\frac{2x_n^2-x_n^2+2}{2x_n}=\frac{1}{2}\left(x_n+\frac{2}{x_n}\right).$$ $$\begin{aligned} x_1&=\frac12\left(1+2\right)=1.5 \\ x_2&=\frac12\left(1.5+\frac{2}{1.5}\right)=\frac12\left(1.5+1.3333333333\right)=1.4166666667 \\ x_3&=\frac12\left(1.4166666667+1.4117647059\right)=1.4142156863 \\ x_4&=\frac12\left(1.4142156863+1.4142114385\right)=1.4142135624 \end{aligned}$$ Against $\sqrt{2}=1.41421356237310$ the errors are $8.58\times10^{-2}$, $2.45\times10^{-3}$, $2.12\times10^{-6}$, $1.59\times10^{-12}$: the number of correct digits roughly **doubles** each step. ### 5. Worked example 2 — solving $\cos x=x$ Move everything to one side: $f(x)=\cos x-x$, so $f'(x)=-\sin x-1$. *Bracket.* $f$ is continuous, $f(0)=1>0$ and $f(1)=\cos 1-1=-0.4596976941<0$, so by the IVT there is a root in $(0,1)$. On $(0,1)$, $\sin x>0$ gives $f'(x)<-1<0$, so $f$ is strictly decreasing and the root is unique. *Iterate* from $x_0=1$ (radians!): $$x_{n+1}=x_n-\frac{\cos x_n-x_n}{-\sin x_n-1}=x_n+\frac{\cos x_n-x_n}{\sin x_n+1}.$$ $$\begin{aligned} x_1&=1+\frac{0.5403023059-1}{0.8414709848+1}=1-0.2496361322=0.7503638678\\ x_2&=0.7503638678+\frac{-0.0189230738}{1.6819049529}=0.7391128909\\ x_3&=0.7391128909+\frac{-0.0000464559}{1.6736325442}=0.7390851334\\ x_4&=0.7390851332 \end{aligned}$$ The root is $r=0.7390851332$ (to $10$ decimal places); errors $1.1\times10^{-2}$, $2.8\times10^{-5}$, $1.7\times10^{-10}$. ### 6. How fast: quadratic convergence **Theorem.** Suppose $f$ is twice continuously differentiable on an open interval $I$ containing a root $r$, and $f'(r)\ne 0$ (a *simple* root). Then there is $\delta>0$ such that for every $x_0$ with $|x_0-r|<\delta$ all iterates are defined, stay in $(r-\delta,r+\delta)$, and $x_n\to r$; moreover with $e_n=x_n-r$, $$|e_{n+1}|\le C\,e_n^{\,2},\qquad C=\frac{\max_{J}|f''|}{2\min_{J}|f'|},\qquad J=\left[r-\delta,r+\delta\right],$$ (the max and the min are taken on the **closed** interval $J$, where the EVT guarantees they exist, and $\delta$ is shrunk first so that $\min_{J}|f'|>0$), and if $f''(r)\ne0$ then $\dfrac{|e_{n+1}|}{e_n^{2}}\to\dfrac{|f''(r)|}{2|f'(r)|}$. *Why.* Taylor-expand $f$ about $x_n$ and evaluate at $r$: for some $\xi_n$ between $x_n$ and $r$, $$0=f(r)=f(x_n)+f'(x_n)(r-x_n)+\frac{f''(\xi_n)}{2}(r-x_n)^2 .$$ Divide by $f'(x_n)$ and rearrange: $$x_n-\frac{f(x_n)}{f'(x_n)}-r=\frac{f''(\xi_n)}{2f'(x_n)}\left(x_n-r\right)^2 \quad\Rightarrow\quad e_{n+1}=\frac{f''(\xi_n)}{2f'(x_n)}\,e_n^{2}.$$ Practical reading: **the number of correct digits roughly doubles per step** once you are close. Two consequences: (i) three or four good steps usually suffice; (ii) you must carry far more digits than you want in the answer, or rounding, not the method, limits you. **Multiple roots break this.** If $r$ has multiplicity $m\ge 2$, then $f'(r)=0$, the theorem's hypothesis fails, and Newton converges only *linearly* with $e_{n+1}/e_n\to 1-\frac1m$. Fix: if you know $m$, use the **modified Newton** step $x_{n+1}=x_n-m\,\dfrac{f(x_n)}{f'(x_n)}$, which restores quadratic speed (with the *wrong* $m$ you are back to linear). ### 7. When Newton fails | Failure mode | Concrete example | What you see | Repair | | --- | --- | --- | --- | | $f'(x_n)=0$ | $f(x)=x^2-1$, $x_0=0$ | division by zero; step undefined | move $x_0$ | | $f'(x_n)$ tiny | $f(x)=x^2-4$, $x_0=0.001$ | $x_1=2000.0005$: huge jump away | bracket first | | Cycling | $f(x)=x^3-2x+2$, $x_0=0$ | iterates $0,1,0,1,\dots$ forever | perturb $x_0$ | | Divergence | $f(x)=x^{1/3}$, any $x_0\ne0$ | $x_{n+1}=-2x_n$; size doubles | none — $f'\to\infty$ at the root, so *no* $x_0$ works; bisect instead | | Flat-tail overshoot | $f(x)=\arctan x$, $x_0=2$ | $2\to-3.54\to13.95\to-279\to\dots$ | damped step; start nearer $0$ than $1.3917$ | | Wrong basin | any $f$ with several roots | converges, but to the wrong root | sketch, then bracket | | Multiple root | $f(x)=(x-2)^2(x+1)$ | error only halves each step | modified Newton, $m=2$ | Bisection never does any of these — it just is slow. Hence the hybrid: bracket and bisect for safety, then switch to Newton for speed. ### Common mistakes - **Sign of the step.** Wrong: $x_{n+1}=x_n+\frac{f(x_n)}{f'(x_n)}$. Right: $x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$. Sanity check on $f(x)=x^2-2$, $x_0=1$: the minus sign gives $1.5$ (toward $\sqrt2$); the plus sign gives $0.5$ (away). - **Not moving everything to one side.** For $\cos x=x$, wrong: $f(x)=\cos x$. Right: $f(x)=\cos x-x$, $f'(x)=-\sin x-1$ (the $-1$ is easy to drop). - **Rounding intermediate values.** Rounding each $x_n$ to $4$ decimals caps the final answer at about $4$ decimals no matter how many steps you take. Carry roughly twice the digits you intend to report. - **Degrees instead of radians.** $\frac{d}{dx}\cos x=-\sin x$ is only true in radians; a calculator in degree mode silently gives a different root. - **"$f(x_n)$ is tiny, so $x_n$ is close to the root."** Not necessarily — only when $|f'|$ is not small. For $f(x)=(x-1)^3$ at $x=1.1$, $f=0.001$ looks excellent but the error is $0.1$. Test $|x_{n+1}-x_n|$ as well. - **Reporting more digits than you have.** Two iterates agreeing to $8$ places is strong evidence, not proof; quote the digits that stop changing. - **Optimising with the wrong function.** To find a critical point of $g$ you run Newton on $f=g'$, so the iteration needs $g''$ — writing $x_{n+1}=x_n-g(x_n)/g'(x_n)$ finds a *root* of $g$ instead. - **Assuming convergence.** "Newton always converges" is false; $x^{1/3}$ and $x^3-2x+2$ above are counterexamples with perfectly nice-looking $f$.Key terms
- Newton's method
- Newton-Raphson iteration
- tangent line approximation
- linear approximation
- initial guess
- root (zero) of a function
- simple root
- multiple root / multiplicity
- modified Newton's method
- fixed-point iteration
- superattracting fixed point
- quadratic convergence
- linear convergence
- error term e_n = x_n - r
- Taylor error formula
- Intermediate Value Theorem
- bracketing a root
- bisection method
- sign change
- divergence
- cycling
- basin of attraction
- stopping criterion / tolerance
- division-free reciprocal iteration
Practice Problems
Use Newton's method with and to approximate . Simplify the iteration formula first, then carry out three iterations, quoting each to decimal places.
Show hint
Write and combine the two terms over the common denominator before you put any numbers in.
Show answer
Set-up. is a polynomial, so it is differentiable everywhere, and , which is non-zero for every . Since and , the IVT guarantees a root in ; is a legitimate starting point.
Simplify the iteration.
Iterate.
x_1&=\frac12\left(2+\frac{5}{2}\right)=\frac12\left(2+2.5\right)=\frac{9}{4}=2.2500000000\\ x_2&=\frac12\left(2.25+\frac{5}{2.25}\right)=\frac12\left(2.25+2.2222222222\right)=\frac{161}{72}=2.2361111111\\ x_3&=\frac12\left(2.2361111111+\frac{5}{2.2361111111}\right)=\frac12\left(2.2361111111+2.2360248447\right)=\frac{51841}{23184}=2.2360679779 \end{aligned}$$ **Check.** $\sqrt5=2.2360679775$, so the errors are $$e_1=1.39\times10^{-2},\qquad e_2=4.31\times10^{-5},\qquad e_3=4.16\times10^{-10}.$$ Independent verification: $x_3^2=\left(\frac{51841}{23184}\right)^2=5.0000000019$, which is $5$ to $8$ decimal places, confirming $x_3$ is right. **Answer:** $x_1=2.25$, $x_2=2.2361111111$, $x_3=2.2360679779$. With $e_3=4.16\times10^{-10}$ the three steps have nailed $8$ decimals: $\sqrt5\approx2.23606798$. (Do *not* advertise $2.236067978$ as the $9$-decimal value: $\sqrt5=2.23606797749\ldots$ rounds to $2.236067977$ at $9$ places, and an error of $4\times10^{-10}$ is not yet enough to settle that digit.)Set up Newton's method for the equation , simplify the iteration to a single fraction, and starting from compute , and to decimal places. How many correct digits does each step buy?
Show hint
Put the equation in the form first, then note that splits into .
Show answer
Set-up. , . vanishes only at , and our iterates stay near , so every step is defined. (, , so by the IVT there is a root in ; also for , so that real root is unique.)
Simplify.
Iterate from .
x_1&=\frac{2(8)+7}{3(4)}=\frac{23}{12}=1.9166666667\\ x_2&=\frac{2\left(\frac{23}{12}\right)^3+7}{3\left(\frac{23}{12}\right)^2} =\frac{2(7.0410879630)+7}{3(3.6736111111)}=\frac{21.0821759259}{11.0208333333}=1.9129384583\\ x_3&=\frac{2(7.0000798705)+7}{3(3.6593335453)}=1.9129311828 \end{aligned}$$ (For $x_2$ the intermediate values are $\left(\frac{23}{12}\right)^2=\frac{529}{144}=3.6736111111$ and $\left(\frac{23}{12}\right)^3=\frac{12167}{1728}=7.0410879630$.) **Accuracy.** The true value is $7^{1/3}=1.9129311828$ (more precisely $1.91293118277239$). Errors: $$|x_1-r|=3.74\times10^{-3},\qquad |x_2-r|=7.28\times10^{-6},\qquad |x_3-r|=2.8\times10^{-11}.$$ Measuring correct digits by $-\log_{10}|x_n-r|$, that is $2.4\to5.1\to10.6$: the count doubles each step, which is exactly quadratic convergence. Independent check: $1.9129311828^3=7.000000000$ to $9$ decimal places. **Answer:** $x_1=1.9166666667$, $x_2=1.9129384583$, $x_3=1.9129311828$; $7^{1/3}\approx1.9129311828$.(a) Starting from the equation of the tangent line to at , derive Newton's iteration formula.
(b) State precisely what hypothesis on is needed, and explain geometrically what goes wrong when it fails.
(c) Show that if with , then Newton's method finds the exact root in one step from any . What does that say about how the method works in general?
Show hint
The tangent line is a linear function; asking where it crosses the -axis is a one-line algebra problem.
Show answer
(a) Assume is differentiable at . The tangent line to at the point has slope , so its equation is
Newton's idea: instead of solving (hard), solve (easy) and call the answer :
f(x_n)+f'(x_n)\left(x_{n+1}-x_n\right)&=0\\ f'(x_n)\left(x_{n+1}-x_n\right)&=-f(x_n)\\ x_{n+1}-x_n&=-\frac{f(x_n)}{f'(x_n)}\\ x_{n+1}&=x_n-\frac{f(x_n)}{f'(x_n)}. \end{aligned}$$ The division in the third line is exactly where the hypothesis is used. **(b)** We need $f'(x_n)\ne0$ at every iterate (and $f$ differentiable there). Geometrically, if $f'(x_n)=0$ the tangent line at $x_n$ is **horizontal**: it is either the $x$-axis itself or a line parallel to it, so it has no unique $x$-intercept and $x_{n+1}$ is undefined. Concretely, $f(x)=x^2-1$ with $x_0=0$ gives $f'(0)=0$ and the method stops immediately. Even $f'(x_n)$ merely *small* is dangerous: the near-horizontal tangent meets the axis very far away, so $x_{n+1}$ is thrown a long distance from $x_n$. **(c)** With $f(x)=mx+b$ we have $f'(x)=m\ne0$ for all $x$, so from any $x_0$, $$x_1=x_0-\frac{mx_0+b}{m}=x_0-x_0-\frac{b}{m}=-\frac{b}{m},$$ which is exactly the root of $mx+b=0$. Every further step reproduces it, since $f(-b/m)=0$. **Interpretation.** Newton's method is *exact on linear functions*, and for a general $f$ each step is exact on the tangent line — the best linear model of $f$ at $x_n$. The whole error of a step therefore comes from the gap between $f$ and its linear approximation, which by Taylor's theorem is of size $\frac12 f''(\xi)(x-x_n)^2$. That quadratic-in-the-step error is precisely the source of the quadratic convergence rate.Consider .
(a) Use the IVT to show has a root in , and show that it has exactly one real root.
(b) Do two bisection steps to shrink the bracket, and take to be the midpoint of the resulting interval.
(c) Run three Newton steps from that , reporting decimal places.
(d) Roughly how many bisection steps from would be needed for the same accuracy?
Show hint
For uniqueness look at the sign of ; for the bisection steps you only need the signs of at and .
Show answer
(a) is a polynomial, hence continuous on . and . The values have opposite signs, so by the Intermediate Value Theorem there is with .
Uniqueness: for all real , so is strictly increasing on all of and can cross zero at most once. Hence exactly one real root, and it lies in .
(b) Bisection.
- Midpoint : . Same sign as , so the root is in .
- Midpoint : . Same sign as , so the root is in .
Take .
(c) Newton. .
Step 1: ; .
Step 2: , , so and .
Step 3: , , .
The true root is (to d.p.). Errors: , , — quadratic. Independent check: , essentially zero.
(d) After bisections the bracket has length . To match an error of about we need , i.e. . Since and , we need bisections, versus the Newton steps above (plus the two cheap bisections that produced ). That is the trade-off: bisection is guaranteed but linear; Newton is quadratic but needs a decent start — so bracket first, then switch.
Apply Newton's method to (with ) to get an iteration for that uses no division.
(a) Derive and simplify the iteration.
(b) Show the error satisfies exactly, where .
(c) Deduce exactly which starting values give convergence.
(d) Take , and compute .
Show hint
Remember , and dividing by is the same as multiplying by .
Show answer
(a) on , so , which is never zero. Then
Only multiplications and one subtraction appear — this is how hardware computes reciprocals (and hence divisions).
(b) Let , so . Then
x_{n+1}-\frac1a&=2x_n-a x_n^{2}-\frac1a =-a\left(x_n^{2}-\frac{2}{a}x_n+\frac{1}{a^{2}}\right) =-a\left(x_n-\frac1a\right)^{2}=-a\,e_n^{2}. \end{aligned}$$ So $e_{n+1}=-a e_n^{2}$ **exactly** (no Taylor remainder needed): perfect quadratic convergence, and after the first step every $e_n\le0$ — strictly negative unless some iterate lands exactly on $1/a$ — i.e. the iterates approach $1/a$ from below. **(c)** Put $u_n=a e_n=a x_n-1$. Multiplying the relation by $a$ gives $u_{n+1}=-u_n^{2}$, hence $|u_{n+1}|=|u_n|^{2}$ and by induction $|u_n|=|u_0|^{2^{n}}$. Therefore $u_n\to0$ (equivalently $x_n\to 1/a$) if and only if $|u_0|<1$: $$|a x_0-1|<1\quad\text{is the same as}\quad 0<a x_0<2,\quad\text{i.e.}\quad 0<x_0<\frac{2}{a}.$$ If $x_0<0$ or $x_0>2/a$ then $|u_0|>1$, so $u_n\to-\infty$ and the iterates run off to $-\infty$; if $x_0=2/a$ then $x_1=0$ and the method dies. The value $x_0=0$ is not a legal start at all — $f$ and $f'$ are undefined there — and the map would freeze at $0$ anyway. **(d)** $a=7$, so $x_{n+1}=x_n(2-7x_n)$, and $x_0=0.1$ satisfies $0<0.1<\frac27=0.2857$, so we expect convergence. $$\begin{aligned} x_1&=0.1\left(2-0.7\right)=0.1(1.3)=0.13\\ x_2&=0.13\left(2-0.91\right)=0.13(1.09)=0.1417\\ x_3&=0.1417\left(2-0.9919\right)=0.1417(1.0081)=0.14284777\\ x_4&=0.14284777\left(2-0.99993439\right)=0.14284777(1.00006561)=0.1428571422 \end{aligned}$$ **Check with the error law.** $\frac17=0.1428571429$, so $e_0=-0.0428571429$ and $$e_1=-7e_0^{2}=-7(0.0018367347)=-0.0128571429\ \Rightarrow\ x_1=0.1428571429-0.0128571429=0.13$$ — matching the direct computation. Continuing: $e_2=-1.1571\times10^{-3}$, $e_3=-9.3729\times10^{-6}$, $e_4=-6.1495\times10^{-10}$, matching the computed iterates. **Answer:** $x_{n+1}=x_n(2-ax_n)$; converges exactly for $0<x_0<2/a$; for $a=7$, $x_4=0.1428571422$, whose error is $6.1\times10^{-10}$ — that is $8$ correct decimals ($\frac17\approx0.14285714$), and the next step gives $|e_5|=2.6\times10^{-18}$.Let .
(a) Show that Newton's method with produces a cycle, and identify it.
(b) Explain in terms of the Newton map why the iteration can never escape.
(c) Show has exactly one real root and locate it by running Newton from for four steps ( decimal places).
Show hint
For (a) just compute two steps by hand. For (c), find the local extreme values of and check their signs.
Show answer
(a) , .
x_2=1-\frac{f(1)}{f'(1)}=1-\frac{1-2+2}{3-2}=1-\frac{1}{1}=0.$$ So $x_2=x_0=0$ and the iteration repeats forever: $0,\,1,\,0,\,1,\,0,\dots$ — a **2-cycle**. It never converges, and $f$ is never zero at either point ($f(0)=2$, $f(1)=1$). **(b)** The Newton map here satisfies $N(0)=1$ and $N(1)=0$, so $N(N(0))=0$: the pair $\{0,1\}$ is a periodic orbit of $N$. Because the iteration is deterministic — $x_{n+1}$ depends only on $x_n$ — once a value repeats, the entire future repeats. Exact arithmetic will therefore never break out. (In floating point, rounding sometimes nudges you off the cycle, which is luck, not method.) **(c) Exactly one real root.** $f'(x)=3x^2-2=0$ at $x=\pm\sqrt{2/3}=\pm0.8164965809$. These are the only critical points, and $$f\left(-\sqrt{\frac23}\right)=2+\frac{4}{3}\sqrt{\frac23}=3.0886621079>0\ \text{(local max)},\qquad f\left(\sqrt{\frac23}\right)=2-\frac{4}{3}\sqrt{\frac23}=0.9113378921>0\ \text{(local min)}.$$ Since the local minimum value is positive, $f>0$ on $\left[-\sqrt{2/3},\infty\right)$, so all real roots lie to the left of the local max, where $f$ is increasing; an increasing function crosses zero at most once. And $f(-2)=-8+4+2=-2<0$ while $f(-1)=-1+2+2=3>0$, so by the IVT the unique real root lies in $(-2,-1)$. **Newton from $x_0=-2$.** $$\begin{aligned} f(-2)&=-2,\ f'(-2)=10 &&\Rightarrow x_1=-2-\frac{-2}{10}=-1.8\\ f(-1.8)&=-5.832+3.6+2=-0.232,\ f'(-1.8)=3(3.24)-2=7.72 &&\Rightarrow x_2=-1.8+\frac{0.232}{7.72}=-1.7699481865\\ f(x_2)&=-0.0048496619,\ f'(x_2)=7.3981497490 &&\Rightarrow x_3=-1.7692926629\\ f(x_3)&=-0.0000022814,\ f'(x_3)=7.3911895810 &&\Rightarrow x_4=-1.7692923542 \end{aligned}$$ **Answer:** the cycle is $0\to1\to0\to\cdots$; the unique real root is $r\approx-1.7692923542$. Check: $(-1.7692923542)^3-2(-1.7692923542)+2=2.9\times10^{-10}\approx0$. Moral: a perfectly smooth cubic can trap Newton — always bracket the root first (here $f(-2)<0<f(-1)$ tells you to start near $-2$, not at $0$).Let (roots ).
(a) What happens to Newton's method at ?
(b) Compute for and explain the size of the answer geometrically.
(c) Show that once is large the iteration roughly halves it, and estimate how many steps are needed before the fast convergence kicks in. (The exact count is steps to reach to decimal places.)
(d) Contrast with : run Newton to full accuracy.
Show hint
Write the simplified iteration and think about which of the two terms dominates when is huge.
Show answer
Set-up. , and
(a) , so is undefined. Geometrically, is the vertex of the parabola; the tangent there is the horizontal line , which never meets the -axis. Newton's method simply cannot start here.
(b) With : and .
Geometrically, the tangent at has slope — almost horizontal — so travelling from height up to the axis along it requires a horizontal run of about . A nearly-flat tangent flings the next iterate enormously far away. This is the " near zero" failure: the method does not break, but it wastes the start entirely.
(c) For large the term is negligible next to , so Halving from down to about needs with , i.e. , so steps of pure halving; only then does the quadratic phase begin. In fact the iterates are i.e. steps in total — eleven wasted crawling back, then four fast ones.
(d) From (a sensible start: brackets the root, and is on the side where ):
x_1&=\frac12\left(3+\frac43\right)=\frac{13}{6}=2.1666666667\\ x_2&=\frac12\left(2.1666666667+1.8461538462\right)=\frac{313}{156}=2.0064102564\\ x_3&=\frac12\left(2.0064102564+1.9936102236\right)=\frac{195313}{97656}=2.0000102400 \end{aligned}$$ For the last step use the exact error law $e_{n+1}=\dfrac{e_n^{2}}{2x_n}$ (see the quadratic-convergence problem): with $e_3=1.02400\times10^{-5}$, $$e_4=\frac{\left(1.024\times10^{-5}\right)^{2}}{2(2.00001024)}=2.6214\times10^{-11},\qquad x_4=2.0000000000262 .$$ Four steps give $10$ correct decimals. **Moral:** the method is only as good as $x_0$; bracket with the IVT and keep $|f'(x_0)|$ comfortably away from $0$.Let and let , .
(a) Prove the exact identity .
(b) Starting from , compute and describe the pattern in the number of correct decimal places.
(c) Show that once we have , and use this to predict the accuracy of if is correct to decimals.
(d) Derive the general error formula and confirm it is consistent with (a).
Show hint
For (a) substitute the simplified iteration into and put everything over — a perfect square appears.
Show answer
(a) The simplified iteration is . Hence
e_{n+1}=x_{n+1}-\sqrt2&=\frac{x_n^{2}+2}{2x_n}-\sqrt2 =\frac{x_n^{2}+2-2\sqrt2\,x_n}{2x_n}\\ &=\frac{x_n^{2}-2\sqrt2\,x_n+\left(\sqrt2\right)^{2}}{2x_n} =\frac{\left(x_n-\sqrt2\right)^{2}}{2x_n}=\frac{e_n^{2}}{2x_n}, \end{aligned}$$ using $2=\left(\sqrt2\right)^{2}$. Two immediate consequences: the error is *squared* each step, and (for $x_n>0$) $e_{n+1}>0$ — after one step every iterate overshoots above $\sqrt2$. **(b)** From $x_0=1$: $x_1=1.5$, $x_2=1.4166666667$, $x_3=1.4142156863$, $x_4=1.4142135624$, and $\sqrt2=1.4142135623730950$. $$e_1=8.578644\times10^{-2},\quad e_2=2.453104\times10^{-3},\quad e_3=2.123901\times10^{-6},\quad e_4=1.594862\times10^{-12}.$$ Check with (a): $e_2=\dfrac{e_1^{2}}{2x_1}=\dfrac{(0.0857864376)^{2}}{3}=\dfrac{0.0073593129}{3}=0.0024531043$ ✓ (matches exactly). Correct decimal places: about $1$, then $2$, then $5$, then $11$ — the count **doubles** each iteration (writing $L_n=-\log_{10}e_n$ gives $L_1,\dots,L_4=1.07,\,2.61,\,5.67,\,11.80$, which satisfy $L_{n+1}\approx 2L_n+0.45$, the $0.45$ being $-\log_{10}0.354$). **(c)** If $x_n>\sqrt2$ then $2x_n>2\sqrt2=2.8284271$, so $$e_{n+1}=\frac{e_n^{2}}{2x_n}<\frac{e_n^{2}}{2\sqrt2}=0.3535534\,e_n^{2}\le 0.354\,e_n^{2}.$$ (The upper bound $x_n\le1.5$ is not even needed for this direction; it only tells us $e_{n+1}\ge e_n^2/3$.) So if $x_n$ is correct to $6$ decimals, $e_n\le5\times10^{-7}$ and $$e_{n+1}\le0.354\left(5\times10^{-7}\right)^{2}=8.85\times10^{-14},$$ i.e. $x_{n+1}$ is correct to about $13$ decimal places — one step turns $6$ digits into $13$. **(d)** Taylor-expand $f$ about $x_n$ and evaluate at the root $r$ (valid because $f$ is twice differentiable): for some $\xi_n$ strictly between $x_n$ and $r$, $$0=f(r)=f(x_n)+f'(x_n)\left(r-x_n\right)+\frac{f''(\xi_n)}{2}\left(r-x_n\right)^{2}.$$ Divide by $f'(x_n)\ne0$: $$0=\frac{f(x_n)}{f'(x_n)}+\left(r-x_n\right)+\frac{f''(\xi_n)}{2f'(x_n)}\left(x_n-r\right)^{2},$$ so that $$\left(x_n-\frac{f(x_n)}{f'(x_n)}\right)-r=\frac{f''(\xi_n)}{2f'(x_n)}\left(x_n-r\right)^{2},$$ and the bracket on the left is exactly $x_{n+1}$, so $$e_{n+1}=\frac{f''(\xi_n)}{2f'(x_n)}\,e_n^{2}.$$ **Consistency.** For $f(x)=x^2-2$ we have $f''\equiv2$ and $f'(x_n)=2x_n$, so the general formula reads $e_{n+1}=\dfrac{2}{2\cdot 2x_n}e_n^{2}=\dfrac{e_n^{2}}{2x_n}$ — exactly part (a), with no unknown $\xi_n$ left over because $f''$ is constant. The limiting constant is $\dfrac{|f''(r)|}{2|f'(r)|}=\dfrac{2}{2\cdot2\sqrt2}=\dfrac{1}{2\sqrt2}=0.3536$, agreeing with (c).Let .
(a) Verify that , so is a double root.
(b) Run Newton's method from for four steps and tabulate the errors and the ratios . What kind of convergence is this?
(c) Prove that for a root of multiplicity the ratio tends to .
(d) Use the modified iteration from and compare.
Show hint
For (c), write with , compute by the product rule, and cancel the common factor of before taking the limit.
Show answer
(a) Expand: ✓. So , and gives while gives : the root has multiplicity exactly . Note , so the quadratic-convergence theorem does not apply.
(b) Plain Newton, . From : , , so . Continuing (using and to keep the arithmetic clean):
| 0 | 3.0000000000 | 1.0000000000 | — |
| 1 | 2.5555555556 | 0.5555555556 | 0.5556 |
| 2 | 2.2979066023 | 0.2979066023 | 0.5362 |
| 3 | 2.1553901992 | 0.1553901992 | 0.5216 |
| 4 | 2.0795622104 | 0.0795622104 | 0.5120 |
The error is only halving: this is linear (first-order) convergence with ratio , not quadratic. Ten more steps would gain about decimals, not .
(c) Write with differentiable and , and set . By the product rule, Hence, cancelling , and the new error is Letting (so , ): For this is , matching the table; for a simple root the ratio is , which is the fingerprint of superlinear (in fact quadratic) convergence.
(d) Modified Newton, . From the same formula with the factor inserted, the new error is — quadratic. Here , :
x_1&=3-2\cdot\frac49=3-\frac89=2.1111111111 &&e_1=1.111\times10^{-1}\\ x_2&=2.1111111111-2\cdot\frac{0.0384087791}{0.7037037037}=2.0019493177 &&e_2=1.949\times10^{-3}\\ x_3&=2.0000006327 &&e_3=6.327\times10^{-7}\\ x_4&=2.0000000000 &&e_4=6.7\times10^{-14} \end{aligned}$$ **Answer:** plain Newton on a double root converges linearly with ratio $\to\frac12$; the modified step with $m=2$ restores quadratic convergence, driving the error to $6.7\times10^{-14}$ ($12$ correct decimals) in four steps, where plain Newton still had barely one.(a) Show that Newton's method applied to gives , so that it diverges from every even though has the unique root . Which hypothesis fails?
(b) For (unique root ), write down the Newton map and compute four iterates from . It is known that the method diverges exactly when where satisfies . Explain where that equation comes from.
Show hint
In (a) be careful with the negative exponent: . In (b), the borderline case is a starting point that Newton sends to its own negative.
Show answer
(a) For , has , which is non-zero, so every step is defined:
Hence , so for any , while the sign alternates. From : The iterates straddle the root and run away from it geometrically.
Which hypothesis fails. The convergence theorem needs to be (twice) continuously differentiable near the root with . Here as : is not differentiable at the root at all, and is unbounded near , so the constant in the error bound is infinite. Geometrically the graph has a vertical tangent at , so tangent lines near the root are steep and point away; each one crosses the axis further out.
(b) , , which is never zero, so
From (radians):
x_1&=2-(1+4)\arctan 2=2-5(1.1071487178)=2-5.5357435890=-3.5357435890\\ x_2&=-3.5357435890-\left(13.5014827269\right)\left(-1.2951690588\right)=-3.5357435890+17.4867026759=13.9509590869\\ x_3&=13.9509590869-\left(195.6292594451\right)\left(1.4992390527\right)=13.9509590869-293.2950256205=-279.3440665336\\ x_4&=-279.3440665336-\left(78034.1075075\right)\left(-1.5672165274\right)=122016.998918 \end{aligned}$$ The iterates explode: $2\to-3.54\to13.95\to-279\to1.22\times10^{5}$. (Only the leading digits of $x_4$ are meaningful here — the factors above are themselves rounded, so quoting ten decimals of $x_4$ would be fiction.) **Where $2x=(1+x^{2})\arctan x$ comes from.** The behaviour is symmetric because $N$ is odd: $N(-x)=-N(x)$. The borderline between "step lands closer" and "step lands further" is the starting point that Newton maps exactly onto its own negative, producing a perfect $2$-cycle $x^{*}\to-x^{*}\to x^{*}\to\cdots$. Setting $N(x)=-x$: $$x-\left(1+x^{2}\right)\arctan x=-x\quad\Rightarrow\quad 2x=\left(1+x^{2}\right)\arctan x .$$ Solving numerically gives $x^{*}=1.3917452$. For $|x_0|<x^{*}$ each step lands strictly nearer $0$ and Newton converges; for $|x_0|>x^{*}$ each step lands strictly further away and it diverges; at $|x_0|=x^{*}$ it cycles. The cause is that $\arctan$ has flat tails — $f'(x)=\frac{1}{1+x^2}\to0$ — so far from the root the tangent is nearly horizontal and its $x$-intercept is thrown across to the other side. A **damped** step $x_{n+1}=x_n-\lambda\frac{f(x_n)}{f'(x_n)}$ with $0<\lambda\le1$ chosen so that $|f(x_{n+1})|<|f(x_n)|$ cures it.Find the point on the parabola closest to the point , using Newton's method.
(a) Set up the function to minimise, and show it has exactly one critical point which is a global minimum.
(b) Reduce the minimisation to a root-finding problem and bracket the root with the IVT.
(c) Run Newton's method to decimal places, and state the closest point and the minimum distance.
Show hint
Minimise the square of the distance to avoid a square root, then remember that finding a critical point of means running Newton on — so the iteration involves .
Show answer
(a) Set-up. A general point of the parabola is . Its squared distance to is
Minimising is equivalent to minimising the distance , since is increasing on . Now
Since for all , is strictly convex for all real ; hence is strictly increasing, so has at most one zero, and any zero is a global minimum. Also as , so a minimum exists. Exactly one critical point, and it is the global minimiser.
(b) Root-finding problem. Solve , i.e. (dividing by )
Newton on is Newton on , because .
Bracket. is continuous; and , so by the IVT there is a root in . Sharpen: and , so the root lies in . Take (note , comfortably away from ).
(c) Newton. .
x_1&=1.1-\frac{-0.238}{8.26}=1.1+0.0288135593=1.1288135593\\ x_2&=1.1288135593-\frac{0.0055273032}{8.6453203103}=1.1288135593-0.0006393405=1.1281742188\\ x_3&=1.1281742188-\frac{0.0000027679}{8.6366624084}=1.1281742188-0.0000003205=1.1281738983 \end{aligned}$$ Carrying extra digits, $x_3=1.12817389836$, so the iterates have stabilised at $x^{*}=1.1281738984$ to $10$ decimal places. Independent check by sign change: $g(1.1281738983)=-5.3\times10^{-10}<0$ and $g(1.1281738984)=+3.3\times10^{-10}>0$, so the root really is trapped between those two ten-decimal values. **Answer.** The closest point is $$\left(x^{*},\left(x^{*}\right)^{2}\right)=\left(1.1281738984,\;1.2727763449\right),$$ and the minimum distance is $$\sqrt{D(x^{*})}=\sqrt{(1.1281738984-4)^{2}+(1.1281738984)^{4}}=\sqrt{8.2473851578+1.6199596245}=\sqrt{9.8673447823}=3.1412330035 .$$ (That is $3.1412$, tantalisingly close to $\pi=3.14159\ldots$ but not equal to it — a good reminder to check, not assume.) A geometric sanity check: the segment from $(4,0)$ to the closest point should be perpendicular to the parabola. The tangent slope there is $2x^{*}=2.2563477968$, and the segment has slope $\dfrac{1.2727763449-0}{1.1281738984-4}=\dfrac{1.2727763449}{-2.8718261016}=-0.4431940862$; the product is $2.2563477968\times(-0.4431940862)=-1.0000000000$ ✓.