solving schrödinger equation numerically - hitoshi...

21
Solving Schrödinger equation numerically Basic idea on working out the energy eigenvalues numerically is very simple. Just solve the Schrödinger equation with a guessed energy, and it always makes the wave function blow up at the infinity. Do trial-and-error to find an energy for which the wave function is tamed up to a very large value of the radius. In this notebook, I'll give a few examples so that you get an idea how to do it. You are welcome to use my commands modified for your purpose. I restrict the discussions to spherically symmetric systems. The Schrödinger equation for the radial wave function is I -2 ÅÅÅÅÅÅÅÅ 2 m 1 ÅÅÅÅ r d 2 ÅÅÅÅÅÅ Å dr 2 r + 2 ÅÅÅÅÅÅÅ 2 m l Hl+1L ÅÅÅÅÅÅÅÅÅÅ Å r 2 + V HrLM RHrL = ERHrL . Multipying 2 m ê 2 on the both sides, I- 1 ÅÅÅÅ r d 2 ÅÅÅ ÅÅÅ Å dr 2 r + lHl+1L ÅÅÅÅÅÅÅÅÅÅ Å r 2 + UHrLM RHrL = ε RHrL . Here, I introduced the notation UHrL = 2 m ÅÅÅÅÅÅÅ 2 V HrL , ε = 2 m ÅÅÅÅÅÅÅ 2 E Finally regular solutions at the origin are of the form RHrL = r l rHrL . Note that 1 ÅÅÅÅ r d 2 ÅÅÅ ÅÅÅ Å dr 2 rRHrL = 1 ÅÅÅÅ r d 2 ÅÅÅ ÅÅÅ Å dr 2 r l+1 rHrL = 1 ÅÅÅÅ r HHl + 1L lr l-1 r+ 2 Hl + 1L r l r ' + r l+1 r '' L The first term cancels the centrifugal potential term, and we find -r '' HrL - 2 Hl+1L ÅÅÅÅÅÅÅÅÅÅÅÅÅ r r ' HrL + UHrL rHrL = ε rHrL If the potential is regular at the origin, the singular term 2 Hl+1L ÅÅÅÅÅÅÅÅÅÅÅÅÅ r needs to be cancelled by r ' H0L = 0 . If the potential is not regular, such as the Coulomb potential, an additional care is needed as explained below. 3D harmonic oscillator We know the eigenvalues of this problem from 221A. E = 3 ÅÅÅÅ 2 w (l = 0 ) E = 5 ÅÅÅÅ 2 w (l = 1 ) E = 7 ÅÅÅÅ 2 w (l = 0, 2 ) E = 9 ÅÅÅÅ 2 w (l = 1, 3 ) E = 11 ÅÅÅÅÅ 2 w (l = 0, 2, 4 ) E = 13 ÅÅÅÅÅ 2 w (l = 1, 3, 5 ) etc. For numerical calculations, I set = m =w= 1 . Then UHrL = r 2 , ε = 2 E . l=0 no nodes With no nodes (ground state), we expect ε = 3 . eigenvalues.nb 1

Upload: lamanh

Post on 28-Sep-2018

238 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

Solving Schrödinger equation numericallyBasic idea on working out the energy eigenvalues numerically is very simple. Just solve the Schrödinger equation with aguessed energy, and it always makes the wave function blow up at the infinity. Do trial-and-error to find an energy for whichthe wave function is tamed up to a very large value of the radius. In this notebook, I'll give a few examples so that you get anidea how to do it. You are welcome to use my commands modified for your purpose.

I restrict the discussions to spherically symmetric systems.

The Schrödinger equation for the radial wave function is I -—2ÅÅÅÅÅÅÅÅÅÅ2 m 1ÅÅÅÅr d2

ÅÅÅÅÅÅÅÅÅÅd r2 r + —2ÅÅÅÅÅÅÅÅÅ2 m lHl+1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅr2 + V HrLM RHrL = E RHrL.

Multipying 2 m ê—2 on the both sides, I- 1ÅÅÅÅr d2ÅÅÅÅÅÅÅÅÅÅd r2 r + lHl+1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅr2 + UHrLM RHrL = ε RHrL.

Here, I introduced the notation UHrL = 2 mÅÅÅÅÅÅÅÅÅ—2 VHrL, ε = 2 mÅÅÅÅÅÅÅÅÅ—2 E

Finally regular solutions at the origin are of the form RHrL = rl rHrL. Note that1ÅÅÅÅr d2

ÅÅÅÅÅÅÅÅÅÅd r2 r RHrL = 1ÅÅÅÅr d2ÅÅÅÅÅÅÅÅÅÅd r2 rl+1 rHrL = 1ÅÅÅÅr HHl + 1L l rl-1 r + 2 Hl + 1L rl r ' + rl+1 r ''L

The first term cancels the centrifugal potential term, and we find - r '' HrL - 2 Hl+1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅr r ' HrL + UHrL rHrL = ε rHrLIf the potential is regular at the origin, the singular term 2 Hl+1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅr needs to be cancelled by r ' H0L = 0. If the potential is notregular, such as the Coulomb potential, an additional care is needed as explained below.

3D harmonic oscillatorWe know the eigenvalues of this problem from 221A.

E = 3ÅÅÅÅ2 — w (l = 0)E = 5ÅÅÅÅ2 — w (l = 1)E = 7ÅÅÅÅ2 — w (l = 0, 2)E = 9ÅÅÅÅ2 — w (l = 1, 3)E = 11ÅÅÅÅÅÅÅ2 — w (l = 0, 2, 4)E = 13ÅÅÅÅÅÅÅ2 — w (l = 1, 3, 5)etc.

For numerical calculations, I set — = m = w = 1. Then UHrL = r2 , ε = 2 E.

l=0

no nodes

With no nodes (ground state), we expect ε = 3.

eigenvalues.nb 1

Page 2: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[83]:= sol = NDSolveA9-r''@rD - IfAr == 0, 0,2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 0< ê.8ε Ø 2.99999997876<, r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;

Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[83]= Ü Graphics Ü

In[84]:= sol = NDSolveA9-r''@rD - IfAr == 0, 0,2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 0< ê.8ε Ø 2.99999997877<, r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;

Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[84]= Ü Graphics Ü

I find the eigenvalue to be 2.99999997876 < ε < 2.99999997877, compared to the exact result ε = 3. You get a sense on thenumerical accuracy, at well as the eigenvalue itself.

one node

Now for the higher levels. With one node, we expect ε = 7,

eigenvalues.nb 2

Page 3: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[111]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 0< ê. 8ε Ø 6.9999999265<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[111]=Ü Graphics Ü

In[112]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 0< ê. 8ε Ø 6.9999999264<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[112]=Ü Graphics Ü

two nodes

With two nodes, we expect ε = 11,

eigenvalues.nb 3

Page 4: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[143]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 0< ê. 8ε Ø 11.000000071<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[143]=Ü Graphics Ü

In[144]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 0< ê. 8ε Ø 11.000000072<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[144]=Ü Graphics Ü

l=1

no nodes

With no nodes (ground state), we expect ε = 5.

eigenvalues.nb 4

Page 5: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[162]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 1< ê. 8ε Ø 4.9999999971<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[162]=Ü Graphics Ü

In[160]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 1< ê. 8ε Ø 4.9999999972<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[160]=Ü Graphics Ü

one node

Now for the higher levels. With one node, we expect ε = 9,

eigenvalues.nb 5

Page 6: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[193]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 1< ê. 8ε Ø 9.00000003<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[193]=Ü Graphics Ü

In[194]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 1< ê. 8ε Ø 9.00000002<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[194]=Ü Graphics Ü

two nodes

With two nodes, we expect ε = 11,

eigenvalues.nb 6

Page 7: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[212]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 1< ê. 8ε Ø 13.000000115<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[212]=Ü Graphics Ü

In[213]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 1< ê. 8ε Ø 13.000000116<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[213]=Ü Graphics Ü

l=2

no nodes

With no nodes (ground state), we expect ε = 7.

eigenvalues.nb 7

Page 8: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[233]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 2< ê. 8ε Ø 6.9999997058<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[233]=Ü Graphics Ü

In[234]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 2< ê. 8ε Ø 6.9999997059<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[234]=Ü Graphics Ü

one node

Now for the higher levels. With one node, we expect ε = 11,

eigenvalues.nb 8

Page 9: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[252]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 2< ê. 8ε Ø 10.99999983<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[252]=Ü Graphics Ü

In[253]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 2< ê. 8ε Ø 10.99999982<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[253]=Ü Graphics Ü

l=3

no nodes

With no nodes (ground state), we expect ε = 9.

eigenvalues.nb 9

Page 10: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[265]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 3< ê. 8ε Ø 8.99999966<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[265]=Ü Graphics Ü

In[266]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 3< ê. 8ε Ø 8.99999967<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[266]=Ü Graphics Ü

one node

Now for the higher levels. With one node, we expect ε = 13,

eigenvalues.nb 10

Page 11: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[279]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 3< ê. 8ε Ø 12.9999953<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[279]=Ü Graphics Ü

In[280]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 3< ê. 8ε Ø 12.9999952<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[280]=Ü Graphics Ü

l=4

no nodes

With no nodes (ground state), we expect ε = 11.

eigenvalues.nb 11

Page 12: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[297]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 4< ê. 8ε Ø 10.999999161<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[297]=Ü Graphics Ü

In[298]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 4< ê. 8ε Ø 10.999999162<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[298]=Ü Graphics Ü

l=5

no nodes

With no nodes (ground state), we expect ε = 13.

eigenvalues.nb 12

Page 13: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[308]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 5< ê. 8ε Ø 13.0000004<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[308]=Ü Graphics Ü

In[309]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

rE r'@rD + r2 r@rD ã ε r@rD ê. 8l Ø 5< ê. 8ε Ø 13.0000005<,

r@0D ã 1, r'@0D ã 0=, r, 8r, 0, 10<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 10<, PlotRange Ø 8-1, 1<D

2 4 6 8 10

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[309]=Ü Graphics Ü

eigenvalues.nb 13

Page 14: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

Coulomb potential (hydrogen atom)The potential is VHrL = - e2

ÅÅÅÅÅÅÅr , UHrL = - 2 mÅÅÅÅÅÅÅÅÅ—2 e2

ÅÅÅÅÅÅÅr = -2 aBÅÅÅÅÅÅÅr . The Schrödinger equation is - r '' HrL - 2 Hl+1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅr r ' HrL - 2 aBÅÅÅÅÅÅÅr rHrL = ε rHrL.Close to the origin, we expand rHrL = rH0L + r ' H0L r +OHr2 L. The singiularity in - 2 Hl+1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅr r ' HrL must be canceled by thecorresponding singularity due to the Coulomb potential -2 aBÅÅÅÅÅÅÅr rH0L, and hence 2 Hl + 1L r ' H0L + 2 aB rH0L = 0,r ' H0L = - aBÅÅÅÅÅÅÅÅÅl+1 rH0L. Because we don't care the overall normalization of the wave function, we can just set rH0L = 1,r ' H0L = -aB ê Hl + 1L.For numerical calculations, we use the atomic unit, e2 = m = — = 1. Then the energy levels are E = - e4 mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ2 —2 n2 = -H2 n2 L-1 , andε = -n-2 .

l=0

no nodes

With no nodes (ground state), we expect ε = -1.

In[367]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 0< ê. 8ε Ø -1<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-1, 1<D

20 40 60 80 100

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[367]=Ü Graphics Ü

one node

Now for the higher levels. With one node, we expect ε = -0.25,

eigenvalues.nb 14

Page 15: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[424]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 0< ê. 8ε Ø -0.250000003824023<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-1, 1<D

20 40 60 80 100

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[424]=Ü Graphics Ü

two nodes

With two nodes, we expect ε = -1ÅÅÅÅÅÅÅÅ9 ,

In[415]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 0< ê. 8ε Ø -0.1111111209<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-1, 1<D

20 40 60 80 100

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[415]=Ü Graphics Ü

eigenvalues.nb 15

Page 16: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

three nodes

With two nodes, we expect ε = -1ÅÅÅÅÅÅÅÅ16 ,

In[433]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 0< ê. 8ε Ø -0.0625<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-1, 1<D

20 40 60 80 100

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[433]=Ü Graphics Ü

four nodes

With two nodes, we expect ε = -1ÅÅÅÅÅÅÅÅ25 ,

eigenvalues.nb 16

Page 17: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[434]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 0< ê. 8ε Ø -0.04<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-1, 1<D

20 40 60 80 100

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[434]=Ü Graphics Ü

five nodes

With two nodes, we expect ε = -1ÅÅÅÅÅÅÅÅ36 ,

In[450]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 0< ê. 8ε Ø -0.0277777<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-0.2, 1<D

20 40 60 80 100

-0.2

0.2

0.4

0.6

0.8

1

Out[450]=Ü Graphics Ü

eigenvalues.nb 17

Page 18: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

l=1

no nodes

With no nodes (ground state), we expect ε = -1ÅÅÅÅÅÅÅÅ4 .

In[436]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 1< ê. 8ε Ø -0.25<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-1, 1<D

20 40 60 80 100

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[436]=Ü Graphics Ü

one node

Now for the higher levels. With one node, we expect ε = -1ÅÅÅÅÅÅÅÅ9 ,

eigenvalues.nb 18

Page 19: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[444]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 1< ê. 8ε Ø -0.111111098<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-1, 1<D

20 40 60 80 100

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[444]=Ü Graphics Ü

two nodes

With two nodes, we expect ε = -1ÅÅÅÅÅÅÅÅ16 ,

In[445]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 1< ê. 8ε Ø -0.0625<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-1, 1<D

20 40 60 80 100

-1

-0.75

-0.5

-0.25

0.25

0.5

0.75

1

Out[445]=Ü Graphics Ü

eigenvalues.nb 19

Page 20: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

three nodes

With two nodes, we expect ε = -1ÅÅÅÅÅÅÅÅ25 ,

In[456]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 1< ê. 8ε Ø -0.04<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-0.03, 0.05<D

20 40 60 80 100

-0.03

-0.02

-0.01

0.01

0.02

0.03

0.04

0.05

Out[456]=Ü Graphics Ü

four nodes

With two nodes, we expect ε = -1ÅÅÅÅÅÅÅÅ36 ,

eigenvalues.nb 20

Page 21: Solving Schrödinger equation numerically - Hitoshi …hitoshi.berkeley.edu/221b/eigenvalues.nb.pdf · Solving Schrödinger equation numerically Basic idea on working out the energy

In[460]:=sol = NDSolveA9-r''@rD - IfAr == 0, 0,

2 Hl + 1LÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

r r'@rD +

2ÅÅÅÅr

r@rDE ã ε r@rD, r@0D ã 1, r'@0D ã-1

ÅÅÅÅÅÅÅÅÅÅÅÅl + 1

= ê.8l Ø 1< ê. 8ε Ø -0.0277777<, r, 8r, 0, 100<E;Plot@Evaluate@r@rD ê. solD, 8r, 0, 100<, PlotRange Ø 8-0.03, 0.05<D

20 40 60 80 100

-0.03

-0.02

-0.01

0.01

0.02

0.03

0.04

0.05

Out[460]=Ü Graphics Ü

eigenvalues.nb 21