I want to use the command FourierTransform to transform a differential equations from time - domain to complex frequency domain but it don't works. My code is
eq = {a'[t] == -κ/2 a[t] - I g b[t] E^(I Ω t) +
Sqrt[κ] ain ,
b'[t] == -Γ/2 b[t] - I Ω b[t] -
I g a[t] E^(- I Ω t) + Sqrt[Γ] bin}
ff = FourierTransform[eq, t, ω]
The Result is
(* {FourierTransform[
Derivative[1][a][t] ==
ain Sqrt[κ] - 1/2 κ a[t] -
I E^(I t Ω) g b[t], t, ω],
FourierTransform[
Derivative[1][b][t] ==
bin Sqrt[Γ] - I E^(-I t Ω) g a[t] -
1/2 Γ b[t] - I Ω b[t], t, ω]} *)
Then I try use Map to make it works
Clear["Global`*"]
eq = {a'[t] == -κ/2 a[t] - I g b[t] E^(I Ω t) +
Sqrt[κ] ain ,
b'[t] == -Γ/2 b[t] - I Ω b[t] -
I g a[t] E^(- I Ω t) + Sqrt[Γ] bin}
ff = FourierTransform[#, t, ω] &
Map[ff, eq, {2}]
But it doesn't work, either:
(*{-I ω FourierTransform[a[t],t,ω]==FourierTransform[ain Sqrt[κ]-1/2 κ a[t]-I E^(I t Ω) g b[t],t,ω],-I ω FourierTransform[b[t],t,ω]==FourierTransform[bin Sqrt[Γ]-I E^(-I t Ω) g a[t]-1/2 Γ b[t]-I Ω b[t],t,ω]}*)
How can I make Mathematica apply FourierTransForm in every term of a differential equation
With the method of Workarounds for a possible bug in the linearity of FourierTransform I define a shell but it dosen't work well for some term.
(*Clear["Global`*"]
ft[(h : List | Plus | Equal)[a__], t_, w_] := ft[#, t, w] & /@ h[a]
ft[a_ b_, t_, w_] /; FreeQ[b, t] := b ft[a, t, w]
ft[a_ E^(-I b_ t_) , t_, w_] /; FreeQ[b, t] := ft[a + b, t, w]
ft[a_, t_, w_] := FourierTransform[a, t, w]
eq = { eq = {a'[t] == -κ/2 a[t] - I g b[t] E^(I Ω t) +
Sqrt[κ] ain ,
b'[t] == -Γ/2 b[t] - I Ω b[t] -
I g a[t] E^(- I Ω t) + Sqrt[Γ] bin}}
ft[eq, t, ω]*)
Then I get a result
(*{-I ω FourierTransform[a[t], t, ω] == -(1/2) κ FourierTransform[a[t],t,ω]+ Sqrt[κ] FourierTransform[ain[t], t, ω] - I g FourierTransform[E^(I t Ω) b[t], t, ω], -I ωFourierTransform[b[t], t, ω] == -I g FourierTransform[E^(-I t Ω) a[t], t,ω]- 1/2 Γ FourierTransform[b[t], t, ω] - I Ω FourierTransform[b[t], t, ω] +Sqrt[Γ] FourierTransform[bin[t], t, ω]}*)
The term "FourierTransform[ E^(-I t Ω) a[t], t, ω]" is uncalculated. It is improper to direct added a "Times" command in the first shell. And even more, I wonder how can I deal with the nonlinear conditional with a term "a[t] b[t]" ?
a[t] E^(- I Ω t)or even more I want to ask how to deal with the terma[t]*b[t]using mathematica. Must I write a shell according to the property of Fourier Transform by myself? – May 09 '16 at 09:19a[t] E^(- I Ω t)term, except for the programming issue, you misremember the corresponding rule, in a word, it should be something likeft[f_[t_] E^(Complex[0, c_] b_ t_), t_, w_] /; FreeQ[b, t] := ft[f[t - c b], t, w]. Rule 109 here isn't hard to implement, too. But why you need them? as far as I can tell, these rules are just useless when solving differential equations. – xzczd May 10 '16 at 02:23ft[f_[t_] E^(Complex[0, c_] b_ t_), t_, w_] /; FreeQ[b, t] := ft[f[t], t, w + c b]– xzczd May 10 '16 at 02:50Moduleand it'll disappear ifConvolveis successfully calculated. Its role is the same as the $x$ in the formula $\int_{-\infty }^{\infty } f(x) g(y-x) , dx$. If you don't like it and are not in fear of duplication of variable name, you can take away theModuleand thex$…will becomexthen. – xzczd May 10 '16 at 05:38