(N)FourierTrigSeries
- To: mathgroup at smc.vnet.net
- Subject: [mg44996] (N)FourierTrigSeries
- From: "Martin Manscher" <reversed-email-rehcsnam at kd.utd.tac>
- Date: Fri, 12 Dec 2003 04:41:50 -0500 (EST)
- Organization: UNI-C
- Sender: owner-wri-mathgroup at wolfram.com
Consider the function
f[x_] = Sign[-Cos[2\[Pi] x]];
Then define
f2[x_] := f[If[EvenQ[Floor[2x]], Mod[x, 1/2], 1/2 - Mod[x, 1/2]]]
The two functions are equal:
Plot[{f[x], f2[x]}, {x, -2, 2}, PlotPoints -> 100];
Now if I Fourier transform f[x],
Chop[NFourierTrigSeries[f[x], x, 3, AccuracyGoal -> 10]]
I get
-1.27324 Cos[2 \[Pi] x] + 0.424413 Cos[6 \[Pi] x]
But if I Fourier tranform f2[x],
Chop[NFourierTrigSeries[f2[x], x, 3, AccuracyGoal -> 10]]
I get
1.27324 Sin[4 \[Pi] x]
Why this difference? Did I miss something or is this a bug in
(N)FourierTrigSeries?
Martin Manscher