Maclaurin series for sin 2 x is: Write a matlab function that calculates right a
ID: 3565351 • Letter: M
Question
Maclaurin series for sin2x is:
Write a matlab function that calculates right approximate value for sin2x with n-level maclaurin polynomial. Draw the function sin2x and 8. level maclaurin series on the range x ? [ -3/2pi, 3/2pi] on the same picture.
Maclaurin series for sin2x is: Sigma k=0 to infinity (-1)^k 2^2k+1/()2k+2)! X^2k+2 Write a matlab function that calculates right approximate value for sin2x with n-level maclaurin polynomial. Draw the function sin2x and 8. level maclaurin series on the range x ? [ -3/2pi, 3/2pi] on the same picture.Explanation / Answer
clc;
close all ;
clear all;
syms x;
P=0;
for j =1:9 ;
i=j-1;
F(j)=(-1)^i*(2^(2*i+1))*x^(2*i+2)/(factorial(2*i+2));
P=P+F(j);
end
ezplot(x,P,[ -3/2*pi, 3/2*pi])
hold on
h=ezplot(x,(sin(x))^2, [ -3/2*pi, 3/2*pi])
%% rate me five stars
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.