Linear Differential Equations
Linear Differential Equations
Linear Differential Equations
Lecture Notes
Samsun Baharin Haji Mohamad
March 30, 2012
1
Contents
1 Introduction to Differential Equations 3
1.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Solution of Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Linearly Independent Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2
1 Introduction to Differential Equations
1.1 Definitions
A differential equation is an equation which involve differential coefficients or differentials. For
example, the equations below are all differential equations.
1. ex dx + ey dy = 0
d2 x
2. dt2 + n2 x = 0
dy
3. y = x dx + x dx
dy
2 3/2 2
dy d y
4. 1 + dx / dx 2 = c
5. dx
dy − wy = a cos(pt), dy
dt + wx = a sin(pt)
6. x ∂u ∂u
∂x + y ∂y = 2u
∂2y 2
∂ y
7. ∂t2 = c2 ∂x 2
An ordinary differential equations (ODE) is differential equations where all the differential
coefficients have reference to a single independent variable. Item 1 to 5 in the list are all ODEs.
A partial differential equation (PDE) is differential equations which there are two or more
independent variables and partial differential coefficients with respect to any of them. Item 6 and
7 are PDEs.
The ORDER of a differential equation is the order of the highest derivative appearing in it.
The DEGREE of a differential equation is the degree of the highest derivative occuring in it,
after the equation has been expressed in a form free from any radicals or fractions as far as the
derivatives are concerned.
From the list above, we can see that
y = A cos(nx + α)
is a solution of
d2 y
+ ny 2 = 0
dx2
The general (or complete) solution of a differential equation is that in which the number of
arbitrary constants are equal to the order of the differential equation. Thus y = A cos(nx + α) is
3
d2 y
a solution for dx2 + ny 2 = 0 as the number of arbitrary constants (A, α) are the same as the order
2
d y
of + ny 2 = 0.
dx2
A particular solution is a solution that can be obtained from general solution by giving
particular values to the arbitrary constants. For example
y = A cos(nx + π/4)
2
d y 2
is the particular solution of the equation dx 2 + ny = 0 as it can be derived from the general
solution y = A cos(nx + α) by putting α = π/4.
A differential equation may sometimes have an additional solution which cannot be obtained
from the general solution by assigning a particular value to the arbitrary constant. Such a solution
is called a singular solution.
d2 y dy
+ P (x) + Q(x)y = 0
dx2 dx
are said to be linearly independent if c1 y1 (x) + c2 y2 (x) = 0 such that c1 = 0 and c2 = 0.
If c1 and c2 are not both zero, then the two solutions y1 (x) and y2 (x) are said to be linearly
dependent.
d2 y dy
If y1 (x) and y2 (x) any two solutions of dx 2 + P (x) dx + Q(x)y = 0, then their linear combination
d2 y dy
c1 y1 (x) + c2 y2 (x) where c1 and c2 are constants, is also a solution of dx2 + P (x) dx + Q(x)y = 0.
4
2 First Order and First Degree ODEs
Some special methods to find solutions for these ODEs will be discussed here,
1. Separation of Variables
2. Homogeneous equations
3. Linear equations
4. Exact equations.
f (x)dx = g(y)dy
Integrating both sides, we get
Z Z
f (x)dx = g(y)dy + c
as its solution.
Example 1
Solve
dy x(2 log x + 1)
=
dx sin y + y cos y
We separate them into
(sin y + y cos y)dy = (x(2 log x + 1))dx
Integrating both side, we get
Z Z Z Z
sin ydy + y cos ydy = 2 log x · xdx + 2 xdx
x2 1 x2 x2
Z Z
− cos y + y sin y − sin y · 1dy + c = 2 log x · − · dx +
2 x 2 2
2 2
x x
− cos y + y sin y + cos y + c = 2x2 log x − +
2 2
Hence the solution is
2x2 log x − y sin y = c
Example 2
Solve
dy
= e3x−2y + x2 e−2y
dx
We separate them into
e2y dy = (e3x + x2 )dx
5
Integrating both side, we get
Z Z
2y
e dy = (e3x + x2 )dx + c
e2y e3x x3
= + +c
2 3 3
Hence the solution is
3e2y = 2(e3x + x3 ) + 6c
Example 3
Solve
dy
= sin(x + y) + cos(x + y)
dx
Setting x + y = t so that dy/dx = dt/dx − 1. The given equation becomes
dt
− 1 = sin t + cos t
dx
dt
dx =
1 + sin t + cos t
Integrating both side, we get
Z Z
dt
dx = +c
1 + sin t + cos t
Z
2dθ
x= +c (setting t = 2θ)
1 + sin 2θ + cos 2θ
Z
2dθ
= c
2 cos2 θ + 2 sin θ cos θ
sec2 θ
Z
= dθ + c
1 + tan θ
= log(1 + tan θ) + c
Example 4
Solve
y dy x2 + y 2 − 1
+ =0
x dx 2(x2 + y 2 ) + 1
Setting x2 + y 2 = t, we get
dy dt
2x + 2y =
dx dx
y dy 1 dt
or = −1
x dx 2x dx
6
The given equation becomes
1 dt t−1
−1+ =0
2x dx 2t + 1
1 dt t−1 t+2
=1− =
2x dx 2t + 1 2t + 1
2t + 1
2xdx = dt
t+2
3
2xdx = 2 − dt
t+2
dy f (x, y)
=
dx g(x, y)
where f (x, y) and g(x, y) are homogeneous functions of the same degree in x and y.
To solve a homogeneous equation,
dy
1. Set y = ux, then dx = u + x du
dx
Solve
(x2 − y 2 )dx − xydy = 0
Rearrange the equation, we get
dy x2 − y 2
=
dx xy
dy
Setting y = ux, then dx = u + x du
dx , the equation becomes,
du 1 − u2
u+x =
dx u
du 1 − 2u2
x =
dx u
Separating the variables, we get
u dx
2
du =
1 − 2u x
7
Integrating both sides, we get
Z Z
u dx
du = +c
1 − 2u2 x
−4u
Z Z
1 dx
− du = +c
4 1 − 2u2 x
1
− log(1 − 2u2 ) = log x + c
4
4 log x + log(1 − 2u2 ) = −4c
log x4 (1 − 2u2 ) = −4c
y2
x4 1 − 2 2 = e−4c = c0 (Set u = y/x)
x
Example 2
Solve y y y
− y sec2
x tan dx + x sec2 dy = 0
x x x
The equation can be rearrange into homogeneous equation
dy y y y y
= sec2 − tan cos2
dx x x x x
dy
Setting y = ux, then dx = u + x du
dx , the equation becomes,
du
u+x = (u sec2 u − tan u) cos2 u
dx
du
x = u − tan u cos2 u − u
dx
Separating the variables, we get
sec2 u dx
du = −
tan u x
Integrating both side, we get
sec2 u
Z Z
dx
du = −
tan u x
log tan u = − log x + log c
x tan u = c
Example 3
Solve
x
(1 + ex/y )dx + ex/y 1 − dy = 0
y
8
Rewrite the equation into its homogeneous form, we get
x/y x
dx e 1 − y
=− x/y
dy (1 + e )
dx
Setting x = uy, then dy = u + y du
dy , the equation becomes
du eu (1 − u)
u+y =−
dy (1 + eu )
du eu (1 − u) u + eu
y =− u
−u=−
dy (1 + e ) (1 + eu )
dy 1 + eu d(u + eu )
− = du =
y u + eu u + eu
Integrating both side, we get
d(u + eu )
Z Z
dy
− =
y u + eu
− log y = log(u + eu ) + c
y(u + eu ) = e−c = c0
a b
Case I. When a0 6= b0
Setting
x = X + h, y = Y + k, (h, k are constants)
and
dx = dX, dy = dY
the equation becomes
dY aX + bY + (ah + bk + c)
= 0
dX a X + b0 Y + (a0 h + b0 k + c0 )
dY
we choose h and k so that dX become homogeneous equation.
Set ah + bk + c = 0 and a0 h + b0 k + c0 = 0 so that
h k 1
= 0 = 0
bc0 0
−bc 0
ca − c a ab − ba0
or
bc0 − b0 c ca0 − c0 a
h= , and k =
ab0 − b0 a ab0 − ba0
9
Thus when ab0 − ba0 6= 0, dY
dX becomes
dY aX + bY
= 0
dX a X + b0 Y
which is homogeneous in X, Y and be solved by setting Y = uX.
Example
Solve
dy y+x−2
=
dx y−x−4
Setting
x = X + h, y = Y + k, (h, k are constants)
and
dx = dX, dy = dY
the equation becomes
dy y + x + (k + h − 2)
=
dx y − x + (k − h − 4)
Letting k + h − 2 = 0 and k − h − 4 = 0, then h = −1 and k = 3 then the equation will be
dY Y +X
dX = Y −X which is homogeneous in X and Y .
dY du
Setting Y = uX, then dX = u + X dX , the equation becomes,
du u+1
u+X =
dX u−1
du 1 + 2u − u2
X =
dX u−1
u−1 dX
du =
1 + 2u − u2 X
Integrating both sides, we get
2 − 2u
Z Z
1 dX
− du =
2 1 + 2u − u2 X
1
− log(1 + 2u − u2 ) = log X + c
2
Y2
2Y
log 1 + 2 − 2 + log X 2 = −2c
X X
log(X 2 + 2XY − Y 2 ) = −2c
X 2 + 2XY − Y 2 = e−2c = c0
10
Set
a b 1
= 0 =
a0 b m
or
a0 = am, b0 = bm
dy
then dx becomes
dy (ax + by) + c
=
dx m(ax + by) + c0
dy dt dy
= 1b dxdt
Setting ax + by = t, so that a + b dx = dx or dx − a , then the previous equation becomes
1 dt t+c
−a =
b dx mt + c0
dt bt + bc
=a+
dx mt + c0
(am + b)t + ac0 + bc
=
mt + c0
so the variables are separable. In the solution, setting t = ax + by, we get the required solution of
dy
dx
Example
Solve
(3y + 2x + 4)dx − (4x + 6y + 5)dy = 0
The equation can be rearrange as
dy (2x + 3y) + 4
=
dx 2(2x + 3y) + 5
dy dt
Setting 2x + 3y = t, then 2 + 3 dx = dx The equation becomes,
1 dt t+4
−2 =
3 dx 2t + 5
dt 7t + 22
=
dx 2t + 5
2t + 5
dt = dx
7t + 22
Integrating both sides,
Z Z
2t + 5
dt = dx
7t + 22
Z
2 9 1
− · =x+c
7 7 7t + 22
2 9
t− log(7t + 22) = x + c
7 49
Setting t = 2x + 3y, we have
11
2.3 Linear First-order Equations
A differential equation is said to be linear if the dependent variable and its differential coefficients
occur only in the first degree and not multiplied together.
Thus the standard form of a linear equation of the first order is,
dy
+ Py = Q
dx
where P Q are the functions of x. R
To solve the equation, we multiply both sides by e P dx , so we get
dy R P dx R R
·e + y e P dx P = Qe P dx
dx
d R P dx R
ye = Qe P dx
dx
Integrating both side, we get
R
Z R
P dx P dx
ye = Qe +c
Example 1
Solve
dy
(x + 1) − y = e3x (x + 1)2
dx
Divide the equation with (x + 1), we get
dy y
− = e3x (x + 1)
dx x + 1
1
Here P = − x+1 and
Z Z
dx
P dx = − = − log(x + 1) = log(x + 1)−1
x+1
The integrating factor is
R
P dx −1 1
e = elog(x+1) =
x+1
Thus the solution for the equation is
Z
y 1
= [e3x (x + 1)] dx + c
x+1 x+1
Z
= e3x dx + c
1 3x
= e +c
3
So the solution is
1 3x
y= e + c (x + 1)
3
12
Example 2
Solve √ !
e−2 x dx
√ =1
x dy
Rewrite the equation into √
dy y e−2 x
+√ = √
dx x x
where P = √1 and
x
√
Z Z
1
P dx = √ =2 x
x
R √
P dx
then the integrating factor becomes e = e2 x
Example 3
Solve
dy
3x(1 − x2 )y 2 + (2x2 − 1)y 3 = ax3
dx
dy dz
Setting z = y 3 and 3y 2 dx = dx , the equation becomes
dz
x(1 − x2 ) = (2x2 − 1)z = ax3
dx
dz 2x2 − 1 ax3
+ z =
dx x − x3 x − x3
2x2 −1
Here P = x−x3 and
2x2 − 1
Z Z
P dx = dx
x − x3
Z
1 1 1 1 1
= − − + dx
x 21+x 21−x
1 1
= − log x − log(1 + x) − log(1 − x)
h p 2 i 2
= − log x 1 − x2
2x2 − 1 √
Z h p i−1
− log[x 1−x2 ] 2
exp dx = e = x 1 − x
x − x3
13
So the solution is
x3
Z
z 1
√ =a · √ dx + c
x 1 − x2 x(1 − x2 ) x 1 − x2
Z
=a x(1 − x2 )−3/2 dx + c
Z
a
=− (−2x)(1 − x2 )−3/2 dx + c
2
z
√ = a(1 − x2 )−1/2 + c
x 1 − x2
Inserting z = y 3 , we get p
y 3 = ax + cx 1 − x2
Example
Solve
dy
x + y = x3 y 6
dx
.
Divide both sides with xy 6 , we get
dy y −5
y −6 + = x2
dx x
Setting y −5 = z and
dy dz
−5y −6 =
dx dx
The equation becomes
1 dz z
− + = x2
5 dx x
dz 5
− z = −5x2
dx x
14
dy
which is the same as dx + P y = Q pattern. So we can use the integrating factor.
Integrating factor is
R R
e P dx
= e− (5/x)
dx
−5 log x
=e
−5
= elog x
= x−5
The solution is
Z
z · x−5 = (−5x2 ) · x−5 dx + c
x−2
y −5 x−5 = −5 · +c
−2
Divide both side with y −5 x−5 , we get
is said to be exact if its left hand side member is the exact differential of some function u(x, y)
which is
du ≡ M dx + N dy = 0
The solution is therefore
u(x, y) = c
From calculus, we see that the partial derivatives of u(x, y) is
∂u ∂u
du = dx + dy
∂x ∂y
Comparing with du ≡ M dx + N dy, then we see that
∂u ∂u
=M =N
∂x ∂y
If we differentiate M with respect to y and N with respect to x, we get
∂M ∂2u
=
∂y ∂y∂x
∂N ∂2u
=
∂x ∂x∂y
or
∂M ∂N
=
∂y ∂x
∂u
We integrate ∂x = M with respect to x, we get
Z
u = M dx + k(y) k(y) is a constant
15
∂u ∂u
To determine k(y), we derive ∂y from this equation, and use ∂y = N to get dk/dy, and integrate
dk/dy to get k.
Example
Solve
cos(x + y)dx + (3x2 + 2y + cos(x + y))dy = 0
Test for exactness
M = cos(x + y)
N = (3x2 + 2y + cos(x + y))
Thus
∂M
= − sin(x + y)
∂y
∂N
= − sin(x + y)
∂x
So the equation is exact.
Implicit general solution
Z
u= M dx + k(y)
Z
= cos(x + y)dx + k(y)
= sin(x + y) + k(y)
∂u dk
= cos(x + y) +
∂y dy
N = 3y 2 + 2y + cos(x + y)
dk
So, dy is
dk
= 3y 2 + 2y
dy
By integration k(y) is
k(y) = y 3 + y 2 + c∗
Inserting k(y) into u = sin(x + y) + k(y), we obtain the answer
u(x, y) = sin(x + y) + y 3 + y 2 = c
F P dx + F Qdy = 0
16
which can be solve by using the method from the previous section. F (x, y) is called Integrating
Factor.
If we integrate the equation with respect to x and taking the exponent on both side, we get
the integrating factor which is Z
F (x) = exp R(x)dx
Example
Hence the integrating factor is F (y) = exp −1dy = e−1 . Multiplying the integrating factor to
R
17
which is an exact equation and be solve using the previous method.
Z
u = (ex + y)
= ex + xy + k(y)
∂u dk
=x+ = N = x − e−y
∂y dy
dk
= −e−y
dy
k = e−y + c∗
The solution is
y = eλx
0
y = λeλx
00
y = λ2 eλx
(λ2 + aλ + b)eλx = 0
λ2 + aλ + b = 0
18
3. Complex conjugate roots if a2 − 4b < 0
Example
y = ex + 3e−2x
When a2 − 4b = 0 we only get one root, λ = λ1 = λ2 = −a/2, hence the only solution is
y1 = e−(a/2)x
To obtain the second independent solution y2 , we set y2 = uy1 . Substitute this and its derivative
0 00
y2 and y2 , we get
00 0
(u00 y1 + 2u0 y 0 + uy1 ) + (a(u0 y1 + uy1 ) + buy1 = 0
Collecting term 0 00 0
u00 y1 + u0 (2y1 + ay1 ) + u(y1 + ay1 + by1 ) = 0
The second and third expression is zero, so we are left with
u00 y1 = 0
19
we choose c1 = 1 and c2 = 0 then u = x, so y2 = xy1 , so the general solution is
y = (c1 + c2 x)e−(a/2)x
Example
λ2 + λ + 0.25 = (λ + 0.5)2 = 0
y = (c1 + c2 x)e−0.5x
Taking the derivative and find c1 and c2 , so we get the particular solution as
y = (3 − 2x)e−0.5x
1 1
Case III: Complex Roots − + iω and − − iω
2 2
The discriminant is a2 − 4b < 0, two complex roots, or we can obtain a real solution by using
Example
Differentiate the general solution and using the initial value, we get the particular solution as
y = e−0.2x sin 3x
20
3.2 Non-homogeneous ODEs
A general solution for a non-homogeneous ODEs
y 00 + ay 0 + by = r(x)
when r(x) is an exponential function, a power of x, a cosine or sine, or sums or products of such
functions. These functions have derivative similar to r(x) itself. So, we choose a form for yp similar
to r(x), but with unknown coefficients to be determined by substituting yp and its derivatives into
the ODE. Table below shows the choice for yp for important form of r(x).
And the choice of rules for the method of undetermined coefficients are
1. Basic Rule: If r(x) is one of the functions in the first column from the table, choose yp
from the same line and determine the coefficients by substituting yp and its derivatives into
the equation
2. Modification rule: If a term in our choice for yp happens to be a solution of the ho-
mogeneous ODE corresponding to the equation, we multiply the choice of yp by x or x2
etc.
3. Sum Rule: If r(x) is a sum of functions in the first column of the table; we choose yp by
summing up the functions in the corresponding line.
Example 1: Rule 1
21
Comparing both sides, we see that
2K = 0, K = 0.001
which the value of K contradict each other, so yp = Kx2 is not the solution for this equation.
Looking from the table, the choice of yp for the term r(x) = Kxn is yp = K2 x2 + K1 x + K0 ,
then 00
yp + yp = 2K2 + 2K2 x2 + K1 x + K0 = 0.001x2
Comparing both sides, we get
K2 = 0.001, K1 = 0, K0 = −0.002
This gives
yp = 0.001x2 − 0.002
and the general solution becomes,
So, A = 0.002. To find B, we diffentiate the general solution once and put the initial condition
0 0
y 0 = yh + yp
= −A sin x + B cos x + 0.002x
0
y (0) = −A sin 0 + B cos 0 + 0.002(0)
= B = 1.5
Example 2: Rule 2
y 00 + 3y 0 + 2.25y = 0
yh = (c1 + c2 x)e−1.5x
The solution of non-homogeneous ODE cannot be taken as yp = Ce−1.5x since this a solution
for homogeneous ODE. So, by using rule number 2, we modify our choice function by x2 . That is,
we use
yp = Cx2 e−1.5x
0
yp = C(2x − 1.5x2 )e−1.5x
00
yp = C(2 − 3x − 3x + 2.25x2 )e−1.5x
22
Substitute these equations into the main equation, by ignoring the e−1.5x , we get
yp = −5x2 e−1.5x
c1 = 1, and c2 = 1.5
Example 3: Rule 3
y 00 + 2y 0 + 5y = e0.5x + 40 cos 10x − 190 sin 10x, y(0) = 0.16, y 0 (0) = 40.08
The general solution for homogeneous ODE y 00 + 2y 0 + 5y = 0 from the characteristics equation
is
yh = e−x (A cos 2x + B sin 2x)
The solution for non-homogeneous ODE, we choose our yp as summation of two function from
the table, that is
yp = Ce0.5x + K cos 10x + M sin 10x
Substitute into the equation and comparing both side, we get
C = 0.16, K = 0, M =2
From the initial condition, we found that A = 0 and B = 10, hence the complete solution is
23
where y1 and y2 are solutions for the corresponding homogeneous ODE,
y 00 + P (x)y 0 + Q(x)y = 0
and W is the Wronskian of y1 , y2 ,
0 0
W = y1 y2 − y2 y1
Example
y 00 + y = sec x
From the homogeneous solution we get y1 = cos x and y2 = sin x. Using these information, we
can get the Wronskian as
y = yh + yp
= c1 cos x + c2 sin x + cos x ln | cos x| + x sin x
y = (c1 + ln | cos x|) cos x + (c2 + x) sin x
on substituting
dy
=p
dx
d2 y dp
=
dx2 dx
we get
dp
f , p, x =0
dx
24
Example
(1 − x2 )D2 − xD = 2
dy d2 y dp
By setting dx = p and dx2 = dx , we get
dp
(1 − x2 )
− xp = 2
dx
dp x 2
− 2
p=
dx 1 − x 1 − x2
Integrating factor is
R x
− 1−x2
I.F = e
2
= e−1/2·log(1−x )
√
2
= elog 1−x
p
= 1 − x2
25
we get
dp
f , p, y =0
dx
Example
dp
y · p + (p)2 = p
dy
dp
or y =1−p
dy
dp dy
or =
1−p y
or − log(1 − p) = log y + log c1
1
or = c1 y
1−p
1
or p = 1 −
c1 y
dy c1 y − 1 dy
or = ∵ =p
dx c1 y dx
c1 y
or dy = dx
c1 y − 1
1
or 1+ dy = dx
c1 y − 1
1
∴y+ log(c1 y − 1) = x + c2
c1
d2 y
4.3 Equation of the type dx2
= f (y)
dy
Multiplying with 2 dx , we get
dy d2 y dy
2 · =2 · f (y)
dx dx2 dx
Integrating with respect to x, we get
2 Z
dy
= 2 f (y)dy + c1
dx
Z
= φ(y), ∵ φ(y) = 2 f (y)dy + c1
dy p
= φ(y)
dx
dy
p = dx
φ(y)
So the solution is Z
dy
p = x + c2
φ(y)
26
Example
27
2
d y
And for x2 dx 2 , we get
d2 y
d dy
=
dx2 dx dx
d 1 dy
= ·
dx x dz
1 dy 1 d2 y dz
=− 2 +
x dz x dz 2 dx
1 dy 1 d2 y 1
=− 2 + 2 x
xdz x dz
2
1 d y dy
= 2 −
x dz 2 dz
1
= 2 (D2 − D)y
x
2
d y
x2 2 = (D2 − D)y
dx
2
dy d y
Substitution of x dx = Dy and x2 dx 2
2 = (D − D)y into the first equation will reduces equation
Example
28
But since our original independent variable is x, we substitute back x = ez and z = ln x into the
equation to get our final solution,
c1 1
y(x) = + c2 x4 + x4 ln x
x 5
x2 y 00 + axy 0 + by = 0
Substituting
y = xm
y 0 = mxm−1
y 00 = m(m − 1)xm−2
r
1 1
m1 = (1 − a) + (1 − a)2 − b
2 4
r
1 1
m2 = (1 − a) − (1 − a)2 − b
2 4
If the roots m1 and m2 are real and different, the solutions are
y1 = xm 1 , y2 = xm2
and the general solution will be
y = c1 x m 1 + c2 x m 2
Example
x2 y 00 + 1.5xy 0 − 0.5y = 0
the auxiliary equation is
29
√ c2
y = c1 x +
x
y1 = x(1−a)/2
To find a second linearly independent solution, we use the reduction of order method by setting
y2 = u · y1 where we get
Z Z
1
u= exp − p dx dx
y12
where p = xa , which after some manipulation, we get u as
u = ln x
Therefore, the second linearly independent solution is
y2 = u · y1
= ln x · x(1−a)/2
y = (c1 + c2 ln x)x(1−a)/2
Example
x2 y 00 − 5xy 0 + 9y = 0
Answer
m2 − 6m + 9 = 0
which give double real roots m1 = m2 = 3, so the general solution is
y = (c1 + c2 ln x)x3
Example
x2 y 00 + 0.6xy 0 + 16.04y = 0
30
the auxilirary equation is
m2 − 0.4m + 16.04 = 0
which give complex roots
m1 = 0.2 + 4i
m2 = 0.2 − 4i
y1 = x0.2 cos(4 ln x)
y2 = x0.2 sin(4 ln x)
d2 y dy
+ P (x) + Q(x)y = R(x) (1)
dx2 dx
Since u is a solution of the differential equation, we can write
d2 u du
+ P (x) + Q(x)u = 0
dx2 dx
For y = u · v
y =u·v
dy du dv
=v +u
dx dx dx
d2 y d2 u dv du d2 v
= v + 2 + u
dx2 dx2 dx dx dx2
31
2
dy d y
Substituting y, dx and dx 2 into (1), we get
d2 u d2 v
dv du du dv
v + 2 + u + P (x) v + u + Q(x)uv = R(x)
dx2 dx dx dx2 dx dx
Rearrange, we get
2 2
d u du d v dv du dv
v + P (x) + Q(x)u + u + P (x) +2 = R(x)
dx2 dx dx2 dx dx dx
The first bracket is equal to 0, so the remaining equation divided by u, we get
d2 v dv 2 du dv R(x)
+ P (x) + =
dx2 dx u dx dx u
d2 v
2 du dv R(x)
+ P (x) + =
dx2 u dx dx u
Thus, the formula to find v is
d2 v
2 du dv R(x)
2
+ P (x) + = (2)
dx u dx dx u
Example
Solve the following equation, given that y = u = x is a homogeneous solution for this equation
d2 v
2 du dv R(x)
+ P (x) + =
dx2 u dx dx u
2
d v −2x(1 + x) 2 dv x
+ + (1) =
dx2 x2 x dx x
2
d v dv
−2 =1
dx2 dx
dz dv
or − 2z = 1, ∵ z =
dx dx
The last equation is linear differential equation, its solution is
Z
−2x
ze = 1 · e−2x dx + c1
e−2x
= + c1
−2
1
z = + c1 e2x
−2
dv 1
= + c1 e2x
dx −2
1
dv =( + c1 e2x )dx
−2
−x c1 2x
v = + e + c2
2 2
Then, the complete solution y = u · v is
−x c1 2x
y =u·v =x + e + c2
2 2
32
5 Higher Order Linear ODEs
An Higher Order ODE which can be written as below
y n + an−1 y n−1 + . . . + a1 y 0 + a0 y = 0
Substituting y = eλx , we obtain the characteristic equation,
λn + an−1 λn−1 + . . . + a1 λ + a0 = 0
By factoring the equation or using other methods we can determine the roots for this equation.
If all the roots we get are real and different, (λ1 6= λ2 6= . . . 6= λn ), then the n solutions,
y1 = eλ1 x , . . . , yn = eλn x
cosntitute the basic solution for
Example
y 000 − 2y 00 − y 0 + 2y = 0
Answer
λ3 − 2λ2 − λ + 2 = 0
The roots are λ1 = −1, λ2 = 1 and λ3 = 2. Therefore, the general solution is
y = c1 e−x + c2 ex + c3 e2x
If complex roots occur, they exist in conjugate pairs. Thus if λ = γ + iω is a complex root
exist then it conjugate λ∗ = γ − iω will also exist. The two corresponding linearly independent
solutions are
33
Example
Answer
λ3 − λ2 + 100λ − 100 = 0
The roots are λ1 = 1, λ2 = 10i and λ2 = −10i which has a complex roots. The general solution
will be
If among the nth roots we have a real double root occur, for example λ1 = λ2 , we take y1 and
xy1 as the corresponding linearly independent solutions.
In general, if we have λ as a real root of order m, the m corresponding linearly independent
solution are
Example
Answer
λ5 − 3λ4 + 3λ3 − λ2 = 0
The roots are λ1 = λ2 = 0 and λ3 = λ4 = λ5 = 1. So the general solution will be
y = c1 + c2 x + (c3 + c4 x + c5 x2 )ex
The general solution will be the same as Simple Complex Roots except if λ = γ + iω is a
complex double root with corresponding linearly independent solutions are
34
eγx cos(ωx), eγx sin(ωx), xeγx cos(ωx), xeγx sin(ωx)
and the corresponding general solution are
n Z
X Wk (x)
yp (x) = yk (x) r(x) dx
W (x)
k=1
Z Z
W1 (x) Wn (x)
= y1 (x) r(x) dx + . . . + yn (x) r(x) dx
W (x) W (x)
Example
Answer
y1 = x, y2 = x2 , y3 = x3 .
Hence the corresponding general solution of the homogeneous ODE is
35
yh = c1 x + c2 x2 + c3 x3 .
For particular non-homogeneous solution, we start by finding the Determinants
x x2 x3
= 1 2x 3x2 = 2x3
W
0 2 6x
2
0 x x3
= 0 2x 3x2 = x4
W1
1 2 6x
x 0 x3
= 1 0 3x2 = −2x3
W2
0 1 6x
x x2 0
= 1 2x 0 = x2
W3
0 2 1
Z Z Z
W1 (x) W2 (x) W3 (x)
yp = y1 (x) r(x) dx + y2 (x) r(x) dx + y3 (x) r(x) dx
W (x) W (x) W (x)
x4 −2x3 x2
Z Z Z
2 3
=x x ln x dx + x x ln x dx + x x ln x dx
2x3 2x3 2x3
Z Z Z
x 1
=x x ln x dx − x2 x ln x dx + x3 x ln x dx
2 2x
x x3 x3
2
x2 x3
x
= ln x − − x2 ln x − + (x ln x − x)
2 3 9 2 4 2
1 11
yp = x4 ln x −
6 6
y = yh + yp
1 11
= c1 x + c2 x2 + c3 x3 + x4 ln x −
6 6
1. for r(x) = erx , we mulitply the non-homogeneous equation with (D−r) to get (D−r)r(x) = 0
Example
Derx = rerx
(D − r)erx = 0
2. for r(x) = xk erx we multiply the non-homogeneous equation with (D − r)k+1 to get (D −
r)k+1 r(x) = 0
36
Example
3. for r(x) = cos βx or sin βx, we multiply the non-homogeneous equation with (D2 + β 2 ) to
get (D2 + β 2 )r(x) = 0
Example
4. for r(x) = xk eαx cos βx or xk eαx sin βx, we multiply the non-homogeneous equation with
k+1 k+1
(D − α)2 + β 2 to get (D − α)2 + β 2 r(x) = 0
Example
Find a general solution for the following non-homogeneous ODEs using Annihilator method,
y 000 − 3y 00 + 4y = xe2x
Answer
Using method of undetermined coefficients, we get c4 = −1/18 and c5 = 1/18, so the general
solution is
1 2 2x 1
y(x) = c1 e−x + c2 e2x + c3 xe2x − x e + x3 e2x
18 18
37