Question 1
Using Matlab, approximate a root of the function f(x) = e-x cos(x) starting with x0 = 1.2 and x1 = 1.3. The terminating conditions are given by εabs = 1e-5 and εstep = 1e-5.
Answer: 1.570796326794664 after seven iterations (you answer may be different in the last few digits).
Question 2
Perform three steps of the secant method for the function f(x) = x2 - 2 starting with x0 = 0 and x1 = 1. Use a calculator for the third step.
Answer: 2, 4/3, 7/5 (it is easier if you simply plot the points)
Copyright ©2005 by Douglas Wilhelm Harder. All rights reserved.