Question: Please answer in Matlab form and explain process and variables ENGR&240 Applied Numerical Methods Problem 2 The Maclaurin series expansion for the cosine function is:
Please answer in Matlab form and explain process and variables ENGR&240 Applied Numerical Methods Problem 2 The Maclaurin series expansion for the cosine function is: cos x = 1--+--+--.. 2 4! 6 8! Write an m-file that generates a column vector of the first 13 series sums to estimate cos(8r/5). Compute the true relative error (e) and approximate relative error (&) for the second through last series sums. Use MATLAB's built-in cosine function to calculate the true value. Save your cosine estimates, corresponding & values, and corresponding &, values to three column vectors. Note: the first elements in your approximate relative error vector should correspond to the second Maclaurin series approximation: cos x = 1-X /2. ANSWERS: Write your three column vectors (cos x,, &), to A3.dat (13x1), A4.dat (13x1), and A5.dat (12x1) respectively
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
