You are on page 1of 9

Solving Differential Equations

1
:
Introduction:
In the previous chapters we have come across equations which contain a
derivative operator, these are examples of a large class of equations called
DIFFERENTIAL EQUATIONS. Example:
A
n
(x)
d
n
y
dx
n
+ A
n-1
(x)
d
n-1
y
dx
n-1
+ ..... + A
o
(x)y = g(x) (6.1)
| | |
|________ |______________ |_________ General Coefficients
y y(x) DEPENDENT VARIABLE (may be fns of x or
x INDEPENDENT VARIABLE constants eg. 0)
In (1) only 1st power of y is found i.e. no
dy
2
dx
or

_
dy
dx
2
or y
2
CALLED LINEAR
DIFFERENTIAL EQUATION.
If g(x) = 0 then called HOMOGENEOUS DIFFERENTIAL EQ.
If g(x) 0 then called INHOMOGENOUS DIFFERENTIAL EQ.
IMPORTANT PROPERTY OF LINEAR (!) DIFF. EQS:
Suppose solution of eq. (6.1) gives us 2 possible solutions y
1
(x) and y
2
(x) then a
combination
y(x) = c
1
y
1
(x) + c
2
y
2
(x)
| | (6.2)
|______ |________ constants
is also a solution within a constant: Write (6.1) as
[A
n
(x)
d
n
dx
n
+ A
n-1
(x)
d
n-1
dx
n-1
+ .... + A
o
(x)]y(x) Dy(x) = g(x)
If y
1
(x) solution then
Dy
1
(x) = g(x) (6.3)

1
From Quantum Mechanics and Spectroscopy . Lecture notes by Dr. R. Paul University of Calgary
If y
2
(x) solution then
Dy
2
(x) = g(x) (6.4)
Dy(x) = c
1
Dy
1
(x) + c
2
Dy
2
(x) = (c
1
+ c
2
)g(x)
y(x) is a solution of the differential eq. within a constant (c
1
+ c
2
).
For a homogeneous case y(x) solves the eq. exactly. This result is called PRINCIPLE OF
SUPERPOSITION and may extend to an arbitrary number of functions. Eg if:-
y
1
(x), y
2
(x), y
3
(x), ..... y
N
(x) are all solutions, then
y(x) = c
1
y
1
(x) + c
2
y
2
(x) + c
3
y
3
(x) + ..... c
N
y
N
(x) is also a solution.
Compact notation:
y(x) =
i=1
N
c
i
y
i
(x) (6.5)
In eq. (6.1) VALUE OF n(HIGHEST) ORDER OF DIFFERENTIAL EQ
n = 1, 1st order
n = 2, 2nd order
n = 3, 3rd order
etc etc.
Some Methods of Solving 2nd Order, Linear, Homogeneous Equations:-
This is the most common type found in quantum chemistry. From (6.1)
A
2
(x)
d
2
y
dx
2
+ A
1
(x)
dy
dx
+ A
0
(x)y = 0 (6.6)
Divided by A
2
(x)

d
2
y
dx
2
+
A
1
(x)
A
2
(x)

dy
dx
+
A
0
(x)
A
2
(x)
y = 0 (6.7)
Consider 2 sample cases of this which appear in quantum mech.:-
(1) A
1
(x)/A
2
(x) = constant = p; A
0
(x)/A
2
(x) = constant = q
d
2
y
dx
2
+ p
dy
dx
+ qy = 0 (6.8)
(2) In eq (6.8) p = 0
d
2
y
dx
2
+ qy = 0 (6.8a)
(a) Method of Auxilliary equations:
Let y(x) = e
sx
s = unknown constant (6.9)

d
2
y
dx
2
=
d
2
dx
2
e
sx
= s
2
y (6.10)
d
dx
e
sx
= se
sx
= sy (6.11)
substituting in (6.8) we get
s
2
y + psy + qy = (s
2
+ ps + q)y = 0 (6.12)
In eq (6.12) how can we get 0 in l.h.s.? Two ways:
(1) y = 0 Uninteresting and trivial
(2) s
2
+ ps + q = 0 called AUXILLIARY EQ. It is quadratic here.
Solve to get s
s =
-p t p
2
-4q
2
C
t
(6.13)
2 values of s possible and 2 solutions
y
1
(x) = e
xC+
(6.14)
y
2
(x) = e
xC-
(6.15)
From principle of superposition we can have general solution
y(x) = Ay
1
(x) + By
2
(x) (6.16)
______________ values are fixed by
additional physical requirements
If p = 0 then (This corresponds to solving (6.8a))
s = t
1
2
-4q = ti q for q > 0 (6.17)
y(x) = Ae
i q x
+ Be
- i q x
(6.18)
From a well known algebraic identity
e
ti
= cos t i sin (6.19)
y(x) = A(cos qx + i sin qx) + B(cos qx - i sin qx)
= A cos qx + i A sin qx + B cos qx - i B sin qx
= (A+B) cos qx + (A-B) sin qx
C
1
C
2
= C
1
cos qx + C
2
sin qx (6.20)
_______________________________________________________________
A note on Taylor expansions:
Consider a function f(x) we wish to expand in power series of x
f(x) = a
0
+ a
1
x + a
2
x + ..... (6.21)
if we know a
0
, a
1
, a
2
etc then we know expansion:
f(0) = a
0
df
dx
= f'(x) = a
1
+ 2a
2
x + 3a
3
x
2
+ ....

_
df
dx
x=0
= a
1
f'(0)
f'(0) = a
1

d
2
f
dx
2
= 2a
2
+ 6a
3
x f"(x)

_
d
2
f
dx
2

x=0
= f"(0) = 2a
2
a
2
=
1
2
f"(0) =
1
2!
f"(0)
in general
a
n
=
1
n!
f
(n)
(0) where f
(n)
(0)

_
d
n
f(x)
dx
n

x=0
Putting all together
f(x) = a
0
+ a
1
x + a
2
x + .... + a
n
x + .....
= f(0) + f'(0)x +
1
2!
f"(0)x
2
+ .... +
1
n!
f
(n)
(0)x
n
+ ..... (6.22)
This is called a Taylor expansion
Examples:
(1) f(x) = e
x
df(x)
dx
=
d
dx
e
x
= e
x
f'(x) f'(0) = 1
d
2
f(x)
dx
2
=
d
2
dx
2
e
x
=
d
dx
e
x
= e
x
f'''(x) f'''(0) = 1
:
:
d
n
f(x)
dx
n
= . . . . . . . . . . = e
x
f
(n)
(x) f
(n)
(0) = 1
a
0
= f(0) = 1
a
1
= f'(0) = 1
a
2
=
1
2!
f"(0) =
1
2!
:
:
a
n
=
1
n!
f
(n)
(0) =
1
n!
e
x
= 1 = x =
x
2
2!
+
x
3
3!
+ .... +
x
n
n!
+ .... Important expansion (6.23)
please remember
(2) f(x) = sin x
f(0) = sin 0 = 0
f'(x) = cos x, f'(0) = cos 0 = 1
f"(x) = -sin x, f"(0) = -sin 0 = 0
f'''(0) = -cos x, f'''(0) = -cos 0 = -1
:
:
we get a
0
= 0
a
1
= 1
a
2
= 0
a
3
= -1
1
3!
a
4
= 0
a
5
= 1
1
5!
sin x = x -
1
3!
x
3
+
1
5!
x
5
-
1
7!
x
7
+ ..... (6.24)
NOTE: (a) only odd powers of x present
if x -x every term will change sign
sin -x = -sin x example of an ODD FUNCTION of x
(b) alternating sign of the terms
(3) f(x) = cos x work this out yourself and show that
cos x = 1 -
x
2
2!
+
x
4
4!
-
x
6
6!
+ .... (6.25)
Convince yourself that cos (-x) = cos x example of an EVEN FUNCTION of x
_______________________________________________________________
(b) Method of series solution:
We shall here attempt to solve (6.8a) even though we have already done so,
however the presentation below is meant to illustrate the basic principles and is useful
when the method of auxilliary equations can't be used:
d
2
y
dx
2
= qy (6.8a)
Let

y(x) = c
j
x
j
(6.26)
j=0
where c
j
are unknown coefficients which we must determine if we have solved the eq.
(compare with Taylor expansion):
dy
dx
=

j=0

jc
j
x
j-1
(6.27)
d
2
y
dx
2
=

j=0

j(j-1)c
j
x
j-2
(6.28)
Substitute in (6.8a)


j(j -1)c
j
x
j-2
+ q c
j
x
j
= 0 (6.29)
j=0 j=0
T
1
T
2
In T
1
change index of summation from j to k where
k = j - 2 or j = k+2 (6.30)
when j=0 then k = -2 > lower limit of sum
when j= k = - 2 = > upper limit of sum

T
1
= c
k+2
(k+2)(k+2-1)x
k
k=-2

= c
k+2
(k+2)(k+1)x
k
(6.31)
k=-2
Write out first few terms of this series:
0 0
T
1
= c
0
(-2+2)(-2+1)x
-2
+ c
1
(-1+2)(-1+1)x
-1
+ c
2
(0+2)(0+1)x
0
+ c
3
(1+2)(1+1)x
1
+ ....
the terms corresponding to k=-2 and k=-1 vanish and the first nonzero term
corresponds to k=0 and we might as well write

T
1
= c
k+2
(k+2)(k+1)x
k
(6.32)
k=0
Now note the letter k in this expansion is simply an index taking values of 0, etc. We
could use any other letter e.g. (alpha Gk)

T
1
= c
+2
(+2)(+1)x

(6.33)
=0
we might as well use j

T
1
= c
j+2
(j+2)(j+1)x
j
(6.34)
j=0
such indices are called DUMMY INDICES i.e. no intrinsic significance is to be attached
ot the name (letter) used. Substitute back into (6.29)

c
j+2
(j+2)(j+1)x
j
+ q c
j
x
j
= 0

j=0 j=0

[c
j+2
(j+2)(j+1) + qc
j
]x
j
= 0 (6.35)

j=0
c
j+2
(j+2)(j+1) = -qc
j
c
j+2
=
-q
(j+2)(j+1)
c
j
(6.36)
called a RECURSION RELATION
Consider 2 cases:
(a) we know c
0
then we can generate all even indexed coefficients:
arbitrary
c
2
=
-q
(0+2)(0+1)
c
0
=
-q
2
c
0
= =
-q
2!
c
0

c
4
=
-q
(2+2)(2+1)
c
2
=
-q
2
c
2
=
+q
2
24
c
0
=
q
2
4!
c
0

c
6
=
-q
(4+2)(4+1)
c
4
=
-q
30
c
2
=
-q
3
720
c
0
=
-q
3
6!
c
0
etc.
Try to construct y(x) from (6.26) using this expansion
y(x) = c
0
+ c
2
x
2
+ c
4
x
4
+ c
6
x
6
+ .....
= c
0
-
q
2
c
0
x
2
+
q
2
4!
c
0
x
4
-
q
3
6!
c
0
x
6
+ .....
= c
0

]
1
1
1 -
q
2
x
2
2!
+
q
4
x
4
4!
-
q
6
x
6
6!
+ ....
(6.37)
compare with
expansion (6.25)
= c0
cos qx
(b) We know c
1
then we can generate all odd index coefficients
c
3
=
-q
(1+2)(3+1)
c
1
=
-q
6
c
1
= =
-q
3!
c
1

c
5
=
-q
(3+2)(3+1)
c
3
=
-q
20
c
3
=
+q
2
120
c
1
=
q
2
5!
c
1

c
7
=
-q
(5+2)(5+1)
c
5
=
-q
42
c
5
=
-q
3
5040
c
0
=
-q
3
7!
c
1
etc.
Construct y(x)
y(x) = c
1
x + c
3
x
3
+ c
5
x
5
+ c
7
x
7
+ .....
= c
1
x +
q
3!
c
1
x
3
+
q
2
5!
c
1
x
5
+
q
3
7!
c
1
x
7
+ ..... (6.39)
Let c
1
= q
1/2
c
1
' (c
1
' is arbitrary)
y(x) = c
1
'q
1/2
x -
q
3/2
3!
c
1
'x
3
+
q
5/2
5!
c
1
'x
5
-
q
7/2
7!
c
1
'x
7
+ .....
= c
1
'

]
1
1
qx -
q
3
3!
x
3
+
q
5
5!
x
5
-
q
7
7!
x
7
+ ..... (6.41)
compare with
expansion (6.24)
= c
1
' sin qx (6.42)
Thus taking the sum of both forms (even + odd) we get
y(x) = c
0
cos qx + c
1
' sin qx (6.43)

becomes c
1
of becomes c
2
of
eq (6.20) eq(6.20)
Thus the two methods produce the same result. The series expansion method is useful
when we can't do the auxilliary equation method.

You might also like