MathGroup Archive 2010

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

Search the Archive

Re: Rule

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108460] Re: Rule
  • From: Leonid Shifrin <lshifr at gmail.com>
  • Date: Fri, 19 Mar 2010 02:45:55 -0500 (EST)

Hi Rui,

This is a bit of a point solution, but it implements the functionality you
were asking for:

Clear[fourierTransformAnalyze]
SetAttributes[fourierTransformAnalyze, HoldAll];
fourierTransformAnalyze[FourierTransform[expr_, t_, f_]] :=
  With[{coeffs =
     Union@ Cases[expr, a_*t /; FreeQ[a, t] :> a, Infinity]},
   With[{k = First@coeffs, ks = FullSimplify@First@coeffs},
     1/Abs[ks]*FourierTransform[expr /. k -> 1, t, f/ks] /;
      FullSimplify[ks != 0] && ks =!= 0 &&
       FullSimplify[Im[ks] == 0 || Im[ks] === 0]] /;
    Length[coeffs] == 1];

fourierTransformAnalyze[a_FourierTransform] := a;

Some examples:

In[171]:= fourierTransformAnalyze[
 FourierTransform[DiracComb[a*t], t, f]]

Out[171]= FourierTransform[DiracComb[a t], t, f]

In[187]:= Assuming[Element[a, Reals],
 fourierTransformAnalyze[FourierTransform[DiracComb[a*t], t, f]]]

Out[187]= FourierTransform[DiracComb[a t], t, f]

In[188]:= Assuming[{Element[a, Reals], a > 0},
 fourierTransformAnalyze[FourierTransform[DiracComb[a*t], t, f]]]

Out[188]= DiracComb[-(f/(2 a \[Pi]))]/(Sqrt[2 \[Pi]] Abs[a])

In[189]:= Assuming[Element[a, Reals],
 fourierTransformAnalyze[
  FourierTransform[DiracComb[(Sin[a]^2 + Cos[a]^2 - 1)*t], t, f]]]

Out[189]= Sqrt[2 \[Pi]] DiracComb[0] DiracDelta[f]

In[191]:= Assuming[{Element[{a, b}, Reals], a > 0, b > 0},
 fourierTransformAnalyze[FourierTransform[DiracComb[a*b*t], t, f]]]

Out[191]= DiracComb[-(f/(2 a b \[Pi]))]/(Sqrt[2 \[Pi]] Abs[a b])

In[192]:= Assuming[{Element[a, Reals], a > 0},
 fourierTransformAnalyze[
  FourierTransform[DiracComb[a*t] + Sin[a*t], t, f]]]

Out[192]= (
DiracComb[-(f/(2 a \[Pi]))]/Sqrt[2 \[Pi]] +
 I Sqrt[\[Pi]/2] DiracDelta[-1 + f/a] -
 I Sqrt[\[Pi]/2] DiracDelta[1 + f/a])/Abs[a]

In[193]:= Assuming[{Element[a, Reals], a > 0},
 fourierTransformAnalyze[
  FourierTransform[DiracComb[a*t] + 1/(a^2*t^2), t, f]]]

Out[193]= (
a DiracComb[-(f/(2 a \[Pi]))] Sign[a] - f \[Pi] Sign[f])/(a Sqrt[
 2 \[Pi]] Abs[a] Sign[a])

Hope this helps.

Regards,
Leonid




On Thu, Mar 18, 2010 at 12:33 PM, Rui <rui.rojo at gmail.com> wrote:

> I got surprised when I saw that my Mathematica 7 computed
> FourierTransform[DiracComb[t], t, f] without trouble but couldn't deal
> with
> FourierTransform[DiracComb[2 t], t, f]
>
> So I thought about writing a rule that uses the property that the
> F{x[k t]}[f] = 1/|k| F{x[t]}[f/k] (I think :P)
>
> In Mathematica's words:
> FourierTransform[ expr_ , t_, f_]   should be transformed, only if in
> "expr" you can find aall "t"s multiplied by the same thing (let's call
> it "k"), and that thing doesn't have "t"s inside, into
> 1/Abs[k] FourierTrnasform[expr_ (* having replaced the k t  by t *),
> t, f/k]
>
> I'm a little lost. Even if I could find a way to do it, I wanna know
> how you would do it, because I'm already thinking about complicated
> stuff and it doesn't seem neither a too complex or too unusual
> problem.
>
> Thanks ;)
>
>



  • Prev by Date: Re: solving equations
  • Next by Date: Re: need something like ReplaceAllIndexed[]
  • Previous by thread: Re: Rule
  • Next by thread: Re: Rule