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: [mg70202] Re: [mg70176] FoourierTransform of a function defined in sections
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Sat, 7 Oct 2006 07:07:41 -0400 (EDT)
  • References: <200610060559.BAA15565@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
> 
> thanks
> 
> Eckhard
> 
> --
> _________________________
> Ludwig Schlemm
> Tel: +49 (0) 160 91617114
> LudwigSchlemm at hotmail.com
> 

Infinite recursion suggests a bug in the implementation of 
FourierTransform. That said, it may not handle very well a programming 
construct such as If. Instead one could use Piecewise or products of 
UnitStep cutoffs.

In[3]:= ff = UnitStep[Pi-x]*UnitStep[Pi+x]*Sin[x]^2;

In[4]:= InputForm[FourierTransform[ff, x, w]]
Out[4]//InputForm= (-2*Sqrt[2/Pi]*Sin[Pi*w])/(-4*w + w^3)

In[7]:= hh[x_] = Piecewise[{{Sin[x]^2, Abs[x]<Pi}}];

In[11]:= InputForm[FourierTransform[hh[x], x, w]]
Out[11]//InputForm= (-2*Sqrt[2/Pi]*Sin[Pi*w])/(-4*w + w^3)

Version 5.2 of Mathematica does in fact handle your If formulation. My 
guess is some preprocessing reformulates an integrand as a Piecewise 
construct.

In[12]:= g[x_]:=If[Abs[x]>Pi,0,Sin[x]^2]

In[14]:= InputForm[FourierTransform[g[x],x,p]]
Out[14]//InputForm= (-2*Sqrt[2/Pi]*Sin[p*Pi])/(-4*p + p^3)


Daniel Lichtblau
Wolfram Research


  • Prev by Date: Re: Beginner--[Please Help]How to get coefficient list issued from a Series Command
  • 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