Skip to main content

N-R: 4 sin x - e^x

Short answer

Apply Newton-Raphson to f(x)=4 sin x - e^x with x0=0.5. Iterations give x=0.370558, with relative change below 0.01%, so the smallest positive real root is approximately 0.3706.

Evaluate the real root of f(x) = 4 sin x - e^x using Newton Raphson method. The absolute error of root in consecutive iteration should be less than 0.01%.

Newton-Raphson formula: x(n+1) = x(n) − f(x(n)) / f′(x(n)). Stop when the relative change |x(n+1) − x(n)| / |x(n+1)| × 100 % is below 0.01 %.

Step 1: Function, derivative and starting value

f(x)  = 4 sin x − eˣ
f'(x) = 4 cos x − eˣ        (x in radians)

f(0) = −1 < 0 and f(0.5) = 4(0.4794) − 1.6487 = 0.2690 > 0, so a root lies in (0, 0.5). Take x0 = 0.5. (A second root lies in (1, 2) because f(1) = 0.648 > 0 and f(2) = −3.75 < 0.)

Step 2: Iterations (six decimals shown)

nx(n)f(x(n))f'(x(n))x(n+1)error % = |Δx / x(n+1)| × 100
00.5000000.2689811.8616090.35551240.6424
10.355512-0.0346302.3229640.3704194.0246
20.370419-0.0003162.2803600.3705580.0374
30.370558-0.0000002.2799590.3705580.0000

The error is below 0.01 % at the last row.

Answer: smallest positive real root ≈ 0.3706

Starting from x0 = 1.5 the same method converges to the other real root ≈ 1.3650 in 4 iterations.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Numerical Method chapter 2 questions →