Skip to main content

21. Differentials · Newton's Method

Adapted from: Classical single-variable calculus (linear approximation and Newton root-finding). Rewritten for teaching — not a verbatim textbook dump.

If ff is differentiable at xx, then

f′(x)=lim⁡Δx→0ΔyΔx,Δy=f(x+Δx)−f(x).f'(x)=\lim_{\Delta x\to 0}\frac{\Delta y}{\Delta x},\qquad \Delta y=f(x+\Delta x)-f(x).

So for small Δx\Delta x,

ΔyΔx∼f′(x)⇒Δy∼f′(x) Δx.(21.1)\frac{\Delta y}{\Delta x}\sim f'(x) \quad\Rightarrow\quad \Delta y\sim f'(x)\,\Delta x. \tag{21.1}

Rearranged:

f(x+Δx)∼f(x)+f′(x) Δx.(21.2)f(x+\Delta x)\sim f(x)+f'(x)\,\Delta x. \tag{21.2}

This is the linear (or tangent-line) approximation to ff near xx.

No free error bound

Formula (21.2) does not by itself say how small Δx\Delta x must be for a chosen number of correct decimals. That needs remainder estimates (later: Taylor with remainder).


Example 21.1 — Estimate 16.2\sqrt{16.2}​

Take f(x)=xf(x)=\sqrt{x}, x=16x=16, Δx=0.2\Delta x=0.2. Then f(16)=4f(16)=4 and

f′(x)=12x  ⟹  f′(16)=18.f'(x)=\frac{1}{2\sqrt{x}}\implies f'(16)=\frac18.

So

16.2∼4+18(0.2)=4.025.\sqrt{16.2}\sim 4+\frac18(0.2)=4.025.

(True value ≈4.0249\approx 4.0249 — three decimals agree.)


Example 21.2 — Estimate sin⁡(0.1)\sin(0.1)​

Take f(x)=sin⁡xf(x)=\sin x, x=0x=0, Δx=0.1\Delta x=0.1. Then f(0)=0f(0)=0, f′(0)=cos⁡0=1f'(0)=\cos 0=1, so

sin⁡(0.1)∼0.1.\sin(0.1)\sim 0.1.

True value ≈0.0998\approx 0.0998. Same idea: sin⁡u∼u\sin u\sim u for small uu.

Check: linear approx​

Quiz

Linear approximation

1 / 2

Formula (21.2) says f(x+Δx) is approximately…

Pick an answer to see if you are right.


The differential​

The product on the right of (21.1) is the differential of ff:

df=f′(x) Δx.df = f'(x)\,\Delta x.

It depends on both xx and Δx\Delta x. For small Δx\Delta x,

f(x+Δx)−f(x)∼df.(21.3)f(x+\Delta x)-f(x)\sim df. \tag{21.3}
Fig. 21-1 — RT = df approximates RQ = Δy

In the figure, the tangent L\mathscr{L} at PP has slope f′(x)f'(x), so the vertical rise over Δx\Delta x is dfdf. The true change along the curve is Δy\Delta y; they nearly match when Δx\Delta x is small.

Writing dxdx​

If f(x)=xf(x)=x, then dx=Δxdx=\Delta x. Hence we may rewrite

df=f′(x) dx,df = f'(x)\,dx,

and when Δx≠0\Delta x\neq 0,

dfdx=f′(x).\frac{df}{dx}=f'(x).

With y=f(x)y=f(x) one writes dydy for dfdf — the familiar dy/dxdy/dx.

Algebra of differentials​

For functions u,vu,v and constant cc:

d(c)=0,d(cu)=c du,d(u+v)=du+dv,d(uv)=u dv+v du,d ⁣(uv)=v du−u dvv2.\begin{aligned} d(c)&=0,& d(cu)&=c\,du,& d(u+v)&=du+dv,\\ d(uv)&=u\,dv+v\,du,& d\!\left(\frac{u}{v}\right)&=\frac{v\,du-u\,dv}{v^{2}}. \end{aligned}

Examples: d(tan⁡x)=sec⁡2x Δxd(\tan x)=\sec^{2}x\,\Delta x, and d(x3−2x)=(3x2−2) Δxd(x^{3}-2x)=(3x^{2}-2)\,\Delta x.


Newton's method​

Suppose x0x_0 is near a root of f(x)=0f(x)=0 and ff is differentiable. The tangent at x0x_0 usually hits the xx-axis at a better guess x1x_1.

Fig. 21-2 — tangent at x₀ meets the axis at x₁

Point-slope for the tangent:

y−f(x0)=f′(x0)(x−x0).y-f(x_0)=f'(x_0)(x-x_0).

At the intercept (x1,0)(x_1,0), if f′(x0)≠0f'(x_0)\neq 0,

x1=x0−f(x0)f′(x0).x_1=x_0-\frac{f(x_0)}{f'(x_0)}.

Repeating from x1,x2,…x_1,x_2,\ldots gives

xn+1=xn−f(xn)f′(xn).(21.5)x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}. \tag{21.5}
When Newton fails

If f′(xn)≈0f'(x_n)\approx 0, or the seed is far from a simple root, the sequence can diverge, cycle, or jump to another root. Always plot or sanity-check the start.


Example 21.3 — Approximate 3\sqrt{3}​

Solve f(x)=x2−3=0f(x)=x^{2}-3=0. Then f′(x)=2xf'(x)=2x and (21.5) becomes

xn+1=xn2+32xn.(21.6)x_{n+1}=\frac{x_n^{2}+3}{2x_n}. \tag{21.6}

With x0=1x_0=1:

nnxnx_n (approx.)
0011
1122
221.751.75
331.7321428571.732142857
441.732050811.73205081
55–661.7320508081.732050808 (stable)

So 3≈1.732050808\sqrt{3}\approx 1.732050808 to the digits shown.

Check: Newton​

Quiz

Newton's method

1 / 3

The Newton update is…

Pick an answer to see if you are right.


Takeaways​

Remember
  • Δy∼f′(x) Δx\Delta y\sim f'(x)\,\Delta x and f(x+Δx)∼f(x)+f′(x) Δxf(x+\Delta x)\sim f(x)+f'(x)\,\Delta x
  • df=f′(x) dxdf=f'(x)\,dx; algebra mirrors derivative rules
  • Newton: xn+1=xn−f(xn)/f′(xn)x_{n+1}=x_n-f(x_n)/f'(x_n) — fast near a simple root, not magic from a bad start

Further Reading​