Newton-Raphson Method Example
Find the real root of \( 3x = \cos(x) + 1 \) correct to four decimal places
Step 1: Define the function
\( f(x) = 3x - \cos(x) - 1 \)
Check sign change:
\( f(0) = -2 \)
\( f(1) = 1.4597 \)
Since there's a sign change between 0 and 1, a root lies in this interval. Choose initial guess: \( x_0 = 0.5 \)
Step 2: Use Newton-Raphson formula
\( x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)} \)
Where: \( f'(x) = 3 + \sin(x) \)
Iteration (n) | \( x_n \) | \( x_{n+1} \) |
---|---|---|
0 | 0.5 | 0.6085 |
1 | 0.6085 | 0.6071 |
2 | 0.6071 | 0.6071 |
Therefore, the root is: \( 0.6071 \)
✓
✓
No comments:
Post a Comment