6. Quantum Mechanics

Legal Notice, Disclaimer, and Book Ordering Information:

Null

Setup

\(Clear["Global`*"]; 
Off[General::spell]; 
Off[General::spell1]; 
    \)

<< "D:\Mma\Inits\ch6init.m"

6.1 Introduction

6.1.2 Mathematica Commands

Example:  Change of variable

eq1 = ψ''[x] + x^n ψ'[x] + ψ[x] == 0

vChange[eq1,ψ,x,z,α z]

eq2 = eq1/.{Derivative[n_Integer][ψ][x]:>
		Nest[(D[#,z]/D[α z,z])&,ψ[z],n]}

eq3 = eq2/.{ψ[x]:>ψ[z], x->α z}

Example:  Complex exponential

I Exp[I k x]//conjugate

I Exp[I k x]==(I Exp[I k x]//conjugate//conjugate)

Example:  Hermite solution

n /: IntegerQ[n]=True

m /: IntegerQ[m]=True

eq1=0 == 2 n h[z] - 2 z h'[z] + h''[z]

eq2  = h''[z] == h[z] - (1 + 2n) h[z] + 2 z h'[z]

DSolve[eq1,{h},z]//Flatten

DSolve[eq2,{h},z]//Flatten

Example:  Legendre solution

IntegerQ[ℓ]^=True;
IntegerQ[μ]^=True;

eq1 = (ℓ Θ[z] + ℓ^2 Θ[z] + μ^2/(-1+z^2)Θ[z]
		- 2 z Θ'[z] + (1 - z^2)Θ''[z]) == 0

DSolve[eq1,{Θ},z]//Flatten

eq2 = eq1//ExpandAll

DSolve[eq2,{Θ},z]//Flatten

6.1.3 User-defined Three-dimensional Quantum Equations

Example:  Spherical potential and spherical wave functions

SetCoordinates[Spherical[r,θ,ϕ]]

eq1 = 0 == schrodinger[V[r],En] @ (ψ[r])//ExpandAll

Example:  Harmonic oscillator

SetCoordinates[Cartesian[x,y,z]]

wave = Exp[- a1 x^2]

potential = 1/2 k x^2

hamiltonian[potential][wave]//Simplify//PowerExpand

Example:  Plane wave flux

SetCoordinates[Cartesian[x,y,z]]

flux[Exp[I {kx,ky,kz}.{x,y,z}]]