MAT 202 LECTURE NOTE
COURSE TITLE:Elementary Differential Equation
COURSE OUTLINE
i. First Order Ordinary Differential Equation
ii. Existence and Uniqueness of solution.
iii. Second order ordinary differential equation with constant coefficient.
iv. General theory of nth order linear equation
v. Laplace Transform Method
vi. Simple treatment of Partial Differential Equations
vii. Application of ODE and PDE to physical, life and social sciences.
DEFINITION OF TERMS
0.1 Differential Equation (DE)
A DE according to Wikipedia is an equation which relates functions with their
derivatives. We note that a function denotes physical phenomenon, while its
derivative gives the rate of change. Differential equation thus describes the re-
lationship between the two.
In Ray’s language, DE is an equation which involves derivatives(or differentials)
of one or more dependent variables y1 , y2 , ...yn with respect to one or more in-
dependent variables x1 , x2 , ...xn .
The solution of such equation over a specific region R is a set of suitably differ-
entiable functions say y1 (x1 , x2 , ...xn ), y2 (x1 , x2 , ...xn , ...yn (x1 , x2 , ...xn ) which
when put into the given equation reduces to an identity at all points of R.
dy
R
Note dx = f (x) is a d.e whose solution reads y = f (x)dx + C
0.2 Ordinary differential equation(ODE)
This is an equation in which all the derivatives in the d.e are total derivatives.
While Partial Differential Equation PDE are such equations in which the deriva-
∂y
tives in the d.es are partial ∂x
Order and degree of d.e
: The order of a d.e is the order of the highest derivative which appears in the
d.e. While the degree of a d.e is the degree of the highest order derivative in
the given d.e
e.g
dy
1. 4 dx − 3y = 0 is an ode of order 1 degree 1.
2
d y dy
2. 3 dx 2 + 5 dx = 6 is an ode of order 2 degree 1.
∂3y ∂y
3. ∂x3 + ∂x = sin x is a pde of order 3 degree 1.
dy 3
4. 7( dx ) − 5y 2 = 3xe5 is an ode of order 1 degree 3.
.
0.3 Linear Differential Equation
A linear differential equation is an equation of the first degree in the dependent
d2 y dy
variable and its derivatives. e.g dx 2 + 5 dx − 3y = 6x
The general form of linear differential equations is
ao (x)y n + a1 (x)y n−1 + a2 (x)y n−2 + ... + an−1 (x)y 1 + an = q(x) a0 (x) 6= 0 (1)
The equation is called homogenous if q(x) = 0 while if q(x) 6= 0 it is termed
nonhomogenous. A d.e that cannot be put in the form (1) above is called
nonlinear
e.g
1. y 00 + 3xy 0 − 4y = sin x is a non homogenous linear equation.
2. 4y 00 + 2yy 0 − 5y = tan x e non linear non homogenous equation
0.3.1 Exercise
1. Describe the nature of the following d.e with respect to ode/pde, order,linearity
and homogeneity
a. y 00 − 2y 0 + y = x2
b. y 00 + (4 + 3sin2x)y = 0
c. y 000 + 5y 00 − 12y 0 + 3y = ex
d. y iv + 2xy 000 + y 2 = 0
∂2p
e. ∂t2 + p ∂p
∂t = 0
2. Verify that each of the following d.es has the given solution for all values of
the arbitrary constants A and B
a. y 00 − 4y = 0; y = Ae2x + Be−2x
d2 y
b. dx2 + 4y = 0; y = A cos 2x + B sin 2x
c. y 00 + 3y 0 + 2y = 12e2x ; y = Ae−x + Be−2x + e2x
d. y 00 − 6y 0 + 9y = 0; y = Ae3x + Bxe3x
e. 2xydy = (y 2 − x)dx; y 2 = ax − xlnx
∂2p ∂p
f. ∂x2 = ∂t ; p = Ae−9t cos(3x + B)
3. Given that A and B are arbitrary constants, find a second order differential
equation for which each of the following expression is a general solution:
a. y = Ae−2x + Bex
b. y = A + Be4x
c. y = A sin 5x + B cos 5x
d. y = A cosh 3x + B sinh 3x
e. y = 3Ax + Bx2
f. y = sin(A + Bx)
0.3.2 Theorem 1
If y1 and y2 are two solutions of a homogenous, linear differential equation; then
for values of the constants A and B, the linear combination y = AY1 + BY2 is
also a solution of the homogenous equation.
0.3.3 EXAMPLE/EX
. a. Show that for all values of the arbitrary constants A and B, both y1 = A
and y2 = Bx2 satisfy each of the d.es xy 00 = y 0 and 2yy 00 = ((y 0 ))2 but that
y = A + Bx2 will satisfy only the first of these equations. Why ?
b. Verify same for values of A and B both y1 = A(x − 1)2 and y2 = B(x + 1)2
satisfy the d.es (x2 − 1)y 00 − 2xy 0 + 2y = 0, 2yy 00 − (y 0 )2 = 0 but that y =
A(x − 1)2 + B(x + 1)2 will satisfy only the first equation. Why?
0.4 METHODS OF SOLVING FIRST ORDER ORDI-
NARY DIFFERENTIAL EQUATIONS
There are several methods of solution to ODEs, among these are:
i Direct integration,
ii Separable variable ,
iii Homogeneous equation, Exact
iv Linear differential equation methods.
Direct integration method
Here the differential equation is written explicitly as a function of the indepen-
dent variable.
dy
R
e.g dx = f (x) has the solution y = f (x)dx + C
Separable first order equations
They are equations of the form:
a f (x)dx = g(y)dy
dy
b dx = K(x)T (y)
c f (x)G(Y )dx = F (x)g(y)dy
EXAMPLE/EX
dy
1 Solve dx = 5xy
solution
Separating
R dy R the variables
y = 5xdx
5x2
lny = 2 +C
sx2
⇒ y = Ae 2
Solve:
2. yy 0 = (2xy + x)
3. y 0 = 4x2 (1 + y 2 )
4. xdy = 9ydx
5. y 0 + 6y = 0 x = 0, y = 40
6. 2xdx − dy = x(xdy − 2ydx) x = 3, y − 1
Homogeneous first order equations
Any given first order d.e.
M (X, Y )dx = N (x, y)dy is reducible to a separable variable form if all terms
in the coefficient functions M (x, y) N (x, y) are of the same total degree for the
variables x and y. we thus use the substitution y = ux or x − vy
NOTE: If M (x, y) and N (x, y) have the property that ∀λ, the substitution of
λx for x and λy for y converts them respectively to λn M (x, y) and λn N (x, y)
then equation (i) can be reduced to a separable equation by either substituting
y = ux or x = vy
E.G.
x
1. Is the function x2 +y 2 homogeneous?
2 2
+y −1
2. what of x xy+2
Find the general solution of the following:
dy
a 2x dx =y−x
b x2 dy = (xy − y 2 )dx
dy 2x−y
c dx = x−2y
d x2 ydx = (x3 − y 3 )dy x = 1, y = 1
p
e xy0 = y + ( x2 + y 2 ), x = 6, y = 9
SOLUTION
dy
(a) 2x dx =y−x
let y = ux
dy = udx + xdu
∴ 2xdy = (y − x)dx
2x(udx + xdu) = (ux − x)dx
2udx + 2xdu = (u − 1)dx
R2xdu = −(u + 1)dx
R −dx
2du
u+1 = x
2ln(u + 1) = −lnx + c
ln(u + 1) = ln √1x + k, k = 2c
u + 1 = A √1x , A = exp k
⇒ xy + 1 = A √1x
∴ y = A √xx − x
NOTE
With the values of x and y given we can obtain the particular solution to give
d,e.
EXERCISE
Find the particular solution of:
a x2 ydx = (x3 − y 3 )dy; x = 1, y = 1
p
b xy0 = y + x2 + y 2 ; x = 6, y = 9
x+y
c y= x−y ; x = rcosθ, y = rsinθ
EXACT FIRST ORDER D.E
∂f ∂f
Given f (x, y), The total derivative df = ∂x dx + ∂y dy
∂f ∂f
If for some values of f (x, y), M (x, y) = ∂x ; N (x, y) = ∂y The D.E. M (x, y)dx+
N (x, y)dy = 0 wheref (x, y) = k
is said to be exact if f ∂M ∂N
∂y = ∂x
Theorem
If ∂M ∂N
∂y and ∂x are continuous in a rectangular region R, then the d.e.
M (x, y)dx + N (x, y)dy = 0 is exact if f ∂M ∂N
∂y = ∂x in R.
(a, b) an arbitrary point solution in R defines a family of solution curves of the
differential equation for suitable values of K.
To solve an exact d.e
Corollary
If theRd.e. M (x, y)dxR+ N (x, y)dy = 0 is exact in a rectangular region R, then
x y
in R a M (t, y)dt + b N (x, u)du = k (a, b) an arbitrary point in R defines a
family of solution curves of the d.e for suitable values of K.
To solve an exact d.e M (x, y)dx + N (x, y)dy = 0 , we proceed thus:
∂f
= M (x, y) (2)
∂x
∂f
= = N (x, y) (3)
∂y
Solve (2) for f (x) by integrating w.r.tx taking function of y as the arbitrary
constant. i.e
f (x, y) = g(x, y) + k(y) (4)
Differentiate (4) w.r.t.y and compare your result with (3)
Example 1. Show that
(4x + 3y − 2)dx + (3x − 4y + 1)dy = 0 (5)
is exact. Hence find a general solution..
Solution
M (x, y) = 4x + 3y − 2; N (x, y) = 3x − 4y + 1 ∂M ∂N
∂y = 3; ∂x = 3
⇒ (5) is exact.
∂f ∂f
∂x =R 4x + 3y − 2; ∂y = 3x − 4y + 1
f = (4x + 3y − 2)dx = 2x2 + 3yx − 2x + h(y)
Differentiating w.r.t. y
∂f 0
∂y = 3x + h(y ) = 3x − 4y + 1
Thus;
h0 = −4y + 1 i.e ∂h ∂y = −4y + 1
Integrating w.r.t. y
h(y) = −2y 2 + y + c2
Hence,
f (x, y) = 2x2 + 3yx − 2x − 2y 2 + y + c2
EXERCISE
Show that the following equations are exact, hence solve the first equation for
f (1, 2)
(2y + 3x)dx + (y 2 + 2x)dy = 0 (6)
(y 2 − 1)dx + (2xy − siny)dy = 0 (7)
2 2
(7x − 6xy)dx − (3x + 2y)dy = 0 (8)
p p
(x x2 + y 2 )dx + (y x2 + y 2 )dx = 0 (9)
solution
(2y + 3x)dx + (y 2 + 2x)dy = 0
∂f ∂f 2
∂x = 2y + 3x; ∂y = y + 2x ......i
3x
f (x, y) = 2xy + 2 + h(y) ...... ii
∂f 0
∂y = 2x + h ......iii
comparing (i) with (ii)
h0 = y 2
Integrating w.r.t.y
3
h(y) = y3 + c
Hence,
y3
f (x, y) = 2xy + 3x
2 + 3 +c
h(1, 2) = 10 + 83 + c = 0
⇒ c = −38 3
∴
y3
f (x, y) = 2xy + 3x 38
2 + 3 − 3
Making an Unexact d.e. Exact by Integrating Factor
In most cases some d.e. have the tendency of being exact but with some little
adjustment .such as multiplying with suitable factor.
EXAMPLES
1. Solve (x2 + y 2 − x)dx − ydy = 0
Solution
(x2 + y 2 ) − xdx − ydy = 0 ⇒
(x2 + y 2 )dx − (xdx + ydy) = 0
1
x2 + y 2 dx = xdx + ydy Multiplying both sides with x2 +y 2
xdx+ydy
dx = x2 +y 2
Integrating, we have p
x = 12 ln(x2 + y 2 ) + c or x − ln x2 + y 2 = c
2. Solve xdy − ydx = (9x2 + y 2 )dy
Solution
The term on the left hand side can be expressed as
d xy = xdy−ydx
x2 d xy = ydx−xdy
y2
Multiplying by x12 we have
xdy−ydx
x2 = (9 + ( xy )2 )dy
i.e d x = 9 + ( xy )2 )dy
y
It is though not exact but can separated as
y
d( x )
y 2 = dy
9+( x )
Integrating, we have
1 −1 y
3 T an 3x = y + k
3
3. Solve ydx + (x2y +x )dy = 0
Solution
ydx + (x2 y 3 + x)dy = 0
ydx + xdy + x2 y 3 dy = 0
Now ydx + xdy = d(xy)
1
We can multiply the equation by x2 y 2
d(xy)
(xy)2+ ydy = 0
Integrating by inspection, we have
−1 y2
xy + 2 = k EXERCISE
Solve by using suitable factor.
1 y(1 + xy)dx + (2y − x)dy = 0
2 (x2 − y 2 )dy = 2xydx
dx dy
3 xdy + ydx = y − x
p
4 x2 + y 2 dx = xdy − ydx
5 (xy 2 − y)dx + (x2 y − x)dy
Linear First Order Equation
A linear first order d.e is of the form
dy
+ p(x)y = Q (10)
dx
For exactness, we behave
(p(x) − Q(x))dx + dy = 0 (11)
Here
M (x, y) = p(x)y − Q(x); / N (x, y) = 1
∂dM ∂dN
dy = p(x); dx = 0
Thu, it is exact if f p(x) = 0
Suppose p(x) 6= 0, we try an integrating factor φ(x)
Multiplying equation (11) by φ(x) we have
φ(x)(p(x) − Q(x))dx + φ(x)dy = 0
Carrying out the same test for exactness
φ(x)p(x) = φ0(x) = dφ(x)dx
Separating the variables,
dφ(x)
φ(x) = dxR
lnφ(x) = Rp(x)dx R
⇒ φ(x) = e p(x)dx is the R required I.F. Multiplying (10) by e
p(x)dx
we have
d p(x)dx
R
dx (y p(x)dx) = Q(x)e R R
Integrating we have ye p(x)dx = Q(x)e p(x)dx + C
EXAMPLE
dy 2
1 Find a general solution to the problem dx + 2xy + x = e−x
SOLUTION
dy 2
dx + 2xy + x = e−x
dy 2
dx + 2xy R
= e−x − x
2xdx x2
I.F.
R xis2 e R =2e 2 2
ye dx = ex (e−x − x)dx = (1 − xex )dx
R
2 2
yex = x − 12 ex + C
2 Solve (1 + x2 )(dy − dx) = 4xy for which x = 1, y = 0
SOLUTION
Divide b/s by (1 + x2 )dx and transposing gives
dy 4x
− y=1 (12)
dx 1 + x2
4x
− 2 2 −2
I.F. is e 1+x2 = e−2ln(1+x ) = eln(1+x ) = 1
(1+x2 )2
Multiplying (12) by I.F. we have
1 dy 4x 1
(1+x2 )2 dx − (1+x2 )3 y = (1+x2 )2
y 1
R
Thus, Integrating, we have (1+x 2 )2 = (1+x2 )2
dy
i dx + y cot x = sin 2x
ii (2y + x2 )dx = xdy
iii (1 − x2 )y0 + xy = 2x
a
iv xy0 + 2(1 − x2 )y = 1
v y0 + y = ex x = 0, y = 2
vi (x2 + 1)dy = (x3 − 2xy + x)dx, x = 1, y = 1
vii (1 + x2 )dy = (1 + xy)dx x = 1, y = 0
0.4.1 SPECIAL FIRST ORDER EQUATION
A second order d.e can be solved by expressing it as a first order d.e in y0
e.g Solve y00 − 2(y0)2 + 1 = 0
SOLUTION
y00 − 2(y0)2 + 1 = 0 ⇒ dy0 2
dx − 2(y0) + 1 = 0
Separating the variables and integrating
dy0
R
−1+2(y0)2 = x + C
1 2
4 ln(−1 + 2(y0) ) = x + C
EXERCISE
Solve 1. y00 + 2y − 2y 3 = 0 for y(0) = 0, y0(0) = 1
2. y00 − 2y0 = 1
3. y00 + y0 = ex
Bernouli Equation
Te equation is named after the author Jacub Bernouli (1654 - 1705) He was a
Swiss mathematician. The equation is of the form
dy
+ p(x)y = Q(x)y n (13)
dx
For n = 0or1, the equation is a homogenou, equation. While x 6= 1 it is non-
linear. If n 6= 1 in the equation above, the change in the dependent variable
defined by the substitution
Z = y 1−n which transforms the equation to a linear equation in Z.
Poof
n
Divide (13)by y
dy
y −n + p(x)y 1−n = Q(x) (14)
dx
Let Z = y 1−n
dz dz dy −n dy
dx = dy dx = (1 − n)y dx
dy 1 dz
⇒ dx = 1−n y n dx
Substituting the result in (14)
1 dz
1−n dx + p(x)z = Q(X)
Which is now a linear equation in z.
EXAMPLE/EXERCISE
a Solve 4xy 0 + y + x2 y 3 = 0
b y 00 − 2y 0 = 1
c xy 00 = y 0
d xy 2 y 0 − y 3 = x2
e y 00 + y 0 = e2x
SOLUTION
4xy 0 + y + x2 y 3 = 0
Divide through by 4x
y 0 + 4x1
y + x4 y 3 = 0
0
y + 4x y = − x4 y 3
1
Let z = y 1−3 = y −2 This transformed the equation into a linear equitation in z.
dz
− 12 dx + 4x1
z = − 44
dz 1 x
dx − 2x z = 2
1 ln √1x
R
− 2x √1
I.F = e dx = e = x
√1 dz − 1√
z = x
√
x dx 2x x 2 x
1 x
d( xz ) = 2 x
√ √
1
3
√1 z x x2
dx = 13 x 2
R R
x
= √
2 x
dx = 2
1
z = 13 x2 + Cx 2
1
i.e y −2 = 31 x2 + Cx 2
nth Order Ordinary Differential Equation
A general linear differential equation of order n is given by
dn y dn−1 y dy
a0 (x) + a1 (x) + ....an−1 (x) + an y = f (x) (15)
dxn dxn−1 dx
Where ai ., i = 0, 1, 2, .., n are functions of x
If ai (x) are independent of x (i.e constants)
We refer to (15) as a linear d.e. with constant coefficients.
If f (x) = 0 equation (15) is called a homogenous d.e.
The solution
a1 f1 + a2 f2 + .... + an fn (16)
of the homogenous d.e. with constant coefficients is known as a complementary
function. (C.F.)
Consider a general second order homogenous d.e.
ay 00 + by 0 + cy = 0 (17)
mx
Let y = Ae be the solution of (16)
Then y 0 = Amemx ; y 00 = Am2 emx
Substituting these results in (16) we have
aAm2 emx + bAmemx + cAemx = 0 ⇒
am2 + bm + c = 0 (18)
Suppose m = m1 and m = m2 are the solution to (16)
i.e y = Aem1 x and y = Bem2 x are two solutions of equation (16)
Then y = Aem1 x + Bem2 x is its solution
The equation am2 + bm + c = 0 is called an auxiliary equation (or characteristic
equation) obtained directly from
ay 00 + by 0 + cy = 0, writing y 00 ,y 0 and y as m2 , m,and 1 respectively. The method
of solution is called undetermined coefficient.
SOLUTION OF HOMOGENEOUS SECOND ORDER D.E.
Different solutions are obtained for second order d.e depending on the nature
of the root of the auxiliary equation.
Real and Distinct Roots
Example 1.
y 00 + 7y 0 + 10y = 0
Solution
Auxiliary equation reads m2 + 7m + 10 = 0
⇒ m2 + 2m + 5m + 10 = 0
m(m + 2) + 5(m + 2) = 0
(m + 2)(m + 5) = 0
m = −2, m = −5
∴ y = Ae−2x + Be−5x
EXERCISE
Solve the following d.es
a y 00 − 5y 0 + 6y = 0
b y 00 + 2y 0 = 0
c y 00 − 7y 0 + 12y = 0
Repeated Roots
Consider the equation
y 00 − 2ay 0 + a2 y = 0 (19)
A/E: m2 − 2am + a2 m = 0
(m − a)2 = 0
m = a twice
∴ y = k1 eax + k2 eax = (k1 + k2 )eax = keax where k = k1 + k2 is a function of x.
ax
Here, y = keax , y 0 = k 0 eax + akeax , y 00 = k 00 eax + 2ak 0 eax + a2 k e
substituting these results in(19), we have
k 00 eax = 0
But eax 6= 0 ⇒ k 00 = 0
Thus, k 0 = A, k = Ax + B
Hence, y = (Ax + B)eax is the solution for repeated roots.
EXAMPLE
Solve y 00 − 6y 0 + 9y = 0
SOLUTION
m2 − 6m + 9 = 0
(m − 3)2 = 0 ⇒ m = 3 twice
y = (Ax + B)e3x
Equal and Opposite Real Roots
Consider the equation y 00 − a2 y = 0
A.E. : m2 − a2 = 0 ⇒ m = + − a
Thus, m1 = a, m2 = −a
Hence y = Aeax + Be−ax
But eax = cosh ax + sinh ax and e−ax = cosh ax − sinh ax
∴ y = A(cosh ax + sinh ax) + B(cosh ax − sinh ax) = (A + B) cosh ax + (A −
B) sinh ax = C cosh ax + D sinh ax is the (C.F.)
EXAMPLE
A.E. : m2 − a2 = 0 ⇒ m = + − a
Solve y 00 − 16y = 0
SOLUTION
A.E.: m2 − 16 = 0 ⇒ m = + − 4
∴ y = A cosh 4x + B sinh 4x
Equal and Opposite Imaginary Roots
Consider the equation y 00 + a2 y = 0
A.E. : m2 + a2 = 0 ⇒ m = + − a
Thus, y = Aeiax + Be−iax
But eiax = cos ax + i sin ax and e−iax = cos ax − i sin ax
∴ y = A(cos ax + i sin ax) + B(cos ax − i sin ax)
⇒ y = (A + B) cos ax + i(A − B) sin ax = C cos ax + D sin ax
EXAMPLE
Solve
y 00 + 36y = 0 (20)
SOLUTION
m2 + 36 = 0 ⇒ m = + − 6i
∴ y = C cos 6x + D sin 6x
Complex Roots
e.g
Solve y 00 + 8y 0 + 25y = 0
SOLUTION
m2 + 8m + 25 = 0 ⇒ m = −4 + 3i, m = −4 − 3i
y = e−4x (Ae3ix + Be−3ix ) = e−4x (C cos 3x + D sin 3x)
General Solution
The general of a d.e.is the sum of the (C.F.) and the particular Integral (P.I.)
i.e yc + yp
The solution having no arbitrary constant is called the (P.I.) which is obtained
using the method of undetermined coefficient in the question. The following
table depicts the possible assumable (P.I.) for given functions.
SN f (x) Assumable (P.I) yp
1 k Ax + B
2 kx Ax2 + Bx + C
3 kx2 Ax3 + Bx2 + Cx + D
Pn+1
4 kxn i=1 Ai x
i
ax
5 keax Ae
6 k sin ax or k cos ax A cos ax + B sin ax
7 k sinh ax or k cosh ax A cosh ax + B sinh ax
EXAMPLE