01 · One tangent intercept
A current estimate is x₀ = 4, with f(4) = 6 and f′(4) = 3. Find x₁.
Hint
Subtract function value divided by derivative.
Worked solution
x₁ = 4 − 6/3 = 2.
Understand · explore · practise
Derive and use the Newton–Raphson formula with learner-controlled tangent steps. Work through polynomial, exponential, logarithmic and trigonometric equations, retain working precision and verify root accuracy.
Before you startDifferentiation; equations of tangents; root accuracy
01 / Replace a small part of the curve by its tangent
xₙ₊₁ = xₙ − f(xₙ)/f′(xₙ), provided f′(xₙ) ≠ 0.
Newton–Raphson tries to solve f(x) = 0. At the current estimate xₙ, find the point on the curve and its tangent. The point where that tangent meets the horizontal axis is the next estimate.
A good tangent can give a much closer estimate quickly. Convergence is not guaranteed for every function or starting value; check the domain and the results.
x0 = 2; f(x0) = 1; f′(x0) = 4.
x1 = 2 − 1/4 = 1.75.
Distance from √3: current ≈ 0.267949192431; next ≈ 0.0179491924311.
Current and previous estimates: 2.
The tangent is drawn through (xₙ, f(xₙ)); its horizontal-axis intercept supplies xₙ₊₁. Each selection is manual. Internal values are retained before display rounding; the known root √3 lets us compare errors here. At very late steps, a displayed zero error means agreement at machine precision, not an exact value for this irrational root.
02 / Derive the update from the tangent equation
The tangent gradient is f′(xₙ)
Differentiate the function whose root is sought.
y − f(xₙ) = f′(xₙ)(x − xₙ)
Use the point-gradient equation.
At the tangent’s x-intercept, y = 0
This point supplies the next estimate xₙ₊₁.
−f(xₙ) = f′(xₙ)(xₙ₊₁ − xₙ)
Substitute and rearrange.
xₙ₊₁ = xₙ − f(xₙ)/f′(xₙ)
Division requires a nonzero derivative.
Pause, replay or seek freely. The notes explain the same idea and stay in view.
A current estimate is x₀ = 4, with f(4) = 6 and f′(4) = 3. Find x₁.
Subtract function value divided by derivative.
x₁ = 4 − 6/3 = 2.
If x₀ = 1, f(1) = −2 and f′(1) = 4, find x₁.
Subtracting a negative quotient increases the estimate.
x₁ = 1 − (−2)/4 = 1.5.
03 / Write the formula for the chosen equation
f(x) = x² − 3; f′(x) = 2x
The derivative vanishes at zero, which must be avoided.
xₙ₊₁ = xₙ − (xₙ² − 3)/(2xₙ)
Substitute into Newton’s formula.
Equivalently xₙ₊₁ = (xₙ + 3/xₙ)/2
This simplification is valid for xₙ ≠ 0.
x₁ = 7/4 = 1.75; x₂ = 97/56 ≈ 1.73214285714
Retain unrounded values.
x₃ ≈ 1.73205081002
Compare with √3 ≈ 1.73205080757.
Write the Newton update for f(x) = x³ + 2x − 7.
First find f′(x).
xₙ₊₁ = xₙ − (xₙ³ + 2xₙ − 7)/(3xₙ² + 2). The denominator is positive for every real xₙ.
For that cubic, calculate x₁ from x₀ = 1.
f(1) = −4 and f′(1) = 5.
x₁ = 1 − (−4)/5 = 1.8.
04 / Count the requested number of substitutions
f′(x) = 3x² − 1
Use this derivative in every step.
x₁ ≈ 1.521739130435
First substitution.
x₂ ≈ 1.521379805965
Second substitution.
x₃ ≈ 1.521379706805
Third substitution.
If asked for x₂, report x₂ with the requested rounding
Do not silently replace it by a later iterate.
A question supplies x₁ = 2 for xₙ₊₁ = (xₙ + 3/xₙ)/2. Find x₃.
Only two substitutions are needed from x₁.
x₂ = 1.75, then x₃ = 97/56 ≈ 1.73214285714.
05 / Include the whole equation in f
Choose f(x) = eˣ − 3
We need a zero of this difference.
f′(x) = eˣ
The constant disappears when differentiated.
xₙ₊₁ = xₙ − [exp(xₙ) − 3]/exp(xₙ)
Use the exponential function at the current input.
x₁ ≈ 1.103638323514; x₂ ≈ 1.098624898047
Store full values between steps.
The exact answer is ln3 ≈ 1.098612288668
An exact comparison is available in this example.
Write the update for eˣ + x − 4 = 0.
The derivative includes the derivative of x.
xₙ₊₁ = xₙ − (exp(xₙ) + xₙ − 4)/(exp(xₙ) + 1).
06 / Keep logarithmic iterates in the real domain
f(x) = ln x + x − 2, with x > 0
The domain belongs to the original equation.
f′(x) = 1/x + 1
Both terms contribute.
xₙ₊₁ = xₙ − (ln xₙ + xₙ − 2)/(1/xₙ + 1)
Check every next value before using it.
x₁ = 1.5; x₂ ≈ 1.556720935135
These values remain positive.
x₃ ≈ 1.557145576347
This is a numerical estimate, requiring a separate accuracy check.
Can you start this Newton calculation at x₀ = −1?
Check f(x₀) before calculating a quotient.
No. ln(−1) is not real, so f(−1) is undefined in this real-valued problem.
For f(x) = 1/x − 2, show that Newton’s update simplifies to xₙ₊₁ = 2xₙ − 2xₙ². State the domain restriction inherited from f.
f′(x) = −1/x².
x − (1/x − 2)/(−1/x²) = x + x − 2x² = 2x − 2x². The Newton calculation still requires xₙ ≠ 0, even though the simplified polynomial is defined there.
07 / Use radians with standard trig derivatives
f(x) = cos x − x
Move x to the left.
f′(x) = −sin x − 1
The standard derivative assumes radians.
xₙ₊₁ = xₙ − (cos xₙ − xₙ)/(−sin xₙ − 1)
Use radians for both trigonometric evaluations.
x₁ ≈ 0.750363867840; x₂ ≈ 0.739112890911
Keep stored precision.
x₃ ≈ 0.739085133385
A useful estimate of the fixed intersection.
Write the Newton update for sin(2x) − x/2 = 0, using radians.
Apply the chain rule to sin(2x).
xₙ₊₁ = xₙ − [sin(2xₙ) − xₙ/2]/[2cos(2xₙ) − 1/2], provided the denominator is nonzero.
08 / Differentiate xˣ before substituting
Write xˣ = exp(x ln x)
This real expression uses x > 0.
d(xˣ)/dx = xˣ(ln x + 1)
Use the chain rule.
Set f(x) = xˣ − 3
Then f′(x) = xˣ(ln x + 1).
xₙ₊₁ = xₙ − (xₙxₙ − 3)/[xₙxₙ(ln xₙ + 1)]
In this formula xₙxₙ means the current input raised to itself.
From x₀ = 1.5: x₁ ≈ 1.950379848069; x₂ ≈ 1.839606335555
The first step overshoots; improvement need not be monotone from the start.
For f(x) = xˣ − 3 on x > 0, at what input is f′(x) zero?
The factor xˣ is positive.
ln x + 1 = 0, so x = e⁻¹. Newton’s quotient cannot be evaluated there. That input does not solve xˣ = 3.
09 / Prove the requested decimal accuracy separately
Test the halfway values 1.7315 and 1.7325
These are the rounding boundaries.
f(1.7315) = −0.00190775
The lower sign is negative.
f(1.7325) = 0.00155625
The upper sign is positive.
f is continuous and increasing on this interval
There is a unique root between the boundaries.
Hence the root rounds to 1.732 at 3 d.p.
This verifies the root, independently of how it was approximated.
Two Newton iterates both display 0.7391. Does that alone prove the true root is 0.7391 to 4 d.p.?
Distinguish numerical agreement from a root bracket.
No. A suitable sign-change proof would test the continuous target function at 0.73905 and 0.73915, or establish a smaller valid bracket within them.
Does a small |f(xₙ)| always mean xₙ is close to a root?
The scale of f can make every output small.
No. Multiplying a function by a tiny nonzero constant makes its residuals small without changing its roots. Use a justified root bracket or other valid error estimate.
10 / A nonzero constant factor cancels from Newton’s method
h′(x) = 7f′(x)
Differentiate the constant multiple.
h(x)/h′(x) = f(x)/f′(x)
The nonzero factor cancels wherever the quotient is defined.
The exact Newton updates are identical
This concerns exact mathematics; finite-precision computations can still be affected by extreme scaling.
Do x² − 3 and 5x² − 15 produce the same Newton update from the same nonzero start?
The second function is five times the first.
Yes. (5x² − 15)/(10x) = (x² − 3)/(2x), so the updates match.
If h(x) = [f(x)]³ and f and f′ are nonzero at the current input, compare h/h′ with f/f′.
Use the chain rule.
h′ = 3f²f′, so h/h′ = f/(3f′). The step is one third as large. Having the same roots does not always give the same Newton iteration.
11 / Check the prerequisites for the next tangent
If the current point is already an exact root, stop. Otherwise Newton’s formula needs a defined f and a nonzero derivative at that input. Check that the next estimate remains in the domain and in any physical interval relevant to the problem.
A horizontal tangent at a nonroot gives no finite intercept. A near-horizontal tangent can make a large step when the ratio f/f′ is large. More detailed failure cases belong to the next lesson.
For f(x) = x², the current input is zero. Both f and f′ are zero. What should you report?
Check whether the problem has already been solved.
Zero is an exact root. Stop; do not try to evaluate the undefined quotient 0/0.
12 / Present a Newton calculation so it can be checked
For f(x) = 1/x − 2, use x₀ = 0.25 to find x₁.
Use f(0.25) = 2 and f′(0.25) = −16.
x₁ = 0.25 − 2/(−16) = 0.375. Both inputs are nonzero.
Section 1 of 12 · Replace a small part of the curve by its tangent