Numerical method II-II IOE Note by IOE ALL Subject Notes
Write a pseudo-code to find a real root of non-linear equation using fixed point iteration method?
1. Start
2. Define function as f(x)
3. Define convergent form g(x)
4. Input:
a. Initial guess x0
b. Tolerable Error e
c. Maximum Iteration N
5. Initialize iteration counter: step = 1
6. Do
Xi+1 = g(Xi)
step = step + 1
If step > N
Print "Not Convergent"
Stop
End If
x0 = x1
While abs f(x1) > e
7. Print root as x1
8. Stop
Note: g(x) is obtained by rewriting f(x) in the form of x = g(x)
0 Comments:
Post a Comment
Please don't enter any spam link in the comment box