Question: MATLAB code Recall the Taylor series expansion for the exponential function ex, centerod at x=0 : cx=n=0n!xn=1+x+2!x2+3!x3 If we truncate the series after a finite

 MATLAB code Recall the Taylor series expansion for the exponential function

MATLAB code

Recall the Taylor series expansion for the exponential function ex, centerod at x=0 : cx=n=0n!xn=1+x+2!x2+3!x3 If we truncate the series after a finite number terms, the result ing polynomial will be upproximately equal to ex if x is sufficiently small. Ploase answer the following: (a) Plot the exponential function, cx, in the interval 3x3. Include cnough points to make the curve appear smooth. (b) Using a for loop, in the same plot, superimpose the Taylor polynomial npproximations of degrees 0 through 5 , on the same interval. In other words, plot the polynomials I.IIx,1+21x2, all the way up to degree 5. Hint: The factorial in the denominator of cach polynomial term can be calculated using a built-in function called factorial (try the help command for more information). Hint: Put a plot command inside the loop. Remember to use hold on to kecp all the curves in the plot

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!