FourierTrigSeries[] and user-defined function
- To: mathgroup at smc.vnet.net
- Subject: [mg96628] FourierTrigSeries[] and user-defined function
- From: sagrailo at gmail.com
- Date: Tue, 17 Feb 2009 06:32:53 -0500 (EST)
Am trying to have Mathematica to generated coefficient of Fourier trigonometric series for simple step function, defined as follows: f[x_ /; Mod[x, 2*Pi] <= Pi] := 1 f[x_ /; Mod[x, 2*Pi] > Pi] := 2 I'm able to get the plot of the function: Plot[f[x], {x, 0, 2*Pi}, PlotRange -> {0, 3}] However, when I try to generate Fourier coefficients: FourierTrigSeries[f[x], x, 10] Mathematica is just repeating the above expression as output (and passing the expression to N[] or Evaluate[] doesn't help. Any suggestion here? Also, is it possible to not use Mod[] in the function definition above, and to have Mathematica to "know" that it should "extend" given function so that it behaves as periodic function? Thanks.
- Follow-Ups:
- Re: FourierTrigSeries[] and user-defined function
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: FourierTrigSeries[] and user-defined function