Chapter 3
Chapter 3
CCMA4003 Calculus
Chapter 3
Differential Equations
3.1 Introduction
dy d 2 y d 3 y
A differential equation is an equation involving a function y(x) and its derivatives, , , , etc.
dx dx 2 dx 3
The following are some examples of differential equations.
dy
(1) = 3x + 2
dx
d2y dy
(2) 2
+2 – 3 = ex
dx dx
3
d2 y
5
dy
(3) 2 + + x2 = sin x
dx dx
The order of a differential equation is the order of the highest derivatives in the equation.
Hence equation (1) is a first order differential equation while the others are of second order.
The degree of a differential equation is that of the highest power of the highest derivatives which
the equation contains after simplification. Thus equation (3) is a second order differential
equation of degree three.
Starting with a differential equation it is possible, by integration and by being given sufficient
data to determine unknown constants, to obtain the original function. This process is called
‘solving the differential equation’.
The general solution of a differential equation is a function y = F(x) (explicit) or F(x,y) = 0 (implicit)
which satisfies the differential equation and contains one or more arbitrary constants of integration.
When additional information is given so that constants may be calculated, the particular solution of
the differential equation is obtained.
dy
For example, y = 3x + C is the general solution of the differential equation 3.
dx
If we include the fact that y = 5 when x = 1, i.e. y(1) = 5 (Initial Condition),
we can determine that C = 2 (∵ 5 = 3 + C ∴ C = 2 )
and we obtain y = 3x + 2, the particular solution.
3-1
3.2 First Order Differential Equations
Solve by integration: y = f ( x ) dx
Example 1
dy
Solve the differential equation x 2 8x 5 3x 4 , given y = 0 when x = 1.
dx
Solution:
dy
x2 8x 5 3x 4
dx
dy
x2 8x 5 3x 4
dx
dy
8x 3 3x 1 4x 2
dx
∴ y = (8x 3 3x 1 4x 2 ) dx
x4 4x 1
y 8 3ln | x | C
4 1
4
y 2x 4 3ln | x | C (General Solution)
x
4
Hence y 2x 4 3ln | x | 2 (Particular Solution)
x
3-2
B. Separable Differential Equation – By Separating the Variables
This method is used if the equation is separable, i.e. it can be written in either forms
dy g( x )
= f(x, y) = g(x) h(y) or
dx h ( y)
3-3
Example 2
dy x 2 1
Solve the differential equation given y = 2 when x = 1.
dx xy
Solution:
dy x 2 1
dx xy
dy x 2 1
y
dx x
dy
y x x 1
dx
ydy (x x
1
)dx
y2 x 2
ln | x | C (General Solution)
2 2
1 2 1 2 3
Hence y x ln | x | (Particular Solution)
2 2 2
Remark: It is not necessary to rewrite the answer in the explicit form, y = F(x).
3-4
C. Homogeneous Differential Equation – By Substitution
A function f(x, y) of two variables is homogeneous (or, more precisely, homogeneous of degree 0),
if for any constant k, we have f(kx, ky) = k0 f(x, y) = f(x, y).
x 2 y2
For example the function f(x, y) = is homogeneous, since
xy
(kx ) 2 (ky ) 2 k 2 x 2 k 2 y 2 k 2 (x 2 y 2 ) x 2 y 2
f(kx, ky) = = = = = f(x, y)
(kx )(ky ) k 2 xy k 2 xy xy
The following method is used if the equation can be written in the form
dy
= f(x, y) where f(kx, ky) = f(x, y), k is any constant
dx
3-5
Example 3
dy x 2 y 2
Solve the differential equation = given y = 4 when x = 1.
dx xy
Solution:
x 2 y2
Let f(x, y) =
xy
(kx)2 (ky) 2 k 2 x 2 k 2 y2 k 2 (x 2 y 2 ) x 2 y 2
We have f (kx, ky) f (x, y)
(kx)(ky) k 2 xy k 2 (xy) xy
∴ f is a homogeneous function of x and y
By the substitution y = vx
dy dv
We have =x +v
dx dx
dv x 2 (vx)2 x 2 v2 x 2 x 2 (1 v2 ) 1 v 2
Therefore x + v = f(x, y) = f(x,vx) =
dx x(vx) vx 2 x 2 (v) v
dv 1 v 2 1 v2 v2 1
i.e. x v
dx v v v
dv 1 1
Hence
dx v x
1
vdv dx
x
1
∴ v dv = x dx
v2
ln x C
2
2
1 y
ln x C
2 x
y2
ln x C (General Solution)
2x 2
3-6
D. Linear Differential Equation – By Integrating Factor
The equation is called linear if only first degree terms in y and its derivatives occur.
To solve this type of equation, we make use of an Integrating Factor (I. F.), which is given by
u(x) = e
P ( x ) dx
dy
We have u(x) + u(x) P(x) y = u(x) Q(x)
dx
dy d
u(x) + y [u ( x )] = u(x) Q(x)
dx dx
d
Hence [u(x) y] = u(x) Q(x)
dx
where u(x) = e
1
u(x)
P ( x ) dx
∴ y= u(x) Q(x) dx
3-7
Example 4
dy
Solve the differential equation x 2y x 2 given y = 1 when x = 1.
dx
Solution:
dy dy
First rewrite the equation x 2y x 2 in the form of + P(x) y = Q(x)
dx dx
dy 2
+ y=x … (*)
dx x
2 2
Then P(x) =
x
and P( x ) dx = x dx = 2 ln x = ln x 2
∴ x 2 y = x 3 dx
x4
x2y C
4
x2 C
y (General Solution)
4 x2
x2 3
Hence y = 2 (Particular Solution)
4 4x
3-8
3.3 Second Order Linear Differential Equations with Constant Coefficients
The second order linear differential equations with constant coefficients are of the type
d2y dy
a 2
+b + cy = f(x) …(*)
dx dx
where a (≠0), b, c are constants and f(x) is a function of x.
d2y
This equation is called second order because its highest derivative of y with respect to x is .
dx 2
It is linear because only first degree terms in y and its derivatives occur and it is with constant
coefficients because the coefficients are constants (not variables).
A solution which contains a number of arbitrary constants equal to the order of the equation
(in this case two), is called the complete or general solutions.
Solutions obtained by giving particular values to the constants are called particular solutions.
Since solving a second order differential inevitably entails integrating twice, the general solution
of such an equation must include two arbitrary constants.
3-9
A. Linear Homogeneous Differential Equations with Constant Coefficients
dy d 2 y
Then by substituting y, , into (**), we get (am2 + bm + c)emx = 0
dx dx 2
Hence y = emx is a solution of (**) if m is a root of the Auxiliary Equation az2 + bz + c = 0
Let m1 and m2 be the roots of the auxiliary equation and they can be obtained by the formula
b b 2 4ac b b 2 4ac
z= =
2a 2a 2a
3-10
To solve the auxiliary quadratic equation
az2 + bz + c = 0
dy mx mx d2y
We have = mxe + e and = m2xemx + 2memx
dx dx 2
d2y dy
Hence a 2
+b + cy = a(m2x + 2m)emx + b(mx + 1)emx + cxemx
dx dx
= [(am2 + bm + c)x + (2am + b)]emx
= (2am + b)emx ( ∵ am2 + bm + c = 0 )
b mx b
= 2a b e ( ∵ b2 – 4ac = 0 ∴ m = – )
2a 2a
=0
Let m1 = p + qi
Then m2 = p – qi
2. Let m1 and m2 be the roots of the auxiliary equation and they can be obtained by the formula
b b 2 4ac b b 2 4ac
z= =
2a 2a 2a
3. The general solution of the differential equation then takes one of the three forms as
shown in the table.
3-12
Example 5
d2 y dy
Solve the differential equation 2
2 8y 0 .
dx dx
Solution:
Auxiliary Equation: z2 + 2z – 8 = 0
(z + 4) (z – 2) = 0
∴ z = – 4 or z = 2
Hence the general solution is y = Ae- 4x + Be2x, where A and B are arbitrary constants.
Example 6
d2 y dy
Solve the differential equation 2
6 9y 0 .
dx dx
Solution:
Auxiliary Equation: z2 – 6z + 9 = 0
(z – 3)2 = 0
∴ z = 3 (repeated)
Hence the general solution is y = (Ax + B)e3x , where A and B are arbitrary constants.
Example 7
d2 y dy
Solve the differential equation 2
8 25y 0 .
dx dx
Solution:
Auxiliary Equation: z2 8z 25 0
(8) (8) 2 4(1)(25)
∴ z=
2(1)
8 36
2
8 6i
2
4 3i
Hence the general solution is y = e4x [Acos(3x) Bsin(3x)] , where A and B are arbitrary constants.
3-13
B. Linear Non-Homogeneous Differential Equations with Constant Coefficients
Step1
The general solution of the equation (**) is called the Complementary Function –– yc.
It is given by
yc = Au + Bv
where y = u(x) and y = v(x) are particular and distinct solutions of (**)
and A and B are arbitrary constants.
Step 2
Step 3
The general solution of the equation (*) is then the sum of the complementary function of (**) and
any particular solution of (*), i.e. y = yc + yp
Since yc can be obtained by the method in the last section, the only remaining problem is to find
a particular solution yp.
However, in all but very simple cases it is virtually impossible to find particular solutions by inspection
and, in general, other methods have to be used.
3-14
Method of Undetermined Coefficients
This method is based on assuming a trial form for the particular solution yp which depends
on the form of f(x) and contains some constants.
The trial function is then substituted into the equation and the constants so chosen that make it
to be a solution.
The following rules are useful in fixing the form of yp(x) for a particular form of f(x).
2. If the trial form is not a particular solution, then we try another form
by multiplying our initial choice by x or, if necessary, by x2.
3-15
Example 8
d2 y dy
Solve the equation 2
5 6y 3e x .
dx dx
Solution:
Auxiliary Equation: z2 5z 6 0
(z – 2)(z – 3) = 0
∴ z = 2 or z = 3
Hence the complementary function is yc Ae2x Be3x , where A and B are arbitrary constants.
Try yp = Kex
dy p
Then = Kex
dx
2
d yp
and 2
= Kex
dx
3 x
Hence y p e is a particular solution.
2
3
And the general solution is y yc y p Ae2x Be3x e x , where A and B are arbitrary constants.
2
3-16
Example 9
d2 y dy
Find a particular solution of 2
5 6y 3e2x .
dx dx
Solution:
Try yp = Ke2x
dy p
Then = 2Ke2x
dx
2
d yp
and = 4Ke2x
dx 2
Try yp = Kxe2x
dy p
Then = Ke2x + 2Kxe2x
dx
2
d yp
and = 2Ke2x + 2Ke2x + 4Kxe2x = 4Ke2x + 4Kxe2x
dx 2
3-17
Example 10
d2 y dy
Find a particular solution of 2
5 6y 36x .
dx dx
Solution:
Try yp = K1x + K0
dy p
Then = K1
dx
2
d yp
and =0
dx 2
6K1 36
we have i.e. K1 = 6 and K0 = 5
6K 0 5K1 0
3-18
Example 11
d2 y dy
Find a particular solution of 2
5 6y 18x 2 11 .
dx dx
Solution:
Try y p K 2 x 2 K1 x K 0
dy p
Then 2K 2 x K1
dx
2
d yp
and 2K 2
dx 2
By comparing coefficients of x2 terms, x terms and the constant terms on both sides,
6K 2 18
we have 10K 2 6K1 0 i.e. K2 = 3, K1 = 5 and K0 = 5
2K 5K 6K 11
2 1 0
3-19
Example 12
d 2 y dy
Find a particular solution of 2x 1 .
dx 2 dx
Solution:
Try yp = K1x + K0
dy p
Then = K1
dx
2
d yp
and =0
dx 2
2K1 2
we have i.e. K1 = 1 and K0 = –1
2K1 K 0 1
3-20
Example 13
d2 y dy
Find a particular solution of 2
5 6y 52sin(2x) .
dx dx
Solution:
dy p
Then 2K1 sin(2x) 2K 2 cos(2x)
dx
d 2 yp
and 4K1 cos(2x) 4K 2 sin(2x)
dx 2
[4K1 cos(2x) 4K 2 sin(2x)] 5[2K1 sin(2x) 2K 2 cos(2x)] 6[K1 cos(2x) K 2 sin(2x)] 52sin(2x)
(10K1 2K 2 ) sin(2x) (2K1 10K 2 ) cos(2x) 52sin(2x)
10K1 2K 2 52
we have i.e. K1 = 5 and K2 = 1
2K1 10K 2 0
3-21
Example 14
d2 y dy
Solve the equation 2
4y 3cos x given y = 0 and = 2 when x = 0.
dx dx
Solution:
Auxiliary Equation: z2 + 4 = 0
∴ z = 2i
Hence the complementary function is yc = A cos(2x) + B sin(2x), where A and B are arbitrary constants.
3K 3
we have 1 i.e. K1 = 1 and K2 = 0
3K 2 0
And the general solution is y yc yp = A cos(2x) + B sin(2x) + cos x, where A and B are arbitrary constants.
A. The D Operator
d
Let the symbol D denote the operation of differentiation with respect to x, , so that
dx
dy d2 y d3 y dn y
Dy , D2 y D(Dy) 2 , D3 y D(D 2 y) 3 , and Dn y n , where n is a positive integer.
dx dx dx dx
The general nth order linear differential equation with constant coefficients may now be written
dn y d n 1y dy
in terms of the D operator as a n a n 1 a1 a 0 y F(D)y f (x)
dx n dx n 1 dx
n
where F(D) a i Di a n D n a n 1D n 1 a1D a 0 is a polynomial in D of degree n.
i 0
d2 y dy
For example, 2
4 3y f (x) can be written as D2 y 4Dy 3y f (x)
dx dx
and simplify as (D 4D 3)y f (x) .
2
3-23
Example 15
Find
(a) (2D 5)e4x
(b) (6D2 4D 2)e3x
Solution:
Example 16
Find
(a) (D2 4D 1)(e2x sin x)
(b) (D2 4D 1)(e2x x3 )
(c) (D 2)4 (e2x cos x)
Solution:
3-24
Example 17
Find
(a) (D4 5D2 1)sin(4x)
(b) (D4 2D2 )cos(3x)
(c) (D4 2D3 D2 D 1)sin(2x)
Solution:
Example 18
Solution:
3-25
B. The Inverse Operator
1
Consider the equation Dy f (x) , which gives y f (x) .
D
dy
But Dy f (x) , or equivalently f (x) , is easily solved by writing y f (x)dx ,
dx
1
So it is nature to make the definition f (x) f (x)dx .
D
1
Therefore, the operator applied to a function means integrate the function.
D
1
Similarly, the operator applied to a function means integrate the function twice in succession, and so on.
D2
1 1
Operators like and 2 are called inverse operators.
D D
The general solution of an nth order differential equation must contain n independent arbitrary constants.
A solution which does not contains arbitrary constant is called particular integral.
1 2
For example, if Dy x , then y xdx x C is the general solution
2
1 1
and y p x x 2 is the particular integral of Dy x .
D 2
1
In general, y p f (x) is the particular integral of F(D)y f (x) .
F(D)
Remark:
1
1. F(D) 1
F(D)
1 1 1
2. [f (x) g(x)] f (x) g(x)
F(D) F(D) F(D)
1 1
3. [k(f (x)] k f (x)
F(D) F(D)
3-26
The following are some useful results of the inverse operator:
1
a F(0) 0
1
1. 1 0
F(D) 1 xm F(0) 0
F(m) (0)
where m is the smallest positive integer such that F(m) (0) 0
1 kx
e F(k) 0
1 kx F(k)
2. e
F(D) e kx 1
1 F(k) 0
F(D k)
G(D)x n F(0) 0
1
3. xn 1
F(D) m G1 (D)x
n
F(0) 0,i.e., F(D) Dm F1 (D) and F1 (0) 0
D
1
where G(D) is a polynomial in D of degree n which is obtained by expanding in ascending
F(D)
powers of D and up to D n ;
1
and G1 (D) is a polynomial in D of degree n which is obtained by expanding in ascending
F1 (D)
powers of D and up to D n .
4. Let F(D) DG(D2 ) H(D2 ) . Assume A G(k 2 ) and B H(k 2 ) are NOT BOTH zero. Then
1 1
sin(kx m) (AD B)sin(kx m)
F(D) A k B2
2 2
1 1
cos(kx m) (AD B) cos(kx m)
F(D) A k B2
2 2
1 kx 1
5. e V(x) ekx V(x)
F(D) F(D k)
3-27
Example 19
Find a particular integral of the following differential equations by using operator method.
(a) (3D2 2D 4)y 1
(b) (3D2 2D)y 5
(c) (3D2 )y 7
Solution:
1 1
(a) y p 1 ( ∵ F(0) 0 )
3D 2D 4
2
4
1 1 1 5
(b) y p 55 2 1 5 x x ( ∵ F(0) 0 and F(1) (0) 2 )
3D 2D
2
3D 2D 2 2
1 1 1 7
(c) y p 7 7 2 1 7 x2 x2 ( ∵ F(0) 0 , F(1) (0) 0 and F(2) (0) 6 )
6 6
2
3D 3D
Example 20
Find a particular integral of the following differential equations by using operator method.
(a) (D2 2D 3)y e2x
(b) (D2 2D 3)y 4ex
Solution:
1 1 1
(a) yp e2x 2 e2x e2x ( ∵ F(2) 0 )
D 2D 3
2
2 2(2) 3 5
1 1
(b) yp (4e x ) 4e x 1 ( ∵ F(1) 0 )
D 2D 3
2
(D 1) 2(D 1) 3
2
1
4e x 1
D 2D 1 2D 2 3
2
1
4e x 2 1
D 4D
1
4e x x ( ∵ F(0) 0 and F(1) (0) 4 )
4
xex
3-28
Example 21
Find a particular integral of the following differential equations by using operator method.
(a) (D2 5D 6)y 36x
(b) (D2 5D 6)y 18x 2
(c) (D2 D)y 2x 1
Solution:
1
(a) y p 36x 1 5
D 5D 6
2 D
6 36
1 6 5D D 2 1
36 2 x
D 5D 6 5 1
1 D D2
1 5 6 6
36 D x 5 1 2
D D
6 36 6 6
1 5
36 x (1)
6 36
6x 5
1
(b) y p 18x 2
D 5D 6
2 1 5
D
19 2
D
6 36 216
1
18 2 x2 6 5D D 2 1
D 5D 6 5 1
1 D D2
1 5 19 2 2 6 6
18 D D x 5 1 2
6 36 216 D D
6 6
1 5 19
18 x 2 (2x) (2) 5 25 5
D D 2 D3
6 36 216 6 36 36
19 2 5 3
19 D D
3x 2 5x 36 36
6
1
(c) yp (2x 1)
D D
2
1 1
2 2 x 2 1
D D D D
1 1 1
2 x 2 1
D D 1 D D 1 D
1 1 1 D 1
2 (1 D)x x ( ∵ F(0) 0 and F(1) (0) 1 ) 1 D
D 1
D
1
2 1 x x
D
x2
2 x x
2
x2 x
3-29
Example 22
Find a particular integral of the following differential equations by using operator method.
(a) (D2 4)y cos(3x)
(b) (D2 3D 5)y sin(x)
(c) (D2 5D 6)y 52cos(2x)
Solution:
1 1 1
(a) y p cos(3x) 2 cos(3x) cos(3x)
D 4
2
3 4 5
1 1
(b) y p sin(x) 2 sin(x)
D 3D 5
2
1 3D 5
1
sin(x)
3D 4
3D 4
sin(x)
(3D 4)(3D 4)
3D 4
sin(x)
9D 2 16
3D 4
sin(x)
9(12 ) 16
3D 4
sin(x)
25
3 4
cos(x) sin(x)
25 25
1 1
(c) yp 52 cos(2x) 52 2 cos(2x)
D 5D 6
2
2 5D 6
1
52 cos(2x)
2 5D
2 5D
52 cos(2x)
(2 5D)(2 5D)
5D 2
52 cos(2x)
4 25D 2
5D 2
52 cos(2x)
4 25(22 )
52
(5D 2) cos(2x)
104
1
{5[2sin(2x)] 2 cos(2x)}
2
5sin(2x) cos(2x)
3-30
Example 23
Find a particular integral of the differential equation (D2 2D 4)y ex sin(2x) by using operator method.
Solution:
1
yp e x sin(2x)
D 2D 4
2
1
ex sin(2x)
(D 1) 2(D 1) 4
2
1
ex 2 sin(2x)
D 2D 1 2D 2 4
1
ex 2 sin(2x)
D 4D 7
1
ex sin(2x)
(2 ) 4D 7
2
1
ex sin(2x)
4D 3
4D 3
ex sin(2x)
(4D 3)(4D 3)
4D 3
ex sin(2x)
16D 2 9
4D 3
ex sin(2x)
16(22 ) 9
1
e x (4D 3) sin(2x)
73
1
e x [4 2 cos(2x) 3sin(2x)]
73
8 3
e x cos(2x) e x sin(2x)
73 73
3-31
Example 24
d2 y
Find the general solution of the differential equation 4y x 2e3x by using operator method.
dx 2
Solution:
Auxiliary Equation: z2 4 0
∴ z 2
Hence the complementary function is yc Ae2x Be2x , where A and B are arbitrary constants.
(D 2 4)y x 2 e3x
1
yp e3x x 2
D 4
2
1
e3x x2
(D 3) 4
2
1
e3x 2 x2
D 6D 9 4 1 6 31 2
D D
1 5 25 125
e3x 2 x2 5 6D D 2 1
D 6D 5
6 1
1 6 31 2 2 1 D D2
e3x D D x 5 5
5 25 125 6 1 2
D D
1 6 31 5 5
e3x x 2 (2x) (2) 6 36 6
5 25 125 D D 2 D3
5 25 25
1 12 62 31 2 6 3
D D
e3x x 2 x 25 25
5 25 125
1 12 62
Hence the general solution is y y c y p Ae 2x Be 2x e3x x 2 x ,
5 25 125
where A and B are arbitrary constants.
3-32