The Newton-Raphson method
The Newton-Raphson method finds an approximate root of an equation f(x) = 0 by repeating one formula: xn+1 = xn − f(xn) ÷ f′(xn). Start from a guess x₀ near the root, put it into the formula to get x₁, put x₁ in to get x₂, and so on. Each step slides down the tangent to the curve to where it crosses the x-axis, and close to a root the number of correct digits roughly doubles each time. For example, starting at x₀ = 2 for x² − 5 = 0 gives 2.25, then 2.2361, then 2.2360680, which is √5.
The Newton-Raphson formula
| Symbol | Meaning |
|---|---|
| x<sub>n</sub> | The current approximation |
| x<sub>n+1</sub> | The next, better approximation |
| f(x<sub>n</sub>) | The value of the function at x<sub>n</sub> |
| f′(x<sub>n</sub>) | The gradient (derivative) at x<sub>n</sub> |
The equation must be rearranged to the form f(x) = 0 first. AQA's AS and A-level formulae booklet gives the formula, and Pearson Edexcel's A-level specification asks students to solve equations using the Newton-Raphson method and to understand how it can fail.
Why the Newton-Raphson method works
At the point (xn, f(xn)) on the curve y = f(x), draw the tangent. Its gradient is f′(xn). Follow the tangent down to the x-axis: it meets it at xn+1. The gradient of the tangent is the rise over the run:
Rearranging for xn+1 gives the formula. Near a root, the curve is almost straight, so the tangent lands very close to where the curve itself crosses the axis.
Here x is the input and y = x³ − 2x − 5. The curve crosses the x-axis just above 2. The tangent at x₀ = 2, where f(2) = −1 and f′(2) = 10, hits the axis at 2 − (−1) ÷ 10 = 2.1, already very close to the root.
How to use the Newton-Raphson method
- Rearrange the equation into the form f(x) = 0.
- Differentiate to find f′(x).
- Choose a starting value x₀ close to the root, for example from a graph or a change of sign.
- Work out x₁ = x₀ − f(x₀) ÷ f′(x₀).
- Repeat with x₁, x₂, ... until the values agree to the accuracy you need.
- If the question asks, prove the accuracy with a change of sign.
On a calculator, type the starting value and press =, then type the formula using Ans in place of xn. Each press of = gives the next iteration.
Newton-Raphson worked examples
Example 1: finding √5
Use the Newton-Raphson method with x₀ = 2 to find √5.
√5 is the positive root of f(x) = x² − 5, with f′(x) = 2x. So:
| n | x<sub>n</sub> |
|---|---|
| 0 | 2 |
| 1 | 2.25 |
| 2 | 2.2361111 |
| 3 | 2.2360680 |
| 4 | 2.2360680 |
The value has stopped changing to 7 decimal places, so √5 ≈ 2.2360680. Three steps were enough.
Example 2: a cubic with no exact root
Solve x³ − 2x − 5 = 0, starting from x₀ = 2.
f(x) = x³ − 2x − 5 and f′(x) = 3x² − 2.
- x₁ = 2 − (−1) ÷ 10 = 2.1
- x₂ = 2.1 − 0.061 ÷ 11.23 = 2.0945681
- x₃ = 2.0945515
- x₄ = 2.0945515
The root is x = 2.0945515 to 7 decimal places.
Example 3: an equation with eˣ
Find the root of eˣ = 3 − x, starting from x₀ = 1.
Rearrange to f(x) = eˣ + x − 3 = 0, so f′(x) = eˣ + 1.
Then x₂ = 0.792135, x₃ = 0.792060 and x₄ = 0.792060. The root is x = 0.79206 to 5 decimal places.
Example 4: proving the accuracy
Show that the root of x³ − 2x − 5 = 0 is 2.095 to 3 decimal places.
Check the values either side, at 2.0945 and 2.0955:
- f(2.0945) = −0.00057, which is negative
- f(2.0955) = 0.01059, which is positive
The sign changes and f is continuous, so there is a root between 2.0945 and 2.0955, and every number in that interval rounds to 2.095.
Here is a quick check.
When the Newton-Raphson method fails
Pearson Edexcel's specification asks students to understand the method's working in geometrical terms, so they understand its failure near points where the gradient is small.
- At a stationary point, f′(xn) = 0. The tangent is horizontal and never meets the x-axis, and the formula divides by zero.
- Near a stationary point, the tangent is almost flat, so it meets the axis far away. For x³ − 2x − 5, there is a turning point at x = 0.816. Starting at x₀ = 0.8, where f′(0.8) = −0.08, gives x₁ = 0.8 − (−6.088) ÷ (−0.08) = −75.3, nowhere near the root.
- A poor starting value can lead to a different root from the one you wanted, or to values that bounce around without settling.
- A discontinuity, such as in tan x or 1 ÷ x, can make the method jump across a gap where there is no root at all.
The fix is usually a better starting value: sketch the graph, or use a change of sign to find an interval containing the root, and start inside it. The Derivative Calculator finds f′(x) with each rule shown, and the Custom Graph plots f(x) so you can see where the roots are before you start.
Derivative Calculator
Differentiate any function and see each rule applied
Newton-Raphson and other numerical methods
At A-level, Newton-Raphson sits alongside two other ways of locating roots:
| Method | How it works | Notes |
|---|---|---|
| Change of sign | If f(a) and f(b) have opposite signs and f is continuous, there is a root between a and b | Used to find an interval and to prove accuracy |
| Fixed-point iteration | Rearrange f(x) = 0 into x = g(x), then use x<sub>n+1</sub> = g(x<sub>n</sub>) | Shown with cobweb and staircase diagrams; may not converge |
| Newton-Raphson | Follow tangents: x<sub>n+1</sub> = x<sub>n</sub> − f(x<sub>n</sub>) ÷ f′(x<sub>n</sub>) | Usually very fast; needs f′(x); fails where f′ is near 0 |
Common mistakes
- Not rearranging to f(x) = 0. For eˣ = 3 − x, f(x) is eˣ + x − 3, not eˣ.
- Differentiating wrongly. Check f′(x) before you start: every iteration depends on it.
- Calculator in degrees for trig functions. Newton-Raphson with sin or cos needs radians.
- Rounding between steps. Keep full calculator values and round only the final answer.
- Stopping too early. Two successive values must agree to the required accuracy, and a change of sign proves it.
Newton-Raphson questions with answers
1. Write down the Newton-Raphson formula.
2. Use one iteration with x₀ = 2 to estimate the cube root of 7.
x₁ = 2 − (8 − 7) ÷ 12 = 1.9167
3. Why can't x₀ = 0 be used for f(x) = x² − 5?
4. Give the iteration formula for f(x) = x² − 10, and find √10 to 4 decimal places from x₀ = 3.
x₁ = 3.16667, x₂ = 3.16228, so √10 ≈ 3.1623
5. How do you show a root is correct to a given number of decimal places?
Practise calculus in a short timed paper
The daily papers don't set the Newton-Raphson method itself, but A-level Maths: Calculus gives you a short timed paper every day, with 8 questions worth 25 to 35 marks, on the differentiation every Newton-Raphson step depends on.
A-level Maths: Calculus
Start today's paperPaper resets in
Common questions
What is the Newton-Raphson method?
What is the Newton-Raphson formula?
Is the Newton-Raphson formula in the formula booklet?
Why does the Newton-Raphson method fail?
Is Newton's method the same as Newton-Raphson?
How fast is the Newton-Raphson method?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Solve it
Derivative Calculator
Differentiate any function and see each rule applied
Open the tool - Test it
A-level Maths: Calculus
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper