Consider the sum A inferred by the following:
A = 1 -1/4 + 1/9 - 1/16 + 1/25...
If the 1st term is t1 = 1 and the 2nd term is t2 = -1/4, use MATLAB to determine the sum
of terms at the 57th term (i.e. including the 57th term). Give answer to 4 decimal places. Also, provide MATLAB code.
"F(x)=\\displaystyle{\\sum_{n=1}^{57}}\\frac{(-1)^{n-1}}{n^2}"
MATLAB code:
syms n x
F(x)=symsum((-1)^(n-1)/n^2,n,1,57)
"F(x)=0.8226"
Comments
Leave a comment