RE: Fourier Series Expansions and it's Coefficients question revised tia

*To*: mathgroup at smc.vnet.net*Subject*: [mg85288] RE: [mg85198] Fourier Series Expansions and it's Coefficients question revised tia*From*: "Jaccard Florian" <Florian.Jaccard at he-arc.ch>*Date*: Tue, 5 Feb 2008 06:07:49 -0500 (EST)*References*: <200802010720.CAA10016@smc.vnet.net> <EEDC4D88C587AB4F96F5E092A0514BE50669452D@01-orion.intra.eiaj.ch> <f20200960802041551x6903f219v70ba91a31fed21c7@mail.gmail.com>

Yes, I apologizeâ?¦ I should have controlled the detail of the starting point! Itâ??s not a problem to correct : data = {{0, 14}, {1, 18.7}, {2, 9}, {3, 4.1}, {4, 6.7}, {5, 6}, {6, 6.3}, {7, 8.4}, {8, 4}, {9, 2.9}, {10, 14}}; f = Interpolation[data, PeriodicInterpolation -> True]; << "FourierSeries`" s[x_] = N[FourierTrigSeries[f[x], x, 5, FourierParameters -> {-1, 1/10}]] 3.0154915002923373*Cos[0.6283185307179586*x] + 1.9468858139025986*Cos[1.2566370614359172*x] + 0.8537160611831265*Cos[1.8849555921538759*x] - 0.015093318283407771*Cos[2.5132741228718345*x] - 0.008688922838720048*Cos[3.141592653589793*x] + 2.0329072955441627*Sin[0.6283185307179586*x] + 3.8913292892342564*Sin[1.2566370614359172*x] + 2.5915623403884527*Sin[1.8849555921538759*x] + 0.027891058355718902*Sin[2.5132741228718345*x] + 0.*Sin[3.141592653589793*x] + 8.009999999999998 I suppose itâ??s quite normal that you cannot obtain the same result as doing it by hand and with excel, because in all cases, numerical methods are being used. This cannot be exact! So you have to choose what seem the best answer and the best way to do it yourself. I think that graphical controls are the easiest way to check solutions. Graphical control : discr = Interpolation[data /. {x_, y_} -> {x + 1, y},InterpolationOrder -> 0]; g[x_] = Piecewise[{{discr[x], 0 < x < 10}, {0, True}}]; Show[Plot[s[x], {x, -10, 20}, PlotStyle -> Red, PlotRange -> {0, 20}], Plot[g[x], {x, -10, 20}, Filling -> Axis], ListPlot[data, Filling -> Axis,PlotRange -> {0, 20}]] In this case, Iâ??m quite satisfied with what I seeâ?¦ arenâ??t you? Best regards F.Jaccard

**References**:**Fourier Series Expansions and it's Coefficients question revised tia***From:*ratullochjk@gmail.com