# Calculating the normalization constant for a wavefunction

How can I compute the normalization constant for a quantum mechanics wave-function, like Ψ(x)=Nexp(−λx2/2)Ψ(x)=Nexp(−λx2/2)\Psi(x) = N \exp(-\lambda x^2/2) by using Mathematica? (The normalization constant is NN).

=================

The normalization is given in terms of the integral of the absolute square of the wave function. You can calculate this using Integrate.
Nov 12 ’15 at 13:30

Caveat: the normalization constant in mathematica is most certainly not the reserved symbol N 😉
– LLlAMnYP
Nov 12 ’15 at 13:40

=================

1

=================

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.

3

At 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! 😀
– infiniteNOP
Nov 13 ’15 at 13:41