Imports
/- Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Tooby-Smith -/ module public import Physlib.QuantumMechanics.HarmonicOscillator.OneDimension.Basic public import Physlib.Mathematics.SpecialFunctions.PhysHermite

Eigenfunction of the Harmonic Oscillator

@[expose] public sectionlemma eigenfunction_eq (n : ) : Q.eigenfunction n = fun (x : ) => (1/(2 ^ n * n !) * (1/ (Real.pi * Q.ξ))) * Complex.ofReal (physHermite n (x / Q.ξ) * Real.exp (- x^2 / (2 * Q.ξ^2))) := Q:HarmonicOscillatorn:Q.eigenfunction n = fun x => 1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2))) Q:HarmonicOscillatorn:x:Q.eigenfunction n x = 1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2))) Q:HarmonicOscillatorn:x:(↑n !)⁻¹ * (↑(2 ^ n))⁻¹ * (↑(Real.pi * Q.ξ))⁻¹ * ((Polynomial.aeval (x / Q.ξ)) (physHermite n)) * Complex.exp (-x ^ 2 / (2 * Q.ξ ^ 2)) = (↑n !)⁻¹ * (↑(2 ^ n))⁻¹ * (↑(Real.pi * Q.ξ))⁻¹ * (((Polynomial.aeval (x / Q.ξ)) (physHermite n)) * Complex.exp (-x ^ 2 / (2 * Q.ξ ^ 2))) All goals completed! 🐙lemma eigenfunction_zero : Q.eigenfunction 0 = fun (x : ) => (1/ (Real.pi * Q.ξ)) * Complex.exp (- x^2 / (2 * Q.ξ^2)) := Q:HarmonicOscillatorQ.eigenfunction 0 = fun x => 1 / (Real.pi * Q.ξ) * Complex.exp (-x ^ 2 / (2 * Q.ξ ^ 2)) Q:HarmonicOscillatorx:Q.eigenfunction 0 x = 1 / (Real.pi * Q.ξ) * Complex.exp (-x ^ 2 / (2 * Q.ξ ^ 2)) All goals completed! 🐙lemma eigenfunction_eq_mul_eigenfunction_zero (n : ) : Q.eigenfunction n = fun x => Complex.ofReal (1/(2 ^ n * n !)) * Complex.ofReal (physHermite n (x / Q.ξ)) * Q.eigenfunction 0 x := Q:HarmonicOscillatorn:Q.eigenfunction n = fun x => (1 / (2 ^ n * n !)) * ((fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ)) * Q.eigenfunction 0 x match n with Q:HarmonicOscillatorn:Q.eigenfunction 0 = fun x => (1 / (2 ^ 0 * 0!)) * ((fun x => (Polynomial.aeval x) (physHermite 0)) (x / Q.ξ)) * Q.eigenfunction 0 x All goals completed! 🐙 Q:HarmonicOscillatorn✝:n:Q.eigenfunction (n + 1) = fun x => (1 / (2 ^ (n + 1) * (n + 1)!)) * ((fun x => (Polynomial.aeval x) (physHermite (n + 1))) (x / Q.ξ)) * Q.eigenfunction 0 x Q:HarmonicOscillatorn✝:n:x:Q.eigenfunction (n + 1) x = (1 / (2 ^ (n + 1) * (n + 1)!)) * ((fun x => (Polynomial.aeval x) (physHermite (n + 1))) (x / Q.ξ)) * Q.eigenfunction 0 x Q:HarmonicOscillatorn✝:n:x:(↑(2 ^ (n + 1) * (n + 1)!))⁻¹ * (↑(Real.pi * Q.ξ))⁻¹ * ((Polynomial.aeval (x / Q.ξ)) (physHermite (n + 1))) * (Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2))) = (↑(2 ^ (n + 1) * (n + 1)!))⁻¹ * ((Polynomial.aeval (x / Q.ξ)) (physHermite (n + 1))) * ((↑(Real.pi * Q.ξ))⁻¹ * (Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2)))) All goals completed! 🐙

Basic properties of the eigenfunctions

The eigenfunctions are integrable.

Q:HarmonicOscillatorn:h1:(fun x => (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2))) = fun x => (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * Real.exp (-(1 / (2 * Q.ξ ^ 2)) * x ^ 2)Integrable (fun x => (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * Real.exp (-(1 / (2 * Q.ξ ^ 2)) * x ^ 2)) volume Q:HarmonicOscillatorn:h1:(fun x => (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2))) = fun x => (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * Real.exp (-(1 / (2 * Q.ξ ^ 2)) * x ^ 2)0 < 1 / (2 * Q.ξ ^ 2) All goals completed! 🐙

The eigenfunctions are real.

Q:HarmonicOscillatorn:x:(starRingEnd ) ((fun x => 1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2)))) x) = (fun x => 1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2)))) x All goals completed! 🐙
Q:HarmonicOscillatorn:x:Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2)) = Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2)) All goals completed! 🐙Q:HarmonicOscillatorn:x:Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2) * 2) = Real.exp (-x ^ 2 / Q.ξ ^ 2) Q:HarmonicOscillatorn:x:-x ^ 2 / (2 * Q.ξ ^ 2) * 2 = -x ^ 2 / Q.ξ ^ 2 All goals completed! 🐙

The eigenfunctions are square integrable.

Q:HarmonicOscillatorn:h0: (x : ), Real.exp (-x ^ 2 / Q.ξ ^ 2) = Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)Integrable (fun x => Q.eigenfunction n x ^ 2) volume Q:HarmonicOscillatorn:h0: (x : ), Real.exp (-x ^ 2 / Q.ξ ^ 2) = Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)| Integrable (fun x => Q.eigenfunction n x ^ 2) volume Q:HarmonicOscillatorn:h0: (x : ), Real.exp (-x ^ 2 / Q.ξ ^ 2) = Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)x:| Q.eigenfunction n x ^ 2 Q:HarmonicOscillatorn:h0: (x : ), Real.exp (-x ^ 2 / Q.ξ ^ 2) = Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)x:| (1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ))) ^ 2 * ((fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) ^ 2 * Real.exp (-x ^ 2 / Q.ξ ^ 2)) Q:HarmonicOscillatorn:h0: (x : ), Real.exp (-x ^ 2 / Q.ξ ^ 2) = Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)x:| (1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ))) ^ 2 * ((Polynomial.aeval (x / Q.ξ)) (physHermite n ^ 2) * Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)) Q:HarmonicOscillatorn:h0: (x : ), Real.exp (-x ^ 2 / Q.ξ ^ 2) = Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)x:| x / Q.ξ Q:HarmonicOscillatorn:h0: (x : ), Real.exp (-x ^ 2 / Q.ξ ^ 2) = Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)x:| 1 / Q.ξ * x Q:HarmonicOscillatorn:h0: (x : ), Real.exp (-x ^ 2 / Q.ξ ^ 2) = Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)Integrable (fun x => (Polynomial.aeval (1 / Q.ξ * x)) (physHermite n ^ 2) * Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)) volume Q:HarmonicOscillatorn:h0: (x : ), Real.exp (-x ^ 2 / Q.ξ ^ 2) = Real.exp (-(1 / Q.ξ ^ 2) * x ^ 2)0 < 1 / Q.ξ ^ 2 All goals completed! 🐙

The eigenfunctions are almost everywhere strongly measurable.

@[fun_prop] lemma eigenfunction_aeStronglyMeasurable (n : ) : MeasureTheory.AEStronglyMeasurable (Q.eigenfunction n) := (Q.eigenfunction_integrable n).aestronglyMeasurable

The eigenfunctions are members of the Hilbert space.

Q:HarmonicOscillatorn:AEStronglyMeasurable (Q.eigenfunction n) volume Integrable (fun x => Q.eigenfunction n x ^ 2) volume Q:HarmonicOscillatorn:AEStronglyMeasurable (Q.eigenfunction n) volumeQ:HarmonicOscillatorn:Integrable (fun x => Q.eigenfunction n x ^ 2) volume Q:HarmonicOscillatorn:AEStronglyMeasurable (Q.eigenfunction n) volumeQ:HarmonicOscillatorn:Integrable (fun x => Q.eigenfunction n x ^ 2) volume All goals completed! 🐙

The eigenfunctions are differentiable.

Q:HarmonicOscillatorx:n:DifferentiableAt (fun x => 1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2)))) x All goals completed! 🐙

The eigenfunctions are continuous.

Q:HarmonicOscillatorn:Continuous fun x => 1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2))) All goals completed! 🐙

The nth eigenfunction is an eigenfunction of the parity operator with the eigenvalue (-1) ^ n.

Q:HarmonicOscillatorn:x:1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((-1) ^ n * (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-(-x) ^ 2 / (2 * Q.ξ ^ 2))) = (-1) ^ n * (1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((Polynomial.aeval (x / Q.ξ)) (physHermite n) * Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2)))) Q:HarmonicOscillatorn:x:1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((-1) ^ n * ((Polynomial.aeval (x / Q.ξ)) (physHermite n)) * (Real.exp (-(-x) ^ 2 / (2 * Q.ξ ^ 2)))) = (-1) ^ n * (1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * (((Polynomial.aeval (x / Q.ξ)) (physHermite n)) * (Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2))))) All goals completed! 🐙

Orthonormality

A simplification of the product of two eigenfunctions.

Q:HarmonicOscillatorx:n:p:Real.exp (-x ^ 2 / (2 * Q.ξ ^ 2) + -x ^ 2 / (2 * Q.ξ ^ 2)) = Real.exp (-x ^ 2 / Q.ξ ^ 2) Q:HarmonicOscillatorx:n:p:-x ^ 2 / (2 * Q.ξ ^ 2) + -x ^ 2 / (2 * Q.ξ ^ 2) = -x ^ 2 / Q.ξ ^ 2 Q:HarmonicOscillatorx:n:p:x ^ 2 * (-1 + -1) = -(x ^ 2 * 2) All goals completed! 🐙 Q:HarmonicOscillatorx:n:p:(↑n !)⁻¹ * (↑(2 ^ n))⁻¹ / ((2 ^ p) * p !) * ((↑Q.ξ)⁻¹ * (↑Real.pi)⁻¹) * (((Polynomial.aeval (x / Q.ξ)) (physHermite n)) * ((Polynomial.aeval (x / Q.ξ)) (physHermite p))) * Complex.exp (-x ^ 2 / Q.ξ ^ 2) = (↑n !)⁻¹ * (↑(2 ^ n))⁻¹ / ((2 ^ p) * p !) * ((↑Q.ξ)⁻¹ * (↑Real.pi)⁻¹) * (((Polynomial.aeval (x / Q.ξ)) (physHermite n)) * ((Polynomial.aeval (x / Q.ξ)) (physHermite p)) * Complex.exp (-x ^ 2 / Q.ξ ^ 2)) All goals completed! 🐙
Q:HarmonicOscillatorx:n:1 / (2 ^ n * n !) * 1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / Q.ξ ^ 2)) = 1 / (2 ^ n * n !) * (1 / (Real.pi * Q.ξ)) * ((fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) ^ 2 * Real.exp (-x ^ 2 / Q.ξ ^ 2)) Q:HarmonicOscillatorx:n:1 / (2 ^ n * n !) * 1 / (2 ^ n * n !) = 1 / (2 ^ n * n !)Q:HarmonicOscillatorx:n:(fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / Q.ξ ^ 2) = (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) ^ 2 * Real.exp (-x ^ 2 / Q.ξ ^ 2) Q:HarmonicOscillatorx:n:1 / (2 ^ n * n !) * 1 / (2 ^ n * n !) = 1 / (2 ^ n * n !) Q:HarmonicOscillatorx:n:1 / (2 ^ n * n !) * 1 / (2 ^ n * n !) = 1 / ((2 ^ n * n !) * (2 ^ n * n !))Q:HarmonicOscillatorx:n:1 / ((2 ^ n * n !) * (2 ^ n * n !)) = 1 / (2 ^ n * n !) Q:HarmonicOscillatorx:n:1 / (2 ^ n * n !) * 1 / (2 ^ n * n !) = 1 / ((2 ^ n * n !) * (2 ^ n * n !)) Q:HarmonicOscillatorx:n:(↑n !)⁻¹ * (↑(2 ^ n))⁻¹ / ((2 ^ n) * n !) = (↑n !)⁻¹ * (↑(2 ^ n))⁻¹ * ((↑n !)⁻¹ * (↑(2 ^ n))⁻¹) All goals completed! 🐙 Q:HarmonicOscillatorx:n:((2 ^ n * n !) * (2 ^ n * n !)) = 2 ^ n * n ! Q:HarmonicOscillatorx:n:((2 ^ n * n !) * (2 ^ n * n !)) = (2 ^ n * n !)Q:HarmonicOscillatorx:n:(2 ^ n * n !) = 2 ^ n * n ! Q:HarmonicOscillatorx:n:((2 ^ n * n !) * (2 ^ n * n !)) = (2 ^ n * n !) Q:HarmonicOscillatorx:n:(2 ^ n * n !) * (2 ^ n * n !) = 2 ^ n * n ! Q:HarmonicOscillatorx:n:0 2 ^ n * n ! Q:HarmonicOscillatorx:n:0 2 ^ n Q:HarmonicOscillatorx:n:0 2 All goals completed! 🐙 Q:HarmonicOscillatorx:n:(2 ^ n * n !) = 2 ^ n * n ! All goals completed! 🐙 Q:HarmonicOscillatorx:n:(fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * Real.exp (-x ^ 2 / Q.ξ ^ 2) = (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) ^ 2 * Real.exp (-x ^ 2 / Q.ξ ^ 2) Q:HarmonicOscillatorx:n:(fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) = (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) ^ 2 All goals completed! 🐙

The eigenfunction are normalized.

Q:HarmonicOscillatorn:hc: (x : ), (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) ^ 2 * Real.exp (-x ^ 2 / Q.ξ ^ 2) = (x : ), (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * Real.exp (-(1 / Q.ξ) ^ 2 * x ^ 2)this:n ! 0(↑n !)⁻¹ * (2 ^ n)⁻¹ * ((↑Q.ξ)⁻¹ * (↑Real.pi)⁻¹) * (Q.ξ (n ! * 2 ^ n * Real.pi)) = 1 Q:HarmonicOscillatorn:hc: (x : ), (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) ^ 2 * Real.exp (-x ^ 2 / Q.ξ ^ 2) = (x : ), (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * Real.exp (-(1 / Q.ξ) ^ 2 * x ^ 2)this✝:n ! 0this:Q.ξ 0(↑n !)⁻¹ * (2 ^ n)⁻¹ * ((↑Q.ξ)⁻¹ * (↑Real.pi)⁻¹) * (Q.ξ (n ! * 2 ^ n * Real.pi)) = 1 Q:HarmonicOscillatorn:hc: (x : ), (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) ^ 2 * Real.exp (-x ^ 2 / Q.ξ ^ 2) = (x : ), (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * Real.exp (-(1 / Q.ξ) ^ 2 * x ^ 2)this✝¹:n ! 0this✝:Q.ξ 0this:Real.pi 0(↑n !)⁻¹ * (2 ^ n)⁻¹ * ((↑Q.ξ)⁻¹ * (↑Real.pi)⁻¹) * (Q.ξ (n ! * 2 ^ n * Real.pi)) = 1 Q:HarmonicOscillatorn:hc: (x : ), (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) ^ 2 * Real.exp (-x ^ 2 / Q.ξ ^ 2) = (x : ), (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * Real.exp (-(1 / Q.ξ) ^ 2 * x ^ 2)this✝¹:n ! 0this✝:Q.ξ 0this:Real.pi 0(↑n !)⁻¹ * (2 ^ n)⁻¹ * ((↑Q.ξ)⁻¹ * (↑Real.pi)⁻¹) * (Q.ξ * (n ! * 2 ^ n * Real.pi)) = 1 All goals completed! 🐙

The eigenfunctions of the quantum harmonic oscillator are orthogonal.

Q:HarmonicOscillatorn:p:hnp:n phc: (x : ), (fun x => (Polynomial.aeval x) (physHermite n)) (x / Q.ξ) * (fun x => (Polynomial.aeval x) (physHermite p)) (x / Q.ξ) * Real.exp (-x ^ 2 / Q.ξ ^ 2) = (x : ), (fun x => (Polynomial.aeval x) (physHermite n)) (1 / Q.ξ * x) * (fun x => (Polynomial.aeval x) (physHermite p)) (1 / Q.ξ * x) * Real.exp (-(1 / Q.ξ) ^ 2 * x ^ 2)1 / (2 ^ n * n !) * 1 / (2 ^ p * p !) * (1 / (Real.pi * Q.ξ)) * 0 = 0 All goals completed! 🐙

The eigenfunctions are orthonormal within the Hilbert space.

Q:HarmonicOscillator (i j : ), HilbertSpace.mk , HilbertSpace.mk ⟫_ = if i = j then 1 else 0 Q:HarmonicOscillatorn:p:HilbertSpace.mk , HilbertSpace.mk ⟫_ = if n = p then 1 else 0 Q:HarmonicOscillatorn:p:hnp:n = pHilbertSpace.mk , HilbertSpace.mk ⟫_ = if n = p then 1 else 0Q:HarmonicOscillatorn:p:hnp:¬n = pHilbertSpace.mk , HilbertSpace.mk ⟫_ = if n = p then 1 else 0 Q:HarmonicOscillatorn:p:hnp:n = pHilbertSpace.mk , HilbertSpace.mk ⟫_ = if n = p then 1 else 0 Q:HarmonicOscillatorn:p:hnp:n = pHilbertSpace.mk , HilbertSpace.mk ⟫_ = 1 All goals completed! 🐙 Q:HarmonicOscillatorn:p:hnp:¬n = pHilbertSpace.mk , HilbertSpace.mk ⟫_ = if n = p then 1 else 0 Q:HarmonicOscillatorn:p:hnp:¬n = pHilbertSpace.mk , HilbertSpace.mk ⟫_ = 0 All goals completed! 🐙

The eigenfunctions are linearly independent.

lemma eigenfunction_linearIndependent : LinearIndependent (fun n => HilbertSpace.mk (Q.eigenfunction_memHS n)) := Q.eigenfunction_orthonormal.linearIndependent