HarmonicOscillatior

..\DiffEq
Introduction
In this document the harmonic oscillator will be used as a test case for the ability to
approximate the wave function by a complex form similar to the WKB form. The beginning of this is a
visual hand fit of a harmonic oscillator potential to the bottom of the resonance potential.
Figure 1 plotv1 is the resonance potential. plotv is a Harmonic oscillator that approximates the resonance potential.
X'S FOR E=POT(X) -4.3250000000000002
-0.8496377147287321
0.8496377147287320
Potential.for
FUNCTION V(X,dVdx,IPOT)
DATA A,W/5D0,3D0/
SELECT CASE(IPOT)
…
CASE(4)
V=(X/(.45d0*W))**2-4.8168436111126578D0
DVDX=2*X/(.45d0*W)**2
…
END SELECT
RETURN
END
V  x   V  x0    x  x0 V '  x0  
1
2
 x  x0  V '  x0  
2
Start at the potential minimum
2
1
2 d V  xmin  
V ( x)  V  xmin    x  xmin 

2
dx 2
x
min
Define
2
1 d V  xmin  
2 

2
dx 2
x
2
(1.2)
min
  x   exp   x 2 
d  x 
dx
 2 x exp   x 2 
d 2  x 
dx
2
(1.3)
  2  4 2 x 2  exp   x 2 
The Schrodinger equation is
2
1 d   x

 V  x    x   EH   x 
2 dx 2
(1.4)
2
1 d   x

 2 x 2  x   EH   x 
2
2 dx
Or
  2
2
x 2  2 2 x 2  EH 
So that for the ground state
EH    V  xmin 
(1.6)
(1.5)
(1.1)
AlphaFind.for
ALPHA,EH
0.5237828008789240 -4.2930608102337340
EH0=-3.2454952084758855 1ST excited H.O. state.
The excited states are defined in ..\Raising.docx
d

 2 x  n 1  x 
(1.7)
 dx

En  EH 0  2n
n  x   
 d

 2 x  exp   x 2 
 dx

1  x   
  2 x  2 x  exp   x 2 
(1.8)
 4 x exp   x 2 

 d

 2 x  4 x exp   x 2 
 dx

2  x   

  4  8 2 x 2  8 2 x 2  exp   x 2 
 16 2 x 2  4  exp   x 2 
(1.9)
 4  4 x 2  1 exp   x 2 

d

 2 x  x exp   x 2 
 dx

2  x   

 1  2 x 2  2 x 2  exp   x 2 
   4 x 2  1 exp   x 2 
  8 2 x 2  4  exp   x 2 
 4  2 x 2  1 exp   x 2 
The file HOTheory.out is found by HOBli.wpj. I used 65 points so that the difference between the
differential equation and the simple theory is easy to see.
EulerExt.wpj
EulerExt.for
Case(1)
  x   exp  p  x  
p  x     x  x0 
2
(1.10)
z  x   2  x  x0 
...
CASE(1) ! Normal Harmonic Oscillator Ground State exp(-alpha*x2)
…
P0=-alpha*x0**2 !V starts at 0
Z0=-2*alpha*x0
…
CALL ZFIND(NAZ,IPOT,EH,X0,Z0,XEND)
…
CALL zToP(NAZ,Nap,p0)
…
CALL pToPsi(NAp,NAPsi,ISELECT)
Figure 2 z(x) as found by EulerExt
The function z(x) = -2αx was expected to follow the straight line indefinitely. The eigenvalue with 3000
steps across the region shown is exact to the 9 digits printed out for all values of x.
Figure 3dz/dx as a function of x
Figure 4 the wave function from z (exp(p(x)) comparedwith the theoretical H.O. ground state
Figure 5EulerExt using f t t versus theory for Harmonic oscillator
Figure 6 Data from figure above on log scale.
Case(2) WKB inspired
p  x   ix 2  EH  V  x  
z  x   p '  x   i 2  EH  V  x    i
xV '  x 
2  EH  V  x  
CASE(2) !H.O.WKB starting
c p=-isqrt(EH-V(x0))*x WKB
c z=dp/dx=-i*sqrt(EH-V(x0))+i*x*dVdx0/sqrt(EH-V(x0))
…
V0=V(x0,dVdx0,IPOT)
if(EH.GT.V0)then
srt=sqrt(2*(EH-V0))
p0=-ci*srt*x0
z0=-ci*(srt-x0*dVdx0/srt)
else
srt=sqrt(2*(V0-EH))
p0=srt*x0
z0=srt+x0*dVdx0/srt
(1.11)
endif
…
CALL ZFIND(NAZ,IPOT,EH,X0,Z0,XEND)
…
CALL zToP(NAZ,Nap,p0)
…
CALL pToPsi(NAp,NAPsi,ISELECT)
Figure 7 zcase2 real and imaginary and zcase1 for comparison
The integral of the imaginary part of z is π/2. The term exp(iπ/2) is a complex way of writing -1. This
means that for large values of x, the wave function goes to an incorrect -∞, rather than the incorrect
+∞ seen in figure 6.
Figure 8 zcase2 1 4 is real(dzdx): zcase2 1 5 is imag(dzdx)
The energy is the ground state energy, -4.29306081, for all values of x.
Figure 9PsiCase2 1 3 = imag(PsiCase2)
Case(3) WKB inspired
p  x   ix 2  EH  V  x  
z  x   p '  x   i 2  EH  V  x    i
xV '  x 
2  EH  V  x  
Only the two initial lines are changed from case(2)
(1.12)
Figure 10 zcase3 real(z); zcase3 1 3 imag(z); zcase1 for comparison.
Figure 11 Psicase3 1 3 = imag(Psi)
HO 1stexcited state
At x=0
p  ix   x 2
z  i  2 x
dzdx  2
2ND excited state
 Ex 2  x, c    x 2  cˆ   sum  x, c 
(2.1)
This state contains the ground state in chat which makes it harder to minimize the variance. – it keeps
wanting to go to the ground state.
So that in one dimension
d  Ex 2  x, c  
d EEx 2  x, c 
d 2 Ex1  x, c  
dx
d  Ex 2  x, c 
2
dx 2
d  sum
dx
d  sum  x, c 
 2 x sum  x, c    x 2  cˆ 

  2 sum  x, c   4 x


2
4 x dsum d 2  sum




  x 2  cˆ   x 2  cˆ  dx
dx 2

dx

  Ex 2  x, c 


d 2  sum 
  x  cˆ 

dx 2 
2