Project 0, MAT 362
Due Sunday January 24th, midnight.


   Modify the Matlab demo codes to explore the following four algorithms, and then write a short report containing your results and analysis of your results. Find the four topics in Burden and Faires and include in your report a statement of the most relevant error or convergence facts. Upload one or several Matlab .m files per portion, along with a single PDF copy of your report. This is a solo project - you may collaborate, but write your own code and report. Consult the Project Guidelines!!!

   For the following four questions, let the functions f, g :  be defined by:

(1) Approximate  Use the midpoint rule with n = 10, 20, 40, 80, and 160 divisions. Compare approximations to actual answers, and observe the magnitude of the error as a function of n. See demo program mp.m.


(2) Consider the IVP  over the intervals [0, b], with y(0) = 1, for appropriate values of b < 1. Approximate via Euler’s method with n = 10, 20, 40, 80, and 160 divisions. Compare approximations to actual answers, and observe the magnitude of the error as a function of n. See demo programs edrive.m and myeuler.m.


(3) Approximate the zeros of h defined by h(x) = g(x) - f(x). Use Newton’s method with initial guesses  Compare approximations to actual answers. Which roots are converged to at the faster rate? See demo program iterative.m for a generic iterative structure - you delete some stuff and replace with code to implement Newton’s method.


(4) Approximate first and second derivatives of f and g over the interval [0, 1] by calculating the matrix products  Here,  are vectors in  obtain by evaluating the functions f and g over the n+ 1 gridpoints resulting from dividing the interval into n equal divisions. Use first and second sparse difference matrices for interior points with n = 10, 20, 40, 80, and 160 divisions. Compare approximate derivatives with actual derivatives, and observe the magnitude of the error as a function of n. See demo diffOpDemo.m.