Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The Taylor Series Expansion for sin(x) is given by where x is the angle in radia

ID: 3550155 • Letter: T

Question


The Taylor Series Expansion for sin(x) is given by



where x is the angle in radians. Calculate approximations for sin (x) using


The Taylor Series Expansion for sin(x) is given by sin(x) x - x3/3! + x5/5! - x7/7! + x9/9! where x is the angle in radians. Calculate approximations for sin (x) using· just the first term of the expansion· the first 2 terms of the expansion· the first 3 terms of the expansion· the first 5 terms of the expansion· the built-in sin function for angles from -2pie to 2pie in step of 0.01 pie. Plot all these on the same graph using different colors and line types (you will need to re-use two line types). Add labels and a legend.

Explanation / Answer

x=[-2*pi:0.01*pi:2*pi];

y1=x-(x.^3/factorial(3));

y2=y1+(x.^5/factorial(5));

y3=y2-(x.^7/factorial(7));


y4=y3+(x.^9/factorial(9));


y5=sin(x);


plot(x,x,x,y1,'-r',x,y2,'--b',x,y4,'-k',x,y4,'--r',x,y5,'-c');

grid on


xlabel('x')

ylabel('approximation of sin(x)')

legend('1 term','2 terms','3 terms','5 terms','built-in function');

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote