I'm studying the quantum mechanics of an infinite square well from a computational standpoint.
My eigenfunctions are defined as $u_n(x)=\sqrt{2/L}\sin\left(n\pi x/L\right),\quad 0 \le x \le L, \quad n=1,2,3,\dots$ and zero outside of the $[0,L]$ interval.
I'd like to transform the wave function from position domain to the momentum domain. My book says that this is achieved by writing the Fourier transform of $u_n(x)$:
$\phi_n(k)=\frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} u_n(x)e^{-i k x}dx$
ClearAll["Global`*"];
L = 1;
u[n_, x_] := Sqrt[2/L] Sin[n π x]
φ[n_, k_] := Assuming[{n ∈ Integers, {k, x} ∈ Reals},
1/(Sqrt[2π]) Integrate[u[n, x] Exp[-I k x], {x, -∞, ∞}]]
Integrate::idiv: Integral of E^(-I k x) Sin[n π x] does not converge on {-∞,∞}. >>
If I, though, use FourierTransform[]
, I get the result:
FourierTransform[u[n, x], x, k, FourierParameters -> {0, -1}]
-I Sqrt[π] DiracDelta[k - n π] + I Sqrt[π] DiracDelta[k + n π]
But my book says that the result should be:
$\phi_n(k) = \sqrt{\pi L} n \frac{1-(-1)^n e^{-i L k}}{(n\pi -L k)(n\pi + Lk)}$
I tried to get Mathematica to fully simplify the output of FourierTransform[]
, but I/it couldn't.
So my questions are:
Why does the integral not converge when written manually but it does converge when it is being calculated via
FourierTransform[]
?How could I prove that the output of
FourierTransform[]
is equivalent to the formula that is written in my book for $\phi_n(k)$ ?
FourierTransform
is using (a generalized version of) the transform defined by integrating over the entire real line. There are other definitions more suitable for periodivc functions, e.g. integrating over (possibly a finite multiple of) the period. That appears to be what is wanted for your example, so it will indeed be difgferent from whatFouriertransform
gives. $\endgroup$ – Daniel Lichtblau Nov 12 '13 at 4:36u
is missingPiecewise
in its definition, so that it will be zero outside 0 to L. This is probably one reason why theFouerierTransform
call isn't matching the manual integration from 0 to L. $\endgroup$ – Chris Chiasson Oct 11 '18 at 22:20