Question: For the problems involving MATLAB programs, you can write your own codes or you may download bisect.m, newton.m from your textbook and modify them, if
For the problems involving MATLAB programs, you can write your own codes or you may download bisect.m, newton.m from your textbook and modify them, if necessary. Submit all MATLAB codes you used, output files, and any requested hand-written answers.
Consider approximating 1/3 on a computer using Newton's method to solve f(x) = 3 (1/x) = 0
1) Derive the formula for Newton's method for this problem.
2) Modify newton.m (or write your own program) and write another script to call newton.m to compute 1 / 3 with = 10-5 and max iter = 30 and tabulate the results as in Table 3.2. Try three different initial guesses: x0 = 0.1, 0.2, 0.3 and describe your observations in connection with the theory.
Table 3.2. Newton's Method for x - x 1= 0 n xn f (xn) xn-Xn-1 a - Xn-1 0 1.5 1 1.30049088 8.89E+1 2.54E + 1 5.38E - 1 -2.00E - 1 -3.65E - 1 2 1.18148042 -1.19E-1 3 1.13945559 4.92E-2 -4.20E - -2 4 1.13477763 5.50E - 4 --4.68E-3 -1.66E-1 -4.68E - 2 -4.73E-3 -5.35E 5 -6.91E-9 5 1.13472415 7.11E - - 8 -5.35E-5 6 1.13472414 1.55E - 15 --6.91E-9 Table 3.2. Newton's Method for x - x 1= 0 n xn f (xn) xn-Xn-1 a - Xn-1 0 1.5 1 1.30049088 8.89E+1 2.54E + 1 5.38E - 1 -2.00E - 1 -3.65E - 1 2 1.18148042 -1.19E-1 3 1.13945559 4.92E-2 -4.20E - -2 4 1.13477763 5.50E - 4 --4.68E-3 -1.66E-1 -4.68E - 2 -4.73E-3 -5.35E 5 -6.91E-9 5 1.13472415 7.11E - - 8 -5.35E-5 6 1.13472414 1.55E - 15 --6.91E-9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
