Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.1
Lecture 8
Numerical Techniques : Differential
Equations - Eigenvalue Problems
Wave Motion Along a Spring, Hydrogen Atom
IKC-MH.55 Scientific Computing with Python at December 15,
2023
Dr. Cem Özdo
˘
gan
Engineering Sciences Department
˙
Izmir Kâtip Çelebi University
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.2
Contents
1 Differential Equations - Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a String
Numerical Solutions of Schrödinger Equation
Hydrogen Atom
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.3
Differential Equations
1 Initial Va lue Problems.
2 Boundary Value Problems.
3 Eigenvalue (characteristic-value) Problems:
Even if the boundary conditions of the differential equation are
available, the solutions can only exist for some specific values
of a parameter in the system. For example,
~
2
2m
d
2
ψ
dx
2
+ V (x)ψ(x ) = Eψ(x )
In Schrödinger equation, there are solutions that ψ(x)
goes to zero at infinity for c ertain values of the energy E.
These E
n
values satisfying this condition are the
eigenvalues of the differential equation.
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.4
Boundary/Eigen Value Problems
See the following 2nd degree differential equation:
y
′′
= f (x , y , y
: λ)
Again, let the boundary conditions of this equation to be
given at both ends.
If these conditions can only be satisfi ed for certain λ
values, we call it the eigenvalue problem.
e.g.: Vibrations o f a wire with both ends xed give stable
solution o nly for certain waveleng ths.
e.g.: Solutions of the Schrödi nger e quation that are zero at
infinity exist only for certain energy eigenvalues.
Some boundary value problems in physics/engineering
have a solution based on an eigenvalue.
In terms of numerical solution, boundar y value and
eigenvalue problems are solved by the same method.
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.5
Eigenvalue Problems I
1
For example, standing waves are the solutions of the
following differential equation for a string fixed at both
ends:
d
2
y(x)
dx
2
+ k
2
y(x) = 0
Here k = 2π represents the wavenumber.
If the two ends of the L-length string are fixed, then
corresponding boundary values are:
y(0) = y(L) = 0
Although there are sufficient boundary conditions, there
are only solutions for certain k values.
It is impossible to satisfy these boundary conditions for
other k values.
The standing wave solution in the string:
y(x) = Asinkx + Bcoskx
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.6
Eigenvalue Problems II
Boundary conditions to find the coefficients A, B;
y(0) = 0 A 0 + B 1 = 0 B = 0
y(L) = 0 AsinkL = 0 kL = nπ (n = 1, 2, . . .)
According to these results, there is only one set of solution
as k = π/L, 2π/L, . . . values. (k
n
= nπ/L eigenvalue(s).)
2 Another example is the Schrödinger equation in quantum
mechanics. If we write it in one-dimensional space,
~
2
2m
d
2
ψ(x)
dx
2
+ V (x)ψ(x) = Eψ(x)
Here V (x) is the potential energy function of the particle,
and E is its total energy.
Boundary conditions for the wave function are given for
x = ±∞:
ψ(±∞) 0
Again, this differential equation has solutions s atisfying the
boundary conditions only for certain E eigenvalues.
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.7
Eigenvalue Problems III
For eigenvalue problems, the trial-and-error (shooting) method
is also used.
However, an estimated value is given to the eigenvalue
instead of giving to the derivatives at the boundary .
Then, a trial solution is obtained.
By comparing this trial solution with the value at the
boundary condition, the eigenvalue is readjusted and
another trial is perfor med.
Finally, the solution is to be found when the true
eigenvalue is approached within a certain margin of error.
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.8
Standing Waves on a String I
The wave equation and boundary conditions in a string of
length L = 1 m with both fixed ends are as follows:
d
2
y(x)
dx
2
+ k
2
y(x) = 0 & y(0) = y(1) = 0
Firstly, transform this quadratic equation into
a system of linear (first degree) equations:
y y
1
dy
dx
y
2
with these values (y
1
and y
2
), the sy stem of
equations to be solved: (Now, we h ave a
set of equations.)
dy
1
dr
= y
2
dy
2
dr
= k
2
y
1
and the boundary conditions are:
y(0) = 0
y(1) = 0
Here, the trial-and-error approach differs from the
previously discussed boundary value problem.
Different estimates for y
2
(0) values do not make it zero at
the other boundary.
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.9
Standing Waves on a String II
Instead, an estimated value for the k eigenvalue is
taken and a solution search is initiated.
Searching continues by increasing the value of k until the
boundary condition (here y(1) = 0) at the other end is
satisfied.
For example, the solution at the other boundary is y
1k
(1)
for a given value of k.
Accordingly, the next step is find the root of the following
equation:
F (k) = y
1k
(1) y(1) = 0
When we encountered an eigenvalue k, then F (k) will
change sign as indicating the root.
(Example py-file: The program to find the 5 smallest of
the k eigenvalues in a string:
standingwawes.py)
The program can find the eigenvalues
k = nπ/L = π, 2π, 3π, . . . on a str ing of length L=1 m.
However, the error margin is to be increased by increasing
eigenvalues (see k
n
values).
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.10
Standing Waves on a String III
0.0 0.2 0.4 0.6 0.8 1.0
x
−0.01
0.00
0.01
0.02
0.03
y
Approximate
and Exact Solution for EVP ODE:
d
2
y
(
x
)
dx
2
+
k
2
y
(
x
) = 0
n=1
n=2
n=3
n=4
n=5
SciPy n=5
Figure: S olution for the Eigenvalue Problem for the ODE:
dy
2
dx
= k
2
y
1
.
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.11
Numerical Solutions of Schrödinger Equation I
In quantum mechanics, the Schrödinger equation is used
to find the eigenvalues and eigenfunctions of the particle
moving in one dimension at the potential V (x):
~
2
2m
d
2
ψ(x)
dx
2
+ V (x)ψ(x) = Eψ(x)
An analytical solution to this equation is available for only
very few potential functions such as harmonic oscillator,
infinite well, hydrogen atom, ....
Therefore, numerical solutions of the Schrödinger
equation is an indispensable tool in physics research.
The numerical solution of the Sc hrödinger equation is
complicated for general solutions of the problem.
However, if we assume the potential function to be as
symmetric, the problem can be solved in a much easier
way.
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.12
Numerical Solutions of Schrödinger Equation II
For a symmetric potential,
V (x) = V (x)
Therefore, the solutions of the Schrödinger equation also
fall into two groups:
Symmetrical wave functions: ψ(x) = ψ(x)
Antisymmetric wave functions: ψ(x) = ψ(x)
This property allows us to determine exactly the initial
conditions necessary to start the eigenvalue problem.
Symmetric (even) wave functions: ψ(0) = 1 & ψ
(0) = 0
Antisymmetric ( odd) wave functions: ψ(0) = 0 & ψ
(0) = 1
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.13
Hydrogen Atom I
In quantum mechanics, the hydrogen atom is considered
as a system of electrons with a charge of e around a
proton with a charge of +e.
If the electrostatic potential energy between the
electron-proton is substituted in the Schrödinger equation
as V (r ) = e
2
/r,
~
2
2m
r
2
ψ(
~
r)
e
2
r
ψ(
~
r) = Eψ(
~
r )
Here m
r
= m
e
m
p
/(m
e
+ m
p
) is the reduced mass of the
electron-proton system.
Since the potential energy depends only on the distance r ,
the solution is defined with the spherical coordinates
(r, θ, φ) in three-dimensional space:
ψ(r, θ, φ) = R(r)Y (θ, φ)
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.14
Hydrogen Atom II
The solutions of the equation provided by the angular
variables (θ, φ) are independent of the V (r) potential and
consist of functions called spher ic al harmonics Y (θ, φ).
The equation provided by the R(r ) function is called radial
Schrödinger equation.
~
2
2m
r
d
2
R
dr
2
+
2
r
dR
dr
+
l(l + 1)~
2
2m
r
r
2
e
2
r
R(r) = −|E|R(r)
Attempt to find the bound energy (eigen)values and wave
(eigen)functions of the radial Schrödinger equation
numerically :
First, it is necessary to make the radial equation
dimensionless bu defining a new wavefunction:
u(r) = rR(r )
The radial equation in terms of this new function u(r )
becomes simpler:
d
2
u
dr
2
l(l + 1)
r
2
2m
r
e
2
~
2
r
u(r) =
2m
r
|E|
~
2
u(r)
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.15
Hydrogen Atom III
Now, a variable change is made as the following:
k =
2m
r
|E|
~
, ρ = 2kr , λ
2
=
1
ka
0
=
|E|
Here, the Rydberg constant and the Bohr radius a
0
are
defined as:
a
0
=
~
2
m
r
e
2
, =
~
2
2m
r
a
2
0
As a result of these changes, the dimensionless radial
equation becomes:
d
2
u
dρ
2
l(l + 1)
ρ
2
u +
λ
ρ
1
4
u = 0
(1)
where l is orbital quantum number and λ is principal
quantum number.
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.16
Hydrogen Atom IV
Numerical Solution. Firstly, transform this
quadratic Equation 1 into a system of linear
(first degree) equations:
u y
1
du
dρ
y
2
with these values
(y
1
and y
2
), the system of
equations to be solved:
(Now, we have a set of
equations.)
dy
1
dρ
= y
2
dy
2
dρ
=
l(l + 1)
ρ
2
λ
ρ
1
4

y
1
For the initial conditions:
u(0) 0
Since the absolute magnitude of the wave function has no
physical meaning, the arbitrary va lue u
(0) = 1 can b e
taken.
Then;
y
1
(0) = 0 and y
2
(0) = 1
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.17
Hydrogen Atom V
(Example py-file: Program that solves the radial Schrödinger
equation for the hydrogen atom:
hydrogenatom.py)
Program does not graph the u(r) functions, but the |u|
2
probability densities, which is physically meaningful.
It calculates according to the l quantum number which is
supplied by the user.
The error margin is to be increased by increasing n
quantum number.
Figure: S olution for the Eigenvalue Problem for the ODE:
dy
2
dρ
=
h
l(l+1)
ρ
2
λ
ρ
1
4
i
y
1
.
Numerical Techniques:
Differential Equations -
Eigenvalue Problems
Dr. Cem Özdo
˘
gan
LOGIK
Differential Equations -
Eigenvalue Problems
Eigenvalue Problems
Standing Waves on a
String
Numerical Solutions of
Schrödinger Equation
Hydrogen Atom
8.18
Hydrogen Atom VI
0 1 2 3 4 5 6
ρ
0.000
0.001
0.002
0.003
0.004
0.005
|
u
(
ρ
)|
2
Solution for EVP ODE:
d
2
u
dρ
2
l
(
l
+ 1)
ρ
2
u
+
(
λ
ρ
1
4
)
u
= 0
1s
2s
3s
Figure: S olution for the Eigenvalue Problem for the ODE:
dy
2
dρ
=
h
l(l+1)
ρ
2
λ
ρ
1
4
i
y
1
.