, as you scroll — highermaths.org highermaths.org read instead ›

Numerical methods

Can't solve it? Slide down the tangent.

Most equations have no formula for their roots. Newton–Raphson finds them anyway, one tangent at a time, and each step roughly doubles the number of correct digits.

scroll ↓

A root with no formula

x3−2x−5=0x^3 - 2x - 5 = 0 has a root between 22 and 33: f(2)=−1f(2) = -1 and f(3)=16f(3) = 16, so the curve crosses the axis in between. There is no neat way to find it exactly. Start at x0=3x_0 = 3.

Follow the tangent

The tangent at xnx_n has gradient f′(xn)f'(x_n), so it meets the axis a horizontal distance f(xn)f′(xn)\tfrac{f(x_n)}{f'(x_n)} further on. Go up to the curve there and repeat:

xn+1=xn−f(xn)f′(xn)x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}

The digits double

From 33 the steps go 2.362.36, 2.1271…2.1271\ldots, 2.0951…2.0951\ldots, 2.0945516…2.0945516\ldots Already x4x_4 shares its first seven figures with the root, 2.0945514…2.0945514\ldots Each step roughly doubles the correct digits.

When it fails

If f′(xn)=0f'(x_n) = 0 the tangent is horizontal and never meets the axis. Here that happens at the bottom of the dip, x=23x = \sqrt{\tfrac{2}{3}}. A start near such a point is almost as bad: a nearly flat tangent throws the next value far away.

Chapter 14

Tangent, axis, curve, repeat.

Locating roots by a change of sign, iteration with staircase and cobweb diagrams, the trapezium rule, and twelve graded exam questions with full worked solutions are waiting.