How can I compute the normalization constant for a quantum mechanics wave-function, like $\Psi(x) = N \exp(-\lambda x^2/2)$ by using Mathematica? (The normalization constant is $N$).
Asked
Active
Viewed 2.2k times
2
1 Answers
5
First define the wave function as
Ψ[x_] := n Exp[-λ x^2/2];
Then you define your normalization condition
condition =
Integrate[Ψ[x]^2, {x, -∞, ∞}, Assumptions -> λ > 0] == 1
(* (n^2 Sqrt[π])/Sqrt[λ] == 1 *)
Solve[condition, n]
(* {{n -> -(λ^(1/4)/π^(1/4))}, {n -> λ^(1/4)/π^(1/4)}} *)
Either of these works, the wave function is valid regardless of overall phase.
Edit: You should only do the above code if you can do the integral by hand, because everyone should go through the trick of solving the Gaussian integral for themselves at least once.
Jason B.
- 68,381
- 3
- 139
- 286
-
3At least once?! At least ten times! And then there's the differentiate with respect to a parameter trick, and how to generalize to multi-dimensional Gaussians, etc. – march Nov 12 '15 at 17:15
-
@Jason B : The link requires authentication. It's okay, though, as I was just wondering how to do this by using mathematica; The textbook I am following covers doing it by hand pretty well. I figured it out later on on my own, but your solution is way more elegant than mine (you define a function, which is less messy)! Thanks! :-D – infiniteNOP Nov 13 '15 at 13:41
Integrate. – Marius Ladegård Meyer Nov 12 '15 at 13:30N;-) – LLlAMnYP Nov 12 '15 at 13:40