
Originally Posted by
woody198403
so my Fourier Series is
Have I mis-understood what the function is? When I plot the first 50 terms of your expression above I get the plot below which I've superimposed over what I thought the original function is. That does not seem to be converging to it in the way one normally thinks of a Fourier series converging (with Gibbs phenomenon) to a function. Here's my Mathematica code in case some are interested:
Code:
f[x_] := 2*x - x^2;
h[x_] := 2/3 - (1/Pi^2)*
Sum[Cos[2*Pi*n*x]/n^2, {n, 1, 150}] -
(1/Pi)*Sum[Sin[2*Pi*n*x]/n^2, {n, 1, 150}]
fplot1 = Plot[f[x], {x, 0, 1},
PlotStyle -> {Thickness[0.001], Red}]
fplot2 = Plot[f[x - 1], {x, 1, 2},
PlotStyle -> {Thickness[0.001], Red}]
fplot3 = Plot[f[x - 2], {x, 2, 3},
PlotStyle -> {Thickness[0.001], Red}]
p2 = Plot[h[x], {x, 0, 3}]
Show[{fplot1, fplot2, fplot3, p2},
PlotRange -> {{0, 3}, {0, 1}}]