We have already found the ground state wave function, Φ0(x) = Cexp(-½mωx2/ħ).
If we require the wave function to be properly normalized, i.e. ∫-∞0(x) |2dx = 1,
then  |C|2-∞exp(-mωx2/ħ)dx = 1,  |C|2(πħ/(mω))1/2 = 1, C = (mω/(πħ))1/4.
Therefore
Φ0(x) = (mω/(πħ))1/4exp(-½mωx2/ħ).

We have previously shown that |Φn> = (n!)-1/2(a)n0>,
<x|Φn> = Φn(x)  = (n!)-1/2<x|(a)n0>,
a = (mω/(2ħ))1/2(X - iP/(mω)).

We therefore have
<x|(a)n0> = <x|a(a)n-10> = ((n+1)!)1/2 <x|an-1>
= ((n+1)!)1/2[(mω/(2ħ))1/2<x|X|Φn-1> - (i/(2mωħ)1/2)<x|P|Φn-1>]
= ((n+1)!)1/2[(mω/(2ħ))1/2n-1(x) - (i/(2mωħ)1/2)(ħ/i)∂/∂x)Φn-1(x)].
or
Φn(x) = n-1/2[(mω/(2ħ))1/2x - (ħ/(2mω)1/2)∂/∂x]Φn-1(x),
Φn(x) = (n!)-1/2[(mω/(2ħ))1/2x - (ħ/(2mω)1/2)∂/∂x]nΦ0(x).

Φn(x) = (n! 2n)-1/2(ħ/(mω))n/2(mω/(πħ))1/4 [ (mω/ħ)x - ∂/∂x]n exp(-½mωx2/ħ).
or
Φn(η) = (n! 2n)-1/2 β/√π)1/2(η - ∂/∂η)n exp(-½η2),
where η = (mω/ħ)1/2 x = βx.

Φn(x) is the product of  exp(-½mωx2/ħ) and a polynomial of degree n and parity (-1)n called a Hermite polynomial.
Specifically,
Φ1(x) = ((4/π)(mω/ħ)3)1/4 x exp(-½mωx2/ħ),
Φ2(x) = (mω/(4πħ))1/4 [2mωx2/ħ - 1] exp(-½mωx2/ħ).

with mω/ħ = 1.

The Hermite polynomials
Let us look at the Hermite polynomials in somewhat more detail.
Consider a Gaussian function, F(z) = exp(-z2).
dF/dz = F(1)(z) = -2z exp(-z2), d2F/dz2 = F(2)(z) = (4z2 -2) exp(-z2).
We write
dnF/dzn = F(n)(z) = (-1n)Hn(z)exp(-z2).    Hn(z) = (-1n)exp(z2)dnexp(-z2)/dzn.
This defines the Hermite polynomials.
H0(z) = 1,  H1(z) = 2z,  H2(z) = 4z2 - 2..
The parity of the Hermite polynomials is (-1)n.

Hn(z) is a nth degree polynomial in z.
Proof:
This statement holds for n = 1 and n = 2.
Let F(n-1)(z) = (-1n-1)Hn-1(z)exp(-z2).  Then
F(n)(z) = dF(n-1)(z)/dz = (-1n-1)Hn-1(z)(-2z)exp(-z2) + (1n-1)(dHn-1(z)/dz)exp(-z2).
=  (-1n-1)(2z - d/dz)Hn-1(z)exp(-z2).
Hn(z) = (2z - d/dz)Hn-1(z).
If Hn-1(z) is a polynomial of degree n-1, the Hn(z) is a polynomial of degree n. The statement therefore holds for all n.

The generating function
Consider F(z + λ) = exp(-(z + λ)2).
A Taylor series expansion, (f(x) =  ∑0(xn/n!)dnf/dxn|x=0), yields
F(z + λ) = ∑0n/n!)F(n)(z) =  ∑0n/n!)(-1n)Hn(z)exp(-z2).
Let λ’ = -λ.  Then
exp(z2) F(z + λ)  = ∑0(-λn/n!)(-1n)Hn(z) =  ∑0n/n!)Hn(z).
But exp(z2)F(z + λ) =  exp(-λ2 + 2λz) =  ∑0n/n!)∂nexp(-λ2 + 2λz)/∂λn|λ=0 = ∑0n/n!)Hn(z).
Therefore Hn(z) = ∂nexp(-λ2 + 2λz)/∂λn|λ=0.
exp(-λ2 + 2λz) is called the generating function for the Hermite polynomials Hn(z).

Recurrence relations
We have already found Hn(z) = (2z - d/dz)Hn-1(z).
Therefore Hn(z) = (2z - d/dz)nH0(z) = (2z - d/dz)n1.
Other recurrence relations exist.
dHn(z)/dz = 2nHn-1(z)   and   Hn(z) = 2zHn-1(z) - 2(n-1)Hn-2(z).
and combining the first two relations
[d2/dz2 - 2z d/dz + 2n]Hn(z) = 0.

[dHn(z)/dz = 2nHn-1(z) is obtained by differentiating exp(-λ2 + 2λz) = ∑0n/n!)Hn(z) with respect to z and equating terms of equal power of λ.
2λexp(-λ2 + 2λz) = ∑0n/n!)dHn(z)/dz,  2λ∑0n/n!)Hn(z) = ∑0n/n!)dHn(z)/dz.
Hn(z) = 2zHn-1(z) - 2(n-1)Hn-2(z)  is obtained by differentiating  exp(-λ2 + 2λz) = ∑0n/n!)Hn(z) with respect to λ.]

Summary
The Hermite polynomials Hn(z) are defined by
Hn(z) = (-1n)exp(z2)dnexp(-z2)/dzn,  or  Hn(z) = ∂nexp(-λ2 + 2λz)/∂λn|λ=0.
The generating function of the Hermite polynomials is
exp(-λ2 + 2λz) = ∑0n/n!)Hn(z).
The recurrence relations are
Hn(z) = (2z - d/dz)Hn-1(z),
dHn(z)/dz = 2nHn-1(z),
and Hn(z) = 2zHn-1(z) - 2(n-1)Hn-2(z).
The differential equation satisfied by the Hermite polynomials is
[d2/dz2 - 2z d/dz + 2n]Hn(z) = 0.

What do the Hermite polynomials have to do with the harmonic oscillator?
The energy eigenfunction of the harmonic oscillator are
Φn(x) = (n! 2n)-1/2(ħ/(mω))n/2(mω/(πħ))1/4 [ (mω/ħ)x - ∂/∂x]exp(-½mωx2/ħ).
or
Φn(x) = (n! 2n)-1/2 (β/√π)1/2(η - ∂/∂η)n exp(-½η2),  where η = (mω/ħ)1/2 x = βx.

The Φn(x) are solutions to the time independent Schroedinger equation
[∂2/∂x2 + (2m((n + ½)ħω - ½mω2x2)/ħ2)]Φ(x) = 0,
or
[∂2/∂η2 - η2 + 2n + 1]Φ(η) = 0.

If we wRite Φn(η) = hn(η)exp(-η2/2), where hn(η) is a polynomial of degree n, then hn(η) satisfies the differential equation
[d2/dη2 - 2η d/dη + 2n]hn(η) = 0.
We see that hn(η) satisfies the differential equation satisfied by the Hermite polynomials.  Therefore hn(η) = Hn(η).  The energy eigenfunction of the harmonic oscillator therefore are
Φn(x) = (n! 2n)-1/2 (β/√π)1/2Hn(η) exp(-½η2).

Problem:

The orthonormal set of wave functions for the stationary states of the harmonic oscillator with U(x) = ½mωx2 is
n(η) = Nn Hn(η) exp(-½η2)}, with η = (mω/ħ)1/2x.
The Hermite polynomials Hn(η) satisfy the recurrence relations
ηHn(η)  = nHn-1(η) + ½Hn+1(η)  and dHn(η)/dη = 2nHn-1(η).
The normalization constants Nn are given by
N0 = π1/4, Nn+1 = (2(n+1))-1/2Nn.

(a)  Show that the matrix elements of X can be expressed as
<m|X|n> = (nħ/(2mω))1/2δm,n-1 + ((n+1)ħ/(2mω))1/2δm,n+1.
(b)  Derive a similar expression for the matrix elements of X2.
(c)  The ladder operators for the harmonic oscillator have the properties
a|n> = √(n+1) |n+1>,   a|n> = √(n) |n-1>.
Derive the expressions for a and a in terms of η and d/dη.

Hint: Start by investigating the action of the operator  d/dη on Ψn(η).

• Solution:
(a)  <m|X|n> =  (ħ/(mω))1/2<m|η|n>, <m|n> = δm,n.
<m|η|n> = ∫-∞Φm*(η)ηΦn(η)dη = NmNn-∞Hm(η)ηHn(η) exp(-η2) dη
(use recurrence relation)
<m|η|n> = NmNnn∫-∞Hm(η)Hn-1(η) exp(-η2) dη + NmNn½∫-∞Hm(η)Hn+1(η) exp(-η2) dη
= NmNn(NmNn-1)-1 n∫-∞Φm(η)Φn-1(η) dη + NmNn(NmNn+1)-1 ½∫-∞Φm(η)Φn+1(η)dη
= (Nn/Nn-1)nδm,n-1 + ½ Nn/Nn+1m,n+1 = (n/2)1/2δm,n-1 + ½(2(n+1))1/2δm,n-1.
<m|X|n> = (nħ/(nmω))1/2δm,n-1 + ((n+1)ħ/(2mω))1/2δm,n-1.

(b)  <m|X2|n> =  (ħ/(mω))<m|η2|n>.
<m|η2|n> = ∫-∞Φm*(η)η2Φn(η)dη = NmNn-∞(mHm-1(η) + ½Hm+1(η))(nHn-1(η) + ½Hn+1(η)) exp(-η2) dη
= NmNn[(mn/(Nm-1Nn-1))δm-1,n-1 + ½n/(Nm+1Nn-1))δm+1,n-1 + ½m/(Nm-1Nn+1))δm-1,n+1 + ¼/(Nm+1Nn+1))δm+1,n+1
= ½(mn)1/2δm,n + ½(n(m+1))1/2δm+2,n + ½(m(n+1))1/2δm-2,n + ¼(2(m+1)2(n+1))1/2δm,n
= (n + ½)δm,n + ½(n(n-1))1/2δm+2,n + ½(m(m-1))1/2δm-2,n.
<m|X2|n> = (ħ/(mω))(n + ½)δm,n + ½(ħ/(mω))(n(n-1))1/2δm+2,n + ½(ħ/(mω))(m(m-1))1/2δm-2,n.

(c)  dΦn(η)/dη = Nn(dHn(η)/dη)exp(-½η2) - NnHn(η) η exp(-½η2)
= Nn2nHn-1(η) exp(-½η2) - Nn(nHn-1(η) + ½Hn+1(η)) exp(-½η2).
ηΦn(η) = NnHn(η) η exp(-½η2) = Nn(nHn-1(η) + ½Hn+1(η)) exp(-½η2).
n(η)/dη + ηΦn(η) =  Nn2nHn-1(η) exp(-½η2) = 2n(Nn/Nn-1n-1(η) = √(2n)Φn-1(η)
We have
a|n> = √(n) |n-1>,
therefore a = (1/√2)[η + d/dη].
Similarly,
n(η)/dη - ηΦn(η) =  -NnHn+1(η) exp(-½η2) = -(Nn/Nn+1n+1(η) = -√(2(n+1))Φn+1(η).
We have
a|n> = √(n+1) |n+1>.
therefore a = (1/√2)[η - d/dη].
Problem:

Consider the one-dimensional problem in which a particle of mass m and charge -q is placed in a harmonic oscillator potential U(x) = ½mω2x2 in the presence of an electric field E = E0.
(a)  Write down the Hamiltonian H.
(b)  Find the eigenvalues of H.
(c)  Find <x> for all eigenstates of H.

Solution:

• Concepts:
The eigenfunctions of the harmonic oscillator
• Reasoning:
By changing the variable x to x' = x + qE0/(mω2) we can make H look like the Hamiltonian of a simple harmonic oscillator.
• Details of the calculation:
(a)  H = ½P2/m + ½mω2X2 + qE0X.
(b)  H|Φ> = E|Φ>  ∂2Φ(x)/∂x2 + (2m(E - ½mω2x2 - qE0x)/ħ2)Φ(x) = 0.
Let us try to complete the square.
2Φ(x)/∂x2 + (2m(E - ½mω2(x + qE0/(mω2))2 - q2E02/(2mω2))/ħ2)Φ(x) = 0.
Let x' = x + qE0/(mω2).  Then
2Φ(x')/∂x'2 + (2m(E' - ½mω2x'2)/ħ2)Φ(x') = 0.
This is the equation for a harmonic oscillator in the absence of an electric field.
En' = (n + ½)ħω,  En = (n + ½)ħω - q2E02/(2mω2).
(c)  <x’> = 0  for all eigenstates,  <x> = -qE0/(mω2) for all eigenstates.