# How to manipulate a Fourier sine series?

I would like to plot the Fourier sine series for $f(x) = x$.

I would like to manipulate the parameter n from $0$ to $10$ and plot the sine waves over $(0,1)$. My code below does not work; what is wrong?

Manipulate[Plot[FourierSinSeries[x, x, n], {x, 0, 1}], {n, 0, 10}]

-
Tried adding Evaluated -> True to Plot[]? –  Ｊ. Ｍ. May 6 '13 at 4:29
Also, for this function, n cannot be zero, so you'll need to change {n,0,10} to {n,1,10}. If you only intended to plot for integer n, then it's {n,1,10,1} –  bill s May 6 '13 at 5:07

Manipulate[Plot[Evaluate[FourierSinSeries[x, x, n]], {x, 0, 10}], {n, 1, 10}]

What is happening here is that Plot has the attribute HoldAll so that the FourierSinSeries function has not been evaluated (at the points n) when the plot occurs. There are some examples of this in the documentation for Plot: for instance look at the Neat Example and try removing the Evaluated command -- the plot will disappear.