relative errors for the different solutions | My Assignment Tutor

The sine function can be evaluated by the following series (based on the Taylor’s series expansion):00×3 x5 xsin x = x – + … =3! 5! 7!Σ».(-1)x(2n+1)(2n + 1)!n=0where x is in radians.a) Write a MATLAB program to compute the value of sin x up to a specified order term nb) Compute sin 35° and sin 170° with n being 1, 2, 5, 7, 15c) Compute the true and estimated percent relative errors for the different solutions, for example,estimated relative error for n being 5 is computed from n being 4 and 5. Present the results inboth graphical and tabular format.d) Do you see a systematic trend when comparing the true vs the estimated percent relative errorsfor the numerical solutions?e) What type of numerical error does this question illustrate? What is a viable remedy for this typeof numerical error?


Leave a Reply

Your email address will not be published.