$35
Write a MATLAB Script-M file to solve each of the following problems.
No.
Problem
1.
Use the Bisection method to find an approximation with accuracy 10−5, to a value in [0.5, [1].5] for 𝑓(𝑥) = ex − 2 − cos(ex − 2). Show your answer in a table with headings as follows: “Iteration No.”, “a”, “b”, “𝑐”,
“|𝑓(𝑐)|”
2.
Express the following equation as a fixed-point problem 𝑥 = 𝑔(𝑥) in three different ways
x3 − x +ex = 0
Use Fixed Point Iteration Method to find an approximation with accuracy 10−5. Show your answers in a table with suitable headings. Comment on the convergence of choices of 𝑔(𝑥).
3.
Set 𝑓(𝑥) = 54𝑥6 + 45𝑥5 − 102𝑥4 − 69𝑥3 + 35𝑥2 + 16𝑥 − 4. Plot the function on the interval [−2, 2], and use the Secant Method to find all five roots in the interval. Show your results in a table with headings as follows:
“Iteration No.”, “𝑥𝑛”, “𝐴𝑏𝑠𝑒𝑟𝑟𝑜𝑟”.
4.
Apply Newton’s Method to find both roots of the function
𝑓(𝑥)= 14𝑥𝑒𝑥−2 − 12𝑒𝑥−2 − 7𝑥3 + 20𝑥2 − 26𝑥 + 12 on the interval [0, 3]. Print out the sequence of iterations, the errors 𝑒𝑖, and the relevant error ratio .
[1] | P a g e