ESO-208A Computational Methods in Engineering Assignment 1 2022-23 Semester-1
ESO-208A Computational Methods in Engineering Assignment 1 2022-23 Semester-1
Submit a single zip folder in the Brihaspati server under Assignment-1. The name of the
zip-folder should be your roll-number (e.g., If your roll no. is 123456, the folder name
should be '123456.zip'). The folder should include-
a. Bisection
b. False-position
c. Fixed-Point
d. Newton-Raphson
e. Secant
The program should have the facility for providing the following input– (i) non-linear
equation, (ii) option to choose one of the five methods mentioned above [for Fixed-Point
method, also providing the (x); for Newton-Raphson method, also providing the f’(x)],
(iii) starting values, and (iv) stopping criteria in form of maximum iterations and maximum
relative approximate error (in %).
It should provide as an output (i) Plot of f ( x) vs x , (ii) Plot of relative approximate error
vs iteration number, and (iii) Roots of the equation.
Test functions:
Use the initial bracket as (0,1) or the initial guess as 0; maximum iterations 50; and
maximum εr = 0.01%. For Fixed-Point method, use (x)=cos x.
(2) 𝒇(𝒙) = 𝒆𝒙𝒑(− 𝒙) − 𝒙 = 𝟎
Use the initial bracket as (0,1) or the initial guess as 0; maximum iterations 50; and
maximum εr = 0.05%. For Fixed-Point method, use (x)=exp(−x).
2. Write a computer program for finding roots of a polynomial f ( x) using the following
methods: (a) Muller (b) Bairstow
The program should have the facility for providing the following input– (i) polynomial, (ii)
option to choose one of the two methods, (iii) starting values, and (iv) stopping criteria in
form of maximum iterations and maximum relative approximate error (in %).
It should provide as an output (i) Plot f ( x) vs x and (ii) Roots of the equation.
Test polynomial: