Starting from:

$29.99

EE25745-1 Exercise 2 Solution



Computer Exercise 2

• Reports should include answers to the questions, diagrams, charts and explanation of your methods.
• MATLAB codes should be attached to your reports. Codes are also considered to be well-written with appropriate comments.
• It is suggested to use MATLAB Live Script for preparing your reports more conveniently.
• Reports should be uploaded to courseware.
• Naming Format: HW2_StudentNumber

1. Write a MATLAB code that finds negative zero of the following function in the interval [−1,0] accuracy of 𝜖 = 10−4, using 5 different methods. For Newton and Fixed-point methods use 𝑥0 = 0. For Secant, Bisection and Regula Falsi methods use 𝑥0 = −1 and 𝑥1 = 0. Find N such that |𝑥𝑛 − 𝑥𝑛−1| < 𝜖 for 𝑛 > 𝑁 and plot |𝑥𝑛 − 𝑥𝑛−1| and 𝑓(𝑥𝑛) at each stage of each method.
𝑓(𝑥) = sin(𝑥) 𝑒𝑥 + 25𝑥 + 1

2. Use Newton’s method to compute the zero of 𝑓(𝑥) = 𝑥3 − 3𝑥22−𝑥 + 3𝑥4−𝑥 − 8−𝑥 in [0,1] and explain why convergence is not quadratic.
1


3. The vertical distance 𝑦 that a parachutist falls before opening the parachute is given by equation
𝑦
𝑘
4. Write a MATLAB program to compute the solution of the following 5 × 5 system of equation using Gauss-Jordan, Jacobi and Gauss Seidel methods. Exploit the MATLAB direct solution (𝑥 = 𝑖𝑛𝑣(𝐴) ∗ 𝑏;) as a basis, to calculate the error of each method. For Jacobi and Gauss-Seidel methods, plot the error values with respect to the number of iterations.
1 |𝑖−𝑗| 1 𝑖
𝐴𝑥 = 𝑏, 𝑤ℎ𝑒𝑟𝑒 𝑎𝑖𝑗 = ( ) , 𝑏𝑖 = ( ) , 𝑖, 𝑗 = 1, 2, 3, 4, 5
3 7

2


More products