Question: c o s ( x ) = i = 0 n ( - 1 ) i x 2 i ( 2 i ) ! is
is the Taylor McClaurin expansion of order centred at for
a points Write a Matlab program that computes the nth order expansion and plots this expansion and the real values of on the interval
Hints : try modifying the code snippet for computation of the Maclaurin expansion of given in the week lecture notes!
b points Modify your code to compute and plot the error between the expansion and the real value of for all xin
c points Add commands to your code to compute the sum of the squared errors and comment on what happens to this as the order of the expansion is increased.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
