Maclaurin Series, How can I find the answer?
5 views (last 30 days)
Sahil Jain on 20 Oct 2021
Hi. You can use a "for" loop to calculate this series as follows.
x = pi/3;
cosx = 1;
n = 10; % number of terms in the series
cosx = cosx + (-1)^i*x^(2*i)/factorial(2*i);