Professional Documents
Culture Documents
Numerical Computation
Submitted by:
Muhaib ul Islam
Submitted to:
Sir Ifthikar Ahmed
Registration no:
FA20-BEE-222
1. Simplicity: The method is conceptually simple and easy to implement, making it accessible
to a wide range of users.
3. Convergence in Many Cases: When properly chosen, the function \(g(x)\) and initial guess \
(x_0\) can lead to fast convergence, providing accurate solutions efficiently.
1. Dependence on Initial Guess: The choice of initial guess is crucial. If it's too far from the
actual solution, or if \(g(x)\) is poorly chosen, the method may fail to converge.
2. Potential for Divergence: Depending on the chosen \(g(x)\) and initial guess, the method
can diverge, leading to incorrect results.
def g(x):
return 10 / (x**2 + 4*x)
# Initial guess
x0 = 1.0
# Number of iterations
num_iterations = 10
for _ in range(num_iterations):
x_new = g(x_values[-1])
x_values.append(x_new)
y_values.append(g(x_new))