[Date Index]
[Thread Index]
[Author Index]
Re: FoourierTransform of a function defined in sections
*To*: mathgroup at smc.vnet.net
*Subject*: [mg70200] Re: FoourierTransform of a function defined in sections
*From*: Peter Pein <petsie at dordos.net>
*Date*: Sat, 7 Oct 2006 07:07:39 -0400 (EDT)
*References*: <eg4soa$ffu$1@smc.vnet.net>
Eckhard Schlemm schrieb:
> 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
>
>
Hi Ludwig,
1.) Don't use PI as a variable; it is too similar to the name of the
constant Pi (3.141...).
2.) Mathematica 'prefers' UnitStep or Piecewise (I changed PI to z):
In[1]:=
g[x_] := Sin[x]^2*UnitStep[x + z, z - x]
In[2]:=
tmp = (FullSimplify[#1, Im[p] == 0 && z > 0] & ) /@
Factor[FourierTransform[g[x], x, p]]
Out[2]=
(Sqrt[2/Pi]*(p*Cos[p*z]*Sin[2*z] + (-2 + p^2*Sin[z]^2)*Sin[p*z]))/
((-2 + p)*p*(2 + p))
This has got singularities for p in {-2,0,2}
In[3]:=
lim = (Limit[tmp, p -> #1] & ) /@ {-2, 0, 2}
Out[3]=
{-((4*z - 4*Sin[2*z] + Sin[4*z])/(8*Sqrt[2*Pi])),
(z - Cos[z]*Sin[z])/Sqrt[2*Pi],
-((4*z - 4*Sin[2*z] + Sin[4*z])/(8*Sqrt[2*Pi]))}
In[4]:=
fg[p_] = PiecewiseExpand[
Piecewise[
Apply[
{#1, p == #2} & ,
Transpose[{lim, {-2, 0, 2}}], {1}], tmp]];
You get the same with
In[1]:=
g[x_] := Piecewise[{{Sin[x]^2, -z <= x <= z}}]
etc.
Hope this helps,
Peter
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**
| |