Navigation

Concept Review

Differential Calculus

Newton's Method

Newton's method is the standard fast algorithm for solving an equation f(x)=0f(x)=0 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 ff be differentiable near a current guess xnx_n, and suppose f(xn)0f'(x_n)\ne 0. The tangent line to y=f(x)y=f(x) at (xn,f(xn))\left(x_n,f(x_n)\right) is

L(x)=f(xn)+f(xn)(xxn).L(x)=f(x_n)+f'(x_n)\left(x-x_n\right).

The curve is hard to zero; the line is not. Set L(x)=0L(x)=0 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 f(x)=x25f(x)=x^2-5 and x0=2x_0=2 to approximate 5\sqrt{5}. Simplify the iteration formula first, then carry out three iterations, quoting each xnx_n to 1010 decimal places.

Show hint

Write xn+1=xnf(xn)f(xn)x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)} and combine the two terms over the common denominator 2xn2x_n before you put any numbers in.

Show answer

Set-up. f(x)=x25f(x)=x^2-5 is a polynomial, so it is differentiable everywhere, and f(x)=2xf'(x)=2x, which is non-zero for every x0x\ne0. Since f(2)=1<0f(2)=-1<0 and f(3)=4>0f(3)=4>0, the IVT guarantees a root in (2,3)(2,3); x0=2x_0=2 is a legitimate starting point.

Simplify the iteration.

xn+1=xnxn252xn=2xn2(xn25)2xn=xn2+52xn=12(xn+5xn).x_{n+1}=x_n-\frac{x_n^2-5}{2x_n}=\frac{2x_n^2-\left(x_n^2-5\right)}{2x_n}=\frac{x_n^2+5}{2x_n}=\frac{1}{2}\left(x_n+\frac{5}{x_n}\right).

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 x3=7x^3=7, simplify the iteration to a single fraction, and starting from x0=2x_0=2 compute x1x_1, x2x_2 and x3x_3 to 1010 decimal places. How many correct digits does each step buy?

Show hint

Put the equation in the form f(x)=0f(x)=0 first, then note that x373x2\frac{x^3-7}{3x^2} splits into x373x2\frac{x}{3}-\frac{7}{3x^2}.

Show answer

Set-up. f(x)=x37f(x)=x^3-7, f(x)=3x2f'(x)=3x^2. ff' vanishes only at x=0x=0, and our iterates stay near 22, so every step is defined. (f(1)=6<0f(1)=-6<0, f(2)=1>0f(2)=1>0, so by the IVT there is a root in (1,2)(1,2); also f>0f'>0 for x0x\ne0, so that real root is unique.)

Simplify.

xn+1=xnxn373xn2=3xn3xn3+73xn2=2xn3+73xn2=23xn+73xn2.x_{n+1}=x_n-\frac{x_n^3-7}{3x_n^2}=\frac{3x_n^3-x_n^3+7}{3x_n^2}=\frac{2x_n^3+7}{3x_n^2}=\frac{2}{3}x_n+\frac{7}{3x_n^2}.

Iterate from x0=2x_0=2.

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 y=f(x)y=f(x) at x=xnx=x_n, derive Newton's iteration formula.

(b) State precisely what hypothesis on ff' is needed, and explain geometrically what goes wrong when it fails.

(c) Show that if f(x)=mx+bf(x)=mx+b with m0m\ne0, then Newton's method finds the exact root in one step from any x0x_0. 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 xx-axis is a one-line algebra problem.

Show answer

(a) Assume ff is differentiable at xnx_n. The tangent line to y=f(x)y=f(x) at the point (xn,f(xn))\left(x_n,f(x_n)\right) has slope f(xn)f'(x_n), so its equation is

L(x)=f(xn)+f(xn)(xxn).L(x)=f(x_n)+f'(x_n)\left(x-x_n\right).

Newton's idea: instead of solving f(x)=0f(x)=0 (hard), solve L(x)=0L(x)=0 (easy) and call the answer xn+1x_{n+1}:

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 f(x)=x3+x1f(x)=x^3+x-1.

(a) Use the IVT to show ff has a root in (0,1)(0,1), and show that it has exactly one real root.

(b) Do two bisection steps to shrink the bracket, and take x0x_0 to be the midpoint of the resulting interval.

(c) Run three Newton steps from that x0x_0, reporting 1010 decimal places.

(d) Roughly how many bisection steps from [0,1][0,1] would be needed for the same accuracy?

Show hint

For uniqueness look at the sign of ff'; for the bisection steps you only need the signs of ff at 0.50.5 and 0.750.75.

Show answer

(a) ff is a polynomial, hence continuous on [0,1][0,1]. f(0)=0+01=1<0f(0)=0+0-1=-1<0 and f(1)=1+11=1>0f(1)=1+1-1=1>0. The values have opposite signs, so by the Intermediate Value Theorem there is c(0,1)c\in(0,1) with f(c)=0f(c)=0.

Uniqueness: f(x)=3x2+11>0f'(x)=3x^2+1\ge 1>0 for all real xx, so ff is strictly increasing on all of (,)(-\infty,\infty) and can cross zero at most once. Hence exactly one real root, and it lies in (0,1)(0,1).

(b) Bisection.

  • Midpoint 0.50.5: f(0.5)=0.125+0.51=0.375<0f(0.5)=0.125+0.5-1=-0.375<0. Same sign as f(0)f(0), so the root is in (0.5,1)(0.5,1).
  • Midpoint 0.750.75: f(0.75)=0.421875+0.751=0.171875>0f(0.75)=0.421875+0.75-1=0.171875>0. Same sign as f(1)f(1), so the root is in (0.5,0.75)(0.5,0.75).

Take x0=0.5+0.752=0.625x_0=\dfrac{0.5+0.75}{2}=0.625.

(c) Newton. xn+1=xnxn3+xn13xn2+1x_{n+1}=x_n-\dfrac{x_n^3+x_n-1}{3x_n^2+1}.

Step 1: f(0.625)=0.244140625+0.6251=0.130859375f(0.625)=0.244140625+0.625-1=-0.130859375; f(0.625)=3(0.390625)+1=2.171875f'(0.625)=3(0.390625)+1=2.171875. x1=0.6250.1308593752.171875=0.625+0.0602517986=0.6852517986.x_1=0.625-\frac{-0.130859375}{2.171875}=0.625+0.0602517986=0.6852517986.

Step 2: x12=0.46957002743x_1^2=0.46957002743, x13=0.32177370585x_1^3=0.32177370585, so f(x1)=0.32177370585+0.685251798561=0.00702550441f(x_1)=0.32177370585+0.68525179856-1=0.00702550441 and f(x1)=3(0.46957002743)+1=2.40871008229f'(x_1)=3(0.46957002743)+1=2.40871008229. x2=0.68525179860.00702550442.4087100823=0.68525179860.0029167082=0.6823350904.x_2=0.6852517986-\frac{0.0070255044}{2.4087100823}=0.6852517986-0.0029167082=0.6823350904.

Step 3: x22=0.46558117556x_2^2=0.46558117556, f(x2)=0.0000174639f(x_2)=0.0000174639, f(x2)=3(0.46558117556)+1=2.39674352668f'(x_2)=3(0.46558117556)+1=2.39674352668. x3=0.68233509040.00001746392.3967435267=0.68233509040.0000072865=0.6823278039.x_3=0.6823350904-\frac{0.0000174639}{2.3967435267}=0.6823350904-0.0000072865=0.6823278039.

The true root is r=0.6823278038r=0.6823278038 (to 1010 d.p.). Errors: 2.92×1032.92\times10^{-3}, 7.29×1067.29\times10^{-6}, 4.5×10114.5\times10^{-11} — quadratic. Independent check: 0.68232780383+0.68232780381=6.7×10110.6823278038^3+0.6823278038-1=-6.7\times10^{-11}, essentially zero.

(d) After nn bisections the bracket [0,1][0,1] has length 2n2^{-n}. To match an error of about 101010^{-10} we need 2n<10102^{-n}<10^{-10}, i.e. 2n>10102^{n}>10^{10}. Since 233=8.59×1092^{33}=8.59\times10^{9} and 234=1.72×10102^{34}=1.72\times10^{10}, we need n=34n=34 bisections, versus the 33 Newton steps above (plus the two cheap bisections that produced x0x_0). 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 f(x)=1xaf(x)=\dfrac{1}{x}-a (with a>0a>0) to get an iteration for 1a\dfrac{1}{a} that uses no division.

(a) Derive and simplify the iteration.

(b) Show the error satisfies en+1=aen2e_{n+1}=-a\,e_n^{2} exactly, where en=xn1ae_n=x_n-\frac1a.

(c) Deduce exactly which starting values x0x_0 give convergence.

(d) Take a=7a=7, x0=0.1x_0=0.1 and compute x1,,x4x_1,\dots,x_4.

Show hint

Remember ddx(x1)=x2\frac{d}{dx}\left(x^{-1}\right)=-x^{-2}, and dividing by 1/xn2-1/x_n^{2} is the same as multiplying by xn2-x_n^{2}.

Show answer

(a) f(x)=x1af(x)=x^{-1}-a on x0x\ne0, so f(x)=x2=1x2f'(x)=-x^{-2}=-\dfrac{1}{x^2}, which is never zero. Then

xn+1=xn1xna1xn2=xn+xn2(1xna)=xn+xnaxn2=xn(2axn).x_{n+1}=x_n-\frac{\frac{1}{x_n}-a}{-\frac{1}{x_n^{2}}}=x_n+x_n^{2}\left(\frac{1}{x_n}-a\right)=x_n+x_n-a x_n^{2}=x_n\left(2-a x_n\right).

Only multiplications and one subtraction appear — this is how hardware computes reciprocals (and hence divisions).

(b) Let en=xn1ae_n=x_n-\dfrac1a, so xn=en+1ax_n=e_n+\dfrac1a. 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 f(x)=x32x+2f(x)=x^3-2x+2.

(a) Show that Newton's method with x0=0x_0=0 produces a cycle, and identify it.

(b) Explain in terms of the Newton map N(x)=xf(x)f(x)N(x)=x-\frac{f(x)}{f'(x)} why the iteration can never escape.

(c) Show ff has exactly one real root and locate it by running Newton from x0=2x_0=-2 for four steps (1010 decimal places).

Show hint

For (a) just compute two steps by hand. For (c), find the local extreme values of ff and check their signs.

Show answer

(a) f(x)=x32x+2f(x)=x^3-2x+2, f(x)=3x22f'(x)=3x^2-2.

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 f(x)=x24f(x)=x^2-4 (roots ±2\pm2).

(a) What happens to Newton's method at x0=0x_0=0?

(b) Compute x1x_1 for x0=0.001x_0=0.001 and explain the size of the answer geometrically.

(c) Show that once xnx_n is large the iteration roughly halves it, and estimate how many steps are needed before the fast convergence kicks in. (The exact count is 1515 steps to reach 22 to 1212 decimal places.)

(d) Contrast with x0=3x_0=3: run Newton to full accuracy.

Show hint

Write the simplified iteration xn+1=12(xn+4xn)x_{n+1}=\frac12\left(x_n+\frac{4}{x_n}\right) and think about which of the two terms dominates when xnx_n is huge.

Show answer

Set-up. f(x)=2xf'(x)=2x, and

xn+1=xnxn242xn=xn2+42xn=12(xn+4xn).x_{n+1}=x_n-\frac{x_n^2-4}{2x_n}=\frac{x_n^2+4}{2x_n}=\frac12\left(x_n+\frac{4}{x_n}\right).

(a) f(0)=0f'(0)=0, so x1=0f(0)f(0)=040x_1=0-\dfrac{f(0)}{f'(0)}=0-\dfrac{-4}{0} is undefined. Geometrically, x=0x=0 is the vertex of the parabola; the tangent there is the horizontal line y=4y=-4, which never meets the xx-axis. Newton's method simply cannot start here.

(b) With x0=0.001x_0=0.001: f(0.001)=0.0000014=3.999999f(0.001)=0.000001-4=-3.999999 and f(0.001)=0.002f'(0.001)=0.002.

x1=0.0013.9999990.002=0.001+1999.9995=2000.0005.x_1=0.001-\frac{-3.999999}{0.002}=0.001+1999.9995=2000.0005 .

Geometrically, the tangent at (0.001,3.999999)(0.001,-3.999999) has slope 0.0020.002 — almost horizontal — so travelling from height 4-4 up to the axis along it requires a horizontal run of about 4/0.002=20004/0.002=2000. A nearly-flat tangent flings the next iterate enormously far away. This is the "ff' near zero" failure: the method does not break, but it wastes the start entirely.

(c) For large xnx_n the term 4/xn4/x_n is negligible next to xnx_n, so xn+1=12(xn+4xn)xn2.x_{n+1}=\frac12\left(x_n+\frac{4}{x_n}\right)\approx\frac{x_n}{2}. Halving from 20002000 down to about 22 needs nn with 2000/2n22000/2^{n}\approx2, i.e. 2n10002^{n}\approx1000, so nlog2100010n\approx\log_2 1000\approx10 steps of pure halving; only then does the quadratic phase begin. In fact the iterates are 2000.0005, 1000.0012, 500.0026, 250.0053, 125.0107, 62.5213, 31.2927, 15.7102, 7.9824, 4.2418, 2.5924, 2.0677, 2.0011, 2.00000031, 2.0000000000000,2000.0005,\ 1000.0012,\ 500.0026,\ 250.0053,\ 125.0107,\ 62.5213,\ 31.2927,\ 15.7102,\ 7.9824,\ 4.2418,\ 2.5924,\ 2.0677,\ 2.0011,\ 2.00000031,\ 2.0000000000000, i.e. 1515 steps in total — eleven wasted crawling back, then four fast ones.

(d) From x0=3x_0=3 (a sensible start: f(1)=3<0<5=f(3)f(1)=-3<0<5=f(3) brackets the root, and 33 is on the side where ff>0f\cdot f''>0):

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 f(x)=x22f(x)=x^2-2 and let r=2r=\sqrt2, en=xn2e_n=x_n-\sqrt2.

(a) Prove the exact identity en+1=en22xne_{n+1}=\dfrac{e_n^{2}}{2x_n}.

(b) Starting from x0=1x_0=1, compute e1,e2,e3,e4e_1,e_2,e_3,e_4 and describe the pattern in the number of correct decimal places.

(c) Show that once xn(2,1.5]x_n\in\left(\sqrt2,1.5\right] we have en+10.354en2e_{n+1}\le 0.354\,e_n^{2}, and use this to predict the accuracy of xn+1x_{n+1} if xnx_n is correct to 66 decimals.

(d) Derive the general error formula en+1=f(ξn)2f(xn)en2e_{n+1}=\dfrac{f''(\xi_n)}{2f'(x_n)}e_n^{2} and confirm it is consistent with (a).

Show hint

For (a) substitute the simplified iteration xn+1=12(xn+2xn)x_{n+1}=\frac12\left(x_n+\frac{2}{x_n}\right) into xn+12x_{n+1}-\sqrt2 and put everything over 2xn2x_n — a perfect square appears.

Show answer

(a) The simplified iteration is xn+1=xn2+22xnx_{n+1}=\dfrac{x_n^{2}+2}{2x_n}. 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 f(x)=x33x2+4f(x)=x^3-3x^2+4.

(a) Verify that f(x)=(x2)2(x+1)f(x)=(x-2)^2(x+1), so x=2x=2 is a double root.

(b) Run Newton's method from x0=3x_0=3 for four steps and tabulate the errors en=xn2e_n=x_n-2 and the ratios en+1/ene_{n+1}/e_n. What kind of convergence is this?

(c) Prove that for a root of multiplicity mm the ratio tends to 11m1-\frac1m.

(d) Use the modified iteration xn+1=xn2f(xn)f(xn)x_{n+1}=x_n-2\frac{f(x_n)}{f'(x_n)} from x0=3x_0=3 and compare.

Show hint

For (c), write f(x)=(xr)mg(x)f(x)=(x-r)^m g(x) with g(r)0g(r)\ne0, compute ff' by the product rule, and cancel the common factor of (xr)m1(x-r)^{m-1} before taking the limit.

Show answer

(a) Expand: (x2)2(x+1)=(x24x+4)(x+1)=x3+x24x24x+4x+4=x33x2+4(x-2)^2(x+1)=\left(x^2-4x+4\right)(x+1)=x^3+x^2-4x^2-4x+4x+4=x^3-3x^2+4 ✓. So f(2)=0f(2)=0, and f(x)=3x26x=3x(x2)f'(x)=3x^2-6x=3x(x-2) gives f(2)=0f'(2)=0 while f(x)=6x6f''(x)=6x-6 gives f(2)=60f''(2)=6\ne0: the root x=2x=2 has multiplicity exactly m=2m=2. Note f(r)=0f'(r)=0, so the quadratic-convergence theorem does not apply.

(b) Plain Newton, xn+1=xnxn33xn2+43xn26xnx_{n+1}=x_n-\dfrac{x_n^3-3x_n^2+4}{3x_n^2-6x_n}. From x0=3x_0=3: f(3)=2727+4=4f(3)=27-27+4=4, f(3)=2718=9f'(3)=27-18=9, so x1=349=2.5555555556x_1=3-\frac49=2.5555555556. Continuing (using f=e2(x+1)f=e^2(x+1) and f=3x(x2)f'=3x(x-2) to keep the arithmetic clean):

nnxnx_nen=xn2e_n=x_n-2en/en1e_n/e_{n-1}
03.00000000001.0000000000
12.55555555560.55555555560.5556
22.29790660230.29790660230.5362
32.15539019920.15539019920.5216
42.07956221040.07956221040.5120

The error is only halving: this is linear (first-order) convergence with ratio 12\to\frac12, not quadratic. Ten more steps would gain about 33 decimals, not 30003000.

(c) Write f(x)=(xr)mg(x)f(x)=(x-r)^{m}g(x) with gg differentiable and g(r)0g(r)\ne0, and set e=xre=x-r. By the product rule, f(x)=m(xr)m1g(x)+(xr)mg(x)=(xr)m1[mg(x)+(xr)g(x)].f'(x)=m(x-r)^{m-1}g(x)+(x-r)^{m}g'(x)=(x-r)^{m-1}\left[m\,g(x)+(x-r)g'(x)\right]. Hence, cancelling (xr)m1(x-r)^{m-1}, f(x)f(x)=eg(x)mg(x)+eg(x),\frac{f(x)}{f'(x)}=\frac{e\,g(x)}{m\,g(x)+e\,g'(x)} , and the new error is enew=eegmg+eg=emg+eggmg+eg=e(m1)g(x)+eg(x)mg(x)+eg(x).e_{\text{new}}=e-\frac{e\,g}{mg+eg'}=e\cdot\frac{mg+eg'-g}{mg+eg'}=e\cdot\frac{(m-1)g(x)+e\,g'(x)}{m\,g(x)+e\,g'(x)}. Letting e0e\to0 (so xrx\to r, g(x)g(r)0g(x)\to g(r)\ne0): enewe(m1)g(r)mg(r)=m1m=11m.\frac{e_{\text{new}}}{e}\to\frac{(m-1)g(r)}{m\,g(r)}=\frac{m-1}{m}=1-\frac1m . For m=2m=2 this is 12\frac12, matching the table; for a simple root m=1m=1 the ratio is 00, which is the fingerprint of superlinear (in fact quadratic) convergence.

(d) Modified Newton, xn+1=xn2f(xn)f(xn)x_{n+1}=x_n-2\dfrac{f(x_n)}{f'(x_n)}. From the same formula with the factor m=2m=2 inserted, the new error is enew=e2g(x)2g(x)+eg(x)e_{\text{new}}=\dfrac{e^{2}g'(x)}{2g(x)+e\,g'(x)} — quadratic. Here g(x)=x+1g(x)=x+1, g=1g'=1:

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 f(x)=x1/3f(x)=x^{1/3} gives xn+1=2xnx_{n+1}=-2x_n, so that it diverges from every x00x_0\ne0 even though ff has the unique root x=0x=0. Which hypothesis fails?

(b) For f(x)=arctanxf(x)=\arctan x (unique root x=0x=0), write down the Newton map and compute four iterates from x0=2x_0=2. It is known that the method diverges exactly when x0>x|x_0|>x^{*} where x=1.3917452x^{*}=1.3917452 satisfies 2x=(1+x2)arctanx2x=\left(1+x^2\right)\arctan x. Explain where that equation comes from.

Show hint

In (a) be careful with the negative exponent: x1/313x2/3=3x1/3+2/3\frac{x^{1/3}}{\frac13x^{-2/3}}=3x^{1/3+2/3}. In (b), the borderline case is a starting point that Newton sends to its own negative.

Show answer

(a) For x0x\ne0, f(x)=x1/3f(x)=x^{1/3} has f(x)=13x2/3f'(x)=\dfrac13x^{-2/3}, which is non-zero, so every step is defined:

xn+1=xnxn1/313xn2/3=xn3xn1/3xn2/3=xn3xn=2xn.x_{n+1}=x_n-\frac{x_n^{1/3}}{\frac13 x_n^{-2/3}}=x_n-3\,x_n^{1/3}\cdot x_n^{2/3}=x_n-3x_n=-2x_n .

Hence xn+1=2xn|x_{n+1}|=2|x_n|, so xn=2nx0|x_n|=2^{n}|x_0|\to\infty for any x00x_0\ne0, while the sign alternates. From x0=0.5x_0=0.5: 0.5, 1, 2, 4, 8, 16, 32,0.5,\ -1,\ 2,\ -4,\ 8,\ -16,\ 32,\dots The iterates straddle the root and run away from it geometrically.

Which hypothesis fails. The convergence theorem needs ff to be (twice) continuously differentiable near the root r=0r=0 with f(r)0f'(r)\ne0. Here f(x)=13x2/3+f'(x)=\frac13x^{-2/3}\to+\infty as x0x\to0: ff is not differentiable at the root at all, and f(x)=29x5/3f''(x)=-\frac29x^{-5/3} is unbounded near 00, so the constant C=maxf2minfC=\frac{\max|f''|}{2\min|f'|} in the error bound is infinite. Geometrically the graph has a vertical tangent at 00, so tangent lines near the root are steep and point away; each one crosses the axis further out.

(b) f(x)=arctanxf(x)=\arctan x, f(x)=11+x2f'(x)=\dfrac{1}{1+x^{2}}, which is never zero, so

N(x)=xarctanx11+x2=x(1+x2)arctanx.N(x)=x-\frac{\arctan x}{\frac{1}{1+x^{2}}}=x-\left(1+x^{2}\right)\arctan x .

From x0=2x_0=2 (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 y=x2y=x^{2} closest to the point (4,0)(4,0), 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 1010 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 DD means running Newton on DD' — so the iteration involves DD''.

Show answer

(a) Set-up. A general point of the parabola is (x,x2)\left(x,x^{2}\right). Its squared distance to (4,0)(4,0) is

D(x)=(x4)2+(x20)2=(x4)2+x4.D(x)=(x-4)^{2}+\left(x^{2}-0\right)^{2}=(x-4)^{2}+x^{4}.

Minimising DD is equivalent to minimising the distance D\sqrt{D}, since ttt\mapsto\sqrt t is increasing on [0,)[0,\infty). Now

D(x)=2(x4)+4x3=4x3+2x8,D(x)=12x2+2.D'(x)=2(x-4)+4x^{3}=4x^{3}+2x-8,\qquad D''(x)=12x^{2}+2 .

Since D(x)=12x2+22>0D''(x)=12x^{2}+2\ge2>0 for all xx, DD is strictly convex for all real xx; hence DD' is strictly increasing, so DD' has at most one zero, and any zero is a global minimum. Also D(x)D(x)\to\infty as x±x\to\pm\infty, so a minimum exists. Exactly one critical point, and it is the global minimiser.

(b) Root-finding problem. Solve D(x)=0D'(x)=0, i.e. (dividing by 22)

g(x)=2x3+x4=0,g(x)=6x2+1.g(x)=2x^{3}+x-4=0,\qquad g'(x)=6x^{2}+1 .

Newton on gg is Newton on DD', because D(x)D(x)=2(2x3+x4)2(6x2+1)=g(x)g(x)\dfrac{D'(x)}{D''(x)}=\dfrac{2\left(2x^{3}+x-4\right)}{2\left(6x^{2}+1\right)}=\dfrac{g(x)}{g'(x)}.

Bracket. gg is continuous; g(1)=2+14=1<0g(1)=2+1-4=-1<0 and g(1.5)=6.75+1.54=4.25>0g(1.5)=6.75+1.5-4=4.25>0, so by the IVT there is a root in (1,1.5)(1,1.5). Sharpen: g(1.1)=2(1.331)+1.14=0.238<0g(1.1)=2(1.331)+1.1-4=-0.238<0 and g(1.2)=2(1.728)+1.24=0.656>0g(1.2)=2(1.728)+1.2-4=0.656>0, so the root lies in (1.1,1.2)(1.1,1.2). Take x0=1.1x_0=1.1 (note g(1.1)=8.26g'(1.1)=8.26, comfortably away from 00).

(c) Newton. xn+1=xn2xn3+xn46xn2+1x_{n+1}=x_n-\dfrac{2x_n^{3}+x_n-4}{6x_n^{2}+1}.

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$ ✓.