Professional Documents
Culture Documents
Contents
PART A
1. Introduction
PART B
1 Introduction
• An Ordinary Differential Equation (ode) is an equation which involves at least one derivative of a
function of a single variable and, possibly, the function itself and the independent variable.
• Any particular solution may be obtained by taking particular values of the arbitrary constants.
• The arbitrary constants for any particular solution may be determined by boundary (or initial)
conditions.
Example 2. Consider the motion of a particle of mass m subject to a force given by P e−kt , where P
and k are constants.
The equation of motion is mẍ = P e−kt .
d2 x
(Note that a derivative with respect to time t is denoted by a dot. e.g. dx
dt = ẋ, and dt2 = ẍ.) Thus
P −kt
ẍ = e
m
integrating this gives
P −kt
ẋ = − e +A
mk
where A is an arbitrary constant of integration. Integrating again gives
P −kt
x= e + At + B
mk2
A.C.Croft: MAA255 Ordinary Differential Equations 3
Example 3: Radioactivity.
The rate of decay of a radioactive substance is proportional to the amount of the substance which
remains. Denoting the amount of the substance by x, this implies that
ẋ = −kx (1)
x
−kt = log x − log x0 = log
x0
and so
x = x0 e−kt .
i.e. the amount of radioactive material exponentially decays.
Example 4: Cooling.
The rate of change of the temperature of a body is proportional to the difference in temperature between
the body and its surroundings. Denoting temperature by θ, this implies that
dθ
= −k(θ − A) (2)
dt
where k is a positive constant and A is the temperature of the surroundings (assumed constant).
Equation (2) can be rewritten as
dt 1
=−
dθ k(θ − A)
and so
1 dθ 1
Z
t=− = − log(θ − A) + c
k θ−A k
where c is an arbitrary constant.
Again, if θ = θ0 when t = 0, we obtain
θ−A
−kt = log or θ = A + (θ0 − A)e−kt .
θ0 − A
A.C.Croft: MAA255 Ordinary Differential Equations 4
1.2 Notation
An nth order ode can be expressed in the form
A general solution of this must contain n arbitrary constants. This may be expressed in the form
g(x, y, c1 , c2 , . . . , cn ) = 0. (2)
Provided the n constants in an equation of the form (2) are independent, it is possible to construct an
nth order ode (1) which they must satisfy. This is obtained by differentiating (2) n times and using the n
equations to eliminate the n arbitrary constants. Equation (2) is then called the primitive corresponding
to the differential equation (1).
e.g. Consider the primitive y = c log x, which contains one arbitrary parameter c. It can be seen that
y ′ = cx−1 . We can then eliminate c by putting c = xy ′ , to obtain y = xy ′ log x, or
dy y
= .
dx x log x
It is usual to be given the differential equation (1) and be required to find the general solution (2).
However, it is not always the case that a solution will exist or, if it does, that it will include all possible
solutions.
Note: There exist two special solutions of (3), namely x = a and x = −a which are not contained
in the general solution (4). These are known as singular solutions.
(In this case, they are the envelopes of the family of solutions (4).)
Questions concerning the existence and uniqueness of solutions, and the occurrence of singular solutions,
are advanced topics that will not be considered in this module.
dy
= F (x, y).
dx
Many different techniques exist for solving odes of this type. These depend crucially on the character of
the function F (x, y).
A.C.Croft: MAA255 Ordinary Differential Equations 5
This approach can be extended to cases in which F can be written as the product of separate functions
of the dependent and independent variables. i.e. when the ode can be written in the form
dy
= f (x) g(y).
dx
dy y+1
Example 1: Find the solution of the equation =
dx x−1
such that y = 1 when x = 0.
Separating variables (and noting that we need the solution near x = 0) gives
dy dx
Z Z
=−
y+1 1−x
log |y + 1| = log |1 − x| + A.
Putting A = log C for convenience, we obtain
y + 1 = C(1 − x).
y + 1 = 2(1 − x) or y = 1 − 2x.
A.C.Croft: MAA255 Ordinary Differential Equations 6
dy
Example 2: Consider x + cot y = 0.
dx
Separating variables gives
dx
Z Z
− tan y dy =
x
Thus
log(cos y) = log x + log C
or
cos y = C x
i.e.
y = cos−1 (C x).
dv
Example 3: Consider = g − k v2 .
dt
This is the equation of motion for a body falling vertically under the action of a gravitational force mg and
a resistance to the motion mkv 2 , which is proportional to the square of the speed: m dv dt = mg − mkv .
2
If the body is dropped from rest (i.e. if v = 0 when t = 0), then the constant must be zero, and we
obtain
g
r p
v= tanh gk t .
k
q
g
Thus, as t → ∞, v approaches the terminal speed of k.
dy x3
Example 4: Consider = 2.
dx y
Separating variables gives Z Z
y 2 dy = x3 dx.
dy y
=f
dx x
where P and Q are homogeneous equations in x and y and are of the same degree.
y = vx
where v is a function of x.
dy dv
With this substitution =v+x , so that the equation becomes
dx dx
dv
v+x = f (v)
dx
which can be separated as
dv dx
Z Z
= .
f (v) − v x
(Note that a singular solution of the form y = kx may occur for this class of equations when k is a
root of the equation f (k) = k.)
dy
Example 1: Consider the equation 2xy = x2 + y 2 .
dx
This can be written as
dy 1 x y
= + .
dx 2 y x
dy dv
Putting y = v(x)x, so that dx = v + x dx , this becomes
dv 1 1
v+x = +v
dx 2 v
or
dv 1 1
= −v
dx 2x v
in which the variables can be separated to give
2 v dv dx
Z Z
=
1 − v2 x
so that
1
− log(1 − v 2 ) = log x + log c, or = cx
1 − v2
and so
x2 √ q
= cx or x = c(x2 − y 2 ) or y= x x − 1c .
x2 − y 2
(Notice that the equation in this example admits the singular solutions y = ±x.)
A.C.Croft: MAA255 Ordinary Differential Equations 8
dy
Example 2: Consider the equation y 2 + (xy + x2 ) = 0.
dx
In this case,
dy y2
=− .
dx xy + x2
Putting y = v(x)x, this becomes
dv v2
v+x =−
dx v+1
so that
dv 1 v(2v + 1)
x =− (v 2 + v 2 + v) = − .
dx v+1 v+1
Separating the variables gives
(v + 1) dx
Z Z
dv = − .
v(2v + 1) x
The first integral can be expanded using partial fractions to give
dv dv dx
Z Z Z
− =− .
v 2v + 1 x
so that
log v − 21 log(2v + 1) = − log x + log c
or ! !
v2 c2 y2 c2
log = log or =
2v + 1 x2 2xy + x2 x2
i.e
2y 2c2 y
2 2
y =c +1 or x= .
x y 2 − c2
(Notice that the equation in this example admits the singular solution y = − 12 x.)
x = X + α, y = Y +β
to reduce these terms to zero and hence to solve these equations by the above method.
Using these substitutions
dy y−x+1
Example 3: Consider the equation = .
dx y+x+5
Put x = X + α, y = Y + β. Then
y − x + 1 = Y − X + (−α + β + 1), y + x + 5 = Y + X + (α + β + 5)
dv v−1
v+X =
dX v+1
so that
dv v−1 v − 1 v2 + v v2 + 1
X = −v = − =− .
dX v+1 v+1 v+1 v+1
Separating the variables gives
v+1 dX
Z Z
2
dv = −
v +1 X
which can be integrated to yield
1
2 log(v 2 + 1) + tan−1 v = − log X + log c
or
log X 2 + log(v 2 + 1) = log c2 − 2 tan−1 v
or
X 2 (v 2 + 1) = c2 e−2 tan v
−1
or !
Y2 Y
2
X +1 = c2 exp −2 tan−1
X2 X
and thus we obtain
y+3
2 2 2 −1
(x + 2) + (y + 3) = c exp −2 tan .
x+2
(Notice that no singular solutions occur for the equation in this example.)
dy x−y+1
Example 4: Consider the equation = .
dx 2x − 2y + 3
Notice that, in this equation, it is not possible to shift the origin of the coordinates to remove the constant
terms. However, in this case, it is possible to proceed by putting
z = x − y.
dy
Example 1. Find the general solution of the equation x + y = ex .
dx
It may immediately be noticed that this equation can be expressed in the form
d
(xy) = ex
dx
which can immediately be integrated to give
x y = ex + c.
Thus
ex + c
y= .
x
It may also be noticed that the above ode is equivalent to either of the forms
dy 1 dy y ex
x2 + x y = x ex or + 2 = 2.
dx x dx x x
These equations may therefore also be integrated as above by first multiplying by 1/x or x2 respectively.
This approach may be formalised as follows:
dy
a(x) + b(x) y = f (x).
dx
d
It may be observed that if b(x) = dx a(x), then the left hand side is
d dy da
a(x) y = a(x) + y.
dx dx dx
Since the left hand side in this case is an exact differential, the solution can be obtained by integrating
to obtain Z
a(x) y = f (x) dx
or
1
Z
y= f (x) dx.
a(x)
d
If b(x) 6= dx a(x), it is always possible to multiply both sides of the equation by a particular function
such that this condition is satisfied. We proceed as follows.
First divide by a(x) , to write the general first order linear ode in the form
dy
+ p(x) y = q(x).
dx
A.C.Croft: MAA255 Ordinary Differential Equations 11
Note 1. When evaluating an integrating factor, the constant of integration is irrelevant as it simply
corresponds to multiplying the equation by a constant.
R R R
p(x)dx p(x)dx+c p(x)dx c
e.g. r(x) = e →e =e e.
The factor ec is just an arbitrary multiplicative constant.
When applied to a linear ode, it may be chosen for convenience.
Z
Note 2. The constant of integration in the final integration of r(x) q(x) dx is essential. This constant
must be inserted when the integral is evaluated. It results in a term in the solution of the form
c
y = ...... + .
r(x)
The constant of integration is not added afterwards.
dy
Example 3. Find the general solution of the equation + (x + 1) y = ex . x
dx
This can be written in the standard form of a first order linear ode as
dy 1 1 x
+ 1+ y= e
dx x x
ex c e−x
Thus, the general solution is y= + .
2x x
df
Example 4. Find the general solution of the equation + sin θ f = 1. cos θ
dθ
This can be written in the standard form of a first order linear ode as
df
+ tan θ f = sec θ.
dθ
in which p(θ) = tan θ.
Thus, the integrating factor is
R R
p(θ)dθ tan θ
r(θ) = e =e dθ = e− log cos θ = elog sec θ = sec θ.
Notice that the case when n = 0 is linear and, when n = 1, the equation has separable variables.
Otherwise n can be any real number.
dy
Example 1. Consider the equation = xy 3 + 2xy.
dx
This is a Bernoulli equation with n = 3, which can be rewritten as
1 dy 2x
− = x.
y 3 dx y 2
dz dy
Put z = y −2 , = −2y −3 to obtain
dx dx
1 dz
− 2x z = x
(−2) dx
or
dz
+ 4x z = −2x
dx
which is a linear equation for which the integrating factor is
R R 2
p(x)dx 4x dx
r(x) = e =e = e2x .
Notice that the equation is linear when P = 0, and is a Bernoulli equation when R = 0.
No method exists which will always give the general solution of this equation.
However, a general solution can be obtained if a particular solution is first known.
Suppose that y = u(x) is a known particular solution of (1). i.e. it satisfies the equation
u′ = P u2 + Qu + R.
z′ 2u 1 1
u − 2 = P u2 +
′
+ 2 +Q u+ + R.
z z z z
−z ′ = P (2uz + 1) + Qz
or
z ′ + (2P u + Q)z + P = 0 (2)
which is a linear equation whose general solution can be obtained.
Theorem: If u(x) is a known solution of (1), and if a general solution of (2) can be found for z(x), then
y = u + 1/z is a general solution of (1).
Proof: If u satisfies (1) and z satisfies (2), y = u + 1/z must satisfy (1).
If z is a general solution of (2), it must contain an arbitrary constant.
Hence, y = u + 1/z contains an arbitrary constant.
Thus it must be the general solution of (1).
dy y 3
Example 2. Consider the equation = y2 + − 2 .
dx x x
It can be seen that y = 1/x satisfies this equation.
Thus, substitute y = 1/x + 1/z to obtain
1 z′ 1 2 1 1 1 3
− 2
− 2 = + + + + −
x z x2 xz z 2 x2 xz x2
or
z′ 2 1 1
− 2
=+ + 2+
z xz z xz
or
3
z′ +
z = −1
x
which is a linear equation for which the integrating factor is
R R
p(x)dx ( x3 )dx 3)
r(x) = e =e = e3 log x = elog(x = x3 .
A.C.Croft: MAA255 Ordinary Differential Equations 15
dy
Example 1. Consider the equation y cos x − y 2 sin x + (sin x + 2y cos x) = 0.
dx
It can be seen that this has the solution
y sin x + y 2 cos x = c,
∂ ∂
since ∂x [y sin x + y 2 cos x] = y cos x − y 2 sin x and ∂y [y sin x + y 2 cos x] = sin x + 2y cos x.
However, it may be noticed that the differential equation would usually be written as
dy y (1 − y tan x)
=
dx tan x + 2y
and this only becomes exact after multiplying both sides by (sin x + 2y cos x) and rearranging.
A.C.Croft: MAA255 Ordinary Differential Equations 16
dy
P (x, y) + Q(x, y) =0
dx
can be solved as an exact equation if there exists a function φ(x, y) such that
Py = Qx .
In fact, this is a necessary and sufficient condition for the existence of a function φ such that P = φx
and Q = φy . The solution of the differential equation is then given by φ = c, where φ is obtained
by solving these equations.
dy 2x2 − 2y + y 2
Example 2. Consider the equation = .
dx x(1 − y)
Rewrite this as
dy
2x2 − 2y + y 2 + (−x + xy) = 0.
dx
dy
This is of the form P (x, y) + Q(x, y) dx =0 where P = 2x2 − 2y + y 2 , Q = −x + xy.
This is an exact equation if Py = Qx .
But
Py = −2 + 2y, Qx = −1 + y.
Thus it is not an exact equation. However, multiplying by 2x gives
dy
4x3 − 4xy + 2xy 2 + (−2x2 + 2x2 y) = 0,
dx
Which has the above form with P = 4x3 − 4xy + 2xy 2 , Q = −2x2 + 2x2 y, for which
∂φ ∂φ
= P = 4x3 − 4xy + 2xy 2 and = Q = −2x2 + 2x2 y.
∂x ∂y
By direct inspection, it can be seen that φ must have the form
φ = x4 − 2x2 y + x2 y 2 + const.
x4 − x2 y(2 − y) + c = 0.
A.C.Croft: MAA255 Ordinary Differential Equations 17
2.6 Summary
If F = f (x) g(y) the equation may be integrated after separating the variables.
y Put y = v(x) x.
If F =f the equation is homogeneous.
x The equation is then separable.
ax + by + c Put z = ax + by.
If F =f with am − bl = 0.
lx + my + n The equation is then separable.
R
p(x)dx
If F = q(x) − p(x) y the equation is linear. Use the integrating factor r(x) = e .
P (x, y)
If F =− where Py = Qx , the equation is exact.
Q(x, y)
First order odes with some other forms for F (x, y) can be solved by special methods. However, for
the general case, no analytic methods are known for generating solutions given in terms of elementary
functions. Even for the above methods, the remaining integrals involved often cannot be evaluated
explicitly in terms of elementary functions.
A.C.Croft: MAA255 Ordinary Differential Equations 18
Part B Contents
PART B
The following notes concentrate on second order equations, but the general properties of nth order linear
odes can be immediately deduced.
d2 y dy
a 2
+b + c y = 0.
dx dx
(2)
Note first some general properties
Since a general solution of a second order ODE must contain two arbitrary constants, it follows that, if
y1 (x) and y2 (x) are two linearly independent solutions of (2), then the general solution is given by
y = A y1 (x) + B y2 (x),
d2 y
Example 1. The ode +y =0
dx2
has solutions y = sin x, 2 sin x, cos x, . . . etc.
Since sin x and cos x are linearly independent functions, the general solution is
y = A sin x + B cos x.
d2 y dy
Example 2. The ode (1 − x2 ) 2
− 2x + 2y = 0
dx dx
x 1+x
has solutions y = x, and y = log − 1.
2 1−x
Since these are linearly independent, the general solution is
x 1+x
y = Ax + B log −1 .
2 1−x
Consider the linear second order ordinary differential equation
d2 y dy
a 2
+b + c y = f (x) (1)
dx dx
and the associated reduced equation in which f (x) is replaced by 0
d2 y dy
a 2
+b + c y = 0. (2)
dx dx
Theorem 1: If y1 (x) is a solution of (2), and y3 (x) is a solution of (1), then y1 (x) + y3 (x) is also
a solution of (1).
Proof: By Theorem 1, y = y3 (x) + Ay1 (x) + By2 (x) is a solution of (1). And, since it contains two
arbitrary constants, it must also be the general solution of (1).
The general solution of the reduced eqn (2) is known as the complementary function (CF).
A solution of the complete equation (1) is known as a particular integral (PI).
Thus, the general solution of the complete equation (1) is given by
GS = PI + CF
d2 y
Example 3: For the ode +y =x
dx2
CF: y = A sin x + B cos x
PI: y=x
GS: y = x + A sin x + B cos x
To solve non-homogeneous odes of the form (1), we need to find both the CF and the PI.
We need to find the general solution of the homogeneous (or reduced) equation
d2 y dy
a 2
+b + c y = 0.
dx dx
(2)
for the case in which a, b and c are constants.
Consider a possible trial solution of the form
y = emx . (3)
(a m2 + b m + c) emx = 0.
But emx 6= 0. Thus (3) is a solution of (2) only if m is a root of the quadratic
a m2 + b m + c = 0.
(4)
This is known as the auxiliary equation. It gives two possible solutions for m :
√ √
−b + b2 − 4ac −b − b2 − 4ac
m1 = , m2 = .
2a 2a
This gives two possible solutions of the reduced equation (2) :
Provided m1 and m2 are distinct, the general solution of the homogeneous equation (2) can be expressed
as
y = A em1 x + B em2 x
(5)
where A and B are arbitrary constants.
Case (1) b2 > 4ac : The auxiliary equation has distinct real roots m1 , m2 .
The general solution is
y = A em1 x + B em2 x .
(5)
d2 y dy
Example 1: 2
−3 + 2y = 0
dx dx
The auxiliary equation is m2 − 3 m + 2 = 0
A.C.Croft: MAA255 Ordinary Differential Equations 22
i.e. (m − 1)(m − 2) = 0
This has roots m1 = 1, m2 = 2
The general solution is y = A ex + B e2x
Example 2: ẍ − 3ẋ + x = 0
The auxiliary equation is m2 − 3 m + 1 = 0
This has roots √
3± 9−4 1 √
m= = (3 ± 5)
2 2
1
√ 1
√
The general solution is x = A e 2 (3+ 5)t
+ B e 2 (3− 5)t
Case (2) b2 < 4ac : The auxiliary equation has complex conjugate roots.
Put √
b 4ac − b2
− = α, =β
2a 2a
√
−b ± b2 − 4ac
so that m= can be written as
2a
m = α ± iβ.
y = A1 e(α+iβ)x + A2 e(α−iβ)x .
Also consider putting A = C sin φ, B = C cos φ, where C and φ are constants, so that
or
This replaces the two constants A and B (or the real and imaginary parts of A1 ) by an arbitrary amplitude
C and phase φ.
A.C.Croft: MAA255 Ordinary Differential Equations 23
d2 y dy
Example 3: 2
−2 + 2y = 0
dx dx
The auxiliary equation is m2 − 2 m + 2 = 0
√
2± 4−8
This has roots m= 2 =1±i
i.e. α = 1, β = 1
The general solution is y = (A cos x + B sin x)ex
We know that y = emx is a solution of (2). To form a general solution, we need a second independent
solution.
Putting c = b2 /4a, we rewrite the equation a y ′′ + b y ′ + c y = 0 as
d2 y b dy b2
+ + y=0 or y ′′ − 2m y ′ + m2 y = 0.
dx2 a dx 4a2
Now look for a second solution of the form y = f (x) emx .
Substituting this with y ′ = mf emx + f ′ emx , and y ′′ = m2 f emx + 2mf ′ emx + f ′′ emx gives
m2 f + 2mf ′ + f ′′ − 2m(mf + f ′ ) + m2 f emx = 0
y = (A + B x) emx .
Notice that this includes the initial solution emx and a second linearly independent solution x emx .
d2 y dy
Example 5: −4 + 4y = 0
dx2 dx
The auxiliary equation is m2 − 4 m + 4 = 0
i.e. (m − 2)2 = 0
This has a repeated root m = 2.
The general solution is y = (A x + B) e2x
A.C.Croft: MAA255 Ordinary Differential Equations 24
Summary
For the homogeneous linear ode with constant coefficients
d2 y dy
a 2
+b + cy = 0 (2)
dx dx
the auxiliary equation is
a m2 + b m + c = 0
or
y = C eαx sin(βx + φ)
d2 y dy
a +b + c y = f (x),
dx2 dx
(1)
where a, b and c are constants.
We have shown that, if y = y3 (x) is a particular solution (PI) of this equation (1),
and if y = Ay1 (x) + By2 (x) is the general solution (CF) of the reduced equation (2) ,
then y = y3 (x) + Ay1 (x) + By2 (x) is the general solution of the complete equation (1).
The remaining problem is to find a particular integral y3 (x) for any given function f (x).
The basic method is to use a trial solution which is an initial “guess” involving a number of parameters
whose values can be determined by substituting into the complete equation.
For common functions, use the following suggestions.
where p, q, r and n are given constants, and P , Q and R are constants that can be determined by
substituting into (1).
If a particular f (x) (or the obvious trial solution) is included in the complementary function, multiply the
appropriate trial solution by x.
d2 y dy
Example 6: −3 + 2 y = 2 x2
dx2 dx
The CF (example 1) is y = A ex + B e2x
When looking for a PI, notice that putting y = x2 immediately cancels the right-hand side. However, the
derivative terms introduce a multiple of x and a constant. Such terms have to be removed by including
extra terms in the trial solution.
Thus, for a PI, try
y = P x2 + Q x + R
y′ = 2 P x + Q
y ′′ = 2 P
Then
y ′′ − 3y ′ + 2y = 2 P − 3(2P x + Q) + 2(P x2 + Qx + R)
= 2P x2 + (2Q − 6P )x + (2R − 3Q + 2P )
d2 y dy
Example 7: 2
−2 + 2 y = 3 sinh 2x
dx dx
The CF (example 3) is y = (A cos x + B sin x)ex
For a PI, try
y = P sinh 2x + Q cosh 2x
y ′ = 2P cosh 2x + 2Q sinh 2x
y ′′ = 4P sinh 2x + 4Q cosh 2x
Then
y ′′ − 2y ′ + 2y = 4P sinh 2x + 4Q cosh 2x − 2(2P cosh 2x + 2Q sinh 2x) + 2(P sinh 2x + Q cosh 2x)
= (6P − 4Q) sinh 2x + (−4P + 6Q) cosh 2x
d2 y dy
Example 8: 2
−2 + 2 y = ex − 1
dx dx
The CF (examples 3 & 7) is y = (A cos x + B sin x)ex
For a PI, try
y = P ex + Q
y ′ = P ex
y ′′ = P ex
A.C.Croft: MAA255 Ordinary Differential Equations 26
Then
y ′′ − 2y ′ + 2y = P ex − 2 P ex + 2(P ex + Q)
= P ex + 2Q
d2 y dy
Example 9: 2
−3 + 2 y = 2 ex
dx dx
The CF (examples 1 & 6) is y = A ex + B e2x
Notice that the rhs of the equation is contained within the CF of the reduced equation.
Thus, any multiple of ex cannot be a particular integral.
For a PI in this case try
y = P x ex
y ′ = P ex + P x ex
y ′′ = 2P ex + P x ex
Then
y ′′ − 3y ′ + 2y = 2P ex + P x ex − 3(P ex + P x ex ) + 2(P x ex )
= −P ex
x = (A + B t) e−t .
From the form of the rhs, we would expect a PI to have the form x = P t + Q + R e−t .
However, the term R e−t is already included in the CF.
We would next consider replacing this by R t e−t , but this is also contained in the CF.
Thus, we must now consider a PI of the form
x = P t + Q + R t2 e−t
ẋ = P − R t2 e−t + 2R t e−t
ẍ = R t2 e−t − 4R t e−t + 2R e−t
Thus
Divide by m giving
d2 x dx
2
+ 2k + n2 x = C sin pt.
dt dt
ẍ + 2k ẋ + n2 x = 0.
x = P sin pt + Q cos pt
then
ẋ = pP cos pt − pQ sin pt
ẍ = −p2 P sin pt − p2 Q cos pt
Substituting gives
(n2 − p2 ) C 2kp C
P = , Q=− .
(n2 − p2 )2 + 4k2 p2 (n2 − p2 )2 + 4k2 p2
Thus, the Particular Integral is
C
2 2
x= (n − p ) sin pt − 2kp cos pt .
(n2 − p2 )2 + 4k2 p2
Since the Complementary Function approaches zero as t → ∞, this is the steady state solution for
forced damped harmonic motion.
d2 y dy
a x2 2
+ bx + c y = h(x),
dx dx
(1)
A.C.Croft: MAA255 Ordinary Differential Equations 29
d2 y dy
a x2 + bx + c y = 0.
dx2 dx
(2)
This is known as the equidimensional equation (or Euler’s equation) because it does not depend on the
dimension of x. (It is invariant under the scaling x → kx for any constant k.)
(Equation (1) is sometimes known as the Cauchy–Euler equation.)
To find the general solution of these equations, we need to find two linearly independent solutions of (2).
First note that the equation has a singular point at x = 0. Solutions are not defined at this point.
y = xn ,
(3)
dy d2 y
so that = n xn−1 , and = n(n − 1) xn−2 .
dx dx2
Substituting these into (2) gives
an(n − 1) + bn + c xn = 0.
an2 + (b − a)n + c = 0.
y = A |x|n1 + B |x|n2 .
Note 1: These solutions are given in terms of |x| because the solution is not defined at x = 0 and the
equation is invariant under the transformation x → −x.
Note 2: It has been assumed above that n1 and n2 are real and distinct. This only occurs if (b− a)2 >
4ac.
d2 y dy
Example 1: Solve the equation 2 x2 2
− 3x + 2 y = 0.
dx dx
Substituting the trial solution y = xn , y ′ = nxn−1 , y ′′ = n(n − 1)xn−2 gives
2n(n − 1) − 3n + 2 xn = 0,
An alternative method
As an alternative approach to equations of the form
d2 y dy
a x2 2
+ bx + c y = h(x), (1)
dx dx
where a, b, c are constants, consider the change of variable
x = et or t = log x.
Then
dy dt dy 1 dy
= =
dx dx dt x dt
and
d2 y d dy d 1 dy 1 dt d dy 1 dy 1 d2 y 1 dy
2
= = = − 2
= 2 2
− 2 .
dx dx dx dx x dt x dx dt dt x dt x dt x dt
Substituting these, (1) becomes
!
d2 y dy dy
a − +b + c y = h(et ),
dt2 dt dt
or
a ÿ + (b − a) ẏ + c y = h(et ),
which is a linear equation with constant coefficients.
Note: The transformation x = et deals only with the range x > 0, while the singular point at x = 0
corresponds to t = −∞.
i.e.
The qualitative character of all possible solutions is determined by the real and imaginary parts of m.
For a physical system, there is often some uncertainty in the values of the parameters in the equations.
An understanding of the qualitative behaviour of solutions is often more useful than explicit solutions.
-x
-
Note 1: Only one trajectory passes through any point of the phase plane.
Proof: Any point is represented by the values x = x0 , y = y0 .
This will give particular values of P (x0 , y0 ) and Q(x0 , y0 ).
And these give unique values of ẋ and ẏ.
Thus the trajectory through (x0 , y0 ) must be unique.
Note 2: The only exceptions are critical points or nodes at which P = 0 and Q = 0.
A solution at a critical point stays there indefinitely (as ẋ = 0 and ẏ = 0).
A.C.Croft: MAA255 Ordinary Differential Equations 32
5.2 Phase plane diagrams for linear equations with constant coeffts
Consider linear 2nd -order homogeneous odes
a ẍ + b ẋ + c x = 0 (2)
where a, b and c are constants. The roots of the auxiliary equation are given by
√ √
−b + b2 − 4ac −b − b2 − 4ac
m1 = , m2 =
2a 2a
and equation (2) can be written as two coupled first order equations
ẋ = y
ẏ = − ac x − b
a y
This system has the single critical point x = 0, y = 0 which corresponds to the trivial solution of (2).
5.2.1 Nodes
Consider the case in which m1 and m2 are both real and negative. m2 < m1 < 0
i.e. when b2 > 4ac and a, b and c have the same sign.
The general solution is then given by
x = A em1 t + B em2 t
(
y = m1 A em1 t + m2 B em2 t
When B = 0 or A = 0, it is clear that
y = m1 x or y = m2 x
These indicate straight line trajectories.
They are four trajectories in the 2nd and 4th quadrants (since m1 , m2 < 0).
Also since m1 , m2 < 0, x → 0 and y → 0 as t → ∞.
y
6
B
B
BN ?
PP ^ B
PP PP
PP s
PP B
qP
P
PP B
PBP - x
B PPP
B Pi
P
PP
k PPP
B PP
B ]
6 BMB y = m1 x
BB
B
y = m2 x
Definition: In this case, the critical point at the origin is called a node.
All nodes have this type of structure.
Note: If m1 and m2 were positive, the trajectories would have the same structure, but would be pointed
away from the origin. Moreover, since the em2 t term would dominate at large times, all trajectories
(except that for which B = 0) would become parallel to the line y = m2 x.
A.C.Croft: MAA255 Ordinary Differential Equations 33
When B = 0 or A = 0,
y = m1 x or y = m2 x
These are four straight line trajectories to or from the critical point at the origin.
Since m1 > 0, the trajectories on y = m1 x are away from the origin.
Since m2 < 0, the trajectories on y = m2 x are toward the origin.
This gives the following trajectories in the phase plane
y
6
B
B y = m1 x
BN
B
B 1
B
-x
B
B
)
B
B
BM
B
B
y = m2 x
Since m1 > 0 and m2 < 0, the term em1 t will dominate for large positive times, and the term em2 t
will dominate for large negative times. Thus, all trajectories with A, B 6= 0 will start at large negative
times parallel to y = m2 x, and at large positive times become parallel to y = m1 x.
y
6
B
B z y = m1 x
BN
B z
B 1
B
-x
B
B
)
y B
B
y BM
B
B
y = m2 x
Definition: In this case, the critical point at the origin is called a saddle point.
Initially assume that b and a have the same sign, so that m < 0.
In this case all trajectories approach the critical point at the origin as t → ∞.
When B = 0 y = m x.
These are two straight line trajectories toward the origin.
When B 6= 0 y = mx + B emt . i.e. all trajectories approach y = m x as t → ∞.
But, as t → ∞, x → B t emt , and y → mB t emt .
y
6
U
PP
PP R
PP
PP
q
PP
PP
PP - x
PP
PP
i
P
PP
PP
PP
I PP
P
K y = mx
For B > 0 (i.e. for trajectories above the line y = m x), x > 0 and y < 0 as t → ∞.
Thus, these trajectories approach y = m x < 0 as t → ∞.
For B < 0 (i.e. for trajectories below the line y = m x), x < 0 and y > 0 as t → ∞.
Thus, these trajectories approach y = m x > 0 as t → ∞.
In this case, the roots of the auxiliary equation m1 and m2 are purely imaginary, and the general solution
is given by
x = A cos nt + B sin nt, y = −nA sin nt + nB cos nt.
A.C.Croft: MAA255 Ordinary Differential Equations 35
y2
x2 + = A2 + B 2 .
n2
Thus the trajectories in the phase plane are ellipses.
y
6
R
R
R
-x
I
I
I
The origin is again a critical point (obtained when A = B = 0), but solutions neither approach or diverge
from the origin (they orbit about it).
Clearly both x and y oscillate about zero with frequency β and amplitudes which exponentially increase
(or decrease) as eαt .
If α < 0 (i.e. if a and b have the same sign), then x and y both approach 0 as t → ∞.
All trajectories in the phase plane are therefore spirals which approach the origin as t → ∞.
A.C.Croft: MAA255 Ordinary Differential Equations 36
y
6
R
R
R
-x
I
I
I
Note: If α > 0 (i.e. if a and b have different signs), then all trajectories spiral away from the origin as
t → ∞.
φ̈ + n2 φ = 0 R
R
R
which has a vortex point at the origin. -φ
I
I
I
Notice that this has vortex points at φ = 0, 2π, 4π, . . . (these are the stable equilibrium points),
and saddle points at φ = −π, π, 3π, . . . (These correspond to unstable equilibrium points – the pendulum
is at rest vertically above the fixed point).
a(x) y ′′ + b(x) y ′ = 0.
b(x)
Z
′
log y = − dx.
a(x)
A.C.Croft: MAA255 Ordinary Differential Equations 38
y
6
T
ψ
s
T0
-x
Consider a section of chain of length s, and the tensions T0 and T at each end of this section.
Equating forces horizontally and vertically gives the equations
T cos ψ = T0
T sin ψ = ws
where w is the weight per unit length of the chain.
If the chain is given by the curve y = y(x) then, at any point
dy ws
= tan ψ = .
dx T0
Putting T0 = wk, where k is a constant, and differentiating gives
d2 y 1 ds
2
= .
dx k dx
s
2
ds dy
p
But the small element ds is given by ds = dx2 + dy 2 so that = 1+ .
dx dx
Thus, the equation for the curve is given by
s
2
d2 y dy
k 2 = 1+ .
dx dx
This is a second order (non-linear) ode.
But, since it does not contain y explicitly, it can be solved by putting u = y ′ to give
du p du
Z Z
k = 1+u , 2 and hence k √ = dx
dx 1 + u2
Thus
dy (x − c)
k sinh−1 u = x − c or = sinh .
dx k
Thus, the curve of the chain is given by
(x − c)
y = k cosh + c0 .
k
A.C.Croft: MAA255 Ordinary Differential Equations 39
y = f (x) y1 (x).
i.e.
a(2f ′ y1′ + f ′′ y1 ) + b(f ′ y1 ) + f (a y1′′ + b y1′ + c y1 ) = 0
i.e.
a y1 f ′′ + (2a y1′ + b y1 )f ′ = 0
or
2 y1′ b
′′
f + + f′ = 0
y1 a
which is a linear equation that already has one known solution: f = A.
The other solution can be found by writing it in the form
f ′′ 2 y1′ b
′
+ + = 0.
f y1 a
Each of these terms can be integrated to give (if a and b are constants)
b
log f ′ + 2 log y1 + a x = log B,
Since y1 (x) is a known function, it may be possible to integrate this equation to obtain f (x).
d2 y dy
Example 1: Consider the equation 2
−3 + 2y = 0
dx dx
The auxiliary equation is m2 − 3 m + 2 = 0 or (m − 1)(m − 2) = 0,
so that the general solution is y = A ex + B e2x .
Suppose we only knew the solution y1 = ex .
We could then consider further solutions of the form y = f (x) ex , so that
y ′ = f ex + f ′ ex , y ′′ = f ex + 2f ′ ex + f ′′ ex .
Substituting gives
f ex + 2f ′ ex + f ′′ ex − 3(f ex + f ′ ex ) + 2 f ex = 0
i.e.
f ′′
f ′′ − f ′ = 0 or = 1.
f′
A.C.Croft: MAA255 Ordinary Differential Equations 40
Thus
log f ′ = x + log B or f ′ = B ex
which can be integrated to give f = A + B ex , so that the complete solution is given by
y = (A + B ex ) ex = A ex + B e2x ,
y = f (x) e2x .
Then
y ′ = (f ′ + 2f )e2x , y ′′ = (f ′′ + 4f ′ + 4f )e2x .
Substituting these gives
y = (A + B x) e2x ,
as previously shown.
d2 y dy
Example 3. Consider the equation (1 − x2 ) 2
− 2x + 2y = 0
dx dx
This has the obvious solution y = x.
Now look for a second solution of the form
y = f (x) x.
Then
y ′ = f ′ x + f, y ′′ = f ′′ x + 2f ′ .
Substituting these gives
(1 − x2 )(f ′′ x + 2f ′ ) − 2x (f ′ x + f ) + 2 f x = 0
i.e.
(1 − x2 )x f ′′ + 2(1 − 2x2 )f ′ = 0
or
f ′′ 2 − 4x2
= − .
f′ x(1 − x2 )
Expanding the rhs in partial fractions gives
f ′′ 2 1 1
′
=− + − .
f x 1−x 1+x
A.C.Croft: MAA255 Ordinary Differential Equations 41
Note 1: In fact, all nth -order linear odes can be written in the form
ẋ = A x + u,
where x and u are n-dimensional vectors (column matrices) and A is an n × n matrix.
Note 2: This process has effectively reduced an nth -order ode to n first order equations. This reduction
is usually very helpful.
A.C.Croft: MAA255 Ordinary Differential Equations 42
Note 1: If these expressions can be integrated, this technique can be used to obtain particular integrals.
Note 2: This method is also particularly useful for analysing approximate solutions when the inhomoge-
neous term f (x) corresponds to a small perturbation.
A.C.Croft: MAA255 Ordinary Differential Equations 43
y′ = z
(
z ′ = −2 y + 3 z
z = A ex + 2B e2x
y′ = z
(
z ′ = −2 y + 3 z + 2 x2
z = u1 ex + 2u2 e2x
i.e.
u′1 + u′2 ex = 0 (a)
u′1 + 2 u′2 ex = 2 x2 e−x (b)
Thus
u1 = (2 x2 + 4 x + 4)e−x + A, u2 = −(x2 + x + 12 )e−2x + B
The general solution is then given by y = u1 ex + u2 e2x , or
y = 2 x2 + 4 x + 4 + A ex − x2 − x − 1
2 + B e2x
7
i.e. y = x2 + 3 x + 2 + A ex + B e2x as obtained previously.
A.C.Croft: MAA255 Ordinary Differential Equations 44
y′ = z
(
z ′ = −y
y′ = z
(
z ′ = −y + sec x
i.e.
u′1 sin x + u′2 cos x = 0
u′1 cos x − u′2 sin x = sec x
and hence
u′1 = 1, u′2 = − tan x.
Thus
u1 = x + A, u2 = log | cos x| + B,
and the complete solution is
Note 2: This example illustrates the power of this method for finding PIs when trial solutions are not
obvious.