2.6 Exercises 43
∫∞
−∞
e−xLn(x)^2 dx= 1 ,
and the recursion relation
(n+ 1 )Ln+ 1 (x) = ( 2 n+ 1 −x)Ln(x)−nLn− 1 (x).
Similalry, the Hermite polynomials are solutions of the differential equation
d^2 H(x)
dx^2
− 2 x
dH(x)
dx
+ (λ− 1 )H(x) = 0 ,
which arises for example by solving Schrödinger’s equationfor a particle confined to move in
a harmonic oscillator potential. The first few polynomials are
H 0 (x) = 1 ,
H 1 (x) = 2 x,
H 2 (x) = 4 x^2 − 2 ,
H 3 (x) = 8 x^3 − 12 ,
and
H 4 (x) = 16 x^4 − 48 x^2 + 12.
They fulfil the orthogonality relation
∫∞
−∞
e−x^2 Hn(x)^2 dx= 2 nn!
√
π,
and the recursion relation
Hn+ 1 (x) = 2 xHn(x)− 2 nHn− 1 (x).
Write a program which computes the above Laguerre and Hermite polynomials for different
values ofnusing the pertinent recursion relations. Check your results agains some selected
closed-form expressions.