Anda di halaman 1dari 116

Mathematical and Numerical Methods for

Chemists
Sture Nordholm
Department of Chemistry, The University of Gothenburg
August 2, 2011
Abstract
Chemists need the language and the tools of mathematics to ex-
press its accumulated knowledge and to solve problems. This course is
intended to help students of chemistry to acquire this language and to
use mathematical methods within a chemical context. It is assumed
that the student has had exposure to university mathematics. The
concept of the course is to briey summarize a relevant area of mathe-
matics with emphasis placed on understanding the origin of its tools of
analysis. This is then followed by selected applications of these tools
to chemical problems. In this way the twostep process of translating
a chemical problem into mathematical form and then solving it by an
appropriate mathematical method is amply illustrated.
Part I
Linear Algebra and
Applications
1 Chemical Algebra - A Preview
Mathematics starts with integers ...-2,-1,0,1,2,..... and we cant do without
them in chemistry. We need them in an interesting and nontrivial way when
1
we try to balance a chemical reaction,
i
1
C
14
H
12
+i
2
C
2
= i
3
CC
2
+i
4
H
2
C. (1)
Here we are looking for the set of smallest positive integers i
1
. i
2
. i
3
. i
4
such
that the equation is balanced with respect to all atomic species present.
As we all know this can be a frustrating task if the molecules involved are
many and large. When we then try to calculate the corresponding masses in
a corresponding laboratory experiment we enter the realm of real numbers
which in mathematics we often call x, particularly before we have managed to
obtain them. The concept of a "mole" is the bridge between the stochiometric
equations in chemistry and the measurable masses of reactants and products
in laboratory reactions. It is by a decision of IUPAC dened as the unit of
"amount of substance" and takes stochiometeric calculations from integers
to real numbers.
We know that real numbers can be added, subtracted, multiplied and
divided unless the denominator is zero. In order to be able to take square
roots of negative numbers and do other handy things we introduce complex
numbers z = x+iy. Now we have an object which is specied by two real
numbers. But the story goes on. When we want to specify the position of a
particle we need three coordinates x,y,z and we need them so often that we
decide to call this set of numbers a vector r. This particular vector is three
dimensional but if we have to specify the positions of two particles we need
six real numbers r
1
.
1
. .
1,
r
2
.
2
. .
2
which can be regarded as a six dimensional
vector. In the same way we can go on and nd need for vectors of very high
dimension. If, for example, we would try to discuss the instantaneous state
of a gas by classical mechanics we may need vectors of Avogadros number
of dimensions. Now our ability to call these objects vectors and use vector
notation which suppresses the delineation of the components is essential be-
cause we could not nd time in a lifetime to write down all these components.
Nevertheless it is possible for us to work with such monstrous vectors if we
know the rules which apply to them. Thus we are getting ready to study
the rules applying to vectorspaces. A powerful but simple set of operations
involving vectors are described by what is called linear algebra. As it turns
out quantum mechanics is dominated by linear algebra and through quantum
chemistry, which is, perhaps, the fastest growing branch of chemistry, linear
algebra has become an essential tool for chemists. For this reason we shall
have a look at how quantum mechanics relies on linear algebra and how it
gets into chemistry.
2
1.1 The Linear Algebra of Quantum Mechanics and
Quantum Chemistry
Life may seem to get horribly complicated when we move from classical to
quantum mechanics. A classical particle moving in one dimension can be
described by two real numbers x,v, the position and momentum. Newtons
equations of motion deal with only these two quantities. When we go to
quantum mechanics we must describe the state of the same particle as a
wavefunction (r). A function of x is dened by its value at all x-values. If
all such function values are compared with the components of a vector we see
that a function is a vector in an innite dimensional vectorspace so we would
seem to have a problem worse than that of describing the classical states
of a gas of a mole of particles. It is not quite so dicult as it may sound.
The time-development is described by a time-dependent wavefunction (t; r)
which satises the time-dependent Schrdinger equation,
J
Jt
(t; r) =
i
~
H(t; r). (2)
where H is the Hamiltonian operator,
H =
~
2
2:
J
2
Jr
2
+\ (r). (3)
Here V(x) is the potential acting on the particle. Much interest is focused on
the so-called energy eigenfunctions
1
(r) which satisfy the time-independent
Schrdinger equation,
H
1
(r) = 1
1
(r). (4)
Note that the spatial probability density associated with a wavefunction (r)
is
j(r) = [(r)[
2
. (5)
An energy eigenfunction satises the time-dependent Schrdinger equation
if it is multiplied by the phasefactor c
i1t~
. This means that the spatial
probability density p(x) is time-independent. Thus the energy eigenfunctions
are called stationary states. They also have well-dened energies equal to the
energy eigenvalue E while wavefunctions in general are neither stationary nor
of well-dened energy. In general, a wavefunction (r) can be expanded in
the energy eigenfunctions as follows,
(r) =

1
c
1

1
(r). (6)
3
In quantum chemistry one normally seeks the wavefunction of lowest energy,
the so-called groundstate wavefunction
1
0
which is an energy eigenfunction.
It is generally found by the nite basis set method which is approximative
assuming that the groundstate can be found as a superposition of basisfunc-
tions ,
i
. i = 1. ...`.

1
0
=
.

i=1
c
i
,
i
. (7)
The coecients c
i
form a vector c which is obtained by solving the time-
independent Schrdinger equation in matrix form,
Hc = 1c. (8)
Here I have assumed that the basisfunctions are orthonormal, i.e., they satisfy
_
dr,

i
(r),
)
(r) = o
i)
. (9)
where o
i)
is Kroneckers delta,
o
i)
= 1. if i = ,. (10)
= 0. if i ,= ,.
We shall discuss the nite basis set method in greater detail in the next
chapter. Now we simply note that practical use of quantum mechanics leads
to the eigenvalue problem in matrix form.
1.1.1 The Self Consistent Field (SCF) Aproximation of Quantum
Chemistry
Before we leave this introduction to the linear algebra of quantum mechanics
I want to deal with one major problem of quantum chemistry, the many-
electron problem, and point out the approach to it followed by chemists
with great success. We started by considering one particle moving in one
dimension x. A more realistic application has one particle moving in three
dimensions x,y,z. The time-independent Schrdinger equation then becomes

~
2
2:
\
2
(r. . .) +\ (r. . .)(r. . .) = 1(r. . .). (11)
4
where
\
2
=
J
2
Jr
2
+
J
2
J
2
+
J
2
J.
2
. (12)
This is not too dicult to deal with. We have three coordinates to deal
with rather than one. At this point we would be able to nd the energy
eigenvalues and eigenfunctions of the hydrogen atom and the H
+
2
-ion. This
is not a bad start but we need to go on to H
2
. H
2
O, ..... with more than one
electron. Now the number of coordinates grows linearly with the number of
atoms and the quantum chemistry starts to look completely intractable for
anything but the smallest molecules. The way to deal with this problem is
to note that dealing with many electrons is not such a problem if we could
assume that they were moving independently, i. e., without explicit coupling
to each other. If this were the case then the wavefunctions could be taken to
be products,
(:
1
. :
2
. ...) = (:
1
)(:
2
) . (13)
of one-electron wavefunctions each of which could be obtained from a one-
electron Scrdinger equation with the same form of Hamiltonian operator.
The corresponding many-electron energy eigenvalues would then be sums of
the corresponding one-electron eigenvalues. This sounds brilliant but it does
not work because the electrons interact with each other by the Coulomb re-
pulsion between like charges. Moreover, the Pauli principle enters and insists
that the total electronic wavefunction be antisymmetric with respect to in-
terchange of two electrons. These two mechanisms mean that the electrons
are not moving independently. However, the scheme can be carried out ap-
proximately in the following way: First we do not use product wavefunctions
directly but combine them into Slater determinants which satisfy the Pauli
principle. This means that no more than two electrons of opposite spin can
be assigned the same one-electron eigenfunction (orbital) in the Slater deter-
minant. In order to obtain the lowest energy we stack the electrons in the
lowest available orbitals. The electrons still move without explicit coupling to
each other but the pattern of motion has been restricted by the Pauli princi-
ple. But how do we choose the Hamiltonian which describes the one-particle
motion? We want this Hamiltonian, which is called the Fock operator in
quantum chemistry, to represent the repulsion between the electrons in some
average way, otherwise the resulting energy and electronic structure will be
completely unrealistic. This can be done by an iterative procedure. The Fock
operator can be found if the occupied orbitals are known. Thus we can start
5
with the so-called core Hamiltonian which neglects electron-electron repul-
sion and obtain the corresponding orbitals,
_

(0)
)
_
, which yield a new Fock
operator 1
(0)
. We now use this Fock operator to obtain a new set of orbitals,
which include the eect of electron-electron repulsion,
_

(1)
)
_
. These orbitals
can, in turn, be used to nd an improved Fock operator 1
(1)
and so on. The
vital step in this iteration is the solution of the Fock eigenvalue problem,
1
(i)

(i+1)
=
(i+1)

(i+1)
. (14)
Eventually, in almost all cases, this iterative procedure will converge so that
the Fock operator eigenfunctions are the same as those orbitals used to con-
struct it to within tolerable accuracy. Then we have found the self consistent
eld solution to the electronic stucture of the atom or molecule. It is not pre-
cise. We have not accounted for the correlation of the electrons as they move.
We have also generally used nite basis sets which cannot completely resolve
even the uncorrelated motion but the accuracy achieved in a good SCF cal-
culation is often quite good and the reduction of the problem to one-electron
form is so attractive that nearly all quantum chemistry is done this way. The
language of chemistry is dominated by atomic and molecular orbitals which
are SCF constructs. It is often not clear to the practising chemist that these
concepts are approximate but they are so close to the truth that almost all
methods used to unravel the subtle correlation eects start from the SCF or,
as it is more often called among quantum chemists, the Hartree-Fock theory.
1.2 The Vibrational Modes of Molecules
Even though we often talk about the geometries of molecules as if the atoms
were stationary relative to each other this is not the case. There are internal
motions in molecules in the form of rotations and vibrations. If there are N
atoms in the molecule then there are 3N-3 rotations and vibrations in the
molecule. For a linear molecule there are 2 rotations and 3N-5 vibrations
while there are 3 rotations in a nonlinear molecule and 3N-6 vibrations. This
means that vibrations soon completely dominate the internal motion as the
number of atoms increases. Again the exact treatment of the internal motion
in a molecule of more than two atoms is very dicult due to the coupling
between all the dierent motions. However, for small amplitude motion one
can enormously simplify the problem by assuming separable rotations and
6
harmonic vibrations. This means that the potential is approximated by a
quadratic form in the coordinates,
\ (r
1
. r
2
. r
3
. .....) = \
11
r
2
1
+\
12
r
1
r
2
+..... (15)
=
1
2

i,)
\
i,)
r
i
r
)
.
where \
i)
is the second derivative of the potential at the minimum,
\
i)
=
J
2
Jr
i
Jr
)
\ (r
1
. r
2
. ......) at r
1
. r
2
. ..... = r
(min)
1
. r
(min)
2
. ....... . (16)
It turns out that in this harmonic approximation one can nd a coordinate
transformation such that the vibrations all separate and become indepen-
dent so-called normal modes each performing harmonic oscillatory motion
at a well-dened frequency. This results in an enormous simplication of
the treatment of internal molecular dynamics which is close enough to the
truth for low energies to be of great practical value in chemistry. Thus we
shall, after having learnt the necessary prerequesites of linear algebra, return
to consider how to obtain the coordinate transformation which yields these
normal modes.
2 Vector Spaces and the Eigenvalue Problem
2.1 Vector Spaces
A set of elements x. y. z...... forms a vector space S if addition of two
vectors generates another vector in S,
x +y = z o. and x +y = y +x. and (x +y) +z = x + (y +z), (17)
and there exists a zero 0 such that x +0 = x, and there exists for every
vector x a vector x such that x + (x) = 0, and multiplication by scalar
numbers `. j is possible according to the rules
`x o, `(jx) = (`j)x. (` +j)x =`x +jx. (18)
`(x +y) = `x+`y. 1 x = x, 0 x =0.
7
Denition 1: The vectors x
1
. x
2
. x
a
are said to be linearly inde-
pendent if
a

i=1
`
i
x
i
= 0. `
i
= 0. for all i. (19)
Denition 2: Dimension: If there is a set of N linearly independent
nonzero vectors e
i

.
i=1
but no set of N+1 such vectors then the vector space
is N-dimensional and for any x o we have
x =
.

i=1
r
i
e
i
. (20)
The set of vectors e
i

.
i=1
is called a basis in S. In a given basis the vector
x can be represented by a column matrix of its expansion coecients, e.g.
_
_
_
_
r
1
r
2
r
3
r
4
_
_
_
_
.
Denition 3: Linear operator: A is a linear operator on S if for x o
also Ax o and A satises the linearity condition
A(`x +jy) = `Ax +jAy. (21)
Exercise 1 What is the dimension of our Euclidean space? Find a conve-
nient basis for it.
Exercise 2 What are the vectors and the linear operators of quantum me-
chanics?
Exercise 3 Is the set of vectors
_
_
1
1
1
_
_
.
_
_
1
0
1
_
_
.
_
_
1
3
1
_
_
a set of indepen-
dent vectors?
2.1.1 Matrices
Suppose the linear operator A satises
Ae
i
=
.

)=1

)i
e
)
, for i = 1, . . . `. (22)
8
then it follows that
Ax = A
.

i=1
r
i
e
i
=
.

i=1
.

)=1

)i
r
i
e
)
. (23)
Thus in a given basis a linear operator A can be represented by a matrix

i)
, where i and , are the row and column indices, respectively, and its
operation can be described by matrix multiplication, e.g.,
Ax =
_

11

12

21

22
__
r
1
r
2
_
=
_

11
r
1
+
12
r
2

21
r
1
+
22
r
2
_
. (24)
Linear operators can be multiplied by scalars,
(`A)x = `(Ax). (`A)
i)
= `
i)
. (25)
added,
(A+B)x = Ax +Bx. (A+B)
i)
=
i)
+1
i)
. (26)
and multiplied,
(AB)x = A(Bx). (AB)
i)
=
.

I=1

iI
1
I)
. (27)
There is a null operator 0, such that 0x = 0 for all x, and an identity operator
I such that Ix = x for all x.
Denition 4: Inverse: Certain operators A have inverses A
1
such
that
AA
1
= A
1
A = I. (28)
Denition 5: Determinant: Square matrices such as we have discussed
above posess a determinant det A dened as
det A =

11
. . .
1.
. . . . . . . . .

.1
. . .
..

=

(1)
o

1j
1

2j
2

.j
N
. (29)
where the sum is over all permutations of the numbers 1,2,....N, i.e., N! per-
mutations, and the exponent a is 0 for even permutations and 1 for odd
permutations. The even and odd permutations can be distinguished by the
fact that the former are constructed by an even number of pairwise inter-
changes, the latter from an odd number of pairwise interchanges, starting
from the original sequence which is even.
9
Exercise 4 Find the determinants and, if possible, the inverses of the ma-
trices
_
1 0
0 1
_
.
_
1 1
1 1
_
.
_
1 2
3 4
_
.
Example 1: 1,2 is an even, 2,1 an odd permutation of 1,2. 1,2,3 is an
even permutation. So are 3,1,2 and 2,3,1 but 2,1,3; 3,2,1 and 1,3,2 are odd
permutations of 1,2,3.
Matrix operations:
Transpose of A:

A is dened by
_

A
_
i)
=
)i
.
Complex conjugate of A : A

is dened by [A

]
i)
=

i)
.
Hermitian conjugate of A : A
y
is dened by
_
A
y

i)
=

)i
.
Note that Hermitian conjugate is often called adjoint as in the Beta Hand-
book. There it is indicated by superscript * while complex conjugate is de-
noted by a bar over the quantity. I am following the standard notation of
physicists and chemists here.
Some terminology: The matrix is called -
real if A

= A and symmetric if

A = A,
antisymmetric if

A = A and Hermitian if A
y
= A.
orthogonal if A
1
= A and unitary if A
1
= A
y
.
diagonal if A
i)
= 0 for all i,= ,.
idempotent if A
2
= A and normal if AA
y
= A
y
A.
Denition 6: Trace: The trace of a matrix A is denoted 1:(A) and
dened as
1: (A) =
.

i=1

ii
. (30)
Exercise 5 Consider the matrix
_
c /i
ci d
_
, where c. /. c and d are real
numbers. Determine its i) transpose, ii) complex conjugate and iii) Her-
mitian conjugate. Determine minimal conditions on c. /. c and d such that
the matrix is iv) real, v) antisymmetric, vi) orthogonal and vii) idempotent.
10
2.2 Introduction of a Metric
Denition 7: Scalar product: The bilinear operation denoted by which
takes two vectors x and y into a scalar xy is called a scalar product if
x y =(y x)

.
x (`y+jz) =`x y +jx z.
x x = 0 only if x = 0.
Denition 8: Norm: [x[ =
_
x x is called the norm (or length) of the
vector x.
Denition 9: Orthogonality: x and y are said to be orthogonal if
x y = 0.
Denition 10: Orthonormality: The basis e
i

.
i=1
is said to be ortho-
normal if e
i
e
)
= o
i)
.
2.3 The Eigenvalue Problem
Denition 11: Eigenvector and eigenvalue: x is an eigenvector of A if
Ax =`x and ` is called the eigenvalue of A corresponding to the eigenvector
x.
How to nd the eigenvalues of an operator A? - We shall assume here
that our operator can be represented as a matrix in an orthonormal basis.
Theorem 1: The eigenvalues of the matrix A can be found as the roots
of the secular equation dct(A`I) = 0.
- I will only sketch a proof here leaving the details to be worked out
as an exercise. First we note that the determinant is unaltered if a scalar
times one of the columns of the matrix is added to another column in the
matrix. This follows from the fact that matrices with two identical columns
have a vanishing determinant. In turn, this follows from the antisymmetry
of the determinant with respect to the interchange of two columns. From the
eigenvalue equation Ax =`x follows that the columns of the matrix A`I
are linearly dependent. This means that by adding scalar numbers times the
other columns to one of them one can, with the proper choice of scalars, make
this column consist of only zeros in a matrix which must have unchanged
determinant. It is then trivial to see that the determinant must be zero.
Note that the secular equation is an Nth order algebraic equation. Thus
there are N roots `
i

.
i=1
some of which may be degenerate, i.e., the same.
11
Note that for each eigenvalue one can nd at least one corresponding eigen-
vector and at most a number of linearly independent eigenvectors equal to
the degeneracy (multiplicity) of the corresponding eigenvector (root of the
secular equation). Since it is trivial to see that if x is an eigenvector so is `x
eigenvectors are only determined up to an arbitrary scalar prefactor. A set of
eigenvectors corresponding to dierent eigenvalues are linearly independent.
2.3.1 Properties of Hermitian matrices
Using long-hand notation for scalar product such that x y is written
as (x. y) we have in general (x. Ay) = (A
y
x. y) and for Hermitian
matrices (x. Ay) = (Ax. y).
The eigenvalues of an Hermitian operator are real and the eigenvectors
corresponding to dierent eigenvalues are orthogonal. There are N
linearly independent eigenvectors.
The proof that the eigenvectors are real and orthogonal follows readily
from consideration of the scalar product (x
1
. Ax
2
) and use of the above
Hermitivity relation and the eigenvalue relation.
Exercise 6 Prove explicitly that (x. Ay) =
_
A
y
x. y
_
in the case of a 2x2
matrix.
Exercise 7 Prove explicitly that if A
y
= A then eigenvectors of dierent
eigenvalues are orthogonal and the eigenvalues are real.
How does one nd the eigenvector(s) corresponding to a given eigenvalue?
- Given the eigenvalue, the eigenvalue equation Ax =`x turns into a set of
coupled linear equations which can be solved by stepwise elimination. Note
that since the eigenvector is arbitrary up to a scalar prefactor one component
of the eigenvector will be undetermined or can be set to unity unless this
component turns out to be zero. If so one simply picks another component
to set to unity or some other convenient value.
Example 8 Find the eigenvalues and eigenvectors of the matrix
_
4 1
1 4
_
.
12
Solution: the secular equation is -
(4 `)
2
1 = 0.
The eigenvalues are then `
1
= 5 and `
2
= 3 with corresponding eigenvectors
obtained by solving the equations -
4r
1
+r
2
= `r
1
.
r
1
+ 4r
2
= `r
2
.
The rst equation yields -
r
2
= (` 4)r
1
.
and the second yields -
r
1
= (` 4)r
2
.
Insisting that these two equations give the same eigenvectors leads to the
secular equation and the two possible eigenvalues. A convenient way to
proceed is to choose r
1
= 1 and then nd the two eigenvectors -
x
1
=
_
1
1
_
.
x
2
=
_
1
1
_
.
Note that these eigenvectors are orthogonal - as they must be for a Hermitian
matrix. In order to make them orthonormal we multiply them by 1,
_
2. -
In some cases, namely when r
1
= 0, the convenient way to proceed above
does not work. One can then instead choose r
2
= 1.
2.4 The Generalized Eigenvalue Problem
The operator eigenvalue above could be written as a matrix equation. Such
an equation can be generated from an operator equation by use of an ortho-
normal basis e
)

a
1
. The operator equation -
A
cj
x =`x (31)
13
can be turned into a matrix equation in the space spanned by the basis
vectors by projecting both x and the operator equation onto the space of the
basis vectors, i.e. -
x =
a

)=1
r
)
e
)
. (32)
(e
i
. A
cj
x) =
_
e
i
. A
cj
a

)=1
r
)
e
)
_
=
a

)=1
r
)
(e
i
. A
cj
e
)
) =
a

)=1

i)
r
)
= `(e
i
. x) = `
a

)=1
r
)
(e
i
. e
)
) = `r
i
. (33)
In the case of a general basis which is not orthonormal the matrix equation
is -
Ax = Sx. (34)
a

i=1

i)
r
)
= `
a

i=1
o
i)
r
)
. (35)
which is the generalized eigenvalue problem. This problem can be converted
to normal form by multiplication with the inverse of o -
S
1
Ax = `S
1
Sx =`x. (36)
A
c
x = `x. where A
c
= S
1
A. (37)
The projection of an operator eigenvalue problem into a reduced space
spanned by a given basis and a corresponding matrix form is called the
Galerkin method and used very commonly in physics and chemistry.
2.5 Linear Algebra Exercises:
1. Try to convert the chemical problem of writing a stoichiometrically
balanced equation for a reaction with given reactants and products into
a mathematical problem. a) Can molecules be treated as basis functions
in a space of all possible chemical species? b) What distinguishes the
space of molecules from a vector space? c) Can you suggest a way to use
vector space methods to solve our problem of balancing a stochiometric
equation?
14
2. Let the matrices A and B be dened by
A =
_
_
2 1 0
1 0 1
0 1 2
_
_
and B =
_
_
1 4 7
2 5 8
3 6 9
_
_
.
a) Obtain the determinants of the two matrices. b) Obtain A
2
. B
2
. AB
explicitly. c) Obtain the eigenvalues of A.
3. Verify Theorem 1 explicitly for 2 2 matrices.
4. Show that for any square matrices A and B we have a)
^
(AB) =

B

A
and b) (AB)
y
= B
y
A
y
.
5. Show that if U is a unitary matrix then its eigenvalues ` satisfy
[`[ = 1.
6. Find the eigenvalues and eigenvectors of the matrix A =
_
1 2
3 7
_
.
7. Find the eigenvalues and eigenvectors of the matrix B =
_
_
1 0 2
0 5 0
3 0 7
_
_
.
8. Prove that eigenvectors of a linear operator corresponding to dierent
eigenvalues must be linearly independent.
9. Under what conditions can the linear equation Ax = b be uniquely
solved? Here A is an : : matrix and x. b are :-dimensional vectors.
Give proof of your conclusion.
10. Prove that (x. Ay) =
_
A
y
x. y
_
.
11. The concept of "linearity" is important and has many applications in
chemistry. It implies a dramatic simplication by comparison with the
more general "nonlinear" case. We are, e.g., lucky that the Schrdinger
equation is linear so that nearly all of quantum chemistry reduces to
linear algebra. Chemical phenomena are, however, generally nonlinear.
An important illustration of this can be found in the current debate
concerning chemicals in our bodies and our environment. Imagine that
15
- as a person with knowledge of chemistry - you have been asked to pro-
nounce whether a certain chemical is poisonous or not. How would you
explain the mathematical content of this question in terms of concepts
of linearity and nonlinearity? Note that nonlinearity is the complement
of linearity, i.e. any relation which is not linear is nonlinear.
3 Hckel Theory of Delocalization
The Hartree-Fock theory shows us how we can, to a good approximation,
reduce the problem of nding the total energy 1
0
of a molecule to one-
electron form. We nd the Fock operator F which plays the role of a one-
electron Hamiltonian operator from which one-electron (canonical orbital)
wave functions can be found by solving
F= ". (38)
The Fock operator is obtained by a self-consistent iterative procedure and
it depends on the occupied electronic orbitals
_

)
_
a
)=1
themselves. Once we
have chosen a basis set ,
|

.
|=1
in which to resolve the canonical orbitals then
the Fock equation 38 turns into a matrix equation
Fc
)
=
)
Sc
)
. (39)
where
1
n)
=
_
dr,

n
(r)1,
)
(r). (40)
o
n)
=
_
dr,

n
(r),
)
(r). (41)
Here S is the overlap matrix which becomes equal to the unit matrix if the
basis functions are orthonormal. Note that 39 can be derived from 38 by
taking scalar products with respect to basis functions and expanding the
orbital in the basis, i.e.,

)
=
.

n=1
c
n)
,
n
. (42)
In the 1930s Hckel developed a very simplied form of Hartree-Fock
theory for planar aromatic molecules. He noted that if the molecule lies
in the x,y-plane then the carbon 2p
:
orbitals stick out orthogonally to the
16
plane. These orbitals do not mix with the in-plane sigma orbitals. Thus
we can develop a reduced Fock matrix in the space of C 2p
:
-orbitals. The
corresponding molecular orbitals obtained by diagonalizing this reduced Fock
matrix are called :-orbitals and the electrons assigned to them are called :-
electrons. The electron assignment to orbitals follows the Aufbau principle:
Fill the orbitals in order of increasing orbital energy but place no more than
two electrons (of opposite spin direction) in each orbital not to run afoul of
the Pauli principle.
The calculation to obtain the Fock matrix, or the :-part of it, rigorously
by the Hartree-Fock method is relatively hard numerical work. In the 30s it
must have been impossible for most molecules. Hckel had the idea that it
may be possible to construct the reduced Fock matrix for the :-electrons, /

or just / below, by empirical means. He proposed to use the C 2p


:
orbitals
on all double bonded carbons as a minimal basis set. Thus the matrix / was
a square matrix of the same order as the number of double bonded carbon
atoms in the planar molecule, N
c
. Next Hckel assumed that the diagonal
terms in this matrix, /
))
. were equal to the carbon 2p
:
atomic orbital energy,
/
))
=
C2j
= c. (43)
Then he assumed that coupling only existed between bonded carbon atoms
(nearest neighbour carbon atoms). The same approximation is justied for
the overlap matrix also and we end up with a reduced Fock equation for, as
an example butadiene (C
4
H
6
in a linear chain geometry for the carbons), of
the type
_
_
_
_
c , 0 0
, c , 0
0 , c ,
0 0 , c
_
_
_
_
_
_
_
_
c
1
c
2
c
3
c
4
_
_
_
_
=
_
_
_
_
1 : 0 0
: 1 : 0
0 : 1 :
0 0 : 1
_
_
_
_
_
_
_
_
c
1
c
2
c
3
c
4
_
_
_
_
. (44)
This is a generalized eigenvalue equation due to the presence of the overlap
matrix S on the left. It is not much more dicult to solve this generalized
form of the eigenvalue problem but Hckel simplied it further by setting
: = 0. Thus, for butadiene, he obtained
_
_
_
_
c , 0 0
, c , 0
0 , c ,
0 0 , c
_
_
_
_
_
_
_
_
c
1
c
2
c
3
c
4
_
_
_
_
=
_
_
_
_
c
1
c
2
c
3
c
4
_
_
_
_
. (45)
17
Note that the coupling term ,,
, = /
)n
. with j bonded to m, (46)
is taken to be independent of which bond is referred to. In order to write down
the Hckel matrices one needs to number the atoms in some reasonable way
and keep track of all coupled and uncoupled carbon atom pairs. When the
indices in /
)n
refer to uncoupled carbon atoms the matrix element vanishes
so for large molecules there will be a lot of zeroes. The coupling term , is
often called the resonance integral. It is responsible for the delocalization
of :-electron motion in the molecule. Thus it is also responsible for the
lowering of the energy which is the cause of the resonance stabilization of
the aromatic or conjugated molecules. Note that both c and , are negative
numbers representing a negative atomic C2p-energy and a coupling energy.
In order to solve the Hckel eigenvalue problem one usually works in
energy units such that , = 1. Then the secular equation becomes
det
_
_
_
_
1 0 0
1 1 0
0 1 1
0 0 1
_
_
_
_
= 0. (47)
Here we have dened as
= (c ),, = ( c),(,). (48)
The determinant can be worked out by noting that the only nonvanishing
matrix element products are the (1. 2. 3. 4), (2. 1. 3. 4), (1. 2. 4. 3), (1. 3. 2. 4),
(2. 1. 4. 3) permutations leading to the secular equation -

4
3
2
+ 1 = 0. (49)
We solve rst for
2
and nd -

2
=
3
_
5
2
. (50)
The corresponding solutions for are obtained as -
=
_
3
_
5
2
=
_
_
5 1
2
_
= 0.618. (51)
=
_
3 +
_
5
2
=
_
_
5 + 1
2
_
= 1.618.
18
The set of eigenvectors and eigenvalues are -

1
= 0.3717(,
1
+,
4
) + 0.6015(,
2
+,
3
),
1
= 1.618.

2
= 0.6015(,
1
,
4
) + 0.3717(,
2
,
3
),
2
= 0.618.

3
= 0.6015(,
1
+,
4
) 0.3717(,
2
+,
3
),
3
= 0.618.

4
= 0.3717(,
1
,
4
) 0.6015(,
2
,
3
),
4
= 1.618.
The energy eigenvalues are displaced down and up from the C2p energy in
a symmetric fashion. Note that the eigenfunctions are symmetric or antisym-
metric to reection in the midpoint. Note also the linear growth in the num-
ber of nodes with excitation. The expansion coecients change with carbon
atom somewhat like the eigenfunctions of the one-dimensional particle-in-a-
box problem. When we work out the :contribution to the total binding
energy we rst nd the number of :electrons to be placed and then place
them in the available :orbitals from the lowest and up in accord with the
Aufbau principle which restricts the number of electrons in an orbital to 0,
1 or 2. In the case of butadiene we have four :electrons which ll the two
lowest orbitals. The binding energy contribution is 2(1.618+0.618)=4.472 in
-, units. If we instead considered the butadiene molecule to contain pair-
wise localized and uncoupled :bonds, C=C-C=C, then the binding energy
contribution would turn out to be -4, as will be clear below. Thus the extra
binding energy due to the delocalization of the :electrons over more than
two nuclei is -0.472, here. This we shall call the resonance stabilization of
the butadiene molecule.
How can we obtain estimates of the two parameters c and ,? The rst, c,
is supposed to be the C2p
:
orbital energy. It can be estimated as minus the
ionization energy of the carbon atom which is 1090 kJ/mol. This parameter
does not play a very important role in the Hckel theory. The more impor-
tant parameter is ,, the coupling constant, which delocalizes the electrons
and stabilizes favored structures. In order to estimate , we shall consider
the simplest molecule containing a :-bond, i.e., ethylene C
2
H
4
. From a ta-
ble of average molecular bond energies ( Table 13.5 in Zumdahl, Chemical
Principles) we nd that a C=C bond consisting of a : and a obond the
average bond energy is 614 kJ/mol while for the C-C obond the energy is
347 kJ/mol. Thus it appears that the :bond energy can be estimated for
19
the ethylene molecule to be 267 kJ/mol. Let us now apply Hckel theory
to ethylene to nd the predicted :bond energy in terms of ,. The Hckel
hamiltonian is
/ =
_
c ,
, c
_
. (52)
The reduced secular equation becomes -
det
_
1
1
_
= 0. (53)
The solution is = 1. The lower orbital will be occupied by two electrons
each contributing an equal amount to the bond energy. Thus the :bond
energy is in reduced units of -, equal to 2. Setting this equal to 267 kJ/mol
we nd that , = 134 kJ/mol in SI-units. This should be considered a very
approximative estimate but it gives us a plausible magnitude and an example
of how , could be obtained.
3.1 Hckel exercises:
1. One might expect on the basis of standard bonding pictures that the
middle carbon-carbon bond in butadiene is weaker and longer due to
dominant single bond character. Estimate the resonance stabilization
energy of butadiene (i.e., that part of the binding energy due to the fur-
ther delocalization of the :-electrons in the butadiene chain) in kJ/mol
in the case when the coupling between the two middle carbon atoms,
due to a longer bond, is half the normal value. Compare with the value
for the standard model with all couplings the same.
2. Work out the Hckel orbitals for butadiene, i.e., verify the results stated
in the text showing the algebra explicitly.
3. Write down the Hckel matrix for benzene. Use symmetry to obtain
the form and the energy of the lowest lying :-orbital.
4. Consider the square planar molecule cyclobutadiene C
4
H
4
obtained by
tying the ends of the butadiene molecule together with the loss of two
hydrogen atoms. Write down its Hckel matrix and calculate the cor-
responding :-orbitals and orbital energies. What is the total resonance
stabilization energy?
20
5. Obtain the :electron contribution to the binding energy of the square
planar N
4
-molecule and estimate the corresponding resonance energy
due to the further delocalization of the :electrons. You may use the
bond energies N-N 160 kJ/mol, N=N 418 kJ/mol, in your estimation.
4 Vibrational Modes of a Molecule
Our purpose here will be to describe the motion of the nuclei in a molecule,
e.g., the water molecule H
2
O. The exact solution to this problemis intractable
due to coupling between the motion of electrons and nuclei and between
nuclei due to anharmonic eects. However, on the basis of a number of
simplications we shall be able to get close to reality without losing too
much in accuracy. The most important simplications are -
the point particle model - i.e., the electrons are neglected and the atoms
become point particles interacting by a potential \ (r
1
. r
2
.....) (actually
due to the electrons), where r
1
. r
2
. ... are the spatial coordinates of the
atoms;
classical mechanics - while we really ought to use quantum mechanics;
small amplitude vibrations - anharmonic eects and vibration-rotation
coupling will be neglected.
4.1 The One -Dimensional Oscillator
Let the potential acting on a particle moving in one dimension be \ (r) and
the mass of the particle m. We assume that \ (r) has the general character
of a bond potential in a diatomic molecule, i.e., a well dened minimum.
As the temperature decreases the bondlength decreases to become equal to
the so called equilibrium value r
c
at T=0 K. The particle would then in our
simple picture sit motionless at the bottom of the potential well. We can
nd x
c
by examining the stationary points satisfying
J\
Jr
= 0. and
J
2
\
Jr
2
0. (54)
These conditions identify a potential minimum. If there are several minima
we choose the point where the potential is the smallest.
21
We now apply the harmonic approximation by expanding the potential
in a Taylor series around the point x=x
c
and retaining only the rst three
terms,
\ (r) = \ (r
c
) + (r r
c
)\
0
+
1
2
(r r
c
)
2
\
00
. (55)
= \ (r
c
) +
1
2
(r r
c
)
2
\
00
.
Here we have used the fact that \
0
vanishes at r = r
c
. Without loss of
generality, as the mathematicians like to put it, we will now choose an energy
scale such that \ (r
c
) = 0 and the origin on the x-axis such that r
c
= 0. Then
the potential can be written as
\ (r) =
1
2
/r
2
. with / = \
00
(r
c
). (56)
Chemists call / the force constant. A particle moving in such a potential
is called a harmonic oscillator. We shall now review the solution for the
harmonic oscillator motion. We start from Newtons equation of motion -
:
J
2
Jt
2
r(t) =
J
Jr
\ (r). (57)
which yields
d
2
dt
2
r(t) =
/
:
r(t). (58)
In order to solve this second order ordinary dierential equation we note
that it is linear and use a method to be discussed in greater detail in a later
chapter. Shifting the RHS over to the left we rewrite the equation as
(
d
dt
+i
_
/
:
)(
d
dt
i
_
/
:
)r(t) = 0. (59)
It is now clear that since the factors can be written in any order any sum of
solutions to the two rst order equations
(
d
dt
+i
_
/
:
)r(t) = 0. or (
d
dt
i
_
/
:
)r(t) = 0. (60)
will be a solution of the second order equation 58. The solutions to the two
rst order equations are -
r(t) = cc
i
_
Int
. and r(t) = /c
i
_
Int
. (61)
22
respectively. Thus the harmonic oscillator solution is
r(t) = cc
i
_
Int
+/c
i
_
Int
. (62)
but since r(t) must be real the solution can be reduced to the form -
r(t) = sin(
_
/,:t +o ), (63)
where is a real amplitude, i.e., the maximal excursion of the oscillation
from the origin, and o is an arbitrary initial phase, 0 _ o _ 2:, of the
oscillator.
4.2 Multidimensional vibrations in molecules
If the molecule is made up of N atoms there are 3N spatial coordinates so
the problem is now n-dimensional where n is an integer larger than one. The
3N spatial degrees of freedom can be divided into center of mass, rotational
and vibrational subsets as shown below.
# of dof linear nonlinear
c of m 3 3
rot 2 3
vib 3N-5 3N-6
The potential now depends on the spatial coordinates, \ (r
1
. r
2
. .... r
a
). If
we are describing a molecule in eld free space then the potential must be
invariant to translation (center of mass coordinates) and rotation (rotational
coordinates). This makes it useful to transform our analysis into a set of
internal bond coordinates explicitly accounting for the invariance of \ to
external motions. However, the gain in lower dimensionality is more than
oset by loss of simplicity so we shall stick with our initial representation
in terms of cartesian atomic coordinates. The global minimum is found by
solving for all extrema given by the set of equations -
J
Jr
i
\ (r
1
. r
2
. .... r
a
) = 0. i=1,2,.....,n. (64)
It is now a little more dicult to determine whether we have found a maxi-
mum or minimum but evaluating \ at the point and choosing the extremum
giving the lowest potential should work for all reasonable vibrational poten-
tials. Once the global minimum is found we transform our coordinate system
23
to make this point the origin. Thus we shall take r
1c
. r
2c
. ... all to vanish in
our discussion below. We also take the potential energy to be zero at the
minimum. From the multidimensional Taylor series expansion (see Appen-
dix) follows that in the harmonic approximation where terms of order higher
than quadratic in the coordinates vanish we get -
\ (r
1
. r
2
. .... r
a
) =
1
2
a

i=1
a

)=1
\
i)
r
i
r
)
. (65)
where
\
i)
=
_
J
2
Jr
i
Jr
)
\ (r
1
. r
2
. .... r
a
)
_
x=0
= \
)i
. (66)
We are now ready to consider the multidimensional motion which is de-
scribed by Newtons equation suitably generalized to the multidimensional
case,
d
2
dt
2
r
I
(t) =
1
:
I
J
Jr
I
\ (r
1
. ...r
a
) =
1
:
I
a

|=1
\
I|
r
|
(t). for k=1,2,...,n. (67)
We have a set of n coupled linear second order dierential equations. This
sounds, perhaps, quite intractable for large n but we shall see that it is
possible to nd a coordinate transformation x y such that we end up
with n uncoupled equations of motion of the type 58 which we have already
solved, i.e.,
d
2
dt
2

I
(t) = l
II

I
(t). for k=1,2,....,n, (68)
with solutions -

I
(t) =
I
sin(
_
l
II
t +o
I
). for k=1,2,....,n. (69)
Here the factor
_
l
II
= .
I
is called the frequency of the kth vibrational
mode and is normally given in radians per second. We often refer to the
variables
I

a
I=1
as the normal modes since they are decoupled from each
other.
The coordinate transformation we shall use is linear and given by -

I
=
a

|=1
o
I|
r
|
. for k=1,2,....,n, (70)
24
or in vector notation -
y = Sx. (71)
The task that remains is to nd the matrix S and the frequencies .
I

a
I=1
.
Note rst that Newtons equations in the x-coordinates can be rewritten
as
d
2
dt
2
x = Rx. (72)
where
1
I|
=
1
:
I
\
I|
. (73)
In order to nd the corresponding equation for y we multiply both sides by
S,
d
2
dt
2
Sx = SRx = SRS
1
Sx. (74)
which can be rewritten as
d
2
dt
2
y = Uy. (75)
Here we used the fact that S
1
S = I. the identity operator, and denoted
SRS
1
as U.
Theorem: Let e
i

a
i=1
be the basis vectors of our vector space of posi-
tions so that any vector x can be expanded in this basis,
x =
a

i=1
r
i
e
i
. (76)
In our case e
i

a
i=1
will be the set of cartesian basis vectors. Suppose that R
has n linearly independent eigenvectors x
i

a
i=1
such that
x
|
=
a

i=1
r
|i
e
i
. (77)
Then, if S is chosen so that
S
1
e
i
= x
i
. i = 1. 2. .... :. (78)
i.e., the eigenvectors of R become columns of S
1
,
_
S
1

|i
= r
i|
= [x
i
]
|
. (79)
25
then U becomes diagonal.
Proof:
l
i)
= e
i
SRS
1
e
)
= e
i
SRx
)
= 1
)
e
i
Sx
)
= 1
)
e
i
SS
1
e
)
= 1
)
o
i)
. (80)
where
Rx
)
= 1
)
x
)
. (81)
and we have assumed the basis to be orthonormal, i.e., e
i
e
)
= o
i)
.
Thus we conclude that when R has n linearly independent eigenvectors
then we can construct S
1
from these eigenvectors and take the inverse to
nd S. Moreover, each such eigenvector corresponds to a normal mode with
frequency equal to the square root of the corresponding eigenvalue 1
)
.
Suppose now that all the masses of the atoms in our molecule are the
same as in, e.g., O
3
, then
1
i)
=
1
:
\
i)
=
1
:
\
)i
= 1
)i
. (82)
Thus Ris symmetric and Hermitian. It follows that it has n linearly indepen-
dent eigenvectors x
i

a
i=1
so the theorem applies. Moreover, transformations
between ortonormal basis sets correspond to orthogonal matrices so
S =
]
(S
1
) and o
|i
= r
|i
. (83)
This follows from
_
SS
1

i)
=
a

|=1
o
i|
_
S
1

|)
=
a

|=1
r
i|
r
)|
= x
i
x
)
= o
i)
. (84)
What to do when the masses are not equal? Here is a useful trick. We will
simply insert a transformation to mass weighted coordinates to symmetrize
R before applying the transformation above. Dene M by
`
I|
=
_
:
I
o
I|
(85)
and note that M
1
satises
_
M
1

I|
=
1
_
:
I
o
I|
. (86)
26
Now note that
SRS
1
= SM
1
(MRM
1
)MS
1
= ARA
1
. (87)
where
1
I|
=
1
_
:
I
:
|
\
I|
= 1
|I
. (88)
Thus the transformation to mass weighted coordinates produces a coupling
matrix R which is Hermitian and has n orthonormal eigenvectors x
i

a
i=1
.
By our theorem we then nd that
|i
= r
|i
, and from A = SM
1
follows
that
S = AM. and o
I|
=
a

i=1

Ii
`
i|
=
a

i=1
r
Ii
_
:
i
o
i|
=
_
:
|
r
I|
. (89)
The frequency corresponding to the kth mode is .
I
=
_
1
I
. where
Rx
I
= 1
I
x
I
. (90)
Note when the masses are dierent S is no longer orthogonal, i.e., the normal
modes are no longer orthogonal to each other. In calculations for realistic
molecular models one will nd that the normal modes corresponding to center
of mass translation and rotation correspond to zero frequency modes, . = 0.
Note that when working out normal mode coordinates we divide by some
appropriate
_
:c:: to get -

I
=
a

|=1
_
:
|
:c::
r
I|
r
|
. (91)
4.2.1 Summary of steps in the normal mode analysis
1. Make sure you have masses :
1
. ...:
a
and a potential \ (r
1
. ...r
a
).
2. Find minimumof \ (r
1
. ...r
a
) and double derivatives \
i)
=
0
2
0a
i
0a
j
\ (r
1
. ....r
a
)
at the minimum.
3. If the masses are not the same then we create the Hermitian matrix R
dened by -
1
I|
=
1
_
:
I
:
|
\
I|
.
If the masses are all the same then we can proceed as below noting that
R =R.
27
4. Solve the eigenvalue problem Rx = 1
)
x
)
for : orthonormal eigenvec-
tors with corresponding real eigenvalues.
5. Obtain the vibrational frequencies as .
I
=
_
1
I
and the corresponding
normal mode coordinate as
I
=

a
|=1
_
n
l
nocc
r
I|
r
|
where :c:: can be
taken to be any convenient mass, e.g., one of the atomic masses or
the average atomic mass. Note that the masstretched components of
the eigenvectors of the coupling matrix R become the normal mode
coordinates.
4.3 Example 1 - A Two-Dimensional Vibration
Suppose that two particles of mass :
1
= : and :
2
= 3:, respectively, are
performing vibrations in a potential \ (:
1
. :
2
) = 10 +:
1
2:
2
+:
2
1
,2 +2:
2
2
+
:
1
:
2
. Let us nd the normal modes of this motion. We begin by nding the
equilibrium geometry of the vibrational motion, i.e., the potential minimum.
J
J:
1
\ = 1 + :
1
+:
2
= 0; (92)
J
J:
2
\ = 2 + 4:
2
+:
1
= 0;
:
2,cq
= 1; :
1,cq
= 2.
Next we rewrite the potential in new coordinates r
1
. r
2
dened as r
1
=
:
1
:
1,cq
= :
1
+ 2 and r
2
= :
2
:
2,cq
= :
2
1. We get -
\ (r
1
. r
2
) = 8 +r
2
1
,2 + 2r
2
2
+r
1
r
2
. (93)
The V-matrix is then -
V =
_
1 1
1 4
_
. (94)
and the symmetrized R-matrix is -
R =
1
:
_
1 1,
_
3
1,
_
3 4,3
_
. (95)
The matrix :R has the eigenvalues and eigenvectors -
_
1 1,
_
3
1,
_
3 4,3
_
28
, eigenvectors:
__
1
_
3
_
1 +
_
13
_
,6
__

_
7 +
_
13
_
,6.
__
1
_
3
_
1
_
13
_
,6
__

_
7
_
13
_
,6. Thus the vibrational frequencies are - .
1
=
_
7
6
+
1
6
_
13,
_
:
and .
2
=
_
7
6

1
6
_
13,
_
:. The corresponding normal mode coordinates
(unnormalized) are -

1
= r
1
+
_
3
_
_
3
_
7
6
+
_
13
6
_

_
3
_
r
2
= r
1
+
_
1 +
_
13
_
2
r
2
.

2
= r
1
+
_
3
_
_
3
_
7
6

_
13
6
_

_
3
_
r
2
= r
1
+
(1
_
13)
2
r
2
. (96)
4.4 Example 2 - Normal Modes of a Linear Chain
Molecule
Let us consider a molecule consisting of three atoms attached to each other
by chemical bonds represented by Morse potentials, c(:) = 1(c
2(vve)

2c
(vve)
). and conned to move in one dimension. We shall take the masses
to be the same. The coordinate : is the bondlength. The Morse potential
reaches its minimum potential energy of 1, the bond dissociation energy, at
the equilibrium bondlength :
c
. The full potential can then be written as
\ (:
1
. :
2
. :
3
) = 1(c
2(v
2
v
1
ve)
2c
(v
2
v
1
ve)
+c
2(v
3
v
2
ve)
2c
(v
3
v
2
ve)
).
(97)
The global potential minimum occurs when :
2
:
1
= :
3
:
2
= :
c
. where
the total potential energy is 21. The minimum we shall choose to expand
around is :
1
= 0. :
2
= :
c
. :
3
= 2:
c
. Our x-coordinates measuring deviation
from the equilibrium positions are then r
1
= :
1
. r
2
= :
2
:
c
. r
3
= :
3
2:
c
.
In these coordinates the potential becomes
\ (r
1
. r
2
. r
3
) = 1(c
2(a
2
a
1
)
2c
(a
2
a
1
)
+c
2(a
3
a
2
)
2c
(a
3
a
2
)
). (98)
The rst derivatives are
J\
Jr
1
= 21(c
2(a
2
a
1
)
c
(a
2
a
1
)
). (99)
J\
Jr
2
= 21(c
2(a
2
a
1
)
+c
(a
2
a
1
)
+c
2(a
3
a
2
)
c
(a
3
a
2
)
).
J\
Jr
3
= 21(c
2(a
3
a
2
)
c
(a
3
a
2
)
).
29
Note that the derivatives vanish at r
1
= r
2
= r
3
= 0. Using the denition
\
i)
=
J
2
Jr
i
Jr
)
\. (100)
where the double derivative is evaluated at the origin, we get
\
11
= 21
2
= \
33
. (101)
\
22
= 41
2
.
\
12
= 21
2
= \
21
= \
23
= \
32
.
\
13
= \
31
= 0.
The corresponding R matrix is
R =
1
:
21
2
_
_
1 1 0
1 2 1
0 1 1
_
_
=
21
2
:

R. (102)
Now we are ready to nd the eigenvectors of

R. We have -
det
_
_
1 ` 1 0
1 2 ` 1
0 1 1 `
_
_
= (1 `)
2
(2 `) 2(1 `) (103)
= `
3
+ 4`
2
3`.
The roots are `
1
= 0. `
2
= 3. `
3
= 1. The corresponding orthonormal eigen-
vectors are
x
1
=
1
_
3
_
_
1
1
1
_
_
. x
2
=
1
_
6
_
_
1
2
1
_
_
. x
3
=
1
_
2
_
_
1
0
1
_
_
. (104)
It follows that the normal modes are

1
=
1
_
3
r
1
+
1
_
3
r
2
+
1
_
3
r
3
. .
1
= 0. translation, (105)

2
=
1
_
6
r
1

2
_
6
r
2
+
1
_
6
r
3
. .
2
=
_
61
:
. antisymmetric vibration,

3
=
1
_
2
r
1

1
_
2
r
3
. .
3
=
_
21
:
. symmetric vibration.
30
4.5 Exercises on Normal Mode Analysis
1. A particle of mass : is hanging vertically from the ceiling in a har-
monic spring described by the wall-particle potential \ (r
1
) = /r
2
1
,2.
The gravitational potential can be taken to be \
G
(r
1
) = q:r
1
. a)
What is the equilibrium position and vibrational frequency of the ver-
tical vibration? b) Obtain the equilibrium geometry, vibrational modes
and corresponding frequencies for the case when a second particle of
the same type is attached to the rst particle by a harmonic spring
corresponding to the potential \ (r
1
. r
2
) = /(r
1
r
2
)
2
,2.
2. Find the vibrational frequencies of the triatomic one-dimensional chain
in the example above in the case when the mass of the central particle
is four times larger (4m) but all other parameters of the system remain
the same.
3. Obtain the normal modes and corresponding frequencies of a system
consisting of two identical particles of mass : moving in one dimension
r and interacting by the Lennard-Jones potential -
\ (r
1
. r
2
) = 4
_
_
o
r
12
_
12

_
o
r
12
_
6
_
.
where r
12
= [r
1
r
2
[.
4. Reconsider the system in Exercise 3 above generalized to the case when
the particle masses are not equal :
1
,= :
2
.
5. Find the harmonic vibrational frequency of the diatomic molecule
2
with the bond potential \ (:) = 1(exp (2c:
2
) 2 exp(c:
2
)) .
4.6 Appendix - Multidimensional Taylor Series Expan-
sion
Recall the form of the one-dimensional Taylor series expansion,
\ (:
0
+r) = \ (:
0
) +r
_
J\
J:
_
v=v
0
+
1
2
r
2
_
J
2
\
J:
2
_
v=v
0
+...... (106)
=
1

a=0
1
:!
r
a
_
J
a
\
J:
a
_
v=v
0
.
31
where : = :
0
+r. The corresponding multidimensional Taylor series expansion
is
\ (r
0
+x) = \ (r
0
) +
.

i=1
r
i
_
J\
J:
i
_
r=r
0
+
1
2
.

i=1
.

)=1
r
i
r
)
_
J
2
\
J:
i
J:
)
_
r=r
0
......... (107)
=
1

a=0
1
:!
__
x
J
Jr
_
a
\ (r)
_
r=r
0
.
Probably the easiest way to prove this expansion is to convert it to a one-
dimensional expansion by setting x = : x, where x is a directional vector and
: tells us how far in this direction we have gone. Then we can, of course,
expand with respect to : to get
\ (r
0
+: x) =
1

a=0
1
:!
:
a
_
J
a
\
J:
a
_
c=0
. (108)
But now we note that
J
J:
\ (r
0
+: x) =
.

i=1
r
i
_
J\
J:
i
_
r=r
0
. (109)
J
2
J:
2
\ (r
0
+: x) =
.

i=1
.

)=1
r
i
r
)
_
J
2
\
J:
i
J:
)
_
r=r
0
. (110)
and so on. Thus we can write
:
a
J
a
J:
a
\ (r
0
+: x) =
_
x
J
Jr
_
a
\ (r
0
+x). (111)
Insertion of this result in 108 above yields the multidimensional form of the
Taylor series expansion.
32
Part II
Series Expansions and
Transforms with Applications
5 Fourier Series Expansion
We have already met the idea that function spaces can be turned into nite
or discrete innite-dimensional vector spaces by the introduction of a basis
set of functions. This is the key idea which has made quantum chemistry
tractable for even reasonably large molecules. Long before quantum chemists
mathematicians had the same idea. The best example is the Fourier expan-
sion which we shall now discuss.
We can readily verify that functions on a domain D, the set of independent
variable values over which the function will be dened, form a vector space.
By introduction of a metric we obtain a metric vector space. The metric is
dened by a scalar product satisfying, as we learnt in Chapter 1, a number
of conditions. The most common denition of a scalar product in a vector
space of functions is given by
(q. /) =
_
1
dq

()/(). (112)
where represents the independent variables. This denition of scalar prod-
uct, called an L
2
scalar product, means in our case that we have an Hilbert
space. We have already used this scalar product in our discussion of Hckel
theory.
5.1 Simple Form
Suppose now that we consider a function ,(r) on the inteval [:. :] . The
Fourier basis functions are then the functions cos :r
1
a=0
'sin :r
1
a=1
. They
33
are all orthogonal in our Hilbert space, i.e.,
_

dr sin :r cos :r = 0. for all m,n, (113)


_

dr sin :r sin :r =
_

dr cos :cos :r = :o
n,a
, for m,n0,
cos 0r = 1
_

dr cos 0r cos :r = 2:o


0,n
.
_

dr cos 0r sin :r = 0. for : 0.


Using these functions as basis functions we can expand f(x) as
,(r) = c
0
+
1

a=1
(c
a
cos :r +/
a
sin :r) . -: < r < :. (114)
where the expansion cecients can be found by taking scalar products of
both sides of the equality 114 with respect to each basis function in turn.
We get
c
0
=
1
2:
_

dr,(r). (115)
c
a
=
1
:
_

dr cos :r,(r). : = 1,......


/
a
=
1
:
_

dr sin :r,(r). : = 1,.......


This denes the Fourier expansion of f(x) on [:. :] . The identity of the
original and the expanded function is not absolute but of a weak sense
meaning that
(q. ,) =
_
q. c
0
+
1

a=1
(c
a
cos :r +/
a
sin :r)
_
(116)
for any function g(x) in our vector space. Although the mathematicians call
this sense of equality weak we nd in physics and chemistry that it is quite
strong. We rarely need to distinguish between weak and absolute point by
point equality.
34
Note that all the basis functions are periodic with the period 2:. i.e., for
an integer : we get
cos (:r + 2::) = cos :r. : = 0. 1. ...... (117)
sin (:r + 2::) = sin :r. : = 1. ......
It follows that the expanded function also is periodic with the period 2:.
,(r + 2::) = ,(r). (118)
Thus, irrespective of what the original function was up to, the Fourier ex-
pansion outside the chosen interval [:. :] produces a periodic function by
the relation 118.
5.2 Arbitrary Interval
The Fourier expansion above can easily be generalized to an arbitrary nite
interval [r
0
. r
0
+1] . This is done by recognizing that the variable transforma-
tion y=(2:(x-x
0
),1): transforms the interval [r
0
. r
0
+1] back to the inter-
val [:. :] . Thus our newbasis functions are cos(2::(r r
0
),1) :)
1
a=0
'
sin(2::(r r
0
),1) :)
1
a=1
. However, using the trigonometric relations
cos(c :) = cos(c). (119)
sin(c :) = sin(c).
and the fact that the sign of a basis function can be changed without dif-
culty we can simplify the basis to the form cos(2::(r r
0
),1))
1
a=0
'
sin(2::(r r
0
),1))
1
a=1
. The Fourier expansion then becomes
,(r) = c
0
+
1

a=1
(c
a
cos(2::(rr
0
),1)+/
a
sin(2::(rr
0
),1)). r
0
< r < r
0
+1.
(120)
where the expansion coecients are obtained as
c
0
=
1
1
_
a
0
+1
a
0
dr,(r). (121)
c
a
=
2
1
_
a
0
+1
a
0
dr cos(2::(r r
0
),1),(r). : = 0. 1. ......
/
a
=
2
1
_
a
0
+1
a
0
dr sin(2::(r r
0
),1),(r). : = 1. ......
35
When can a function be expanded in a Fourier series on a nite interval?
There are two answers to this question:
Theorem - Weak formulation: The Fourier basis functions form a com-
plete set on the nite interval for which they were chosen.
Theorem - Strong formulation - Dirichlets theorem: Suppose f(x) is
well-dened on [r
0
. r
0
+1], is bounded, has only a nite number of maxima
and minima and discontinuities. Let f(x) for other values of x be dened by
periodicity, f(x+nL)=f(x) for n=integer, then the Fourier series 120 for f(x)
converges to (f(x+)+f(x-))/2 for all x.
The rst theorem simply states that the Fourier expansion gives a unique
mapping of ,(r) into a vector in our vector space of functions such that all
scalar products with functions in our vector space are reproduced by the
Fourier expansion. As noted above, this is nearly always sucient for us.
The second theorem is deeper and describes what happens at each point x
given some conditions on the function.
5.3 Complex form
At the minor cost of working with complex basis functions we can give the
Fourier series expansion its most general form. Suppose that we want to
consider a function f(x) on the interval [1,2. 1,2] . We can then use the
basis functions exp(i2::r,1)
1
a=1
which satisfy the orthogonality relation
(c
i2na1
. c
i2aa1
) =
_
12
12
drc
i2na1
c
i2aa1
= 1o
n,a
for m,n=integers.
(122)
The Fourier expansion then takes the form
,(r) =
1

a=1
d
a
c
i2aa1
. (123)
with expansion coecients dened by
d
a
=
1
1
_
12
12
drc
i2aa1
,(r). n=-... 1. 0. 1. ...... (124)
36
The relation between the complex and the real form of the Fourier expansion
can be seen from the relation
,(r) = d
0
+
1

a=1
(d
a
c
i2aa1
+d
a
c
i2aa1
) (125)
= d
0
+
1

a=1
[(d
a
+d
a
) cos(2::r,1) +i(d
a
d
a
) sin(2::r,1)]
= c
0
+
1

a=1
[c
a
cos(2::r,1) +/
a
sin(2::r,1)].
It follows that
c
0
= d
0
. (126)
c
a
= d
a
+d
a
. and /
a
= i(d
a
d
a
). for : = 1,......
d
a
=
1
2
(c
a
i/
a
). and d
a
=
1
2
(c
a
+i/
a
), for : = 1,.....
Example 1: Obtain the Fourier series expansion of the function ,(r) = r
on the interval : < r < :. - Let us rst use the original simple Fourier
basis set. Note now that using the relations (3.3) and (3.4) above we get -
_

drr =
_

drr cos(:r) = 0.
_

drr sin(:r) =
_

r
:
cos(:r)
_

+
_

dr
1
:
cos(:r) =
2:
:
cos(::).
Thus the cocients c
0
. c
1
. ..... all vanish. Noting that cos(n:) = +1. for
: = 2. 4. .... and = 1. for : = 1. 3. ....... we get -
r = 2(sin r
1
2
sin 2r +
1
3
sin 3r ...........) = 2
1

a=1
(1)
a+1
:
sin(:r).
5.4 Exercises on Fourier Series:
1. Prove that if the function f(x) on [1,2. 1,2] is even then all its Fourier
expansion coecients corresponding to sin-functions vanish while if
,(r) is odd the coecients corresponding to cos-functions will van-
ish. Note that an even function satises ,(r) = ,(r) and an odd
function satises ,(r) = ,(r).
37
2. Obtain the Fourier expansion of ,(r) = r
2
on the interval [:. :] using
rst the real form then the complex form of the expansion.
3. Obtain the Fourier expansion of the function ,(r) = r on the interval
[:. :]. Draw ,(r) and its approximation ,
a
(r) = c
0
+ ...c
a
cos :r +
/
a
sin :r for : = 0. 1 and 2. Discuss the observed approach of ,
a
to ,
with increasing :. Why might this particular function be a harsh test
of the convergence of a Fourier expansion?
6 Fourier Transforms
The Fourier series expansion is applicable on a nite interval and to periodic
functions on an innite interval. Naturally one would like to be able to
handle functions on the entire line - < r < whether or not they are
periodic. The required generalization to accomplish this will lead us to the
Fourier transform. We shall start from the complex form of the Fourier series
expansion and write it in a suggestive form as follows,
,(r) =
1

a=1
/

,(/
a
)c
iIna
. (127)
where /
a
= 2::,1 and / = /
a
/
a1
= 2:,1. The coecient d
a
has been
renamed /

,(/
a
). i.e.,

,(/
a
) =
1
2:
_
12
12
drc
iIna
,(r). (128)
Insertion into 127 yields
,(r) =
1

a=1
/
1
2:
_
12
12
dr
0
c
iIna
0
,(r
0
)c
iIna
. (129)
Now we are ready to take the limit as 1 . Instead of the discrete
coecients /
a
we now get a continuous parameter k and the sum over n
becomes an integral over /. If all integrals converge properly we have
,(r) =
_
1
1
d/

,(/)c
iIa
. (130)

,(/) =
1
2:
_
1
1
dr,(r)c
iIa
.
38
Note that we have found a pair of functions which are images in either x- or
k-space of one function. If we know f(x) we can generate

,(/) and vice versa.
We say that

,(/) is the Fourier transform of f(x). The expressions for f(x)
and

,(/) look very similar and can be made to look even more similar if we
symmetrize the transform. We dene a new transform ,(/) by
,(/) =
_
2:

,(/). (131)
The new transform can then be seen to satisfy the relations
,(r) =
1
_
2:
_
1
1
d/,(/)c
iIa
. (132)
,(/) =
1
_
2:
_
1
1
dr,(r)c
iIa
.
Example 2: Let us obtain the Fourier transform of the function -
,(r) = exp(cr). r 0.
= 0. r _ 0.
If c is real and greater than zero we have -
,(/) =
1
_
2:
_
1
1
drc
iIa
,(r) =
1
_
2:
_
1
0
drc
iIaoa
=
1
_
2:
_
1
c +i/
c
(o+iI)a
_
1
0
=
1
_
2:
1
c +i/
.
Finally, to more clearly expose the real and imaginary parts, we might write
the result above in the form -
,(/) =
1
_
2:
c i/
c
2
+/
2
.
6.1 The o-Function
By inserting the expression for the Fourier transform in the expression for
the function f(x) we get
,(r) =
_
1
1
d/
1
2:
_
1
1
dr
0
,(r
0
)c
iIa
0
c
iIa
. (133)
39
By inverting order of integration we nd then that
,(r) =
_
1
1
dr
0
,(r
0
)o(r r
0
). (134)
where the so called ofunction is dened by
o(r r
0
) =
1
2:
_
1
1
d/c
iI(aa
0
)
. (135)
The denition of a o-function requires that it satisfy the integral relation
q(r) =
_
b
o
dr
0
o(r r
0
)q(r
0
), if c < r < /, (136)
but there are many forms for it other than that in 135. The o-function is a
generalized sort of function, - a limit of a sequence of functions, e.g.,
o(r r
0
) = lim
c!1
1
2
cc
cjaa
0
j
. (137)
Next we shall consider the lengths of f(x) and its Fourier transform ,(/)
in their respective Hilbert spaces.
Parsevals Theorem: The 1
2
-norms of the function ,(r) and its Fourier
transform ,(/) are the same, i.e.,
_
1
1
dr [,(r)[
2
=
_
1
1
d/

,(/)

2
. (138)
Proof:
_
1
1
dr [,(r)[
2
=
_
1
1
dr,(r),

(r) (139)
=
_
1
1
dr
1
_
2:
_
1
1
d/,(/)c
iIa
1
_
2:
_
1
1
d/
0
,(/
0
)c
iI
0
a
=
_
1
1
d/
_
1
1
d/
0
,(/),

(/
0
)
1
2:
_
1
1
drc
i(II
0
)a
=
_
1
1
d/

,(/)

2
.
since
1
2:
_
1
1
drc
i(II
0
)a
= o(/ /
0
). (140)
40
Note that according to the L
2
-metric f(x) and ,(/) have the same length.
Existence Theorem: The Fourier transform of ,(r), i.e., either

,(/) or
,(/), exists if ,(r) satises the Dirichlet theorem on any nite interval and
moreover
_
1
1
dr [,(r)[ < ` < .
6.2 Properties of the Fourier Transform
1. Linearity: Let 11(q) be either q or q and `. j two scalar numbers,
then
11(`, +jq) = `11(,) +j11(q). (141)
2. Fourier transform of derivatives:
11(
d
a
dr
a
,(r) = (i/)
a
11(,(r)). (142)
3. Convolution theorem: If the function q(r) is a convolution of , and /,
q(r) =
_
1
1
d,(r )/(). (143)
then the Fourier transform of g satises
q(/) = 2:

,(/)

/(/). (144)
q(/) =
_
2:,(/)/(/).
6.3 Fourier Series and Transforms in Higher Dimen-
sion
Both the Fourier series expansion and the Fourier transform are readily gen-
eralized to higher dimension. This is accomplished by forming products of
one-dimensional Fourier basis functions and using these products as basis
functions in higher dimensional spaces. Suppose x is an n-dimensional vector
and the domain 1 of the function q(x) is rectangular, 1
i
,2 < r
i
< 1
i
,2.
for i=1,....n , then if q(x) is a properly behaved function on 1 it can be
expanded as
q(x) =
1

)
1
=1
....
1

)n=1
d
)
1
,...)n
c
i2()
1
a
1
1
1
+....+)nan1n)
. (145)
41
where the expansion coecients are given by
d
)
1
,...)n
=
1
1
1
1
a
_
1
dxq(x)c
i2()
1
a
1
1
1
+....+)nan1n)
. (146)
This is the higher dimensional formof the Fourier series expansion. Removing
the restriction to a nite domain we can dene the Fourier transform as
q(/) =
1
(2:)
a
_
dxq(x)c
ikx
. (147)
where both k and x are :-dimensional vectors. The function q(x) can then
be expressed as
q(x) =
_
dk q(k)c
ikx
. (148)
The symmetrized Fourier transform can be obtained by noting that
q(k) = (2:)
a2
q(k) (149)
in which case we have -
q(x) =
1
(2:)
a2
_
dkq(k)c
ikx
. (150)
6.4 Exercises on Fourier Transforms:
1. What is the Fourier transform of a o-function? Note how in 137 the
o-function is dened as a limit
o(r r
0
) = lim
c!1
,
c
(r r
0
)
with a particular choice of function ,
c
(rr
0
). Can you think of another
choice of function ,
c
which will still generate the o-function in the same
limit? Show that your chosen form of ,
c
is valid.
2. Prove the convolution theorem, i.e., starting from 143 show 144.
3. Calculate the Fourier transform of the function ,(r) = :i:jr, 1 _
r _ 1. ,(r) = 0, [r[ 1. Draw simple gures to show how the
transform

,(/) varies with 1.
42
4. Prove Plancherels formula -
_
1
1
dr,

(r)q(r) =
_
1
1
d/,

(/)q(/).
i.e., show that the scalar product (1
2
) is preserved as we go from func-
tion to Fourier transform (symmetric) space.
(Chapter head:)Applications of Fourier Series and Transforms
7 Diraction
Natural areas of application of Fourier series and transforms are quantum
dynamics and electrodynamics since the plane wave,
1(t; x) = 1
0
c
i(kx.t)
. (151)
is a solution of both the Schrdinger and the Maxwell equations, respectively,
in the absence of a variable external eld. The phenomenon of diraction
arises when particles are placed in the path of propagating plane waves rep-
resenting either particles or electromagnetic radiation. We shall assume that
we are dealing with radiation remembering that our results could apply as
well to plane wave particle motion. It is important to note that both the
wave function in the case of particle motion and the electromagnetic eld
we shall discuss below are amplitudes. Thus the probability density or the
light intensity are obtained by taking the absolute magnitude squared,
1(t. x) = [1(t; x)[
2
. (152)
For the plane wave above the intensity turns out to be a constant. We shall
see below, however, that scattered light is not characterized by a constant
intensity. The particles in a sample scatter the radiation in all directions
and a detector placed at a large distance measures an intensity of radiation
which is sensitive to the orientation if the particles in the irradiated sample
are ordered as in a crystal. Even if the particles are disordered as in a glass
or a liquid the intensity tells us something about the structure of the sample.
43
7.1 Single Particle Scattering
If a small spherically symmetric particle is placed in the path of a propa-
gating plane wave it will scatter some of the radiation, i.e., it will absorb
and reemit the radiation becoming itself a radiative source. The emitted
radiation will have spherical symmetry but it retains the wavelength and
frequency of the original plane wave. This follows from our assumption that
the scattering process is elastic, i.e., energy conserving. Thus the amplitude
of the electromagnetic eld will have the form
1
)
(t; x) = 1
)
c
i(I[xx
j[.t)
, [x x
)
[ . (153)
where x
)
is the location of the particle, k is the wave vector of the plane
wave, its length / is related to the wave length ` by the relation / = 2:,`.
and . is the frequency of the radiation. Note that . = 2:i = /c. The
corresponding intensity of the radiation from a single particle is
1
)
(t; x) = [1
)
[
2
, [x x
)
[
2
. (154)
Note that the denominator is the square of the distance from the particle.
It accounts for the fact that the same ux of radiation intensity is passing
through a spherical surface which grows like 4: [x x
)
[
2
with distance. Flux
conservation then dictates the form of the intensity. The amplitude factor
1
)
is given by
1
)
= c
)
c
ikx
j
. (155)
where the exponential phase factor accounts for the phase of the plane wave
at the particle and c
)
is a constant independent of the particle location x
)
.
It will reect the size of the particle (its cross section) and the process of
absorbtion and reemission.
7.2 Many-Particle Scattering - Crystal Diraction
We now consider the case of scattering from a crystal, i.e., from a three-
dimensional array of particles located at the positions x
)
. The scattered
eld 1
c
(t; x) is now a sum over the elds of all the particles,
1
c
(t; x) =

)
1
)
(t; x) =

)
c
)
[x x
)
[
c
ikx
j
c
i(I[xx
j[.t)
. (156)
44
If the particles are identical as they might be in a crystal then c
)
is indepen-
dent of j, c
)
= c.
We now apply an approximation valid when the irradiated sample is of
much smaller length scale than the distance from sample to detector. Note
that x is the vector taking us from the origin which we shall place in the
sample and the detector. The vector x
)
takes us from the sample origin
to the specic particle ,. These two vectors lie in a plane and the angle
between them we shall call o
)
. It is easy to see that if xx
)
then to a good
approximation we have
[x x
)
[ =r r
)
cos o
)
. (157)
We then nd the much simplied form for the scattered eld -
1
c
(t; x) =
c
r
c
i(Ia.t)

)
c
ikx
j
. (158)
where k = (/x,r) k and we have assumed identical scatterers as in a
monatomic crystal. Here we have neglected all terms of order r
)
,r or smaller.
7.2.1 Constructive and destructive interference:
The observed intensity at x is given by the absolute magnitude squared of
the eld,
1(x) = [1
c
(t; x)[
2
= [c[
2
[x[
2
[[
2
. (159)
where all dependence on particle positions is collected in the amplitude factor,
=

)
c
ikx
j
. (160)
In a crystal with a monatomic unit cell, for simplicity, the particle positions
can be given by
x
)
= :
)
a +:
)
b +j
)
c. (161)
where a. b. c are primitive translational vectors and :
)
. :
)
. j
)
are integers.
For simplicity we assume that the crystal sample is described by the integers
: = 0. ..... `; : = 0. ......`; j = 0. .....1; We then get
=
A

n=0
c
inka
.

a=0
c
iakb
1

j=0
c
ijkc
(162)
=
1 c
i(A+1)ka
1 c
ika
1 c
i(.+1)kb
1 c
ikb
1 c
i(1+1)kc
1 c
ikc
.
45
But note now that
A

n=0
c
inka
= C:dc:(`
12
). generally, (163)
= ` + 1. for k a =2:. q=integer.
Thus if `. `. 1 are large integers, as they would be for a typical crystal
sample in a plane wave beam of macroscopic width, then we would nd
strong intensity peaks when x and k are such that
ak = 2:. for q=integer, (164)
bk = 2::. for r=integer,
ck = 2::. for s=integer.
These are called Laues equations. When they are all satised we get a
strong peak in the intensity. For which k-vectors will the Laue conditions
all be satised? - They will be satised for k of the form
k =

A+:

B+:

C. (165)
where

A = 2:(b c),a(b c). (166)

B = 2:(c a),a(b c).

C = 2:(a b),a(b c).


Note that

A.

B.

C serve as primitive translational vectors in k-space and
they determine the primitive translational vectors a. b. c and thereby the
crystal structure. The vectors

A.

B.

C are dened with the help of the vector
product concept, e.g., bc, which is a vector orthogonal to b and c and of a
length /c:i:o where o is the angle between the vectors. The denominator is
the volume of the parallelipiped formed by the vectors a. b. c, possibly with
a negative sign. Thus we can enter the vectors in any order without aecting
the Laue conditions. See the Beta Handbook Section 3.4.
Example 1 - Simple cubic crystal: - The simple cubic crystal has
orthogonal primitive translational vectors a. b. c of equal length. Let us take
this length, i.e., the separation between neighboring atoms to be 4 . We can
also let the directions of a. b. c be the three axial directions in our Cartesian
46
coordinate system, i.e., x. y. z. We then recall that x y = z. z x = y.
y z = x. It follows that -

A =
2:
4
x.

B =
2:
4
y.

C =
2:
4
z.
Peak intensities occur according to the Laue conditions when the wavevector
shift k satises -
k =
2:
4
x +:
2:
4
y +:
2:
4
z.
where . :. : are integers. Note that the length of k is -
/ =
2:
4
(
2
+:
2
+:
2
)
12
.
Thus the smallest /, not including the forward scattered light at = : =
: = 0 which is submerged in the unscattered light, is 2:,4
1
. Since k is
obtained by a rotation of the wavevector k of the incident light it follows that
/ must be less than 2/. If 2/ < 2:,4
1
or / < :,4
1
then no Laue
peak can be observed. Recalling that / = 2:,` where ` is the wavelength
of the light we see that we should have 2:,` :,4 or ` < 8
1
in order
for Laue peaks to be observed. Thus the wavelength should be less than
twice the particle spacing in the lattice. It might be convenient to take `
in our case to be about 0.5 or so. This would ensure that a number of
peaks would be observable but not so many as to crowd the resolution of the
detector.
7.2.2 Scattering from a continuous medium.
In the case of a uid the particle positions are not nicely ordered on a lattice
but more or less randomly distributed. The particle positions may then be
described by a particle density j(x). If the particle density is j(x) we can
obtain the scattered eld as
1
c
(t; x) =
c
[x[
c
i(Ijxj.t)
_
dx
0
j(x
0
)c
ikx
0
=
c
[x[
c
i(Ijxj.t)
(k). (167)
where
(k) =
_
dx
0
j(x
0
)c
ikx
0
= (2:)
32
j(k). (168)
47
Note that the amplitude factor (k) is directly proportional to the Fourier
transform of the particle density j(x). We can generally only measure inten-
sity directly, i.e.,
1(k) = [(k)[
2
[c[
2
, [x[
2
. (169)
While (k), if it is known for all k, determines j(x) the intensity 1(k)
contains less information. Note that
1(k) [x[
2
, [c[
2
= (k)

(k) (170)
=
_
duj(u)c
iku
_
du
0
j(u
0
)c
iku
0
=
_
dx
__
du
0
j(u
0
)j(u
0
+x)
_
c
ikx
= (2:)
32
1(k).
where the spatial correlation function 1 is dened by
1(x) =
_
du
0
j(u
0
)j(u
0
+x). (171)
and we have used the variable transformation x = u u
0
. Thus the scattered
intensity can tell us about the correlations in the particle positions of a
disordered uid.
7.3 Exercises on Diraction
1. Suppose you have a linear molecule consisting of a very large number
of evenly spaced point particles on a straight line. Let the molecule be
held xed in a position orthogonal to an incoming plane wave eld of
wave vector k. What sort of diraction pattern would be observed by
a detector? How would you propose to determine the particle spacing
d from this pattern? What [k[-value would be most appropriate for the
plane wave eld?
2. Consider an adsorbed monolayer of atoms on a perfectly at surface.
Assume that the surface does not scatter light - only the adsorbed
monolayer of atoms scatters light. a) Suppose that the monolayer forms
a regular two-dimensional crystal lattice. What Laue conditions would
apply to a diraction experiment done to determine the crystal struc-
ture? b) If the adatoms were instead in a disordered uid state what
could be learnt about its structure by the diraction experiment?
48
8 Fourier Spectroscopy
Our purpose here is to determine the frequency spectrum of a light source,
i.e., the intensity 1(.) as a function of the frequency .. The method is to
use the interference pattern arising when a plane wave light beam is split
into two parts traveling paths of length 1 and 1 before being recombined
at the detector. The interference pattern as a function of 1 is in Fourier
spectroscopy used to reveal the frequency spectrum. Thus we shall consider
how to determine 1(.) from the intensity as a function of 1,
^
1(1).
8.1 Monochromatic Light Source
Let us rst note that a thin beam of light can be passed by a path determined
by mirrors from light source to detector. If the path length is 1 then the
amplitude of the electromagnetic eld at the detector is given by
1
1
(t; x) = 1
0
c
i(I1.t)
. (172)
Here we have assumed that we have a point source and an innitely sharp
beam. If the beam is not sharp there will be a distribution of path lengths
so that the amplitude at the detector is instead given by
1
1
(t; x) = 1
0
_
d1j(1)c
i(I1.t)
. (173)
where j(1) is a probabilty density satisfying
_
d1j(1) = 1. (174)
We shall always assume that in the absence of a beam splitter our beam is
sharp.
Suppose now that we introduce a beam splitter which splits the beam into
two parts of equal amplitude but travelling dierent path lengths L
1
and L
2
,
respectively. The dierence in path length is 1, i.e., 1
1
= 1, 1
2
= 1+1.
The amplitude at the detector will then be the sum of the contributions from
the two paths,
1
1
(t) =
1
2
1
0
c
i(I1
1
.t)
+
1
2
1
0
c
i(I1
2
.t)
(175)
=
1
2
1
0
c
i(I1.t)
(1 +c
iI1
).
49
The corresponding intensity is
1
1
(t; 1) = [1
1
(t; 1)[
2
=
1
4
[1
0
[
2

1 +c
iI1

2
(176)
=
1
2
[1
0
[
2
(1 + cos /1).
Noting that for radiation propagating in vacuum we have . = /c, where c is
the velocity of light, we can write
1
1
(t; 1) =
1
2
[1
0
[
2
(1 + cos .t). (177)
where t is the dierence between the times of propagation along the two
paths, t = 1,c. Thus the intensity shows a sinusoidal variation with 1
or t as shown below in a plot of = (1 + cos r).
-10 -8 -6 -4 -2 0 2 4 6 8 10
0.5
1.0
1.5
2.0
x
y
If we identify r in this plot with t then this would be the shape of the
intensity variation for . = 1. In general, the separation between neighbour-
ing peaks would be 2:,.. This allows the frequency of the radiation to be
identied from the intensity as a function of t.
8.1.1 Several frequencies:
If the radiation is made up of intensity at a number of well-dened frequencies
then the amplitude without the beam splitter becomes
1
1
(t) =

)
1
)
c
i(I
j
1.
j
t)
. (178)
50
and the corresponding intensity is
1
1
(t) =

n

a
1

n
1
a
_
c
i((InIm)1(.n.m)t)

(179)
=

n
[1
n
[
2
+

a6=n
1

n
1
a
exp(i((/
a
/
n
)1 (.
a
.
n
)t)).
But note that the latter term above gives rise to a uctuation in intensity in
time. The long time average of this uctuation vanishes, i.e.,
1
1
= lim
T!1
1
1
_
T
0
dt1(t) =

n
[1
n
[
2
. (180)
After introduction of the beam splitter we get
1
1
(t) =
1
2

)
1
)
c
i(I
j
1.
j
t)
(1 +c
iI
j
1
). (181)
1(t) =
1
4

a
1

n
1
a
c
i((InIm)1(.n.m)t)
(1 +c
iIn1
)(1 +c
iIm1
). (182)
1(t) =
1
2

n
[1
n
[
2
(1 + cos .
n
t). (183)
We shall now use a method which has the character of a mathematical form
of ltering. Suppose now that 1(t) has been measured over the interval
0<t < 1 < . Let 1(1. .) be dened by
1(1. .) =
_
1
0
d: cos .:1(:). (184)
where : = t. then we nd that with 1
n
= [1
n
[
2
we have
1(1. .) =
1
2

n
1
n
_
1
0
d: cos .:(1 + cos .
n
:) (185)
=
1
2

n
1
n
_
sin .1
.
+
sin(. +.
n
)1
2(. +.
n
)
+
sin(. .
n
)1
2(. .
n
)
_
.
In order to obtain this result it is convenient to use the identity
cos .: cos .
n
: =
1
2
(cos(. +.
n
): + cos(. .
n
):). (186)
51
Note now that for . = .
n
we have
sin(. .
n
)1
(. .
n
)
= 1. (187)
which, if R is suciently large, gives rise to a blip in B(.) at . = .
n
.
1(1. .
n
) =
1
4
1
n
1.
This maximum in 1(1. .) can be used to identify the frequencies .
n
present
and the corresponding intensities I
n
= [1
n
[
2
.
Example 2: Suppose we have a light source of two spectral lines with
freqencies . = 1 and . = 3 and unit intensities. Draw the cosine transform
1(1. .) for 1 = 5 and 10. - Note that 1(1. .) for 1 = 5 takes the form -
1(1. .) =
1
2
(2
sin 5.
.
+
sin 5(. + 1)
2(. + 1)
+
sin 5(. 1)
2(. 1)
+
sin 5(. + 3)
2(. + 3)
+
sin 5(. 3)
2(. 3)
)
-5 -4 -3 -2 -1 1 2 3 4 5
1
2
3
4
x
y
and the shape shown in the gure above. If 1 = 10 we get for 1(1. .) -
1(1. .) =
1
2
(2
sin 10.
.
+
sin 10(. + 1)
2(. + 1)
+
sin 10(. 1)
2(. 1)
+
sin 10(. + 3)
2(. + 3)
+
sin 10(. 3)
2(. 3)
)
52
-5 -4 -3 -2 -1 1 2 3 4 5
2
4
6
8
x
y
and the shape as shown above. Note the sharper positive peaks at . = 1
and 3.
8.2 Exercises on Fourier Spectroscopy:
1. Consider the interpretation of the function 1(1. .) as derived above.
One problem in determining the frequencies and intensities from the
peaks of 1(1. .) is to make sure that the peak is not just a uctuation
in the background, i.e., not due to . = .
n
as suggested. How could
one guard against this possibility? Propose a method that as far as
possible eliminates background peaks from a set of chosen high peaks.
2. In the case of a continuous light source we have
1(:) =
1
2
_
1
0
d.j(.)(1 + cos .:). (188)
where j(.) is the light intensity as a function of the frequency. Obtain
the cosine transform 1(1. .) for this type of light. Supposing that
we can obtain 1(:) over the interval 0 < : < 1 < suggest a way
by which j(.) could be obtained at least approximately from 1(1. .).
You may use the fact that -
lim
1!1
1
:
sin((r r
0
)1)
r r
0
= o(r r
0
).
53
9 Laplace Transforms and Applications
9.1 Derivation and Properties
With the help of Fourier transforms we can work with functions on the
whole real axis but there are still many functions that we cannot apply the
Fourier transform to due to the requirement of absolute integrability, i.e.,
_
1
1
dr,(r) < ` < . Thus we cannot dene the Fourier transform for the
functions `, r
a
. : _ 1. For this and other reasons we shall continue to
develop the Fourier transform into the Laplace transform.
Suppose we are interested in ,(r) on the interval [0. ] . In order to be
able to apply the Fourier transform we shall rst apply two operations to the
function ,(r):
Multiply it by the Heaviside step function H(r) dened by
H(r) = 0. for x<0, (189)
= 1. for x _ 0.
Multiply it by an exponential function crj(cr).
Thus the function has now been changed according to
,(r) H(r)c
ca
,(r) = q(c. r). (190)
The new function q(c. r) can be Fourier transformed if ,(r) is of exponential
order, i.e., there is an c 0 such that
lim
a!1
c
ca
,(r) = 0. (191)
and c is picked suciently large. The Fourier transform of q(c. r) is
q(c. /) =
1
2:
_
1
1
drH(r)c
(c+iI)a
,(r) =
1
2:
_
1
0
drc
(c+iI)a
,(r). (192)
and the corresponding expression for the function q(c. r) is
q(c. r) =
_
1
1
d/ q(c. /)c
iIa
. (193)
54
By multiplication of this last equation by c
ca
we can recover ,(r),
,(r) =
_
1
1
d/ q(c. /)c
(c+iI)a
. for r 0. (194)
Since we are dealing with complex numbers anyway we shall take the liberty
to dene the complex variable : = c + i/. Moreover, we dene the Laplace
transform

,(:) as 2: q(:), i.e.,

,(:) =
_
1
0
drc
ca
,(r). for 1c(:) = c = large enough. (195)
The corresponding expression for ,(r) can be obtained as
,(r) =
1
2:i
_
c+i1
ci1
d:c
ca

,(:). for r 0. (196)


Here we have changed variable of integration from / to : and noted that if we
integrate in the complex plane along a line parallel to the imaginary axis from
c ito c +ithen d/ = d:,i. The form of the inverse Laplace transform
in 196 invites the use of the residue theorem (see the Beta Handbook, section
14.2). However, it is more common to do the inversion directly from a table
of Laplace transforms, perhaps with the aid of some of the many simplifying
properties of the Laplace transform described below.
9.1.1 Properties of the Laplace transform: LP= Laplace trans-
form
1. Linearity: 11(`,(r) +j/(r)) = `11(,(r)) +j11(/(r)).
2. Derivative theorem: 11(
o
oa
,(r)) = :11(,) ,(0).
3. Integral theorem: 11(
_
a
0
dt,(t)) =
1
c
11(,).
4. Convolution theorem: If q(r) =
_
a
0
dt,(t)/(rt) then 11(q) = 11(,)11(/).
5. Exponential shift theorem: 11(c
ja
,(r)) =

,(: +j).
The linearity follows directly from the linearity of the Fourier transform.
The derivative and the integral theorems can be proven by use of partial
55
integration and the exponential shift theorem follows by inspection. Let us
have a look at the convolution theorem.
Proof of the convolution theorem:
_
1
0
drc
ca
_
a
0
dt,(t)/(r t) =
_
1
0
dt
_
1
t
drc
ca
,(t)/(r t) (197)
=
_
1
0
dt
_
1
t
drc
ct
,(t)c
c(at)
/(r t)
=
_
1
0
dtc
ct
,(t)
_
1
t
drc
c(at)
/(r t)
=
_
1
0
dtc
ct
,(t)
_
1
0
d:c
cv
/(:) =

,(:)

/(:).
The important step is to change order of integration and realize how the
limits of integration change. The variable change : = r t then completes
the proof.
9.1.2 Small table of Laplace transforms:
Function of r Laplace transform
1 1,:
c
ja
1,(: j)
co:jr :,(:
2
+j
2
)
:i:jr j,(:
2
+j
2
)
r
a
. : = 0. 1. 2. .... :!,:
a+1
9.2 Applications of Laplace Transforms
The Laplace transform nds many applications in chemistry. The most com-
mon application is probably to linear dierential or integrodierential equa-
tions where one makes use of the derivative, integral and convolution the-
orems to obtain algebraic equations for the transforms themselves without
derivatives or integrals. Let us consider some examples.
Example 1 - Unimolecular decomposition: Suppose we have a chem-
ical reaction j:odnct:. which is irreversible and proceeds according to
a unimolecular rate law, i.e., if the concentration of at time t is c(t) then
the time development satises
d
dt
c(t) = /c(t). (198)
56
where / is the unimolecular rate coecient. Find the time development of c
from the initial value c(0). - This is a linear rst order dierential equation.
We want c(t) for t 0 so we apply the Laplace transform to both sides of
the equation,
:c(:) c(0) = /c(:). (199)
Here we have used the derivative law. This equation for the Laplace trans-
form can be solved to yield
c(:) =
c(0)
: +/
. (200)
From our small table of Laplace transforms it follows that
c(t) = c(0)c
It
. (201)
Example 2 - Coupled chemical reactions: Consider a set of coupled
chemical reactions of the type 1, 1 C, C product. The corre-
sponding time dependent concentrations are c

(t), c
1
(t). c
C
(t) and the rate
equations are
d
dt
c

(t) = /
1
c

(t). (202)
d
dt
c
1
(t) = /
1
c

(t) /
2
c
1
(t).
d
dt
c
C
(t) = /
2
c
1
(t) /
3
c
C
(t).
These are coupled linear rst order equations. We apply the Laplace trans-
form to both sides of all three equations to obtain -
:c

(:) c

(0) = /
1
c

(:). (203)
:c
1
(:) c
1
(0) = /
1
c

(:) /
2
c
1
(:).
:c
C
(:) c
C
(0) = /
2
c
1
(:) /
3
c
C
(:).
The rst equation can be solved as in the example above. We get -
c

(:) =
c

(0)
: +/
1
. and c

(t) = c

(0)c
I
1
t
. (204)
Insertion in the second equation yields -
c
1
(:) =
c
1
(0)
: +/
2
+
/
1
c

(0)
(: +/
1
)(: +/
2
)
. (205)
57
In order to nd this transform by linear combinations of transforms in our
small table we note that -
1
(: +/
1
)(: +/
2
)
=
1
/
1
/
2
(
1
: +/
2

1
: +/
1
). (206)
Now it is straightforward to nd the inverse Laplace transform. We get -
c
1
(t) = c
1
(0)c
I
2
t
+
/
1
c

(0)
/
1
/
2
(c
I
2
t
c
I
1
t
). (207)
Finally, we solve for c
C
(:) and nd -
c
C
(:) =
c
C
(0)
: +/
3
+
/
2
c
1
(:)
: +/
3
(208)
=
c
C
(0)
: +/
3
+
/
2
: +/
3
(
c
1
(0)
: +/
2
+
/
1
c

(0)
(: +/
1
)(: +/
2
)
)
=
c
C
(0)
: +/
3
+
/
2
: +/
3
(
c
1
(0)
: +/
2
+
/
1
c

(0)
/
1
/
2
(
1
: +/
2

1
: +/
1
))
=
c
C
(0)
: +/
3
+
/
2
c
1
(0)
/
2
/
3
(
1
: +/
3

1
: +/
2
) +
/
1
/
2
c

(0)
/
1
/
2

_
1
/
2
/
3
(
1
: +/
3

1
: +/
2
)
1
/
1
/
3
(
1
: +/
3

1
: +/
1
)
_
.
At this point the transform is of a form such that we can immediately identify
the terms in our table. We nd that the concentration of species C decays
by a triple exponential time dependence, i.e.,
c
C
(t) = c
1
c
I
1
t
+c
2
c
I
2
t
+c
3
c
I
3
t
. (209)
c
1
=
/
1
/
2
c

(0)
(/
1
/
2
)(/
1
/
3
)
.
c
2
=
/
2
c
1
(0)
/
3
/
2
+
/
1
/
2
c

(0)
(/
1
/
2
)(/
3
/
2
)
.
c
3
= c
C
(0) +
/
2
c
1
(0)
/
2
/
3
+
/
1
/
2
c

(0)
/
1
/
2
(
1
/
2
/
3

1
/
1
/
3
)
= c
C
(0) +
/
2
c
1
(0)
/
2
/
3
+
/
1
/
2
c

(0)
(/
2
/
3
)(/
1
/
3
)
. (210)
Example 3 - Harmonic oscillator: We have already encountered the
harmonic oscillator in our discussion of normal modes of molecules in Chapter
58
2. The equation of motion is -
:
d
2
dt
2
r(t) +/r(t) = 0. (211)
where m is the mass and k the force constant. We shall now see that we can
readily solve this equation by Laplace transformation but rst we must note
that the derivative theorem can be iterated to apply to higher derivatives:
11(
d
2
dt
2
r(t)) = :11(
d
dt
r(t)) (0) (212)
= :
2
r(:) :r(0) (0).
where v is the velocity, i.e., the time derivative of r. Using this extension of
the derivative theorem we can take the Laplace transform of the equation of
motion for the harmonic oscillator and obtain -
::
2
r(:) ::r(0) :(0) +/ r(:) = 0. (213)
This equation yields -
r(:) =
::r(0) +:(0)
::
2
+/
=
:r(0) +(0)
:
2
+
I
n
(214)
=
:r(0)
:
2
+
I
n
+
(0)
:
2
+
I
n
.
Now we can identify the terms in our small table of Laplace transforms and
nd -
r(t) = r(0) cos(
_
/
:
t) +(0)
_
:
/
sin(
_
/
:
t). (215)
Example 4 - Debye Hckel theory: Now we shall consider the screen-
ing of an ion in an electrolyte solution. Let c(:) be the average electrostatic
potential at the distance r from the ion. It must be spherically symmetric
so it depends on the distance but not on the direction. In the absence of
other ions the eld would have been of Coulombic form, c(:) ,:, where
q is the charge of the central ion. In the presence of the mobile ions in the
solution the eld is screened by the attraction of counterions and repulsion
of coions. According to the Debye-Hckel analysis the concentration of an
ion of species i is altered by the eld to the form -
c
i
(:) = c
i1
c
1
i
I
B
T
= c
i1
c
q
i
(v)I
B
T
. (216)
59
where
i
is the charge of the ionic species in the screening atmosphere, c
i1
is
its bulk concentration, /
1
is Boltzmanns constant and 1 is the temperature
in Kelvin. From electrostatic theory we know that there is a direct rela-
tionship between the eld and the charge density j expressed by Poissons
equation,
(
J
2
Jr
2
+
J
2
J
2
+
J
2
J.
2
)c = \
2
c = j,
0
. (217)
which in the case of spherical symmetry becomes
1
:
2
d
d:
(:
2
d
d:
c(:)) = j(:),
0
. (218)
The charge density j can be expressed in terms of the concentrations of the
charged species, i.e.,
j(:) =

i

i
c
i
(:) =

i

i
c
i1
c
q
i
(v)I
B
T
. (219)
If we now insert this expression for j in Poissons equation we get the so
called Poisson-Boltzmann equation, which in spherical symmetry takes the
form -
1
:
2
d
d:
(:
2
d
d:
c(:)) =

i
c
i1

0
c
q
i
(v)I
B
T
. (220)
At this point we note that the Poisson-Boltzmann equation is nonlinear
in the eld and therefore dicult to solve. Debye and Hckel investigated
the weak coupling limit when the interaction energy is small compared to
/
1
1. i.e.,
[
i
c(:),/
1
1[ 1. (221)
Then we can linearize the Boltzmann factor and get -
j(:) =

i

i
c
i1
c
q
i
(v)I
B
T
~
=

i
(
i
c
i1

2
i
c
i1
c(:),/
1
1) (222)
=

2
i
c
i1
c(:),/
1
1.
since by electroneutrality in the bulk we have -

i
c
i1
= 0. (223)
60
The corresponding linearized Poisson-Boltzmann equation takes the form -
1
:
2
d
d:
(:
2
d
d:
c(:)) = i
2
c(:). (224)
where
i
2
=

i

2
i
c
i1
,(
0
/
1
1). (225)
Now we have a second order linear dierential equation to solve. Before
we apply the Laplace transform method we change dependent variable to
n(:) = :c(:). The linearized Poisson-Boltzmann equation then becomes -
d
2
d:
2
n(:) = i
2
n(:). (226)
By Laplace transformation of both sides we get -
:
2
n(:) :n(0) n
0
(0) = i
2
n(:). (227)
n(:) =
:n(0) +n
0
(0)
:
2
i
2
.
Recalling that -
1
:
2
i
2
=
1
(: +i)(: i)
=
1
2i
(
1
: i

1
: +i
). (228)
:
:
2
i
2
=
: i +i
(: +i)(: i)
=
1
: +i
+
1
2
(
1
: i

1
: +i
)
=
1
2
(
1
: i
+
1
: +i
).
we nd that n(:) has the form -
n(:) =
1
2
(n(0)
n
0
(0)
i
)c
iv
+
1
2
(n(0) +
n
0
(0)
i
)c
iv
. (229)
However, for physical reasons we cannot tolerate the exponentially growing
term so we must have n
0
(0) = in(0). Thus we get the physical solution -
n(:) = n(0)c
iv
. (230)
and, nally, the eld is given by -
c(:) =
n(0)
:
c
iv
. (231)
61
The parameter n(0) is determined by the condition that the eld approach
the Coulomb potential of the bare charge as : 0. i.e., n(0) = ,4:
0
in
SI-units. Thus we nally obtain the following screened Coulomb potential -
c(:) =

4:
0
:
c
iv
. (232)
9.3 Exercises on Laplace Transforms:
1. Calculate the Laplace transforms of the functions co:/(r) and :i:/(r).
2. Consider the isomerization reaction 1 and its reverse reaction
1 proceeding with the rate coecients /
)
and /
b
, the forward
and backward rate coecients, respectively. Write down the corre-
sponding coupled rate equations for the concentrations c

and c
1
and
solve them. Determine the equilibrium concentrations and the rate at
which equilibrium is approached.
3. If a harmonic oscillator is placed in a dissipative medium ( e.g., a gas or
a liquid) a frictional force is expected to appear which is proportional
to the velocity. The corresponding equation of motion is
:
d
2
dt
2
r(t) = /r(t)
d
dt
r(t). (233)
Solve this equation for r(t), t 0, and describe the qualitative change
in the time dependence as goes from to +. For what values
of is the eect on the motion consistent with a friction acting on an
oscillator?
4. Consider the Debye-Hckel theory of electrolytes above. a) Show that
the solution obtained for c(:) leads to a charge density j(:) which
satises charge neutrality, i.e., the integrated charge density equals the
central charge with reverse sign (). b) In the more realistic model
where the ions are considered to be hard spheres of diameter d, such
that j(:) = 0. for : < d, the solution for n(:) is -
n(:) = n(d) exp(i(: d)). : d.
Determine n(d) so that charge neutrality is again satised.
62
Part III
Dierential Equations
10 Ordinary Dierential Equations
Consider the equation -
d
3
dr
3
+
d
dr
+r
2

a
= q(r) (234)
for the the function (r). It is called an ordinary dierential equation
(ODE) because there appear only derivatives with respect to one unknown
variable called r in this case. It is said to be of 3rd order because the highest
order derivative to appear is of this order. If : = 1 then the equation is
linear and if q(r) = 0 then it is called homogeneous while if q(r) ,= 0
then it is said to be inhomogeneous. If : = 2. 3. ... then the equation is
nonlinear.
10.1 First Order Equations
10.1.1 Simple Integration:
The simplest type of ordinary dierential equation is of the form -

0
= ,(r) (235)
and can be solved by direct integration of both sides,
=
_
a
d:,(:). (236)
Note that superscript prime indicates that a derivative with respect to x has
been taken and double prime indicates double derivative and so on. The
integral on the right hand side is any primitive function to ,(r), 1(r). We
could then write -
=
_
a
0
d:,(:) +C. (237)
to make explicit the fact that the solution requires specication of a constant
C. The value of (r) at one point is sucient to specify C, e.g.,
=
_
a
0
d:,(:) +(0). (238)
63
Thus we see that solving an ODE involves nding a general solution including
one or more undetermined parameters which are then determined by some
boundary condition or point values of the solution or its derivatives. For a
rst order ODE only one parameter is involved.
10.1.2 Generalized integration:
A more general form of rst order ODE is -

0
= ,(r. ). (239)
If the function ,(r. ) is separable -
,(r. ) = /(r),q(). (240)
then an implicit solution can be obtained as follows:

0
q() = /(r). (241)
G() = H(r) +C. (242)
Here G() and H(r) are primitive functions to q() and ,(r), respectively,
and C is an undetermined constant. This equation for must now be solved
for y as a function of r. This can often but not always be done analytically.
Example 1: y
0
= r is solved by simple integration, i.e., y =
_
a
d::+C =
(r
2
,2) +C.
Example 2: y
0
= / is solved by generalized integration, i.e.,

0
1

= /.
ln = /r +C.
= c
Ia+C
= 1c
Ia
.
10.1.3 Reduction by Variable Transformation:
An equivalent way of writing the general rst order ODE 239 is -
d ,(r. )dr = 0. (243)
This equation can be multiplied by another function q(r. ) to produce -
q(r. )d q(r. ),(r. )dr = 0. (244)
64
Thus we see that another way to write a general rst order ODE is -
1(r. )d +Q(r. )dr = 0. (245)
Consider now the special case when 1 and Q are both homogeneous of degree
:, i.e.,
1(`r. `) = `
a
1(r. ). (246)
Q(`r. `) = `
a
Q(r. ).
If we now make the variable transformation = ,r and substitute r for
in 245, then we get -
1(r. r)d +Q(r. r)dr = r
a
1(1. )d +r
a
Q(1. )dr = 0. (247)
which yields -
1(1. )d +Q(1. )dr = 0. (248)
1(1. )(rd +dr) +Q(1. )dr = 0.
1(1. )
1(1. ) +Q(1. )
d +
1
r
dr = 0.
This equation is now of the form -

0
q() = 1,r. (249)
which can be solved by generalized integration to yield -
G() = ln r +C. (250)
Example 3: - Consider the ordinary dierential equation -
d
dr
=

2
,2 r
2
r
2
+r
.
It can be rewritten in the form -
(r
2
+r)d + (r
2

2
,2)dr = 0.
Here we have -
1(r. ) = r
2
+r.
Q(r. ) = r
2

2
,2.
65
Note that both 1(r. ) and Q(r. ) are homogeneous of second order. Thus
we introduce the new dependent variable = ,r and nd = r, d =
rd +dr. Inserted in the ODE we get -
r
2
(1 +)(rd +dr) +r
2
(1
2
,2)dr = 0.
(1 +)rd + (1 + +
2
,2)dr = 0.
1 +
1 + +
2
,2
d +
1
r
dr = 0.
Now we apply generalized integration to both sides and nd -
ln(1 + +
2
,2) = ln(r) +C.
By exponentiation we obtain an implicit solution -
1 + +
2
,2 = ,r.
and by multiplication by r
2
-
r
2
+r +
2
,2 = r.
Since this is a second order equation in we can solve for explicitly as
follows:

2
+ 2r + 2r
2
= 2r.
( +r)
2
= 2r r
2
.
= r
_
2r r
2
.
10.2 Method of Exact Dierentials:
Suppose is given implicitly as a function of r by the equation 1(r. ) = 0.
Dierentiating with respect to r we get -
J1
Jr
+
J1
J
d
dr
= 0. (251)
which can be written as -
d1 =
J1
Jr
dr +
J1
J
d = 1d +Qdr = 0. (252)
66
Thus we know that when the ODE can be written as an exact dierential
equal to zero as above then 1(r. ) = 0 yields an implicit solution. It remains
to learn how to recognize when the ODE has this form. Note that for all
physical functions we have
J
2
1
JrJ
=
J
2
1
JJr
. (253)
Thus if the ODE 245 satises -
J
Jr
1(r. ) =
J
J
Q(r. ). (254)
then it is of exact dierential form and we have the implicit solution 1(r. ) =
0, where 1(r. ) can be found from -
J1
J
= 1(r. ). (255)
J1
Jr
= Q(r. ).
By integration we then nd -
1(r. ) = q(r) +
_
j
d:1(r. :). (256)
1(r. ) = ,() +
_
a
d:Q(:. ).
These equations can then, with a bit of luck, be solved for 1(r. ) which in
turn yields (r) if we can solve 1(r. ) = 0.
Example 4: - Consider the ODE - (r +)dr +rd = 0. Noting that -
J
J
(r +) =
J
Jr
r = 1.
we see that the equation is of exact dierential form. Thus we can nd
a function 1(r. ) such that an implicit solution for (r) is obtained from
1(r. ) = 0 by solving the equations -
1(r. ) = q(r) +
_
j
d:r = q(r) +r.
1(r. ) = ,() +
_
a
d:(: +) = ,() +
1
2
r
2
+r.
67
Noting that the right hand sides must be identical we get -
q(r) +r = ,() +
1
2
r
2
+r.
which yields -
q(r) =
1
2
r
2
+C.
,() = C.
and -
1(r. ) = r +
1
2
r
2
+C = 0.
This equation can, nally be solved for y(x) as -
(r) = (
r
2
+
C
r
).
where C is a parameter to be determined from, e.g., a point value of y(x).
Suppose, for example, that we have y(1) = 1, then C = -3/2.
10.3 Method of Integrating Factors:
Consider the linear rst order ODE of the form -

0
+:(r) = `(r). (257)
Suppose that `(r) is a primitive function of :(r), then we note that -
d
dr
(c
A(a)
) = (
0
+:(r))c
A(a)
= `(r)c
A(a)
. (258)
Integrating both sides with respect to x we get -
(r)c
A(a)
=
_
a
d:`(:)c
A(c)
+C. (259)
(r) = c
A(a)
(
_
a
d:`(:)c
A(c)
+C).
Again C is a parameter to be determined. Suppose that we know (0). It is
then convenient to let the integration go from 0 to r, i.e.,
(r)c
A(a)
(0)c
A(0)
=
_
a
0
d:`(:)c
A(c)
. (260)
(r) = c
A(a)
(
_
a
0
d:`(:)c
A(c)
+(0)c
A(0)
).
68
For simplicity we normally choose `(r) so that `(0) = 0.
Example 5: - Consider the equation:
0
+ / = cr
2
. It is of the form
appropriate for the method of integrating factors. A primitive function for /
is /r so we get -
d
dr
(c
Ia
) = (
0
+/)c
Ia
= cr
2
c
Ia
.
(r) = c
Ia
(
_
a
0
d:c:
2
c
Ic
+(0)).
The integration can be carried out by partial integration or by dierentiation
as follows:
_
a
0
d::
2
c
Ic
=
J
2
J/
2
_
a
0
d:c
Ic
=
J
2
J/
2
(
1
/
(c
Ia
1)
= c
Ia
(
r
2
/

2r
/
2
+
2
/
3
)
2
/
3
.
Thus we get -
(r) = (0)c
Ia
+c(
r
2
/

2r
/
2
+
2
/
3
)
2c
/
3
c
Ia
.
10.4 Factorization Method:
Suppose we consider a dierential equation which can be factorized, i.e.,
1
1
(r. .
0
. ...)1
2
(r. .
0
. ...) = 0. (261)
then we obtain the solutions from each factor,
1
1
(r. .
0
. ...) = 0. (262)
1
2
(r. .
0
. ...) = 0.
and add them to a set of solutions for the full equation.
Example 6: - Consider the ODE - (
0
)
2
(c + /)
0
+ c/ = 0. It can be
factorized as
(
0
c)(
0
/) = 0.
The factor solutions are = cr + and = /r + 1. Thus the solutions to
the full equation are -
(r) = cr + or (r) = /r +1.
69
10.5 Linear Ordinary Dierential Equations
A linear ODE can be either homogeneous or inhomogeneous, i.e., written in
the form -
1(r) = 0. (homogeneous) (263)
or -
1(r) = ,(r). (inhomogeneous) (264)
where the operator 1 can be dened as -
1 = q
0
(r) +q
1
(r)
d
dr
+q
2
(r)
d
2
dr
2
+ . (265)
Suppose now that we have found two linearly independent solutions of a
homogeneous linear ODE,
1
1
(r) = 0. (266)
1
2
(r) = 0.
then it follows from the linearity that -
1(`
1
(r) +j
2
(r)) = `1
1
(r) +j1
2
(r) = 0. (267)
Thus linear combinations of solutions are also solutions. There is a vec-
torspace of solutions and in order to describe it we must try to nd the largest
set of linearly independent solutions of the homogeneous ODE. If
i
(r)
a
i=1
is such a set then it can serve as a basis set in the space of solutions which
can be written as -
(r) =
a

i=1
c
i

i
(r). (268)
where c
i

a
i=1
is a set scalar numbers which are free parameters to be deter-
mined by further information about the solution. The space of solutions of
the corresponding inhomogeneous linear ODE is of the same dimension but
shifted in function space by a function n(r) which is a so-called particular
solution of the inhomogeneous ODE, i.e.,
1n(r) = ,(r). (269)
The general solution of the inhomogeneous linear ODE can then be written
as -
(r) = n(r) +
a

i=1
c
i

i
(r). (270)
70
10.5.1 Linear ODEs with Constant Coecients:
In the special case when all the functions q
i
(r) in the denition of 1 are scalar
constants the search for the space of solutions of the homogeneous ODE is
much simplied by the factorization of 1,
1 = 1
a
+j
1
1
a1
+....... +j
a1
1 +j
a
(271)
= (1 :
1
)(1 :
2
)(1 :
3
) (1 :
a
).
where 1 = d,dr, j
i
is the set constants which dene 1 and :
i
the set
of n roots of the nth order polonomial formed by 1 if 1 is treated as an
ordinary scalar variable. Since the coecients are constants we have -
1:
i
= :
i
1. (272)
i.e., the derivative operator commutes with all coecients, and 1 can be
treated as an ordinary scalar in forming the factorized form of 1 above. It
is now easy to see that the solution of (1 :
a
) = 0 is also a solution of
1 = 0. The rst factor in 1 simply kills if it is a solution of (1:
a
) = 0.
However, we can write the factors in any order. Thus the solutions of all the
equations
(1 :
i
) = 0. i=1, 2,......n, (273)
will also be solutions of 1 = 0. Recall now that -

0
:
i
= 0. (274)
has the general solution -

i
(r) = c
i
c
n
i
a
. (275)
If the roots :
i

a
i=1
are all dierent then the corresponding solutions are all
linearly independent and we get the general solution of 1 = 0 in the form -
(r) =
a

i=1
c
i
c
n
i
a
. (276)
If we have a root of degeneracy d. i.e., d roots are identical, then the corre-
sponding terms are replaced as shown below:
o

i=1
c
i
c
n
i
a

i=1
c
i
r
i1
c
n
1
a
. : = d 1. (277)
71
These last results are oered without proof but can readily be veried.
How can we obtain a particular solution? Since any form of particular
solution will do it is often possible to nd one by inspection, by a guess in-
spired by the form of the ordinary dierential equation. More systematically,
we can use the method of integrating factors iteratively in the following way:
1 = (1 :
1
)(1 :
2
) (1 :
a
) = ,(r). (278)
Dening a new function (r) by -
(r) = (1 :
2
)(1 :
3
) (1 :
a
). (279)
we get a new rst order ODE,
(1 :
1
)(r) = ,(r). (280)
which we solve for (r) by the integrating factor method,
(r) = c
n
1
a
(C
1
+
_
a
0
d:,(:)c
n
1
c
). (281)
Now we have obtained a new linear ODE of order : 1,
(1 :
2
)(1 :
3
) (1 :
a
) = (r). (282)
where (r) is a known function. Thus we can repeat the step and use the
integrating facor method to peal o one factor at a time until (r) itself is
found.
Example 7: - Find the solutions of the dierential equation -

00
3
0
+ 2 = 1.
First we note that this is a linear second order ODE which is inhomogeneous
with constant coecients. The corresponding homogeneous equation is -

00
3
0
+ 2 = 0.
In polynomial form it can be written -
(1 1)(1 2) = 0.
72
Thus we see that the general solution of the homogeneous equation is -
(r) = c
1
c
a
+c
2
c
2a
.
A particular solution can be found by inspection in the form y(x)=1/2. It
follows that the general solution of the inhomogeneous equation is -
(r) =
1
2
+c
1
c
a
+c
2
c
2a
.
Example 8: - Find the solution of the dierential equation -

00
2
0
+ = c
2a
.
Note that the polynomial form of the corresponding homogeneous equation
is -
(1 1)
2
= 0.
It has a doubly degenerate root : = 1. In order to test the statement
above concerning the solution in the case of degenerate roots let us solve
this equation by the iterative method of integrating factors. We rst set
(r) = (1 1) and nd then that -

0
= 0.
which yields -
(r) = c
1
c
a
.
Now we get from the denition of v(x) the equation -

0
= c
1
c
a
.
By the method of integrating factors this yields -
(r) = c
a
(c
2
+
_
a
0
d:c
1
) = (c
2
+c
1
r)c
a
.
in agreement with the statement above. Applying the iterative integrating
factor method to the inhomogeneous equation we get -

0
= c
2a
.
(r) = c
a
(c
1
+
_
a
0
d:c
3c
) = c
1
c
a
+
1
3
(c
a
c
2a
).

0
= (r) = (c
1
+
1
3
)c
a

1
3
c
2a
.
(r) = c
a
(c
2
+ (c
1
+
1
3
)r
1
9
(1 c
3a
))
= (c
2

1
9
+ (c
1
+
1
3
)r)c
a
+
1
9
c
2a
.
73
Noting that c
1
. c
2
are undetermined scalar constants we can rewrite this result
as -
(r) = c
2
exp(r) +c
1
r exp(r) +
1
9
exp(2r).
There are often possibilities to shortcut the brute force type of solution
by a solution by inspection. In this case we could proceed as follows.
We rst note that the inhomogeneity in the form of exp(2r) suggests that
the solution will contain the same exponential. The simplest form of such
solution is c exp(2r). Inserting this guess into the dierential equation
yields -
4c exp(2r) + 4c exp(2r) +c exp(2r) = exp(2r).
It follows immediately that c = 1,9 and thus a particular solution has been
found as -
n(r) =
1
9
exp(2r).
10.6 Known Second Order Dierential Equations:
There are, of course, many ODEs which do not fall in any of the categories
of solvable problems discussed above. It is good to know then that some such
ODEs are well studied and documented in the literature. Here are some that
you could look up in most texts on dierential equations:
1. Legendres equation:
(1 r
2
)
00
2r
0
+:(: + 1) = 0. (283)
2. Associated Legendres equation:
(1 r
2
)
00
2r
0
+ (:(: + 1)
:
2
1 r
2
) = 0. (284)
3. Bessels equation:
r
2

00
+r
0
+ (r
2
:
2
) = 0. (285)
4. Hypergeometric equation:
r(1 r)
00
+ [c (c +/ + 1)r]
0
c/ = 0. (286)
74
10.7 Exercises on Ordinary Dierential Equations:
Exercise 1: - Obtain the general solution of the following ODEs clearly
indicating in each case the method you are using and what conditions on
(r) at r = 0 would completely determine the solution. Note that general
analytical solutions may sometimes have to be in implicit form. Take the
solution as far as you can towards explicit form and then leave it implicit if
necessary.
a)

0
= rc
Ia
.
b)

0
= ,(2
_
r r). (implicit solution is sucient)
c)

0
=
2
(2 + sin r).
d)

0
(1 +r
2
) = r
3
.
e)
(
0
)
3
+ (c +/ +c)(
0
)
2
+ (c/ +/c +cc)
0

2
+c/c
3
= 0.
f)

000
+ 2
00
+ 4
0
= 0.
11 Partial Dierential Equations
Partial dierential equations are dierential equations on multidimensional
domains, i.e., there are several independent variables. There are many im-
portant examples in chemistry such as:
1. The one-dimensional wave equation for the displacement (t; r):
J
2

Jr
2
=
1
c
2
J
2

Jt
2
. (287)
2. The three-dimensional wave equation for the displacement (t; r. . .):
\
2
=
J
2

Jr
2
+
J
2

J
2
+
J
2

J.
2
=
1
c
2
J
2

Jt
2
. (288)
75
3. The Laplace equation for the electrostatic eld (r. . .):
\
2
= 0. (289)
4. Poissons equation for the electrostatic eld (r. . .):
\
2
= q(r. . .). (290)
5. The three-dimensional diusion equation for the particle density (t; r. . .):
\
2
=
1
1
J
Jt
. (291)
6. The time-dependent Schrdinger equation for the wavefunction (t; r. . .):
J
Jt
=
i
}
(
}
2
2:
\
2
+\ (r. . .)). (292)
7. The time-independent Schrdinger equation for the eigenfunction (r. . .):

}
2
2:
\
2
+\ (r. . .) = 1.
Note that, with the exception of Poissons equation which is inhomo-
geneous, all these equations are linear, homogeneous equations of second
order. As in the case of ordinary dierential equations the partial dierential
equations have many solutions which become unique by the application of
boundary conditions. The following types of boundary conditions are com-
mon:
Dirichlet conditions: is known on the boundary.
Neumann conditions: (\)
a
(i.e., the normal gradient) is known on
the boundary.
Cauchy conditions: and (\)
a
are both known at the boundary.
76
11.1 Separation of Variables
We shall consider a few of the most commonly used methods of solving partial
dierential equations (PDEs). Perhaps the most commonly used method is
to attempt to reduce the partial equation to ordinary form by separation
of variables, i.e., we try to nd solutions of product form. Thus if we are
looking for a solution (r. . .) then we propose the form -
(r. . .) = A(r)1 ()2(.). (293)
Upon insertion into the PDE this will, if the PDE is separable in these coor-
dinates, generate three ordinary dierential equations which can be attacked
by the methods of the preceding chapter.
Example 1 - The vibrating string:
Let us consider an elastic string such as a guitar string of length 1. Its
deformation from the straight line shape is resisted by a tension in the string.
We shall limit our string to motion in one dimension only and let the deviation
of the string from its resting (equilibrium) position be denoted by (t; r) as
a function of the time t and the position along the axis of the string at rest
x. The boundary conditions are -
(t; 0) = (t; 1) = 0. (294)
and -
(0; r) = ,(r). (295)
J
Jt
(t; r) = q(r). for t = 0. (296)
The rst condition reects the fact that the string is tied at the two ends.
The second and third conditions give the initial position and velocity of each
point in the chain.
We now assume that the string can be described by the direct product -
(t; r) = A(r)1(t). (297)
By insertion in the applicable partial dierential equation, i.e., the one
dimensional wave equation (287), we get -
1(t)
J
2
Jr
2
A(r) =
1
c
2
A(r)
J
2
Jt
2
1(t). (298)
77
If we now divide by A(r)1(t) we nd -
1
A(r)
J
2
Jr
2
A(r) =
1
c
2
1
1(t)
J
2
Jt
2
1(t) = `
2
. (299)
Here ` is a constant independent of both r and t. We then have two ordinary
dierential equations to solve. The one in r is a boundary value problem
J
2
Jr
2
A(r) = `
2
A(r). (300)
with the condition that A(0) = A(1) = 0. The one in t is an initial value
problem -
J
2
Jt
2
1(t) = `
2
c
2
1(t). (301)
with the condition that 1(0) and J1(t),Jt at t = 0 have predetermined
values. Note that our expectation that there be sinusoidal variations suggests
that ` be a real number. These equations are then readily solved. They can
both be identied with the harmonic oscillator problem dealt with in both
Chapter 2 and Chapter 6. We nd the solutions -
A(r) = sin(`r +o). (302)
1(t) = 1sin(`ct +c). (303)
The boundary conditions on A(r) leads to ` = ::,1. n=1,2,...... with o = 0.
i.e.,
A
a
(r) =
a
sin(::r,1). n=1,2,........ (304)
This is the same form of solution as for the 1D particle-in-the-box problem
in quantum mechanics. The corresponding solution for 1(t) is -
1
a
(t) = 1
a
sin(::ct,1 +c
a
). (305)
Now we can see that the set of A
a
-functions form a set of normal modes of
the chain equivalent to the normal vibrational modes of molecules considered
in Chapter 2. Had our string consisted of a chain of atoms the anology
would have been perfect. In our string model here we have simply taken the
continuum limit when the particles become innitely many and at the same
time innitely small so as to preserve the mass per unit length in the chain.
The general solution is obtained by superposing normal mode solutions so as
78
to match the initial value conditions given. Thus we expand ,(r) in the box
eigenfunction basis set,
,(r) =
1

a=1
c
a
sin(::r,1). (306)
and the same type of expansion applies also to the time-derivative q(r),
q(r) =
1

a=1
d
a
sin(::r,1). (307)
The general form of the solution is -
(t; r) =
1

a=1

a
sin(::ct,1 +c
a
) sin(::r,1). (308)
Thus we can solve for
a
and c
a
from the relations -

a
sin(c
a
) = c
a
.
(
a
::c,1) cos(c
a
) = d
a
. (309)
By dividing the rst of these equations by the last we get -
c
a
= arctan(c
a
::c,d
a
1). (310)
and then
a
can be found as -

a
= c
a
, sin(c
a
). (311)
11.2 Integral Transform Method
A very general method of solving partial dierential equations is to introduce
a basis set and convert the PDE into an algebraic equation for the expansion
coecients by projection onto the nite space spanned by the basis. We have
already seen this method in use in the Hckel theory of :-electron structure
in planar conjugated hydrocarbon molecules. As we noticed in introducing
the Fourier series all series expansion methods and by extension also the
transform methods are basically the same. Thus they bring the possibility of
reducing dierential equations to algebraic form. We shall show by example
how the Fourier transform can be used to solve a PDE in this way.
79
Example 2 - Diusion in an innite solid:
Consider an innite solid in which we have a spatially varying tempera-
ture 1(t; r) at t = 0. The general relation for the time-development of the
temperature is Ficks law which is -
\
2
1(t; r. . .) =
1
i
J1
Jt
. (312)
Note that Ficks law is just a diusion equation in three dimensions and i
is the corresponding diusion coecient. This analogy is reasonable since
the random motion of particles is one of the main mechanisms of energy
transport. In a solid the particles only rarely leave their equilibrium lattice
sites but the vibrations also have a random character and the transfer of
energy between sites in a solid can be approximately described as a diu-
sional process. Since the temperature variation is initially conned to the
r-direction it will remain so for all times. Thus we can look for a function
1(t; r) and use the reduced version of Ficks law -
J
2
Jr
2
1(t; r) =
1
i
J
Jt
1(t; r). (313)
under the boundary condition that 1(0; r) is known.
We now take the Fourier transform with respect to r of both sides. On
the condition that the transform exists we get -
/
2
1(t; /) =
1
i
J
Jt
1(t; /). (314)
From this equation follows by our ODE solving methods -
1(t; /) = 1(0; /) exp(i/
2
t). (315)
Note that this result implies fast damping of high k components, i.e., non-
smooth features of 1(t; r). Thus time evolution produces an increasingly
smooth spatial distribution of temperature.
At this point we need to consider the initial temperature distribution
1(0; r). It seems unlikely that it vanish for r . It would appear
therefore that our clever idea to use the Fourier transform will fail since -
_
1
1
dr [1(0; r)[ = . (316)
80
However, reality comes to the rescue. We can consider a temperature distur-
bance o1(t; r) which is dened by -
o1(t; r) = 1(t; r) 1
bj
. (317)
where 1
bj
is a background temperature so dened that -
_
1
1
dr [o1(0; r)[ < . (318)
Now the temperature disturbance satises the same PDE as 1 itself and it
does have a Fourier transform. Thus we can proceed with our method. The
general solution can be written as -
o1(t; r) =
1
_
2:
_
1
1
d/o1(t; /) exp(i/r)
=
1
_
2:
_
1
1
d/o1(0; /) exp(i/
2
t) exp(i/r). (319)
Greens function: Suppose now that the temperature disturbance is
initially perfectly localised in r, i.e.,
o1(0; r) = o(r r
0
). (320)
Then the Fourier transform is -
o(r
0
; /) =
1
_
2:
_
1
1
dr exp(i/r)o(r r
0
) (321)
=
1
_
2:
exp(i/r
0
).
The corresponding temperature disturbance is -
o1(t; r
0
. r) =
1
2:
_
1
1
d/ exp(i/(r r
0
) i/
2
t). (322)
This integral can be evaluated analytically. Note that -
_
1
1
d/ exp(c/
2
+//) =
_
1
1
d/ exp(c(/
/
2c
)
2
+
/
2
4c
)
=
_
:
c
exp(
/
2
4c
). (323)
81
This result holds even though b is complex as follows from the fact that the
integrand is analytical and the path of integration in the complex plane can
be moved to the real axis. (See Section 14.2 in the Beta Handbook) Thus
our temperature distribution becomes -
o1(t; r
0
. r) =
_
1
4:it
exp((r r
0
)
2
,4it). (324)
Finally, we note that due to linearity and the fact that the initial tem-
perature distribution can be written as an integral over such delta-functions,
o1(0; r) =
_
dro1(0; r
0
)o(r r
0
). (325)
we can obtain the general solution as -
o1(t; r) =
_
dr
0
o1(0; r
0
)o1(t; r
0
. r)
=
_
dr
0
o1(0; r
0
)
_
1
4:it
exp((r r
0
)
2
,4it). (326)
This expression means that each point of excess temperature broadens into
a Gaussian ball of excess with its maximum excess decreasing like 1,
_
t
and its width increasing like
_
t with time. The solution in the case of a
delta function disturbance is called a Greens function by the physicists (See
Section 9.4 of the Beta Handbook).
Linear time-propagation: In order to understand the interest in Greens
functions consider the time-development of the linear Ficks law,
J
Jt
1(t; r) = i
J
2
Jr
2
1(t; r) = L1(t; r). (327)
This equation has the formal solution -
1(t; r) = exp(Lt)1(0; r). (328)
The time-propagator crj(Lt) is also a linear operator. It follows that if -
1(0; r) =

a
c
a
c
a
(0; r). (329)
82
then -
1(t; r) =

a
c
a
exp(Lt)c
a
(0; r) =

a
c
a
c
a
(t; r). (330)
Similarly, if the initial eld can be written as an integral over o-functions,
1(0; r) =
_
dr
0
1(0; r
0
)o(r r
0
). (331)
then we get -
1(t; r) =
_
dr
0
1(0; r
0
) exp(Lt)o(r r
0
) =
_
dr
0
1(0; r
0
)o1(t; r
0
. r).
(332)
Thus the time-dependent o-functions, just like the time dependent Fourier
basis functions, allow us to obtain the time-dependent amplitude 1(t; r)
simply by integration.
11.3 Exercises on Partial Dierential Equations:
1. Reduce the time-dependent Schrdinger equation for particle motion
in three dimensions to the form of two dierential equations - one for
the time-dependence and one for the spatial dependence of the wave-
function.
2. Consider the quantum mechanical motion of a particle in two dimen-
sions. Solve the time-independent Schrdinger equation to obtain the
energy eigenfunctions of the two-dimensional particle-in-the-box prob-
lem where the potential vanishes when 0 < r < 1
1
and 0 < < 1
2
but
is innite elsewhere.
Part IV
Numerical Methods
12 Numerical Solution of ODEs
So far we have studied mathematical methods of an analytical form. The
result has been either explicit solutions of an exact or approximate nature,
83
or mathematical relationships which require evaluation by numerical means,
e.g., by numerical dierentiation or integration. Now we shall proceed to
study the numerical methods most commonly used by chemists. Perhaps the
most commonly used method of all is the nite basis set method employed by
all users of the standard quantum chemical methods. This method was dis-
cussed already in Chapters 1 and 2. The second most commonly used method
could well be the molecular dynamics method of simulating both dynamical
processes and equilibrium properties of chemical systems. Thus we shall fo-
cus on this, the so-called MD method, next. It is based on the numerical
solution of ordinary dierential equations. The third most commonly used
numerical method might be the Monte Carlo method of numerical integra-
tion. It is used to obtain equilibrium properties of chemical systems through
the evaluation of statistical mechanical averages. Thus we shall study the
so-called MC method of numerical simulation.
12.1 Numerical Dierentiation
Recall the denition of the derivative of the function ,(r) at r,
,
0
(r) = lim
I!0
1
/
(,(r +/) ,(r)). (333)
This denition immediately suggests a numerical evaluation of the derivative
by the relation
,
0
(r)
~
=
1
/
(,(r +/) ,(r)). (334)
for a small value of /. How small should / be? This is not so easy to deter-
mine in practice. It depends on the round o error aecting the evaluation
of ,, the intrinsic error in ,
0
and our accuracy requirement. We shall leave
aside the round o error which is machine dependendent, i.e., dependent on
the computer or other computational device you are using, and focus our
attention on the intrinsic error of the approximation. This is the error which
remains if we could evaluate the expression (334) exactly. In order to nd
this error we start from the Taylor series expansion of the function which we
assume to be analytical in the domain of interest, i.e.,
,(r +/) = ,(r) +/,
0
(r) +
1
2
/
2
,
00
(r) +
1
6
/
3
,
000
(r) +
1
24
/
4
,
0000
(r) +.....
=
1

a=0
1
:!
/
a
,
(a)
(r). (335)
84
By subtraction of f(x) and division by h we readily nd that
,
0
(r)
~
=
1
/
(,(r +/) ,(r)) = ,
0
(r) +
1
2
/,
00
(r) +..... = ,
0
(r) +O(/). (336)
By this notation we mean that the leading term in the error is proportional to
/, i.e., if / is small enough the term proportional to / will dominate the error.
If h is small then /
2
is smaller, /
3
is smaller still etcetera. Thus we want
numerical approximations with as high order as is needed to get sucient
accuracy. In the end the human algebraic labor tends to put an end to our
ambitions for high accuracy but it is certainly very important to know how
to generate higher accuracy when needed. Fortunately, it is not dicult in
this case to see how to evaluate ,
0
(r) to higher order in /. The rst trick is
to recognize the merit of a central rather than the forward dierence method
used above. Note that
,(r +
/
2
) ,(r
/
2
) = /,
0
(r) +O(/
3
). (337)
Thus we nd
,
0
(r) =
1
/
(,(r +
/
2
) ,(r
/
2
)) +O(/
2
). (338)
We can get even higher order error by expressions for ,
0
(r) involving more
function evaluations.
Example 1: High order derivate evaluation -
,
0
(r) =
4
3
1
/
_
,(r +
/
2
) ,(r
/
2
)
_

1
6
1
/
(,(r +/) ,(r /)) +O(/
4
).
(339)
Let us now consider higher order derivatives. The second derivative is
most easily evaluated by a sequential application of the denition of a deriv-
ative,
,
00
(r)
~
=
1
/
(,
0
(r +
/
2
) ,
0
(r
/
2
)) (340)
~
=
1
/
2
(,(r +/) 2,(r) +,(r /)).
The order of the error follows from the substitution of the Taylor series
expanded forms of ,(r +/) and ,(r /) and we have
,
00
(r) =
1
/
2
(,(r +/) 2,(r) +,(r /)) +O(/
2
). (341)
85
Note that again this is a central dierence form of approximation so we get a
second order error where for a noncentral form we would expect a rst order
error. As before we can get higher order accuracy by using more function
evaluations. The third order derivative ,
000
(r) can similarly be obtained by
an iterative application of the denition of a derivative,
,
000
(r)
~
=
1
/
(,
00
(r +
/
2
) ,
00
(r
/
2
)) (342)
~
=
1
/
2
(,
0
(r +/) 2,
0
(r) +,
0
(r /))
~
=
1
/
3
(,(r +
3/
2
) 3,(r +
/
2
) + 3,(r
/
2
) ,(r
3/
2
)).
Again the central dierence form of this approximation ensures that the error
is of second order and we nd
,
000
(r) =
1
/
3
(,(r+
3/
2
) 3,(r+
/
2
) +3,(r
/
2
) ,(r
3/
2
)) +O(/
2
). (343)
By the same method we can generate numerical derivatives of any order of
derivation and any order of accuracy. The accuracy can be improved, e.g.,
by identifying the leading error term in the approximations above and sub-
tracting the corresponding numerical derivative multiplied by the appropriate
constant. Note, for example, that the central dierence approximation for
,
0
(r) can be written as
,
0
(r) =
1
/
(,(r +
/
2
) ,(r
/
2
))
1
24
/
2
,
000
(r) +O(/
4
). (344)
Inserting the expression for ,
000
(r) from 343 we then get
,
0
(r) =
1
/
(
1
24
,(r+
3/
2
) +
9
8
,(r+
/
2
)
9
8
,(r
/
2
) +
1
24
,(r
3/
2
)) +O(/
4
).
(345)
12.2 Numerical Solution of ODEs
12.2.1 Direct Taylor Series Expansion Methods
Consider rst the ordinary dierential equation (ODE)

0
= ,(r. ). (346)
86
Replacing
0
by the simplest form of numerical derivative in (334) we nd
that
1
/
((r +/) (r)) = ,(r. (r)) +O(/). (347)
which yields
(r +/) = (r) +/,(r. (r)) +O(/
2
). (348)
This equation propagates the solution y(x) from x to x+h at the cost of an
error of order h
2
. This propagation step can now be iterated to yield y(x+2h)
as
(r + 2/) = (r +/) +/,(r +/. (r +/)) +O(/
2
). (349)
Note that in the second propagation step we have an error of order /
2
in
(r + /) and in ,(r + /. (r + /)) if it is an analytical function of r and .
The latter term is multiplied by / so the additional error is of order /
3
. We
can now repeat the propagation step to generate the solution over a grid of
points. Naturally we can vary the steplength as we go along. The error will
grow in some way which depends on both our choice of method and on the
function ,(r. ). Fortunately it will not always tend in the same direction.
Error cancellation will happen to some extent. In the end the error growth
remains a rather dicult aspect of numerical solutions of ODEs which needs
to be checked in each application.
Let us now consider how we might improve the accuracy of the numerical
solution of the rst order ODE above. The obvious idea is to use the central
dierence denition of the derivative. Note that

0
(r) =
1
2/
((r +/) (r /)) +O(/
2
). (350)
Thus we can insert the relation for
0
from the ODE and obtain
(r +/) = (r /) + 2/,(r. (r)) +O(/
3
). (351)
In order to use this type of propagation we need two values of , (r /)
and (r), in order to generate the new value (r + /). This is no problem
once the propagation is running but will require a special starting procedure.
A simple way to handle this is to use the lower order method above for the
rst step and then go over to the higher order central dierence scheme.
Now we have seen the general character of the problem of solving ODEs
by numerical means. We need to devise a propagation step with an error
of as high order as needed and be prepared to construct a special start up
87
procedure to generate the information required for the propagation. We shall
focus now on some general or particularly advantageous ways of propagating
the solution. We begin with a general method based directly on the Taylor
series expansion. Note that we can always write
(r +/) = (r) +/
0
(r) +
1
2
/
2

00
(r) +
1
6
/
3

000
(r) +........ (352)
Thus if the ODE is of rst order as discussed above then it is natural to
insert the equation for
0
(r) and obtain
(r +/) = (r) +/,(r. (r)) +O(/
2
) (353)
as above. If we want to increase the accuracy we need an expression for the
next term in the Taylor series expansion. Such an expression can be obtained
by dierentiating the original ODE to get

00
(r) =
d
dr
,(r. ) =
J
Jr
,(r. ) +
0
(r)
J
J
,(r. )
=
J
Jr
,(r. ) +,(r. (r))
J
J
,(r. ). (354)
Now we can write
(r+/) = (r)+/,(r. (r))+
1
2
/
2
_
J
Jr
,(r. ) +,(r. (r))
J
J
,(r. )
_
+O(/
3
).
(355)
This method illustrates that one can start directly from the Taylor series
expansion and increase the accuracy by generating expressions for higher
order derivatives by dierentiating the original ODE.
Example 2: Consider the ordinary dierential equation -

0
= r +
2
. (356)
In this case we obtain by dierentiation -

00
= 1 + 2
0
= 1 + 2r + 2
3
. (357)
Thus we can write -
(r +/) = (r) +/(r +
2
(r)) +
/
2
2
(1 + 2r(r) + 2
3
(r)) +O(/
3
). (358)
88
Consider now a second order ODE,

00
= ,(r. .
0
). (359)
The corresponding natural propagating step is
(r +/) = (r) +/
0
(r) +
1
2
/
2
,(r. (r).
0
(r)) +O(/
3
). (360)
This equation shows a dependence on both y(x) and y
0
(r). This means that
we should have initial information on these two functions and we must then
propagate both forward. Thus we complement the propagating equation for
y by the following propagating equation for y
0
.

0
(r +/) =
0
(r) +/,(r. (r).
0
(r)) +O(/
2
). (361)
Solving these two equations in tandem we can generate the numerical solution
of the second order ODE. Note that both y and its rst derivative were needed
initially and had to be propagated forward.
We now go to a third order ODE,

000
= ,(r. .
0
.
00
). (362)
The natural approximation based on the Taylor series expansion nowbecomes
(r +/) = (r) +/
0
(r) +
1
2
/
2

00
(r) +
1
6
/
3
,(r. (r).
0
(r).
00
(r)) +O(/
4
).
Now we need to know initially and to propagate ,
0
.
00
. Thus we addend
the propagating equations for
0
and
00
.

0
(r +/) =
0
(r) +/
00
(r) +
1
2
/
2
,(r. (r).
0
(r).
00
(r)) +O(/
3
). (363)

00
(r +/) =
00
(r) +/,(r. (r).
0
(r).
00
(r)) +O(/
2
). (364)
The pattern is now clear. For an nth order ODE we need to know initially
and propagate all lower order derivatives including the function itself. The
error in (r) in the natural approximation is of order : + 1 in / and this
order decreases in unit steps as we proceed to the derivatives. Although we
shall not show this explicitly it is clear that the accuracy can be increased
by dierentiating the ODE as shown in the rst order case above.
89
12.2.2 Runge-Kutta Methods
If you have understood the direct Taylor series expansion method described
above it may well seem as if the problem is solved in the sense that the algebra
required to produce a solution to desired order of accuracy is straightforward.
However, the direct Taylor methods are, with the exception of the central
dierence method applied to the second order Newtons equations as we
shall see, rarely used. There is nothing wrong with these methods from the
theoretical point of view, but the necessary operations, e.g., the evaluation
of derivatives of the function ,, are often inconvenient. Thus most of the
popular numerical methods for the solution of ODEs are what might be
called implicit Taylor series expansion methods. They are justied by and
reducible to the Taylor series expansion method but by various tricks the
necessary operations have been made more convenient. We shall now have
a look at one of the most popular such implicit methods, the Runge-Kutta
method.
The basic idea is to replace the evaluation of derivatives of , by additional
evaluations of , itself. Note that
,(r + r) = ,(r) + r,
0
(r) +O((r)
2
). (365)
and it follows that
,
0
(r) =
1
r
(,(r + r) ,(r)) +O(r). (366)
Thus the simplest rst order equation

0
= ,(r) (367)
can be solved to an error of order /
3
by
(r +/) = (r) +/,(r) +
1
2
/
2
,
0
(r) +O(/
3
) (368)
= (r) +/,(r) +
1
2
/
2
1
r
(,(r + r) ,(r)) +O(/
3
).
Here we pick r to be a real number of the order of h. If we pick r to be
h then we nd
(r +/) = (r) +
/
2
(,(r +/) +,(r)) +O(/
3
). (369)
90
We see that two evaluations of , have decreased the error by one order of /.
We can go on and improve the error by further function evaluations. Note
that the choice of r = / has given us an added advantage in that although
two values of , appear in the propagation equation one of them will be reused
in the next step. Thus the number of new function evaluations per step is
one except for the rst step when it is two.
What happens if we have the more general case when , depends on both
r and ? Note that
,(r + r. (r + r)) = ,(r + r. (r) + r
0
(r)) +O((r)
2
) (370)
= ,(r + r. (r) + r,(r. (r))) +O((r)
2
).
Thus if we let superscript prime indicate a total derivative with respect to r,
d
dr
,(r. (r)) = ,
0
(r. (r)). (371)
then we get
,
0
(r. (r)) =
1
r
(,(r + r. (r) +/) ,(r. (r))) +O(r). (372)
with
/ = r
0
(r) = r,(r. (r)). (373)
The propagation equation can then be written
(r+/) = (r)+/,(r. (r))+
1
2
/
2
1
r
(,(r+r. (r)+/),(r. (r)))+O(/
3
).
(374)
Again we could pick r = / and get -
(r +/) = (r) +
/
2
(,(r. (r)) +,(r +/. (r) +/)) +O(/
3
). (375)
Note that
(r) +/ = (r) +/,(r. (r)) = (r +/) +O(/
2
). (376)
Thus we have inserted a lower order propagation solution for (r + /) in
the higher order propagation equation. Thus the Runge-Kutta method is
essentially an iterative solution method.
91
There are many dierent Runge-Kutta methods all based on the same
idea of using multiple function evaluations to raise the accuracy (see the
Beta Handbook, Section 16.5). One commonly used scheme bringing the
error to order /
4
for rst order ODEs is as follows:
(r +/) = (r) +
1
6
(/
1
+ 2/
2
+ 2/
3
+/
4
). (377)
/
1
= /,(r. (r)).
/
2
= /,(r +
/
2
. (r) +
/
1
2
).
/
3
= /,(r +
/
2
. (r) +
/
2
2
).
/
4
= /,(r +/. (r) +/
3
).
The Runge-Kutta methods can be applied to higher order ODEs and
to coupled sets of ODEs. There are also many other elegant and intricate
ways to solve ODEs. Normally one does not have to derive or program these
methods oneself. They can be found in program libraries and mathemati-
cal programs such as Mathematica, Matlab, Mathcad and Maple. We shall
discuss such programs later in this course. Examples of programs solving
second order ODEs will be given in the next chapter on molecular dynamics
simulation.
12.3 Exercises:
1. Derive an expression for ,
00
(r) in terms of function values such that the
error is of order /
4
.
2. Derive propagating equations which yield a numerical solution of the
ODE
00
= / +r
2
with the error of order /
4
per step of length / in r.
3. Verify explicitly for the ODE
0
= r + that the error in the Runge-
Kutta propagating equation (8.45) is of fth order in /.
4. Obtain an estimate of ,
0
(r) and ,
00
(r) in terms of the function values
,(r
I
2
), ,(r) and ,(r +
I
2
) to the highest possible accuracy. Show
your derivation and the order of the error in /.
92
13 Molecular Dynamics Simulation
One could say that Newton started the development of molecular dynamics
(MD) simulation when he proposed that systems and their dynamics, i.e.,
movement, were determined by potentials and corresponding forces accord-
ing to what we now call classical mechanics. His original insight has been
associated with the gravitational force acting on an apple falling from a tree
but his classical mechanics is now applied to objects of nearly all imaginable
types from planets in motion around a star to atoms and molecules perform-
ing their dynamics on microscopic time and length scales. The latter type
of dynamics is of particular interest to chemists. Unfortunately, classical
mechanics is not exactly but only approximately valid for atomic and mole-
cular motions and the accuracy of the classical mechanical approximation
reaches its practical boundary in the middle of the eld of chemistry. Thus
we can understand most of the properties of the macroscopic phases on the
basis of classical mechanics but electronic structure and dynamics as well as
vibrational dynamics of molecules and solids must be described by quantum
mechanics. Given the development of fast computers the application of clas-
sical mechanics in the form of molecular dynamics, as we shall soon describe,
has become an extremely powerful tool which is revolutionizing the eld of
chemistry. In fact, the use of MD simulation is so pervasive that one could
argue that it exceeds the scope motivated by its validity and timescale limi-
tations. One reason for the great popularity of MD simulation is that it is so
relatively easy to implement on our ever more powerful computers. Thus MD
simulation can be applied to problems of a complexity beyond all other meth-
ods by chemists who do not require lengthy training to grasp the essential
facts and features of the method. The other major reason for its popularity
is that there are so many important unresolved problems seemingly out of
range for all other methods that MD simulation is applied whether or not it
is completely justied. The hope is that one will always learn something of
value. So far this hope seems well justied.
So what is molecular dynamics simulation? It is based on a number of
propositions which might be summarized as follows:
1. Potentials can be found which accurately describe the forces on the
particles which make up the relevant system.
2. Classical mechanics describes the equilibrium and dynamical properties
of the relevant system to sucient accuracy.
93
3. Where the actual physical system is unmanagably large a small sample
of the system still retains the essential behaviour of the actual system.
The sample system can be chosen small enough to be tractable for MD
simulation.
4. Relaxation processes and relevant dynamical phenomena occur on a
time scale accessible to MD simulation.
These propositions are the subject of many ifs and buts and clever tricks
have been and are being developed to extend their validity. More problems
are coming within range of the MD method every day not the least due
to the continual improvement of computer capacity. Our purpose here is
to illustrate the MD method in its simplest forms leaving the large and
complicated MD programs for later.
13.1 Simplest Case - One-Dimensional Oscillation
We shall begin by simulating the motion of a one-dimensional (1D) oscillator.
The system is then dened by a mass : and a potential \ (r). The motion
is completely described by the time development of the position and the
velocity, i.e., by r(t) and (t). These quantities will form what we call the
trajectory described by the system as it moves with time. The main task
in MD simulation is to obtain this trajectory for some initial condition or
ensemble of initial conditions. The trajectory is found by solving Newtons
equation,
J
2
Jt
2
r(t) =
1
:
J\ (r)
Jr
=
1
:
1(r(t)). (378)
When r(t) is known the velocity can be found by dierentiation,
(t) =
d
dt
r(t). (379)
Thus we have to solve a second order ODE to obtain r(t). Note that the
force is in this case, as almost always, only dependent on the dependent
variable r(t) itself. The simplest propagating equation is obtained by the
direct Taylor series expansion method as follows,
r(t +/) = r(t) +/(t) +
/
2
2:
1(r(t)) +O(/
3
). (380)
94
Note that h is now a time-step. The simplest equation for the velocity is
(t +/) = (t) +
/
:
1(r(t)) +O(/
2
). (381)
However, recalling the simplest Runge-Kutta method as in equation (8.43)
we can improve the accuracy at essentially no additional cost in computation
by using the average force between time t and t +/, i.e.,
(t +/) = (t) +
/
2:
(1(r(t)) +1(r(t +/))) +O(/
3
). (382)
This form of the velocity equation is nicely symmetric as well as of the same
accuracy as the equation for the position. Together these two equations form
a very stable and accurate method of solving Newtons equations which goes
by the name of the velocity Verlet method and is very commonly used in
the eld of MD simulation.
A program implementing the velocity Verlet method for a 1D oscillator
with : = 1 and a potential given by
\ (r) = cr
2
+/r
4
+cr
6
. (383)
is included in an appendix to this chapter. The program is written in For-
tran 77. Let us consider what can be obtained from such a program. Most
obviously we can obtain dynamical information about the oscillation directly
from the trajectory. However, the MD method is often used to obtain infor-
mation about equilibrium properties. In this case we must use the so-called
ergodic hypothesis:
Equilibrium properties in the microcanonical ensemble can be obtained
as long time trajectory averages of the corresponding property.
Suppose for example that we want to know the average potential energy
of the oscillator \ as a function of the energy 1. It is obtained as
\
1
= lim
t!1
1
t
_
t
0
dt\ (r(t)). (384)
Even with a modern computer we cant run forever so we have to assume
that the integral converges reasonably rapidly. This is where the time scale
problem enters but for a simple 1D oscillator we should not have any diculty
95
nding a converged value for \
1
. Note that since Newtonian dynamics
conserves the energy 1,
1 =
:
2

2
+\ (r). (385)
we will generate so-called microcanonical averages if the ergodic hypothesis
turns out to be valid.
13.2 Two-Dimensional Oscillation
Let us now consider the case of two coupled oscillators. The masses will
again be taken to be unity. The potential will be
\ (r. ) = cr
2
+/r
4
+c
2
+d
4
+qr
2

2
. (386)
The equation of motion will be
d
dt
r(t) =
a
(t). (387)
d
dt
(t) =
j
(t).
d
dt

a
(t) = 1
a
(r(t). (t)) =
J
Jr
\ (r. ).
d
dt

j
(t) = 1
j
(r(t). (t)) =
J
J
\ (r. ).
In our special case we have
1
a
(r. ) = (2cr + 4/r
3
+ 2qr
2
). (388)
1
j
(r. ) = (2c + 4d
3
+ 2qr
2
).
If we apply the velocity Verlet method we get the following propagating
equations,
r(t +/) = r(t) +/
a
(t) +
1
2
/
2
1
a
(r(t). (t)). (389)
(t +/) = (t) +/
j
(t) +
1
2
/
2
1
j
(r(t). (t)).

a
(t +/) =
a
(t) +
/
2
(1
a
(r(t). (t)) +1
a
(r(t +/). (t +/))).

j
(t +/) =
j
(t) +
/
2
(1
j
(r(t). (t)) +1
j
(r(t +/). (t +/))).
96
The error is of order /
3
in all the propagating equations. Note that the
velocity Verlet method is very straightforwardly extended to two or more
dimensional system, a very endearing trait since MD simulations are often
carried out for many-particle systems with 1000 dimensions or more.
We might still be interested in calculating the microcanonical potential
energy average for the two-dimensional oscillator. It is worth recalling that
the evaluation of such microcanonical averages as long time trajectory av-
erages is based on the ergodic hypothesis which may not hold for a given
system. If, e.g., we were to set g=0 to break the coupling between the two
oscillators then the initial energy in each oscillator would be conserved and
our system will be nonergodic. The question is whether a coupling term of
the type used here, qr
2

2
. is sucient to make the system ergodic. A listing
of a program carrying out the MD simulation of our two coupled oscillator
system is included in an appendix.
13.2.1 A One-Dimensional Fluid
In order to illustrate the simulation of an innite system without unduly
burdening our discussion with technical details we shall consider a one-
dimensional uid. The particles will be of unit mass and the interaction
is described by a pair-potential, i.e., a potential acting between each set of
two particles in the uid. For reasons of tradition and convenience we shall
let the pair potential be of Lennard-Jones form,
c(:) = 4(
_
o
:
_
12

_
o
:
_
6
). (390)
Here r is the particle separation, is the well depth and o is the separation
where the potential becomes positive. In reduced units such that and o are
unity the potential becomes c(r) = 4(r
12
r
6
) and has the shape shown
in the gure. Note the very rapid rise in c(r) as x decreases from unity.
This rise corresponds to the Pauli repulsion between closed shell atoms or
molecules. For larger separations the potential is negative approaching zero
as :
6
. The complete potential for a one-dimensional uid is then
\ (r
1
. r
2
. r
3
. ......) =

i

)i
c(r
i)
) =
1
2

)6=i
c(r
i)
). (391)
97
1.0 1.2 1.4 1.6 1.8 2.0
0
2
4
6
x
y
where r
i)
is the separation [r
i
r
)
[ between particles i and ,. The force on
particle i is given by
1
i
(r
1
. r
2
. .....) =
J
Jr
i
\ (r
1
. ....) =

)6=i
(
J
Jr
i
c(r
i)
)) (392)
=

)<i
24(2r
13
i)
r
7
i)
)

)i
24(2r
13
i)
r
7
i)
).
The sum should, in principle, go over the innite or nearly innite number
of other particles in the uid. This can, of course, not be managed so one
uses a trick called periodic boundary conditions. One takes a large but
managable number of particles ` and assigns them to an interval [0. 1] which
has a length 1 related to the uid density : by
: = `,1. (393)
Around this interval are placed replicas dened by periodicity, i.e., a particle
at r has replicas at r 1. r 21. r 31. ... The eect of this is that the
forces on our ` particles pick up contributions fromthese replicas which serve
to represent the rest of the innite uid. Thus the ` particles experience
a more realistic environment, if we want to know about properties of an
innite system, then a set of ` particles constrained to the interval [0. 1]
by hard walls. In fact, one normally truncates the interaction potential c(r)
at r = 1 < 1 for two reasons: i) to avoid time consuming summations in
the force evaluations and ii) because one does not want a particle to interact
with its own image. I do not believe the second reason is signicant but it
is nevertheless often referred to in the simulation literature. The truncation
98
of the potential, i.e., setting it to zero for r 1, causes problems because
the potential actually used is then not analytical. It has a step at r = 1
which generates a ofunction in the force at that point. Accounting for it in
the solution of the equations of motion is possible but technically messy. For
short ranged potentials such as the Lennard-Jones potential the problem can
be dealt with in a very summary fashion while for long ranged potentials it
is much more of a problem.
Ignoring the technical problems of potential truncation, the propagating
equations of the velocity Verlet method can be written as
r
i
(t +/) = r
i
(t) +/
i
(t) +
1
2
/
2
1
i
(r
1
(t). r
2
(t). ....) +O(/
3
). (394)

i
(t +/) =
i
(t) +
1
2
/[1
i
(r
1
(t). .....) +1
i
(r
1
(t +/). .....)] +O(/
3
). (395)
for i = 1. 2. ..... `. Apart from the summations hidden behind our notation
for the force 1
i
the propagation equations are no more dicult to deal with
than in our smaller simulations above. - And the computers are good at
repetitive summations. It is possible to simulate uids of thousands of parti-
cles even on a personal computer. If the aim is to evaluate simple properties
such as the average potential energy per particle, the pressure, specic heat
or other bulk thermodynamic property than the program may only be a few
hundred lines long. We shall see examples of such programs later although
using Monte Carlo rather than MD propagation.
13.3 Exercises:
1. Draw a boxdiagram (boxes containing specication of tasks done con-
nected with lines showing the order in which work is done) illustrating
how the one-dimensional oscillation is followed by the MD simulation
program. Write out below the explicit form of the propagating equa-
tions for the case when the potential is \ (r) = cr
2
+/r
4
+cr
6
.
2. The original Verlet algorithm for the propagation in molecular dynam-
ics simulation is in one dimension of the form -
r(t +/) = 2r(t) r(t /) +1(t; r)/
2
,:.
a) Derive this form of propagation from Newtons equation. b) Show
that the error is of order /
4
. c) Show that this propagation is of time
99
reversible form. d) Point out any disadvantages of this method and
suggest remedies.
3. Another interaction potential often used in MDsimulations to represent
pairwise interaction among particles is the Morse potential -
c(:) = 1(exp(2(: :
c
)) 2 exp((: :
c
)) .
Describe how to carry out an MD simulation of a one-dimensional chain
of particles interacting by Morse pair-potentials. The level of detail
should be as for the chain of Lennard-Jones interacting particles above.
13.4 Timedevelopment of a 1Doscillator - NUMSIM.FOR
Note that in the programlisting below normal mathematical notation is used
rather than F77 notation whenever convenient.
01 C This program calculates a trajectory for an oscillator in 1D.
02 C The oscillator potential is cr
2
+/r
4
+cr
6
. The mass is 1.
03 program numsim
04 implicit real*8 (a-h,o-z)
05 jot(r) = cr
2
+/r
4
+cr
6
06 ,cc(r) = 2cr 4/r
3
6cr
5
07 c(r. ) =
2
,2 +jot(r)
08 write(*,*) The potential is cr
2
+/r
4
+cr
6
. Enter c. /. c =
09 read(*,*) c. /. c
10 write(*,*) Input initial position and velocity r. =
11 read(*,*) r.
12 cc = c(r. )
13 write(*,*) Mass is set to 1. For c = 1. / = c = 0 the frequency
is 1.
14 write(*,*) The timestep should be < 1. Set the timestep dt =
15 read(*,*) dt
16 write(*,*) Set the number of timesteps to be taken, :t =
17 read(*,*) :t
18 C Calculate the trajectory by the velocity Verlet method.
19 C Evaluate the time average of the potential energy, jc/, and the
20 C average kinetic energy, c//.
21 jc/ = 0
22 c// = 0
100
23 cdc = 0
24 C Time propagation according to the velocity Verlet method.
25 do 10 i = 1. :t
26 jc/ = jc/ +jot(r),:t
27 c// = c// +
2
,2:t
28 r:cn = r +dt +,cc(r)(dt)
2
,2
29 :cn = + (,cc(r) +,cc(r:cn))dt,2
30 r = r:cn
31 = :cn
32 cdc = cdc +dc/:(c(r. ) cc),:t
33 10 continue
34 write(*,*) Total time, energy, average pe, average ke
35 write(*,20) :t + dt, cc, jc/, c//
36 20 format(4d16.6)
37 write(*,*) Final energy, average energy deviation
38 write(*,30) c(r. ). cdc
39 30 format(2d16.6)
40 stop
41 end
13.5 Some results for an anharmonic oscillator such
that \ (r) = r
2
+r
4
+r
6
Initial position and velocity are r. = 0. 1 and total elepsed time is 100
seconds = :t + dt.
dt :t Final energy Average energy deviation
0.1 1000 0.49978D+00 0.104767D-02
0.01 10000 0.500000D+00 0.104033D-04
14 Timedevelopment of two anharmonically
coupled oscillators - MD2OSC.FOR
01 program md2osc
02 C This program calculates a trajectory for two oscillators with
anharmonic coupling. The particle masses are 1.
03 C The oscillator potential is cr
2
+/r
4
+c
2
+d
4
+qr
2

2
.
04 implicit real*8 (a-h,o-z)
101
05 jot(r. ) = cr
2
+/r
4
+c
2
+d
4
+qr
2

2
06 ,r(r. ) = 2cr 4/r
3
2qr
2
07 ,(r. ) = 2c 4d
3
2qr
2

08 c(r. jr. . j) = jr
2
,2 +j
2
,2 +jot(r. )
09 write(*,*) The potential is cr
2
+/r
4
+c
2
+d
4
+qr
2

10 write(*,*) Enter c. /. c. d. q =
11 read(*,*) c. /. c. d. q
12 write(*,*) Input initial positions and momenta r. jr. . j =
13 read(*,*) r. jr. . j
14 cc = c(r. jr. . j)
15 write(*,*) For \ (r) = r
2
+
2
the frequencies are 1. The
timestep should be < 1. Set dt =
16 read(*,*) dt
17 write(*,*) Set the number of timesteps :t =
18 read(*,*) :t
19 C Calculate the trajectory by velocity Verlet propagation. Evalu-
ate the time average of the potential energy jc/
20 C and the average kinetic energy c//. Also evaluate the ratio
cc:cqc(jr
2)
,cc:cqc(j
2
).
21 jc/ = 0.d0
22 c// = 0.d0
23 cdc = 0.d0
24 jr2 = 0.d0
25 j2 = 0.d0
26 do 10 i = 1. :t
27 jc/ = jc/ +jot(r. ),:t
28 c// = c// + (jr
2
+j
2
),2:t
29 jr2 = jr2 +jr
2
,:t
30 j2 = j2 +j
2
,:t
31 r:cn = r +jrdt +,r(r. )(dt)
2
,2
32 :cn = +jdt +,(r. )(dt)
2
,2
33 jr = jr +dt(,r(r. ) +,r(r:cn. :cn)),2
34 j = j +dt(,(r. ) +,(r:cn. :cn)),2
35 r = r:cn
36 = :cn
37 cdc = cdc +dc/:(c(r. jr. . j) cc),:t
38 10 continue
39 write(*,*) Total time, energy, average pe, average ke
102
40 write(*,20) :tdt. cc. jc/. c//
41 20 format(4d16.6)
42 write(*,*) Final energy, average energy deviation
43 write(*,30) c(r. jr. . j). cdc
44 30 format(2d16.6)
45 write(*,*) The ratio < jr
2
, < j
2
is
46 write(*,40) jr2,j2
47 40 format(2x,Average jr
2
, Average j
2
= ,d16.6)
48 stop
49 end
15 Numerical Integration
Integration is the inverse of dierentiation. Both of these operations are es-
sential tools of applied mathematics and of chemistry. We shall consider now
the basic theory of numerical integration and a sampling of the most popular
methods used. The discussion will be conned here to one dimensional inte-
gration. In the subsequent chapter we will discuss the Monte Carlo method
of numerical integration which is particularly suited to high dimensional in-
tegrals.
Let us focus our attention on the integral
1(,; c. /) =
_
b
o
dr,(r). (396)
We will assume that ,(r) is an analytical function in the interval [c. /] .
The exact value of the integral can be obtained if the primitive function
corresponding to ,(r), i.e.,
1(r; c) =
_
a
o
dr,(r). (397)
can be found. We then get
_
b
o
dr,(r) = 1(/; c) = 1(/; c) 1(c; c). (398)
Here c is a real number which is undetermined. The latter form of the exact
integral is the one we generally use since it allows us to use any primitive
103
function 1(r) satisfying
d
dr
1(r) = ,(r) (399)
in the interval of integration [c. /] . Note now that 1(r; c) satises a rst
order ODE of the form above with the initial value 1(c) = 0. Thus we
can use all our numerical methods of solving rst order ODEs to obtain
a numerical estimate of a one dimensional integral of this type. Therefore
we have already quite a rich collection of methods available for numerical
integration.
Let us try to be systematic. Just like was the case for dierentiation and
ODEs the Taylor series expansion must be the starting point of our theory
of numerical integration. We have
,(r +/) = ,(r) +/,
0
(r) +
1
2
/
2
,
00
(r) +
1
6
/
3
,
000
(r) +...... (400)
where / is again a small increment in r. By direct integration we then nd
that
1(r +/; c) = 1(r; c) +
_
I
0
d:,(r +:)
= 1(r; c) +/,(r) +
1
2
/
2
,
0
(r) +
1
6
/
3
,
00
(r) +
1
24
/
4
,
000
(r) +..... (401)
Thus, at the cost of evaluating derivatives of ,(r) we can generate a stepwise
evaluation of the integral to any order of accuracy desired. In this sense the
theory of numerical integration is extremely simple. However, the evaluation
of derivatives of ,(r) of higher order may be dicult or tedious. Just as
in the case of the Runge-Kutta methods of ODEs we may want to replace
the derivatives by additional function evaluations. For greatest convenience
these function evaluations should occur at points inside the interval [r. r+/].
Otherwise the function evaluations will spill out of the full range [c. /] of the
integral. The simplest and lowest order integration step is
1(r +/; c) = 1(r; c) +/,(r) +O(/
2
). (402)
Next we want to include the term to order /
2
in the Taylor series expansion
by function evaluation. Our experience with central dierence schemes for
numerical dierentiation suggests that this can be done as follows,
1(r +/; c) = 1(r; c) +
1
2
/(,(r) +,(r +/)) +O(/
3
). (403)
104
Taylor series expansion of ,(r + /) shows that this is correct as expected.
Interestingly there is another way to accomplish the same thing. We can
stick with one function evaluation but place it at the step midpoint,
1(r +/; c) = 1(r; c) +/,(r +
/
2
) +O(/
3
). (404)
This looks like a better idea since we need only one function evaluation
rather than two in (10.8). However, the two functions in (10.8) are reused
once so there is only one new function evaluation for each step except for
the very rst. At any rate it is worth remembering that additional function
evaluations can be replaced by clever placement of the points of evaluation.
It is not dicult to go to higher order. Let us propose to use the three
function values ,(r). ,(r +
I
2
). ,(r + /). By symmetry the coecients in
front of the two end values must be the same, j. The middle function value
must then be 1 2j since the coecients must add up to unity. Thus we get
1(r +/; c) = 1(r; c) +/
_
j,(r) + (1 2j),(r +
/
2
) +j,(r +/)
_
+O(/
4
).
(405)
Taylor series expansion of ,(r+
I
2
) and ,(r+/) shows that j should be 1,6,
i.e.,
1(r +/; c) = 1(r; c) +
/
6
_
,(r) + 4,(r +
/
2
) +,(r +/)
_
+O(/
4
). (406)
This is a very good integration step which leads to the following expression
for the full integral
1(/; c)
~
=
_
b
o
dr,(r) =
_
/
6
2.

a=0
(3 + (1)
a+1
),(c +
:/
2
)
_

/
6
[,(c) +,(/)] .
(407)
where / = (/ c),`.
The Beta Handbook (Section 16.4) gives a number of useful integration
methods for one-dimensional integrals. It also gives them names commonly
used in the mathematical literature. Thus (10.9) is called the midpoint rule,
(10.8) is called the trapezoidal rule and the scheme recommended above in
(10.12) is called Simpsons rule.
105
15.1 Exercises:
1. Verify explicitly the validity of the result (10.12), i.e., Simpsons rule.
Write out the terms in the expression on the right hand side explicitly
for the case ` = 3 and show that the contribution from each interval
is treated as in (10.11).
2. Show that it is possible to evaluate the contribution -
1(r +/; c) 1(r; c) =
_
a+I
a
d:,(:).
to 4th order in h with only two function evaluations in the interval
[r. r +/].
3. Derive a numerical integration method based on the four function val-
ues at r. r+
I
3
. r+
2I
3
. r+/ such that the error in the integration from
r to r +/ is of order /
5
.
16 Monte Carlo Simulation
We have seen in the previous chapter how to evaluate one dimensional inte-
grals. The methods we developed required evaluation of the integrand on a
lattice of points followed by summation over the function values multiplied
by an integration step length and some weighting factor determined by the
numerical integration scheme selected. If the function varies substantially
over the interval of integration we must use a large number of points to get
good accuracy. Lets say that we need typically a hundred points. Although
we shall not go into the details it should be clear that these methods can
be extended to two dimensional and higher dimensional integrals. Unfortu-
nately the numerical problem becomes much harder in higher dimensions.
Suppose we have a two dimensional integral over a rectangular domain and
the integrand varies in both dimensions about as much as in a typical one
dimensional integral. Then we would need 100 100 = 10000 points in
the grid of r. values where the integrand is to be evaluated in order to
produce an integral of accuracy comparable to that in the one dimensional
case. However, in chemistry we often want to evaluate integrals of dimension
1000 or more, e.g., in the process of calculating thermodynamic properties
of uids and larger molecules. The number of points in a grid which should
106
yield an accuracy of the integral comparable to that in the one dimensional
case would be of the order 10
2000
which is hopelessly out of range for any
computer now available or in sight. There is hardly any point to quibble
about the most eective of our normal grid methods. We need to think in
new directions.
16.1 The Global Monte Carlo Method
We shall seek a radically new approach to integration by using two new tools:
statistics and dynamics. We begin here by considering the statistical tool.
Consider the problem of holding an election in a country like Sweden. It
takes an enormous eort to conduct such an election which can be regarded
as a kind of gigantic integration. But we know that the pollsters can predict
the outcome of the election rather well. They use a random sample of some
3000 or so voters to predict the result of an election in an electorate of about
4 million voters. If it were not for the problem that a sampled voter may
respond dierently than a voter in the real election the pollsters would be
much more accurate. The key to this method is that the sample really is
random. Any bias in the sample can signicantly reduce the accuracy.
In the global Monte Carlo method we use the method of the random draw
of the pollster to determine the average value of the integrand over a domain
of known size. Let the integral be dened by the notation
_
dr
1
.....
_
dr
.
,(r
1
. ..... r
.
) =
_
1
d,(). (408)
where summarizes all coordinates and D denotes a domain of integration.
The integral can now be written as
_
1
d,() = ,
1
_
1
d. (409)
where
,
1
=
_
1
d,()
_
1
d
. (410)
We shall assume that we can evaluate the area of the domain
_
1
d. If the
natural denition of the domain is too dicult we can always extend the
domain so that the area can be evaluated. The function should then be
given the value zero in all of the added area. We are then left to estimate the
107
average of the integrand ,
1
. This is what the pollster is good at. We can
do it by drawing a random sample of coordinate vectors
i

.
i=1
and setting
,
1
~
= ,
(.)
1
=
1
`
.

i=1
,(
i
). (411)
How large should ` be? This depends entirely on the nature of ,()
and the accuracy requirement. A very practical approach is to calculate the
average for a sequence of increasing `-values and observe the convergence
of the average with `. This will make it possible to stop the calculation as
soon as the accuracy seems sucient. Naturally the statistical estimate will
always entail a risk that the sample is unrepresentative in some way but by
running on for larger ` condence can be built up to any desired level. A
huge advantage of this method is that it will start to produce reasonable if
not accurate values for the integral even for quite small sample size N. If we
have 1000 dimensions we may try ` = 1000000. If we go back to the grid
methods we must have at least two points in each dimension and 2
1000
is a
large number, too large already for our computational power.
16.2 The Metropolis Monte Carlo Method
The weakness of the global Monte Carlo method shows up when we have a
very ill-conditioned function ,(). This is the case, e.g., when we consider
the conguration integral part of the partition function for a dense uid.
What happens is that ,() is nearly always close to zero because random
placement of particles produces overlap of hard cores and unphysically high
potential energies. The integral is then dominated by contributions from a
miniscule subdomain of 1 which we may not even nd by a random sample.
To surmount this problem we shall use a clever trick. We shall start from
a reasonable point
1
and let a type of diusional dynamics generate the
subsequent vector coordinates in the chain
1
.
2
.
3
. ..... in such a way as to
search out the important regions of the domain 1.
Consider the problem of calculating the average potential energy of a
uid. According to statistical mechanics we have
\
T
=
_
1
dc
o\ ()
\ ()
_
1
dc
o\ ()
. (412)
108
where \ () is the potential energy of the uid in the conguration . ,
is 1,/
1
1 and 1 is the absolute temperature. The domain 1 is dened
by the fact that any particle can be anywhere in the available volume 1 .
The area of 1 is then 1
.
. The big problem is that the Boltzmann factor
crj(,\ ()) is nearly zero at nearly all points in 1 for a dense uid. In
the Monte Carlo method we handle this problem by generating a Markov
chain of values starting from one point
1
which has a reasonably low
energy \ (). This chain searches out important regions in the domain 1.
The Monte Carlo method is formulated in terms of the probability density
j() and is constructed primarily to allow averages like -
< =
_
dj()() (413)
to be eciently evaluated. Here () is a property such as, e.g., the potential
energy \ () above. The Markov chain is generated as follows:
1. Choose a reasonable initial point
1
.
2. Make a random displacement in
1
to obtain a proposed
2
.
3. If j(
2
),j(
1
) where is a random number on [0. 1] then
2
is
accepted as the new point. Otherwise we accept
1
as the new point
(i.e.,
1
is repeated in the list of points in the Markov chain).
4. We then generate a new random displacement and thereby a new pro-
posed value for
3
. The two steps 2. and 3. are iterated with each new
point taking the place of
1
until ` points have been generated.
5. The average < can now be obtained as -
< =
1
`
.

i=1
(
i
). (414)
In the case of the statistical mechanical application above the proba-
bility density can be written as -
j() = exp(,\ (),
_
dexp(,\ () (415)
109
and the thermal average potential energy is evaluated as -
\
T
=
1
`
.

i=1
\ (
i
). (416)
Note that each
i
in this average is of equal weight. The Metropolis
Monte Carlo method generates a sample of -values such that sampling
power is not wasted on unimportant points in -space.
What do we mean by a random displacement above? - There are many
ways to generate a random displacement. The most commonly used one is to
select a maximal coordinate displacement and then visit each coordinate
sequentially setting
r
i,2
= r
i,1
+ 2( 0.5). (417)
where is a random number on [0. 1] . Note that a random displacement can
mean a change in only one or a few or all of the coordinates according to
this prescription. Usually one only moves one coordinate in going from
i
to

i+1
but as long as all coordinates are visited in an unbiased way it does not
really matter. The value is chosen so that the probabilty of rejection of
the new -value is about a half. This gives a good balance between moving
over lots of territory and sticking to the most relevant subdomain.
A listing of a Fortran program simulating a one-dimensional Lennard-
Jones uid as discussed in Chapter 9 by the Metropolis Monte Carlo (or just
MC) method is included as an appendix. Note that the MC method is very
closely related to the MD method. The dierence lies in the form of the
dynamics used. The MC method uses a diusional motion. Both methods
are enormously ecient by searching out the relevant part of the domain
of integration. They both allow equilibrium averages to be evaluated for
properties of systems with a thousand particles or more where traditional
methods of integration look completely hopeless.
16.3 Exercise:
1. Draw a boxdiagram showing how the one-dimensional Lennard-Jones
uid can be simulated by the Monte Carlo method to produce the
thermal average potential energy. You can use the program in the
appendix as a guide if you wish.
110
16.4 Appendix - The MC1DT.FOR program
A listing of a Fortran 77 program created to simulate a 1D nearest neigh-
bor interacting chain of LJ(12-6) particles in the canonical ensemble follows
below.
001 C This program simulates a 1D L-J(12-6) uid in the canonical
ensemble
002 C Interactions are pairwise between nearest-neighbors only
003 C Meltdown of the initial conguration is included
004 C General initial statements follow
005 C Programis limited to at most 1000 particles by X(1000), EP(1000)
006 PROGRAM MC1DT
007 IMPLICIT REAL*4 (A-C, E-H, O-Z)
008 IMPLICIT REAL*8 (D-D)
009 COMMON/A005/X(1000),EP(1000),VP(1000),TX,ES,VS,RL,SCUT,N,IN,IR
010 OPEN(2,FILE=OUTPUT)
011 C Initialize the random number generator
012 IR=137
013 C Input information interactively
014 C Spacing in uniform grid is SP. Number of active particles is N.
015 C Reduced units (EPS=SIGMA=1) are used
016 C Cut-o imposed on the range of the pair-potential is SCUT.
017 WRITE(*,*) Canonical ensemble. Thermal energy is TKB.
018 WRITE(*,*) Length of active interval is RL=N*SP
019 WRITE(*,*) Enter spacing = SP, particle # = N (<1000),
TKB and potential cut-o = SCUT in reduced units
020 READ(*,*) SP, N, TKB, SCUT
021 WRITE(*,*) *Keep steplength SL less than active length RL =
N*SP
022 WRITE(*,*) Enter steplength SL, number of steps in Markov
chain = NC and seed random number DNR
023 READ(*,*) SL, NC, DNR
024 WRITE(*,*) Enter number of steps in meltdown MM =
025 READ(*,*) MM
026 WRITE(*,*) Computing. Please wait ....
027 C Active length is RL
028 RL=N*SP
029 C Generate initial coordinates
111
030 SX=SP
031 5 CONTINUE
032 DO 10 I=1,N
033 X(I)=I*SX-SX/2
034 10 CONTINUE
035 C Evaluate initial potential energy in double precision = REAL*8
036 NB=INT(SCUT/SP)
037 DU=0.D0
038 DV=0.D0
039 C The removal energy for particle J is EP(J) below
040 C The virial for particle J is VP(J) below
041 DO 30 J=1,N
042 IN=J
043 TX=X(IN)
044 CALL EPART
045 EP(J)=ES
046 VP(J)=VS
047 DU=DU+EP(J)/2
048 DV=DV+VP(J)/2
049 30 CONTINUE
050 C The total potential energy is DU. The total virial is DV. The
MC loop follows. NR is the number of rejections.
051 II=1
052 NCC=NC
053 NC=MM
054 40 CONTINUE
055 IN=0
056 NR=0
057 SEC=0.D0
058 SVC=0.D0
059 NER=0
060 AU=DU
061 AV=DV
062 AV2=DV*DV
063 DO 100 K=1,NC
064 IN=IN+1
065 IF(IN.EQ.N+1) IN=IN-N
112
066 C Calculate the removal energy and virial of particle IN before
move.
067 TX=X(IN)
068 CALL EPART
069 EP(IN)=ES
070 VP(IN)=VS
071 44 CALL RANDOM(DNR,IR)
072 TX=X(IN)+SL*(DNR-0.5E0)
073 IF(TX.LT.0.D.0) TX=TX+RL
074 IF(TX.GT.RL) TX=TX-RL
075 CALL EPART
076 EC=ES-EP(IN)
077 VC=VS-VP(IN)
078 IF(EC.LT.0.D0) GO TO 66
079 CALL RANDOM(DNR,IR)
080 BFR=-EC/TKB
081 IF(DLOG(DNR).LT.BFR) GO TO 66
082 TX=X(IN)
083 ES=EP(IN)
084 NR=NR+1
085 EC=0.E0
086 VC=0.D0
087 C New conguration is accepted
088 66 EP(IN)=ES
089 VP(IN)=VS
090 C The sum of energy changes is SEC. The sum of virial changes
is SVC.
091 SEC=SEC+EC
092 SVC=SVC+VC
093 X(IN)=TX
094 DU=DU+EC
095 DV=DV+VC
096 C The average potential energy is AU. The average virial is AV.
097 AU=AU+SEC/NC
098 AV=AV+SVC/NC
099 C The average squared virial <virial**2 is calculated below.
100 AV2=AV2+DV*DV/NC
101 100 CONTINUE
113
102 II=II+1
103 IF(II.EQ.2) THEN
104 NC=NCC
105 GO TO 40
106 ENDIF
107 WRITE(*,*) Final conguration: particle #, location
108 WRITE(*,130) (L, X(L),L=1,N)
109 130 FORMAT(20X,I10,F16.6)
110 WRITE(*,*) Average potential energy, nal potential energy
111 WRITE(*,135) AU,DU
112 WRITE(*,*) Average virial energy, nal virial energy
113 WRITE(*,135) AV,DV
114 135 FORMAT(10X,D16.6,10X,D16.6)
115 PID=TKB*N/RL
116 PPOT=AV/RL
117 PV=PID+PPOT
118 VARPPOT=SQRT((AV2-AV*AV)/NC)/RL
119 WRITE(*,*) Ideal pressure, potential pressure, total pressure
120 WRITE(*,137) PID, PPOT, PV
121 137 FORMAT(2X,PID,D16.6,2X,PPOT=,D16.6,2X,PV=,D16.6)
122 WRITE(*,138) VARPPOT
123 138 FORMAT(2X,Variance in PPOT is ,D16.6)
124 WRITE(*,*) Variance estimate is based on independent events.
Correlations are neglected.
125 WRITE(2,140) (DU,L,XL(L),L=1,N)
126 140 FORMAT(D16.6,I10,F16.6)
127 WRITE(*,150) NC,NR
128 150 FORMAT(# of confs=,I10,# of rejs=,I10)
129 CLOSE(2)
130 STOP
131 END
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
132 SUBROUTINE RANDOM(DNR,IR)
133 REAL*8 DNR,D1,D2
134 DNR=DABS(DNR)
135 D1=DLOG(DNR*IR)
136 D1=DABS(D1)
137 D1=D1-DINT(D1)
114
138 D2=1.D7*D1
139 DNR=D2-DINT(D2)
140 IR=IR+1
141 RETURN
142 END
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
143 C This subroutine calculates the energy contribution due to a
single particle, i.e., the sum of nearest neighbor bond energies.
144 C It has been extended to also calculate the virial energy of a
single particle.
145 SUBROUTINE EPART
146 COMMON/A005/X(1000),EP(1000),VP(1000),TX,ES,VS,RL,SCUT,N,IN,IR
147 REAL*4 UJ,VJ,DX,R,RM6,R1,R2
148 ES=0.D0
149 VS=0.D0
150 R1=RL
151 R2=RL
152 DO 1 K=1,N
153 C The particle does not interact with itself.
154 IF(K.EQ.IN) GO TO 1
155 C Let the particle interact with the nearest image of X(K).
156 DX=TX-X(K)
157 R=DABS(DX)
158 IF(R.GT.RL/2) THEN
159 R=RL-R
160 IF(DX.GT.0.D0) THEN
161 DX=R-RL
162 ELSE
163 DX=RL-R
164 ENDIF
165 ENDIF
166 R=ABS(DX)
167 C Protect against overow.
168 IF(R.LT.1.E-1) R=1.E-1
169 C Pick out smallest left and right distances R1 and R2 in the
chain.
170 IF(DX.LT.0.E0) THEN
171 IF(R.LT.R1) R1=R
115
172 GO TO 1
173 ENDIF
174 1 CONTINUE
175 C Add energies due to nearest neighbor bonds.
176 RM6=1/R1**6
177 UJ=4*RM6*(RM6-1.D0)
178 VJ=24*RM6*(2*RM6-1.D0)
179 ES=ES+UJ
180 VS=VS+VJ
181 RM6=1/R2**6
182 UJ=4*RM6*(RM6-1.D0)
183 VJ=24*RM6*(2*RM6-1.D0)
184 ES=ES+UJ
185 VS=VS+VJ
186 RETURN
187 END
116

Anda mungkin juga menyukai