Question: Please Use MATLAB CODE and Ouptut with answer. 4. Use the piecewise quadratic (k = 2) interpolating polynomial to interpolate f = sin(z), z [0,
Please Use MATLAB CODE and Ouptut with answer.


4. Use the piecewise quadratic (k = 2) interpolating polynomial to interpolate f = sin(z), z [0, 2 with , 160. For each m d=linspace (0, 2*pi, m). Write a for loop to calculate the error for m = 10, 20, 40, uniformly decompose the interval into m subintervals. (a) For piecewise interpolating polynomials, recall that the error satisfies the following estimate where h is the size of the subintervals. For this problem, write down the formula for the error bound in terms of k and m. (b) Generate the log-log plot for the error eh against the subinterval size h. In the same graph plot the error bound in 1) against h. What do you observei? c) Empirically calculate the order of accuracy and display the results. 4. Use the piecewise quadratic (k = 2) interpolating polynomial to interpolate f = sin(z), z [0, 2 with , 160. For each m d=linspace (0, 2*pi, m). Write a for loop to calculate the error for m = 10, 20, 40, uniformly decompose the interval into m subintervals. (a) For piecewise interpolating polynomials, recall that the error satisfies the following estimate where h is the size of the subintervals. For this problem, write down the formula for the error bound in terms of k and m. (b) Generate the log-log plot for the error eh against the subinterval size h. In the same graph plot the error bound in 1) against h. What do you observei? c) Empirically calculate the order of accuracy and display the results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
