I am trying essentially to compute a fourier transform with Integrate.
1]Is integrate faster or slower than FourierTransform?
2]Does anyone know how to efficiently calculate these integrals?
My code is the following
$Assumptions = {h > 0, d > 0, p0 >= 0, s > 0, M > 0,
L2 \[Element] Reals, dt \[Element] Reals, x \[Element] Reals,
y \[Element] Reals, z \[Element] Reals, p \[Element] Reals,
Dxx >= 0, Dpp >= 0}
h = 1
d = 100
s = 3
M = 1
p0 = 0
L2
xGpiu[x_] := xGpiu[x] =
Exp[-(x - d/2)^2/(2 s^2) + (I*(-p0)*(x - d/2))/(h)]/(Pi^(1/4)*Sqrt[s])
xGpiuconj[x_] := xGpiuconj[x] =
Exp[-(x - d/2)^2/(2 s^2) - (I*(-p0)*(x - d/2))/(h)]/(Pi^(1/4)*Sqrt[s])
pGpiu[p_] := pGpiu[p] =
Integrate[ xGpiu[x]*Exp[-I*p*x/h]/Sqrt[2*Pi*h], {x, -\[Infinity], +\[Infinity]}]
pGpiu[p]
pGpiuconj[p_] := Integrate[xGpiuconj[x]*Exp[+I*p*x/h]/Sqrt[2*Pi*h], {x, -\[Infinity], +\[Infinity]}]
pGpiuconj[p]
XZUtGpiu[x_, z_, Dt_] := XZUtGpiu[x, z, Dt] =
Integrate[
pGpiu[p]*Exp[-I*p^2*Dt/(2*M*h)]*
Exp[I*p*(x - z)/h]/(Sqrt[2*Pi*h]), {p, -\[Infinity], +\[Infinity]}]
XZUtGpiu[x, z, dt]
GpiuUtdagYZ[y_, z_, Dt_] := GpiuUtdagYZ[y, z, Dt] =
Integrate[
pGpiuconj[p]*Exp[+I*p^2*Dt/(2*M*h)]*
Exp[-I*p*(y - z)/h]/(Sqrt[
2*Pi*h]), {p, -\[Infinity], +\[Infinity]}]
GpiuUtdagYZ[y, z, dt]
XDecPiupiutY[x_, y_, Dt_] := XDecPiupiutY[x, y, Dt] =
Integrate[
Exp[I/h*Dpp*Dt^2/M*z*(x - y)/L2]*Exp[-z^2/(2*L2)]*
XZUtGpiu[x, z, Dt]*
GpiuUtdagYZ[y, z, Dt], {z, -\[Infinity], +\[Infinity]}]
XDecPiupiutY[x, y, dt]
The first integrals are computed within seconds, while the last one, XDecPiupiutY[x, y, dt], does not come out with an output in hours.
Thank you in advance to anybody who will respond.
Dt
is a reserved symbol in Mathematica. It stands for total derivative, so maybe change the variable. $\endgroup$Exp[I/h*Dpp*Dt^2/M*z*(x - y)/L2]*Exp[-z^2/(2*L2)]* XZUtGpiu[x, z, Dt]* GpiuUtdagYZ[y, z, Dt]
of the last integral, Mathematica 12.2 shows a condition-9 < Im[Dt] < 9
. What is the parameter range ofDt
to be condidered? $\endgroup$