MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FoourierTransform of a function defined in sections

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70187] Re: FoourierTransform of a function defined in sections
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Sat, 7 Oct 2006 07:06:56 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <eg4soa$ffu$1@smc.vnet.net>

Eckhard Schlemm 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

Hi Eckhard,

You must have some other conflicting definitions or its a 
platform/version specific problem. With a fresh Mathematica 5.2 kernel 
on Windows XP SP2, I had not problem running the code, see below. (Note 
that I have added two alternative definitions for g, that might help in 
your case.)

In[1]:=
g1[x_] := If[Abs[x] < PI, Sin[x]^2, 0];
fg1 = FourierTransform[g1[x], x, p]

Out[2]=
-((1/(p*(-4 + p^2)))*(Sqrt[2/Pi]*(p*Cos[p*PI]*Sin[2*PI] +
      (-2 + p^2*Sin[PI]^2)*Sin[p*PI])*(-1 + UnitStep[-PI])))

In[3]:=
g2[x_] := Piecewise[{{Sin[x]^2, Abs[x] < PI}}, 0]
fg2 = FourierTransform[g2[x], x, p]

Out[4]=
-((1/(p*(-4 + p^2)))*(Sqrt[2/Pi]*(p*Cos[p*PI]*Sin[2*PI] +
      (-2 + p^2*Sin[PI]^2)*Sin[p*PI])*(-1 + UnitStep[-PI])))

In[5]:=
g3[x_ /; Abs[x] < PI] := Sin[x]^2
g3[x_] := 0
fg3 = FourierTransform[g2[x], x, p]

Out[7]=
-((1/(p*(-4 + p^2)))*(Sqrt[2/Pi]*(p*Cos[p*PI]*Sin[2*PI] +
      (-2 + p^2*Sin[PI]^2)*Sin[p*PI])*(-1 + UnitStep[-PI])))

In[8]:=
fg1 == fg2 == fg3

Out[8]=
True

In[9]:=
$Version

Out[9]=
"5.2 for Microsoft Windows (June 20, 2005)"

Regards,
Jean-Marc


  • Prev by Date: Re: FoourierTransform of a function defined in sections
  • Next by Date: Re: FoourierTransform of a function defined in sections
  • Previous by thread: Re: FoourierTransform of a function defined in sections
  • Next by thread: Re: FoourierTransform of a function defined in sections