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
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');
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.