Re: FoourierTransform of a function defined in sections
- To: mathgroup at smc.vnet.net
- Subject: [mg70191] Re: [mg70176] FoourierTransform of a function defined in sections
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 7 Oct 2006 07:07:05 -0400 (EDT)
- Reply-to: hanlonr at cox.net
Needs["Graphics`"];
g[x_]= (1/2)*(Sign[Pi-x]+Sign[x+Pi])*Sin[x]^2;
Plot[{Sin[x]^2,g[x]},{x,-3Pi,3Pi},
PlotStyle->{Red,{AbsoluteThickness[2],Blue}},
Frame->True,Axes->False,
FrameTicks->{PiScale,Automatic}];
f[p_]=FourierTransform[g[x],x,p]
-((2*Sqrt[2/Pi]*Sin[p*Pi])/(p^3 - 4*p))
g[x]==InverseFourierTransform[f[p],p,x]//Simplify
True
Alternatively you could use UnitStep
g2[x_]=(UnitStep[x+Pi]-UnitStep[x-Pi])Sin[x]^2;
f[p]==FourierTransform[g2[x],x,p]
True
Or, Piecewise
g3[x_]:=Piecewise[{{Sin[x]^2,-Pi<x<Pi}}];
f[p]==FourierTransform[g3[x],x,p]
True
Bob Hanlon
---- Eckhard Schlemm <e.schlemm at hotmail.de> wrote:
> Hello,
>
> I want Mathematica to calculate the FourierTransform of a function which is
> defined by Sin[x]^2 for Abs[x]<PI and zero else. I tried and defined the
> function g as follows:
>
> g[x_]:=If[Abs[x]>PI,0,Sin[x]^2];
>
> That works fine. But if I have mathematica try to determine the
> FourierTransform by
>
> FourierTransform[g[x],x,p]
>
> I always get the error that the recursion limit and the iteration limit were
> exceeded...
>
> what am I'm doing wrong?
>
> Any help is appreciated
>
> thanks
>
> Eckhard
>
> --
> _________________________
> Ludwig Schlemm
> Tel: +49 (0) 160 91617114
> LudwigSchlemm at hotmail.com
>
>
--
Bob Hanlon
hanlonr at cox.net