| Author |
Comment/Response |
Sandra
|
01/07/13 09:17am
Hi all, I am new to Mathematica. I am trying to plot a function f(x)=x from the interval (-\pi,\pi) and together on the same graph, the partial sum S4 and S8
I try a the S4 but can't seem to get it right. Can anyone show me how to do it? Here is my code:
s[n_, x_] := Sum[((-1)^(n + 1)) (2/n) (Sin[nx]), {n, 1, Infinity}]
partialsums = Table[s[n, x], {n, 1, 4}];
Plot[Evaluate[partialsums], {x, -3, 3}]
Is there anything wrong with my code?
URL: , |
|