Assignment 2 G1
Assignment 2 G1
Assignment 2 NM
th
Due Date: 28 November 2024
Q1.
Note: Only graphical solutions will be accepted for this question.
Provide three separate graphs, one for each method.
Find the root of the equation 𝑓(𝑥) = 𝑥 3 − 4𝑥 + 1 graphically using the following methods:
a. Secant Method
b. Newton-Raphson Method
c. Bisection Method
For each method, use Python to plot a graph showing all iterations as the method converges
to the root. The root should be determined based on the graphical solution, not
mathematically.
Q2.
Note: If any two students present the same examples, zero marks will be awarded.
A. Provide two distinct examples where the Newton-Raphson method fails:
a. Case 1: Failure to converge due to an initial estimate being too far from the root.
b. Case 2: Convergence to the wrong root.
Explain why the method fails in each case, providing the function and initial estimate.
B. Give an example where the Secant method fails to converge to the desired root. Discuss
the reasons for failure and compare with the Newton-Raphson method for the same
function.
C. Provide an example where the Bisection method cannot find the root. Discuss how the
choice of interval impacts convergence and when Bisection is better or worse than the
other methods.
D. Analyze and compare the strengths and weaknesses of each method, based on your
examples, and discuss conditions critical for convergence. Recommend the best method
for different function types.
Q3.
In a spring-mass system, the oscillation frequency depends on the stiffness of the spring,
damping coefficient, and the time period of the oscillation. The oscillation frequency f (in
Hz) is modeled by:
√ 𝒌 − 𝒄. 𝒕
𝒎
𝒇=
𝟐𝝅
where:
𝒌
𝟐𝝅. (𝒇 − √ )
𝒎
𝒕=
𝒄
with an initial guess 𝑡0 =2.0. Perform iterations until the error is less than 10−3
Discuss the performance of each method regarding convergence speed and accuracy.