- 2073 Magh · 6 marks
Secant: cos x + e^x - 5
Short answer
Using x0=1, x1=2, the secant iteration x2=x1 - f(x1)*(x1-x0)/(f(x1)-f(x0)) yields root 1.6190 after 5 iterations to four decimals.
Find a real root of cos x + e^x - 5 = 0 accurate to 4 decimal places using the Secant Method.
Secant formula: x(n+1) = x(n) − f(x(n))·[x(n) − x(n−1)] / [f(x(n)) − f(x(n−1))].
Step 1: Starting values
f(x) = cos x + eˣ − 5 f(1) = 0.5403 + 2.7183 − 5 = −1.7414 < 0 and f(2) = −0.4161 + 7.3891 − 5 = 1.9729 > 0, so a root lies in (1, 2). Take x0 = 1 and x1 = 2.
Step 2: Iterations
| n | x(n-1) | x(n) | f(x(n-1)) | f(x(n)) | x(n+1) |
|---|---|---|---|---|---|
| 1 | 1.0000 | 2.0000 | -1.7414 | 1.9729 | 1.4688 |
| 2 | 2.0000 | 1.4688 | 1.9729 | -0.5540 | 1.5853 |
| 3 | 1.4688 | 1.5853 | -0.5540 | -0.1338 | 1.6224 |
| 4 | 1.5853 | 1.6224 | -0.1338 | 0.0135 | 1.6190 |
| 5 | 1.6224 | 1.6190 | 0.0135 | -0.0003 | 1.6190 |
| 6 | 1.6190 | 1.6190 | -0.0003 | -0.0000 | 1.6190 |
The last two iterates agree to four decimals.
Answer: root ≈ 1.6190
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Secant: x e^x - cos x · Numerical Method, chapter 2 · asked 3×
- Secant: x^5 - 3x^3 - 1 · Numerical Method, chapter 2 · asked 2×
- Secant method: explain and derive · Numerical Method, chapter 2 · asked 3×
- Secant method algorithm · Numerical Method, chapter 2 · asked 2×
- False position: cos x = x e^x · Numerical Method, chapter 2 · asked 2×
- False position: e^cos x - sin x - 1 · Numerical Method, chapter 2