Beruflich Dokumente
Kultur Dokumente
x: f(x) = 0
The method starts with a function f defined over the real numbers x, the
function's derivative f ′, and an initial guess x0 for a root of the function f. If the function
satisfies the assumptions made in the derivation of the formula and the initial guess is
close, then a better approximation x1 is
f (x0 )
x1 = x0 –
f′ (x0 )
f (xn )
xn+1 = xn -
f′ (xn )
Aim: Find the root of an equation 3𝑥 + sin(𝑥) − 𝑒 𝑥 = 0 using Newton Rapson Method
1. Start
2. Enter the initial guess, x.
3. Enter the desired accuracy, eps.
4. Repeat
xn = x - f(x) / f’(x)
Until xn – x <= eps
5. Print ‘xn’, which is the root.
6. Finish
Start
Enter x
Enter eps
xn = x - f(x) / f’(x)
No
Yes
Print xn
Finish
4.0 Algorithm
Figure 2: Algorithm
Figure 3: Algorithm
4
Appendix