Question: Design a Matlab function that evaluates the taylor series approximation T n =x^k/k! =1+x+x^2/2! +x^3/3!++x^n/n! to the function e^x near 0. b) Write a Matlab
Design a Matlab function that evaluates the taylor series approximation
Tn=x^k/k! =1+x+x^2/2! +x^3/3!++x^n/n! to the function e^x near 0.
b) Write a Matlab script that uses the function in (a) to plot the relative error in the Taylor series approximation Tn for n=4,8,16and 32 across [-1 1] for 51 values of x.
c) Write a Matlab script that uses the function in(a) to plot the relative error in the Taylor series approximation Tn as a function of n=1,2,100 for x=10 and x=-10. Matlab function to use subplot, 'semilogy , etc.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
