You are on page 1of 93

Practical matters Course Outline 1.

First order ODEs Second order ODEs with constant coefcients Partial Differentiation
MATHEMATICS FOR ELECTRICAL
ENGINEERING I
Dr. G.A. Pavliotis
Department of Mathematics Imperial College London
Spring term 2007/08
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Basic facts
This is the continuation of the course on mathematics from
the previous term.
There are two one-hour lectures per week (Mondays 14:00
to 15:00 and Tuesdays 10:00 to 11:00) plus tutorials.
There will be seven problem sheets (no assessed
coursework). They are available from the course website.
The course ofce hours are:
Mondays 16:00 to 17:00.
Tuesdays 11:00 to 12:00.
By appointment.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Support
Course notes will be made available as the course
progresses (covering all lectures).
Solutions will be made available for all problem sheets.
ALL information about the course will be posted on the
course website:
http://www.ma.imperial.ac.uk/~pavl/ee1.html
Please check the course website regularly.
For any questions, comments, suggestions: e-mail
g.pavliotis@ic.ac.uk
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
1
Ordinary differential equations (ODEs).
2
Partial differentiation.
3
Critical points of functions of two variables.
4
Application of partial derivatives to ODEs.
5
Vector algebra and analytic geometry.
6
Matrices and linear algebra.
7
Numerical methods.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Introduction
An ODE of the rst order is a differential equation of the
form
ODE
dy
dx
= F(x, y). (1)
The highest order derivative that appears in the equation is
rst.
F(x, y) is given and we want to nd the function
y = y(x)
that solves this equation.
Quite often we also want to specify initial conditions or
boundary conditions:
dy
dx
= f (x, y), y(x = x
0
) = y
0
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Introduction
In most cases it is not possible to solve the equation
analytically and to obtain a solution in closed form.
We then have to solve the equation numerically on the
computer.
However, there are certain types of rst order ODEs that
we can solve analytically.
The main types of rst order ODEs that we can solve
analytically are separable, homogeneous, linear and exact.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Separable rst order ODEs
A rst order ODE is called separable if the right hand side is of
the form of a product of a function of x and a function of y:
F(x, y) = G(x)H(y)
dy
dx
= G(x)H(y).
We can solve this equation by rearranging terms and
integrating:
dy
dx
= G(x)H(y)
dy
H(y)
= G(x) dx
_
y
dy
H(y)
=
_
x
G(x) dx
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Separable rst order ODEs
Solution of rst order separable ODE
The solution of the rst order separable equation
dy
dx
= G(x)H(y)
is
_
y
dy
H(y)
=
_
x
G(x) dx. (2)
Notice that the solution is dened implicitly. In order to be able
to write the solution in the form
y = y(x)
we have to be able to evaluate the integrals in (2).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Separable rst order ODEs
Example
dy
dx
= yx
dy
y
= x dx

_
y
dy
y
=
_
x
x dx ln
_
y
C
_
=
1
2
x
2
y(x) = C exp
_

1
2
x
2
_
.
Notice that the solution is dened up to an undetermined
constant.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Homogeneous rst order ODEs
A rst order ODE is called homogeneous is the right hand side
depends on x and y through y/x:
F(x, y) = f
_
y
x
_

dy
dx
= f
_
y
x
_
.
We can solve the equation by introducing the new variable
u =
y
x
:
y = ux
dy
dx
= u + x
du
dx
x
du
dx
= f (u) u
x
du
dx
= f (u) u
du
f (u) u
=
dx
x

_
u
du
f (u) u
=
_
x
dx
x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Homogeneous rst order ODEs
Solution of rst order homogeneous ODE
The solution of the homogeneous equation
dy
dx
= f
_
y
x
_
is
_
u
du
f (u) u
= ln x + C, u =
y
x
.
Notice that the solution is dened implicitly, and that it is
determined up to a constant.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Homogeneous rst order ODEs
Example
F(x, y) = 2
y
x
f (u) = 2u f (u) u = u
_
u
du
u
=
_
x
dx
x
ln
_
u
C
_
= ln(x) u = Cx

y
x
= Cx y = Cx
2
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Linear rst order ODEs
A rst order ODE is called linear if the right hand side is a linear
function of y
F(x, y) = Q(x) yP(x)
dy
dx
= Q(x) yP(x).
The function F(x, y) does not have to be linear in x.
We can rewrite a rst order linear ODE in the form
dy
dx
+ yP(x) = Q(x). (3)
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Linear rst order ODEs
Consider rst the case P(x) = 0. Equation (3) becomes
dy
dx
= Q(x).
This is a separable equation which we can easily solve:
y(x) = C +
_
x
Q(x) dx.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Linear rst order ODEs
Consider now the case Q(x) = 0. Equation (3) becomes
dy
dx
= yP(x).
This is also a separable equation:
_
y
dy
y
=
_
x
P(x) dx
y(x) = C exp
_

_
x
P(x) dx
_
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Linear rst order ODEs
When Q(x) = 0, P(x) = 0 we can solve equation (3) by using
an integrating factor:
R(x) = exp
__
x
P(x) dx
_
.
Notice that
d
dx
(yR(x)) =
dy
dx
R(x) + y
dR
dx
=
_
dy
dx
+ yP(x)
_
R(x)
= Q(x)R(x)
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Linear rst order ODEs
Consequently:
y(x)R(x) =
_
x
Q(x)R(x) dx + C
y(x) =
1
R(x)
_
_
x
Q(x)R(x) dx + C
_
= e

_
x
P(x) dx
_
x
Q(x)e
_
x
P(x) dx
dx + Ce

_
x
P(x) dx
The general solution reduces to the solutions that we obtained
before when P(x) = 0 or Q(x) = 0.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Linear rst order ODEs
Solution of linear rst order ODE
The solution of the linear rst order ODE
dy
dx
+ P(x)y = Q(x)
is
y(x) = e

_
x
P(x) dx
_
x
Q(x)e
_
x
P(x) dx
dx + Ce

_
x
P(x) dx
(4)
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Linear rst order ODEs
Example
x
dy
dx
+ (1 x)y = e
2x

dy
dx
+
1 x
x
y =
e
2x
x

R(x) = exp
__
x
1 x
x
dx
_
= exp (ln(x) x) = xe
x
.
y(x) =
e
x
x
_
x
1
x
e
2x
xe
x
dx + C
e
x
x
=
e
x
x
_
x
e
x
dx + C
e
x
x
= C
e
x
x
+
1
x
e
2x
=
Ce
x
+ e
2x
x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Exact rst order ODEs
Another class of rst order ODEs that we can solve analytically
are the exact ODEs. In order to study them we rst need to
develop the theory of partial differentiation.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
There are many rst order ODEs that do not fall into any of the
four categories that we have studies so far and yet can be
solved analytically. Let us study a few examples.
Consider the ODE
dy
dx
=
a
1
x + b
1
y + c
1
a
2
x + b
2
y + c
2
(5)
where a
1
, a
2
, b
1
, b
2
, c
1
, c
2
R are constants.
This equation does not belong to any of the categories that we
have studied so far for arbitrary values of the parameters
a
1
, a
2
, b
1
, b
2
, c
1
, c
2
. It is homogeneous when c
1
= c
2
:
dy
dx
=
a
1
x + b
1
y
a
2
x + b
2
y
=
a
1
+ b
1
y
x
a
2
+ b
2
y
x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
We set u = y/x:
_
du
a
1
+b
1
u
a
2
+b
2
u
u
=
_
du
a
1
+b
1
ua
2
ub
2
u
2
a
2
+b
2
u
=
_
(a
2
+ b
2
u)du
a
1
+ (b
1
a
2
)u b
2
u
2
= a
2
_
du
a
1
+ (b
1
a
2
)u b
2
u
2
+b
2
_
u du
a
1
+ (b
1
a
2
)u b
2
u
2
.
These two integrals can be calculated, for specic values of
a
1
, a
2
, b
1
, b
2
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
Consider now the case c
1
, c
2
= 0. We can solve equation (5)
by making a change of variables that reduces the equation to
the homogeneous case. Consider the system of linear
equations
a
1
a + b
1
b + c
1
= 0, (6a)
a
2
a + b
2
b + c
2
= 0. (6b)
Assume that b
2
a
1
a
2
b
1
= 0, the solution of this system of
equations is
a =
b
1
c
2
b
2
c
1
b
2
a
1
a
2
b
1
, b =
a
2
c
1
c
2
a
1
b
2
a
1
a
2
b
1
.
We introduce the new variables X, Y through the
transformation
X = x a, Y = y b.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
Notice that
dy
dx
=
dY
dX
.
Furthermore,
a
1
x + b
1
y + c
1
= a
1
(X + a) + b
1
(Y +b) + c
1
= a
1
X +b
1
Y + (a
1
a + b
1
b + c
1
)
= a
1
X +b
1
Y.
Similarly:
a
2
x + b
2
y + c
2
= a
2
X + b
2
Y.
Consequently
dY
dX
=
a
1
X +b
1
Y
a
2
X +b
2
Y
,
which is homogeneous.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
Example
Consider the ODE
dy
dx
=
x + y 3
x y +1
.
This equation is of the form (5) with
a
1
= 1, b
1
= 1, c
1
= 3, a
2
= 1, b
2
= 1, c
2
= 1. The system
of equations (6) becomes
a + b 3 = 0,
a b + 1 = 0.
The solution is
a =
1 1 (1) (3)
(1) 1 1 1
=
2
2
= 1,
b =
1 (3) 1 1
(1) 1 1 1
=
4
2
= 2.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
Example
Contd. We introduce the new variables X = x 1, Y = y 2.
The ODE now becomes
dY
dX
=
X + Y
X Y
=
1 + Y/X
1 Y/X
.
This is a homogeneous equation. We set u = Y/X. We
solution is dened implicitly through the formula
_
u
du
1+u
1u
u
= ln X + C.
We need to calculate the integral on the left hand side of this
equation.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
Example
Contd.
_
u
du
1+u
1u
u
=
_
u
du
1+u
2
1u
=
_
u
(1 u)du
1 + u
2
=
_
u
du
1 + u
2

_
u
u du
1 + u
2
= tan
1
(u)
1
2
ln(1 + u
2
).
Hence, the solution of the ODE is (u = Y/X = (y 2)/(x 1))
tan
1
(u)
1
2
ln(1 + u
2
) = ln X + C
tan
1
_
y 2
x 1
_

1
2
ln
_
1 +
_
y 2
x 1
_
2
_
= ln(x 1) + C.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
When b
2
a
1
a
2
b
1
= 0 the change of variables trick does not
work (the system of equations (6) does not have a solution). In
this case we have
a
1
x + b
1
y =
b
1
b
2
a
2
x + b
1
y =
b
1
b
2
(a
2
x + b
2
y).
Equation (5) becomes
dy
dx
=
(a
2
x + b
2
y) + c
1
a
2
x + b
2
y + c
2
, =
b
1
b
2
.
There are two cases to consider. If c
1
= c
2
, then the equation
becomes
dy
dx
= y = x + C. If c
1
= c
2
, then we
introduce the new variable w = a
2
x + b
2
y. The equation
becomes
dw
dx
=
(b
1
+ a
2
)w + (c
1
b
2
+ a
2
c
2
)
w + c
2
.
This is a separable equation for w(x) (EXERCISE: obtain this
equation and then solve it).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
Consider now the ODE
dy
dx
+F(x)y = H(x)y
n
. (7)
When n = 0 or n = 1 this equation is linear. When n = 0, 1, we
set
v = y
1n

dv
dx
= (1 n)y
n
dy
dx

dy
dx
=
y
n
1 n
dv
dx
.
Equation (7) becomes
y
n
1 n
dv
dx
+ F(x)y = H(x)y
n

1
1 n
dv
dx
+ F(x)y
1n
= H(x)

dv
dx
+ (1 n)F(x)v = (1 n)H(x).
This equation is linear and we can solve it using Equation (4).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
The solution of equation
dv
dx
+ (1 n)F(x)v = (1 n)H(x).
is
v(x) = (1 n)e
(1n)
_
F(x) dx
_
H(x)e
(1n)
_
F(x) dx
+Ce
(1n)
_
F(x) dx
.
The solution of equation (7) is obtained by using the formula
y = v
1/(1n)
.
Exercise
Solve the equation
dy
dx
+
y
x
= xy
4
. (8)
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
Solution:
Equation (8) is of the form (7) with
F(x) = 1/x, H(x) = x, n = 4. We set v = y
3
. Equation (8)
becomes
dv
dx
3
v
x
= 3x.
The integrating factor is R(x) = e
_
(3/x) dx
= e
3lnx
= x
3
.
The solution of the equation is
v(x) = x
3
_
(3x)x
3
dx + Cx
3
= 3x
3
_
x
2
dx + Cx
3
= 3x
2
+ Cx
3
= x
2
(3 + Cx).
The solution of (8) is
y(x) = v(x)
1/3
= x
2/3
(3 + Cx)
1/3
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
Another trick that sometimes work is to change the role of
dependent and independent variables.
Example
Consider the equation
dy
dx
=
1
x + e
y
.
We can write it as an ODE for x = x(y):
dy
dx
=
1
dx
dy
=
1
x + e
y

dx
dy
= x +e
y
.
This is a linear ODE and we can solve it using Equation (4).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Examples of solvable ODEs
The solution of equation
dx
dy
= x + e
y
is
x(y) = e
_
1 dy
_
e
y
e

_
1 dy
dy +Ce
_
1 dy
= e
y
y + Ce
y
= e
y
(C +y).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Introduction
We will study second order ODEs of the form
d
2
y
dx
2
+ a
1
dy
dx
+ a
2
y = f (x). (9)
The constants a
1
, a
2
and the function f (x) are given. Our goal
is to nd the solution y = y(x). We will also use the notation
y

=
dy
dx
, y

=
d
2
y
dx
2
etc. Equation (9) can also be written as
y

+ a
1
y

+ a
2
= f (x).
Equation (9) is often augmented with initial or boundary
conditions:
y

+ a
1
y

+ a
2
y = f (x), y(0) = y
0
, y

(0) = z
0
.
or
y

+ a
1
y

+ a
2
y = f (x), y(0) = A, y(1) = B.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Introduction
When f (x) = 0 equation (9) is called homogeneous (not to be
confuses with rst order homogeneous equations). The
homogeneous second order equation was the rst ODE of a
general type to be completely solved. This was done by Euler
in 1743.
A very important property equation (9) is that it is linear. Let us
study this property for the homogeneous equation.
Proposition
Let y
1
(x) and y
2
(x) be two solutions of the homogeneous
second order ODE with constant coefcients
y

+ a
1
y

+ a
2
y = 0. (10)
Then every linear combination of y
1
and y
2
is also a solution
of (10).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Introduction
Proof Dene the differential operator
L =
d
2
dx
2
+ a
1
d
dx
+ a
2
.
Equation (10) can be written as Ly = 0. Let
y = Ay
1
+ By
2
,
where A, B are arbitrary constants. We calculate
L(Ay
1
+ By
2
) =
_
d
2
dx
2
+ a
1
d
dx
+ a
2
_
(Ay
1
+ By
2
)
= A
d
2
y
1
dx
2
+ B
d
2
y
2
dx
2
+ Aa
1
dy
1
dx
+ Ba
1
dy
2
dx
+Aa
2
y
1
+ Ba
2
y
2
= ALy
1
+ BLy
2
= A 0 +B 0 = 0.
The same result holds true even when a
1
, a
2
are functions of x.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Solution of the homogeneous equation
We look for a solution of (10) in the form
y = e
px
, (11)
where the exponent p is to be calculated. We have that
y

= pe
px
, y

= p
2
e
px
.
We substitute (11) into (10) to obtain
(p
2
+ a
1
p + a
2
)e
px
= 0
p
2
+ a
1
p + a
2
= 0. (12)
This is called the auxiliary equation. In general it has two
solutions p
1
, p
2
. By Proposition 1, the general solution of the
homogeneous equation (10) is
y(x) = Ae
p
1
x
+ Be
p
2
x
.
The constants A, B are determined from the initial conditions.
The number of independent constants is equal to the order of
the ODE.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Solution of the homogeneous equation
Example
Consider the ODE
y

3y

+ 2y = 0.
The auxiliary equation is
p
2
3p + 2 = 0 p = 1, 2.
The general solution of the ODE is
y(x) = Ae
x
+ Be
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Solution of the homogeneous equation
Example
Consider the ODE
y

+ 5y

+ 6y = 0.
The auxiliary equation is
p
2
+ 5p + 6 = 0 p = 3, 2.
The general solution of the ODE is
y(x) = Ae
3x
+ Be
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Solution of the homogeneous equation
Double root
What happens when the auxiliary equation has a double root,
p
1
= p
2
= p? The function y
1
(x) = e
px
is still a solution. We
need to nd another solution. This solution is
y
2
(x) = xe
px
.
To prove this, note that in the case where there is only one root
of the auxiliary equation we have that 2p +a
1
= 0. We calculate
y

2
(x) = e
px
(1 + px), y

2
(x) = e
px
(2p + p
2
x).
Now we have
Ly
2
= e
px
_
2p + a
1
+ (p
2
+ a
1
p + a
2
)x
_
= 0.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Solution of the homogeneous equation
Hence, in the case where there the auxiliary equation (12) has
a double root p, the solution of the homogeneous equation (10)
is
y(x) = Ae
px
+ Bxe
px
.
Example
Consider the equation
y

2y

+ 1 = 0.
The auxiliary equation is
p
2
2p +1 = 0 p = 1.
The solution of the ODE is
y(x) = Ae
x
+ Bxe
x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Solution of the homogeneous equation
Exercise
Find the general solution of the equation
y

+ 4y

+ 4y = 0
Find the solution of this ODE which satises the initial
conditions
y(0) = 1, y

(0) = 2;
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Solution of the homogeneous equation
Solution The auxiliary equation is
p
2
+ 4p + 4 = 0 (p + 2)
2
= 0 p = 2.
The general solution is
y(x) = e
2x
(A + Bx).
The initial conditions give:
y(0) = A = 1, y

(0) = 2A + B = 2 A = 1, B = 4.
The solution of the ODE subject to the boundary conditions is
y(x) = e
2x
(1 + 4x).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
Solution of the homogeneous equation
Complex roots
The two roots of the auxiliary equation can be complex:
p
1,2
=
a
1

_
a
2
1
4a
2
2
.
The roots will be complex when a
2
1
4a
2
< 0. In this case we
can write p
1,2
= i , where = a
1
/2 and
=
_
4a
2
a
2
1
/2. Notice that the two roots are complex
conjugates, p
1
= p
2
. In this case the solution of (10) becomes
y = Ae
+i
+ Be
i
= e
x
_
A
_
cos(x) + i sin(x)
_
+ B cos(x) i sin(x)
_
_
= e
x
_
(A +B) cos(x) + i (A B) sin(x)
_
= e
x
_
C
1
cos(x) + C
2
sin(x)
_
, C
1
= A + B, C
2
= i (A B).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The damped harmonic oscillator
Example
The equation describing the damped harmonic oscillator is
d
2
x
dt
2
+ 2
dx
dt
+
2
x = 0. (13)
t denotes time, x(t ) the position of the oscillator, the
frequency and the damping coefcient. The auxiliary
equation is
p
2
+ 2p +
2
= 0.
The two roots of this equation are
p
1,2
=
2

4
2
4
2
2
=
_

2
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The damped harmonic oscillator
Example
Contd. There a various cases to consider.
= 0 (no damping). In this case p
1,2
= i and the
solution of (13) is
x(t ) = Ae
i t
+ Be
i t
= C
1
cos(t ) + C
2
sin(t ).
< (light damping). In this case
p
1,2
= i ,
2
=
2

2
and the solution of (13) is
x(t ) = Ae
t+i t
+ Be
t+i t
= e
t
(C
1
cos(t ) + C
2
sin(t )) .
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The damped harmonic oscillator
Example
Contd.
> (heavy damping). In this case
p
1,2
=

2
< 0 and the solution of (13) is
x(t ) = Ae
|p
1
|t
+ Be
|p
2
|t
.
k = (critical damping). There is only one root of the
auxiliary equation, p = . The solution of (13) is
x(t ) = (A + Bt ) e
t
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The damped harmonic oscillator
Exercise
Solve equation
d
2
x
dt
2
+ 2
dx
dt
+
2
x = 0.
with initial conditions
x(0) = 1,
dx
dt
(0) = 0.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The damped harmonic oscillator
Solution
When = 0 we have that
x(t ) = C
1
cos(t ) + C
2
sin(t ).
We have that
x(0) = C
1
= 1,
dx
dt
(0) = C
2
= 0
x(t ) = cos(t ).
When < the solution is
x(t ) = e
t
(C
1
cos(t ) + C
2
sin(t )) .
Hence x(0) = C
1
= 1,
dx
dt
(0) = C
1
+C
2
= 0 C
1
=
1, C
2
= / and the solution is
x(t ) = e
t
_
cos(t ) +

sin(t )
_
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The damped harmonic oscillator
Solution
When > we have that
x(t ) = Ae
|p
1
|t
+ Be
|p
2
|t
.
We have that
x(0) = A + B = 1,
dx
dt
(0) = |p
1
|A +|p
2
|B = 0
A =
|p
2
|
|p
1
| |p
2
|
, B =
|p
1
|
|p
1
| |p
2
|

x(t ) =
|p
2
|
|p
1
| |p
2
|
e
|p
1
|t
+
|p
1
|
|p
1
| |p
2
|
e
|p
2
|t
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The damped harmonic oscillator
When = the solution is
x(t ) = (A + Bt ) e
t
.
Consequently
x(0) = A = 1,
dx
dt
(0) = B A = 0
A = 1, B = .
The solution of the initial value problem is
x(t ) = e
t
(1 +t ) .
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The damped harmonic oscillator
0 5 10 15 20
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Now we consider the inhomogeneous second order linear ODE
y

+ a
1
y

+ a
2
y = f (x), (14)
which we can also write in the form
Ly = f (x),
where L =
d
2
dx
2
+ a
1
d
dx
+ a
2
.
Example
Consider the forced damped harmonic oscillator

x + 2

x +
2
0
x = Acos(
1
t ). (15)
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
What is the structure of the solution of an equation of the
form (14)? This is the content of the following proposition.
Proposition
Let y(x) be the solution of (14) and let y
1
(x), y
2
(x) be the two
solutions of the homogeneous equation. Then the solution y(x)
has the form
y(x) = y
PI
(x) +
_
Ay
1
(x) + By
2
(x)

, (16)
where y
PI
(x) is a solution of (14). The function y
PI
(x) is called
the particular integral and the general solution of the
homogeneous equation is called the complementary function.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Proof Let z
1
(x) and z
2
(x) be two solutions of the
inhomogeneous equation (14). Proposition 2 is equivalent to
the statement that any two solutions of equation (16) differ by
the complimentary function. Let
z
1
(x) z
2
(x) = z(x).
By linearity of the differential operator L we have that
Lz = L(z
1
z
2
) = f f = 0.
Consequently, y is the general solution of the homogeneous
equation:
z(x) = y
CF
(x) = Ay
1
(x) + By
2
(x)
and the solution of the inhomogeneous equation has the form
y(x) = y
PI
(x) + y
CF
(x).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
The method of undetermined coefcients
To obtain the general solution of the inhomogeneous equation
we need to calculate the solution of the homogeneous equation
(through the auxiliary polynomial) and to obtain a particular
solution of the inhomogeneous equation. The form of the
particular solution depends on the right hand side f (x). A
general method for calculating y
PI
(x) is the method of
undetermined coefcients.
Example
Find the solution of the equation
y

3y

+ 2y = x.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Solution
The auxiliary polynomial is
p
2
3p + 2 = 0 p
1,2
= 1, 2.
The solution of the homogeneous equation is
y
CF
(x) = Ae
x
+Be
2x
.
We look for a particular integral of the equation in the form of a
second degree polynomial in x:
y
PI
(x) = a + bx + cx
2
.
We substitute this into the equation and evaluate the
coefcients a, b and c:
y

PI
= b + 2cx, y

PI
= 2c.
Consequently:
2c 3(b + 2cx) + 2(a + bx + cx
2
) = x
2cx
2
+ x(6c +2b) + (2c 3b + 2a) = x.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
This equation holds for all x. Consequently, we obtain the
following system of equations for the coefcients a, b, c:
c = 0,
6c + 2b = 1,
2c 3b + 2a = 0.
The solution of this system of equations is c = 0, b =
1
2
, a =
3
4
.
The particular integral is
y
PI
(x) =
3
4
+
1
2
x
and the solution of the ODE is
y(x) =
3
4
+
1
2
x + Ae
x
+ Be
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Exercise
Find the solution of the initial value problem
y

3y

+2y = x, y(0) = 0, y

(0) = 0.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Solution The solution of the ODE is
y(x) =
3
4
+
1
2
x + Ae
x
+ Be
2x
.
Consequently:
y(0) =
3
4
+ A + B, y

(0) =
1
2
+ A + 2B.
We impose the I.C. to obtain the linear system of equations for
A, B:
A + B =
3
4
,
A + 2B =
1
2
.
The solution of this system is A = 1, B =
1
4
. The solution of
the initial value problem is
y(x) =
3
4
+
1
2
x e
x
+
1
4
e
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
The method of undetermined coefcients
If the right hand side of the ODE is a polynomial in x, then
y
PI
(x) = Polynomial with suitable coefcients
If right hand side is
f (x) =
N

n=0

n
x
n
,
then we look for a particular integral of the form
y
PI
(x) =
N+1

n=0

n
x
n
.
Substituting this into the ODE, we obtain a linear system of
equations for the coefcients
n
, n = 0, . . . N. We solve this
system to determine the coefcients of the PI.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
The method of undetermined coefcients
Consider the case where the RHS is an exponential function of
x:
f (x) = Ce
bx
.
If b is not a root of the characteristic polynomial then the PI has
the same form:
y
PI
(x) = De
bx
.
We substitute this into the ODE and calculate the coefcient D.
Example
Find the solution of the equation
y

+ 5y

+ 6y = e
8x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Solution The auxiliary polynomial is
p
2
+ 5p + 6 = 0 p
1,2
= 3, 2.
The CF is
y
CF
(x) = Ae
3x
+ Be
2x
.
We look for a PI of the form
y
PI
(x) = De
8x
.
We substitute this into the equation:
y

= 8De
8x
, y

= 64De
8x

_
64 + 5 8 + 6
_
De
8x
= e
8x

D =
1
110
.
The solution of the ODE is
y(x) =
1
110
e
8x
+ Ae
3x
+ Be
2x
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
What happens when b is a root of the auxiliary polynomial? In
this case we have that
L(De
bx
) = 0
and this function is a part of the CF and not a PI of the
inhomogeneous equation. When b is a root of the auxiliary
equation the PI has the form
y
PI
(x) = Dxe
bx
.
Example
Find the solution of the equation
y

+ 3y

+ 2y = e
x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Solution The auxiliary polynomial is
p
2
+ 3p + 2 = 0, p
1,2
= 2, 1.
The CF is
y
CF
(x) = Ae
2x
+ Be
x
.
The RHS of the equation is part of the CF. We look for a PI of
the form
y
PI
(x) = Cxe
x
.
We have:
y

PI
= C(1 x)e
x
, y

PI
= C(2 + x)e
x
.
Consequently:
Ly
PI
= C(2 + x)e
x
+ 3C(1 x)e
x
+ 2Cxe
x
= Ce
x
= e
x
C = 1.
The solution of the equation is
y(x) = xe
x
+ Ae
2x
+ Be
x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Example
Find the solution of the equation
y

+ 4y

+ 4y = e
2x
.
Solution The auxiliary polynomial is
p
2
+ 4p + 4 = 0 p
1,2
= 2.
Both e
2x
and xe
2x
are solutions of the homogeneous
equation. We look for a PI of the form
y
PI
(x) = Cx
2
e
2x
.
We have
y

PI
= 2Cxe
2x
2Cx
2
e
2x
,
y

PI
= 2Ce
2x
8Cxe
2x
+ 4Cx
2
e
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Consequently
Ly
PI
(x) = 2Ce
2x
8Cxe
2x
+ 4Cx
2
e
2x
+4
_
2Cxe
2x
2Cx
2
e
2x
_
4Cx
2
e
2x
= 2Ce
2x
+ (8C + 8C)xe
2x
+ (4C 8C + 4C)x
2
e
2x
= 2Ce
2x
= e
2x

C =
1
2
.
The solution of the ODE is
y(x) = Ae
2x
+ Bxe
2x
+
1
2
x
2
e
2x
=
_
A + Bx +
1
2
x
2
_
e
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
When the right hand side is of the form f (x) = e
bx
then the PI is
of the form
y
PI
(x) =
_
A +Bx + Cx
2
_
e
bx
.
If b is not a root of the auxiliary equation then B = C = 0. If the
auxiliary equation has two roots and b is one of them then
A = C = 0 and when it has a double root which is equal to b
then A = B = 0. Similarly, if the RHS is of the form
f (x) = P(x)e
bx
where P(x) is a polynomial, then the PI has the
form
y
PI
(x) = C(x)e
bx
,
where C(x) is a polynomial whose coefcients are determined
by the method of undetermined coefcients.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
What is the PI in the case where the RHS is a trigonometric
(sin(x), cos(x)) or a hyperbolic (sinh(x), cosh(x)) function? We
can reduce this to the case where f (x) = Ce
bx
by using the
formulas
cos(x) =
e
ix
+e
ix
2
, sin(x) =
e
ix
e
ix
2i
.
Alternatively, we can look for a PI of the form
y
PI
(x) = a cos(x) +b sin(x).
Example
Find the solution of the equation
y

+ 3y

+ 2y = 2 cos(x).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Solution The CF is
y
CF
(x) = Ae
x
+Be
2x
.
We look for a PI in the form
y
PI
(x) = a cos(x) +b sin(x).
We have that
y

PI
= a sin(x) + b cos(x), y

PI
= acos(x) b sin(x).
We substitute y
PI
into the equation to obtain
(3b + a) cos(x) + (3a + b) sin(x) = 2 cos(x)
3b + a = 2, b 3a = 0, a =
1
5
, b =
3
5
.
The PI is
y
PI
(x) =
1
5
cos(x) +
3
5
sin(x) + Ae
x
+ Be
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Example
Find the solution of the equation
y

+ 3y

+ 2y = e
x
cos(x).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Solution
We look for a particular integral of the form
y
PI
(x) = ae
x
cos(x) + be
x
sin(x).
We have:
y

PI
(x) = e
x
_
(a + b) cos(x) + (b a) sin(x)
_
y

PI
(x) = 2e
x
_
b cos(x) a sin(x)
_
.
We substitute y
PI
(x) into the equation to obtain
Ly
PI
= e
x
_
5(a + b) cos(x) + 5(a + b) sin(x)
_
= e
x
cos(x)
5(a + b) = 1, 5(a b) = 0 a = b =
1
10
.
The solution of the ODE is
y(x) =
1
10
e
x
(cos(x) + sin(x))Ae
x
+ Be
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Consider the case where the RHS consists of more than one
terms:
y

+ a
1
y

+ a
2
y = f
1
(x) + f
2
(x).
Then the PI can be written in the form
y
PI
(x) = y
PI
1
(x) + y
PI
2
(x),
where y
PI
i
(x), i = 1, 2 is a PI of the equation
y

+ a
1
y

+ a
2
y = f
i
(x), i = 1, 2.
This follows from the linearity of the differential operator L:
L
_
y
PI
1
+ y
PI
2
_
= Ly
PI
1
+Ly
PI
2
= f
1
+ f
2
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Example
Find the solution of the equation
y

+ 3y

+ 2y = 3 cosh(2x). (17)
The CF is
y(x) = Ae
x
+ Be
2x
.
The RHS of the equation can be written as
f (x) =
3
2
e
2x
+
3
2
e
2x
.
The equation becomes
y

+ 3y

+ 2y =
3
2
e
2x
+
3
2
e
2x
.
We will study the two terms on the RHS of the equation
separately. Consider rst the term f
1
(x) =
3
2
e
2x
. This is not a
part of the CF.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Consequently, the rst part of the PI is of the form
y
PI
1
(x) = Ce
2x
We substitute this into the equation Ly = f
1
to obtain:
12Ce
2x
=
3
2
C =
1
8
and
y
PI
1
(x) =
1
8
e
2x
.
Consider now the function f
2
(x) =
3
2
e
2x
. This function is a part
of the CF. The PI has the form
y
PI
2
(x) = Dxe
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
We have
y

PI
2
= D(1 2x)e
2x
, y

PI
2
= 4D(x 1)e
2x
.
We substitute these into the equation Ly = f
2
to obtain
De
2x
=
3
2
e
2x
D =
3
2
and
y
PI
2
(x) =
3
2
xe
2x
.
The solution of the ODE (17) is
y(x) =
1
8
e
2x

3
2
xe
2x
+ Ae
x
+ Be
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Example
Find the solution of the equation
y

+ y

6y = sin(x) + xe
2x
subject to the initial conditions y(0) = 0, y

(0) = 0.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Solution
The auxiliary equation is
p
2
+ p 6 = 0 p
1,2
= 3, 2.
The CF is
y(x) = Ae
3x
+Be
2x
.
The PI is of the form
y
PI
(x) = y
PI
1
(x) + y
PI
2
(x)
where y
PI
1
(x) is the PI for f
1
(x) = sin(x) and y
PI
2
(x) is the PI for
f
2
(x) = xe
2x
.
f
1
(x) is not in the CF and consequently
y
PI
1
(x) = C sin(x) + Dcos(x).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
We substitute this into the equation Ly = f
1
to obtain
(7C D) sin(x) + (C 7D) cos(x) = sin(x),
which leads to the system of equations
7C D = 1, C 7D = 0, C =
7
50
, D =
1
50
and
y
PI
1
(x) =
7
50
sin(x)
1
50
cos(x).
Consider now y
PI
2
(x). It has the form
y
PI
2
(x) = (ax + bx
2
)e
2x
.
(Notice that e
2x
is in the CF of the equation).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
We substitute this into the equation Ly = f
2
to obtain
10bxe
2x
+ (2b + 5a)e
2x
= xe
2x
,
which leads to the system of equations
10b = 1, 2b + 5a = 0 b =
1
10
, a =
1
25
and
y
PI
2
(x) =
_

1
25
x +
1
10
x
2
_
e
2x
.
The solution of the ODE is
y(x) =
7
50
sin(x)
1
50
cos(x)+
_

1
25
x+
1
10
x
2
_
e
2x
+Ae
3x
+Be
2x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
We evaluate the solution and its derivative at x = 0:
y(0) =
1
50
+ A + B = 0, y

(0) =
7
50

1
25
3A + 2B = 0,
which leads to the system of equations
A + B =
1
50
, 3A + 2B =
9
50
.
The solution is A =
7
250
, B =
12
250
. Consequently, the solution
of the IVP is
y(x) =
7
250
e
3x
+
12
250
e
2x

1
50
_
cos(x) + 7 sin(x)
_
+
1
50
e
2x
(5x
2
2x).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
The forced Harmonic Oscillator
Example
Find the solution of the ODE

x +
2
0
x = F cos(
1
t ).
Solution
The Cf is
x
CF
(t ) = Acos(
0
t ) + B sin(
0
t ).
First we consider the case
1
=
0
. In this case the RHS is not
a part of the complementary function and the particular integral
is
x
PI
(t ) =
F

2
0

2
1
cos(
1
t ).
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
The Inhomogeneous Equation
Consider the case where
0
=
1
= . In this case the RHS is
part of the CF. We look for a particular integral in the form
x
PI
(t ) = Ct cos(t ) + Dt sin(t ).
We substitute this into the ODE to obtain
x
PI
(t ) =
t

sin(t ).
Consequently, when we force the harmonic oscillator with its
characteristic frequency, the oscillations grow in time.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
ODEs with non-constant coefcients
Consider now second order linear odes with non-constant
coefcients.
ODE with non-constant coefcients
a
0
(x)
d
2
y
dx
2
+ a
1
(x)
dy
dx
+ a
2
(x)y = f (x), (18)
where a
0
(x), a
1
(x), a
2
(x), f (x) are given functions of x.
Equation (18) can be written in the form
Ly = f ,
where
L = a
0
(x)
d
2
dx
2
+ a
1
(x)
d
dx
+ a
2
(x)
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
ODEs with non-constant coefcients
Examples
1
The Schrdinger equation in 1 dimension is a second
order ODE with non-constant coefcients:

d
2
u
dx
2
+ V(x)u = Eu.
2
Many special functions are dened as solutions of second
order ODEs with non-constant coefcients. The Bessel
function of order n is dened as the solution of the equation
x
2
d
2
y
dx
2
+ x
dy
dx
+ (x
2
n
2
)y = 0.
Bessels functions are used in the study of electromagnetic
wave propagation.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
ODEs with non-constant coefcients
Equation (18) is linear (the operator L is a linear differential
operator). We can easily prove that the solution of the
inhomogeneous equation (18) can be written as the sum of the
solution of the homogeneous equation and a particular integral
of the inhomogeneous equation:
y(x) = y
CF
(x) + y
PI
(x), Ly
CF
= 0, Ly
PI
= f .
In contrast to the case of constant coefcients, there is not a
general method for obtaining the solution of the homogeneous
equation and in general it is not possible to obtain a formula for
y
CF
(x).
One of the few ODEs with non-constant coefcients that we can
solve in closed form is Eulers equation
x
2
d
2
y
dx
2
+ a
1
x
dy
dx
+ a
2
y = 0. (19)
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
ODEs with non-constant coefcients
We can solve Eulers equation by transforming to an ODE with
constant coefcients through an appropriate change of
variables. We set x = e
t
. We have that
dy
dx
=
dy
dt
dt
dx
=

y
1

x
=

y
1
e
t
=

y
1
x
,
d
2
y
dx
2
=
d
dx
_
1
x

y
_
=

y
dt
dx
1
x
+

y
_

1
x
2
_
=

y
x
2

y
x
2
.
Consequently x
2
y

=

y

y, xy

=

y. Equation (19) becomes

y + (a
1
1)

y + a
2
y = f .
This is an equation with constant coefcients which we know
how to solve. Then we need to transform back to the original
variable x.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
ODEs with non-constant coefcients
Example
Find the solution of the equation
x
2
y

+ 3xy

+ y = x
3
.
This equation is of the Euler form with a
1
= 3, a
2
= 1. By
setting x = e
t
we obtain the equation

y + 2

y + y = e
3t
.
The solution of the homogeneous equation is
y
CF
(t ) = Ae
t
+ Bte
t
. The particular integral of this equation
is y
PI
(t ) =
1
16
e
3t
. The solution is
y(t ) = Ae
t
+ Bte
t
+
1
16
e
3t
.
In terms of the original variable x the solution is
y(x) =
A
x
+ B
ln(|x|)
x
+
1
16
x
3
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
ODEs with non-constant coefcients
The transformation x = e
t
also applies to higher order
differential equations. Consider the equation
x
3
d
3
y
dx
3
+a
1
x
2
d
2
y
dx
2
+ a
2
x
dy
dx
+ a
3
y = f (x).
We have
dy
dx
= x
1

y,
d
2
y
dx
2
= x
2
_

y

y
_
,
d
3
y
dx
3
= x
3
_
d
3
y
dt
3
3

y + 2

y
_
.
The Euler equation becomes
d
3
y
dt
3
+ (a
1
3)

y + (a
2
a
1
+ 2)

y + a
3
y = f (e
t
),
which is a third order linear ODE with constant coefcients.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
ODEs with non-constant coefcients
In order to solve a third order linear differential equation
y

+ a
1
y

+ a
2
y

+ a
3
y = 0, (20)
we look for a solution of the form
y(x) = e
px
.
This leads to the auxiliary equation
p
3
+ a
1
p
2
+ a
2
p +a
3
= 0,
which, in general, has 3 roots p
1
, p
2
, p
3
. The solution of
equation (20) is
y(x) = Ae
p
1
x
+ Be
p
2
x
+ Ce
p
3
x
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
ODEs with non-constant coefcients
Example
Find the solution of
d
3
y
dx
3
y = 0. (21)
The auxiliary equation is
p
3
1 = 0.
This equation can be rewritten as
(p 1)(p
2
+ p + 1) = 0.
The three roots of this equation are
p
1
= 1, p
2
=
1
2
+ i

3
2
, p
3
=
1
2
i

3
2
.
The solution of equation (21) is
y(x) = Ae
x
+ Be

1
2
+i

3
2
+Ce

1
2
i

3
2
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
ODEs with non-constant coefcients
Chebyshev Polynomials
Consider the equation
(1 x
2
)y

xy

+ m
2
y = 0.
The solution is y(x) = cos(mcos
1
(x)). To check this, we
calculate:
y

= sin(mcos
1
(x))m
d
dx
cos
1
(x) = sin(mcos
1
(x))
m

1 x
2
,
y

= mcos(mcos
1
(x))
1

1 x
2
m
d
dx
cos
1
(x) +
+msin(mcos
1
(x))
d
dx
_
1

1 x
2
_
= m
2
cos(mcos
1
(x))
1
1 x
2
msin(mcos
1
(x))x
1
(1 x
2
)
3/2
.
Practical matters Course Outline 1. First order ODEs Second order ODEs with constant coefcients Partial Differentiation
ODEs with non-constant coefcients
Consequently:
(1 x
2
)y

xy

+ m
2
y = m
2
cos(mcos
1
(x))
+
m

1 x
2
x sin(mcos
1
(x))
mx sin(mcos
1
(x))
1

1 x
2
+ m
2
cos(mcos
1
(x))
= 0.
The function T
m
(x) = y(x) = cos(mcos
1
(x)) is a polynomial
of degree m:
T
0
(x) = 1,
T
1
(x) = x,
T
n+1
(x) = 2xT
n
(x) T
n1
(x), n = 1, 2, . . .
The function T
n
(x) is called the Chebyshev polynomial of the
rst kind. These polynomials play an important role in applied
mathematics.

You might also like