Tegm3592: Engineering Mathematics Ii
Tegm3592: Engineering Mathematics Ii
Tegm3592: Engineering Mathematics Ii
University of Namibia
Faculty of Engineering & IT
Department of Mechanical Engineering
25 September 2020
DIFFERENTIAL EQUATIONS
Chapter 3: Differential Equations
1. Introduction
DIFFERENTIAL EQUATIONS
(1.) INTRODUCTION
Definition 3.1
An equation involving derivatives of one or more dependent
variables with respect to one or more independent variables is
called differential equation.
Definition 3.2
A differential equation involving derivatives of one or more
dependent variables with respect to a single independent variable is
called an ordinary differentiable equation (ODE).
DIFFERENTIAL EQUATIONS
Here are some examples of ordinary differential equations:
d 2y
(1.)
dx 2
+ 4 dy
dx = 2x
dy
dx + xy = 0
(2.)
Definition 3.3
A differential equation involving partial derivatives of one or more
dependent variables with respect to more than one independent
variable is called a partial differential equation.
Definition 3.4
The order of the highest ordered derivative involved in a differential
equation is called the order of the differential equation.
DIFFERENTIAL EQUATIONS
For example
∂2V 2
(1.)
∂s 2
+ ∂∂tV2 = V is a 2nd order PDE.
dy
(2.)
dx + xy = 0 is a 1st order ODE.
Definition 3.5
A linear ODE of order n in the dependent variable y with respect
to the independent variable x, is a n equation that can be written
in the form
d ny d n−1 y dy
a0 (x) n
+a1 (x) n−1
+· · ·+an−1 (x) +an (x)y = b(x) (3.1a)
dx dx dx
where a0 (x) 6= 0 is called a linear ODE.
For example
d 2y
(1.)
dx 2
+ 5 dy
dx + 6y = 0 is a 2
nd order linear ODE.
d 4y 2
(2.)
dx 4
+ x 2 ddxy2 + x 3 dy x th
dx = xe is a 4 oder linear ODE.
DIFFERENTIAL EQUATIONS
NB: If the ODE is not linear then it is called a non-linear. e.g.
dy
(1.)
dx + 2xy 2 = 3x
2
d 2y dy
(2.)
dx 2
+ 2 dx +y =0
NB: The right hand side, b(x) of Equation (3.1a) is called the
non-homogeneous term.
DIFFERENTIAL EQUATIONS
Definition 3.6
If the non-homogeneous term is equals to zero (b(x) = 0), then we
have an nth order linear homogeneous equation with either
constant or variable coefficients. i.e.
d ny d n−1 y dy
a0 (x) n
+ a 1 (x) n−1
+ · · · + an−1 (x) + an (x)y = 0 (3.1b)
dx dx dx
Example:
d 2y
(i)
dx 2
+ 2x dy
dx = 0 is a linear homogeneous ODE.
d 2y
(ii)
dx 2
+ 2x dy
dx = 2 sin x is a linear non-homogeneous ODE.
d 3y 2
(iii)
dx 3
+ 2 ddxy2 + 3 dy
dx + 2y = 0 is a linear homogeneous ODE.
DIFFERENTIAL EQUATIONS
Example 3.1
Show that;
dy
a) y = x + 3e −x is a solution to the ODE dx +y =x +1
DIFFERENTIAL EQUATIONS
Solution 3.1
dy
a) Since y = x + 3e −x , then dx = 1 − 3e −x . So,
dy
+ y = (1 − 3e −x ) + (x + 3e −x )
dx
=x +1
= RHS
dy
∴ y = x + 3e −x is a solution to the ODE dx + y = x + 1.
dy
b) Since y = e x + 2x 2 + 6x + 7, then dx = e x + 4x + 6 and
d 2y
dx 2
= e x + 4. Thus
d 2y dy
2
−3 + 2y = e x + 4 − 3(e x + 4x + 6) + 2(e x + 2x 2 + 6x + 7)
dx dx
= e x + 4 − 3e x − 12x − 18 + 2e x + 4x 2 + 12x + 1
= 4x 2 = RHS
DIFFERENTIAL EQUATIONS
c) Since x 3 + 3xy 2 = 1, then
d 3 dy
(x + 3xy 2 = 1) =⇒ 3x 2 + 3y 2 + 6xy =0
dx dx
dy 3(x 2 + y 2 )
=⇒ =−
dx 6xy
dy x2 + y2
=⇒ =−
dx 2xy
Thus,
2
x + y2
dy
2xy + x 2 + y 2 = 2xy − + x2 + y2
dx 2xy
= −(x 2 + y 2 ) + x 2 + y 2
=0
= RHS
So,
y (1) = 4 =⇒ 1 + C = 4
=⇒ C = 3
dy
∴ y = x 2 + 3 is the solution to the ODE dx = 2x with the initial
condition y (1) = 4.
The solutions y = x 2 + C and y = x 2 + 3 are called the general
solution and particular solution respectively. Thus,
dy
= 2x x(1) = 4
dx
is called an initial value problem
DIFFERENTIAL EQUATIONS
Exercise 3.1
DIFFERENTIAL EQUATIONS
(2.) 1st ORDER ODEs
Definition 3.7
The 1st ODE can be expressed in the form
dy
= F (x, y ) (3.2)
dx
or in differential form
DIFFERENTIAL EQUATIONS
Separable ODEs
Definition 3.8
An equation of the form
DIFFERENTIAL EQUATIONS
solution: We apply techniques of integration to solve the above
separable equations.
a) Since (x − 4)y 4 dx − x 3 (y 2 − 3)dy = 0, then
(x − 4)y 4 dx = x 3 (y 2 − 3)dy
Z 2
y −3 x −4
Z
4
dy = dx
y x3
Z Z
1 3 1 4
=⇒ − dy = − dx
y2 y4 x2 x3
Z Z
=⇒ (y −2 − 3y −4 )dy = (x −2 − 4x −3 )dx
=⇒ −y −1 + y −3 = −x −1 + 2x −2 + C
1 1 1 2
=⇒ − + 3 = − + 2 + C
y y x x
1 − y2 2−x
=⇒ = +C
y3 x2
For cos y du du
R
sinRy dy let u = sin y , then dy = cos y =⇒ dy = cos y
and for x 2x+1 dx let v = x 2 + 1, then dv dx = 2x =⇒ dx = 2x .
dv
So,
Z Z Z Z
cos y du x dv du 1 dv
=− =⇒ =−
u cos y v 2x u 2 v
1
=⇒ ln |u| = − ln |v | + C
2
1
=⇒ ln | sin y | = − ln(x 2 + 1) + C
2
1
=⇒ ln | sin y | = ln(x 2 + 1)− 2 + C
1
=⇒ ln | sin y | = ln √ +C
x2 + 1
DIFFERENTIAL EQUATIONS
So,
1
sin y = √ e C Let A = e C
+1 x2
A −1 A
sin y = √ =⇒ y = sin √
x2 + 1 x2 + 1
Therefore, y = sin−1 √xA2 +1 is the general solution of the ODE
dy
dx = − (x 2x+1)
sin y
cos y
. Using the initial condition y (1) = π2 , we get
π p √
A = sin 12 + 1 = 2
2
q
−1 2
∴ y = sin x 2 +1
is the particular solution of the given ODE.
DIFFERENTIAL EQUATIONS
Exact Differential Equations
Definition 3.9
Let F = F (x, y ) be a function that has a continuous first partial
derivative in the domain D. The total differential function dF , of
the function F is defined by:
∂F (x, y ) ∂F (x, y )
dF (x, y ) = dx + dy (3.5)
∂x ∂y
DIFFERENTIAL EQUATIONS
i.e. M(x, y )dx + N(x, y )dy is an exact differential in D if there
exist a function F (x, y ) such that
∂F ∂F
= M(x, y ) and = N(x, y ) (3.7)
∂x ∂y
If
M(x, y )dx + N(x, y )dy
is an exact differential, then the differential equation
DIFFERENTIAL EQUATIONS
Theorem 3.1
Consider the differential equation (3.3) where M and N have
continuous first partial derivatives at all points (x, y ) in the
domain D.
(1.) If the differential equation (3.3) is exact in D then:
∂M ∂N
= , for all (x, y ) ∈ D
∂y ∂x
(2.) Conversely, if ∂M ∂N
∂y = ∂x for all (x, y ) ∈ D, then the differential
equation (3.3) is exact in D.
DIFFERENTIAL EQUATIONS
Example: Determine whether y 2 dx + 2xydy = 0 is an exact DE.
Z Z
F = Ndy = 2xydy = xy 2 + C (x)
and
∂M ∂M
= 2y =
∂y ∂x
∴ y 2 dx + 2xydy = 0 is an exact differential equation
DIFFERENTIAL EQUATIONS
Solution to exact differential equations
Theorem 3.2
Suppose that the ODE
F (x, y ) = C (3.8)
DIFFERENTIAL EQUATIONS
Examples
a) Solve the ODE (3x 2 + 4xy )dx + (2x 2 + 2y )dy = 0.
b) Solve the initial value problem (IVP),
(2x cos y + 3x 2 y )dx + (x 3 − x 2 sin y − y )dy = 0, y (1) = 0
Solution
a) We have that M = 3x 2 + 4xy and N = 2x 2 + 2y .
So,
∂F
= 2x 2 + c 0 (y ) =⇒ 2x 2 + c 0 (y ) = 2x 2 + 2y = N
∂y
=⇒ c 0 (y ) = 2y
Therefore,
Z
c(y ) = 2ydy
= y2 + C
∂M ∂N
= 3x 2 − 2x sin y =
∂y ∂x
∂F ∂F
=M and =N
∂x ∂y
Z Z
∂F
= 2x cos y + 3x 2 y =⇒ ∂F (x, y ) = (2x cos y + 3x 2 y )dx
∂x
=⇒ F = x 2 cos y + x 3 y + c(y )
DIFFERENTIAL EQUATIONS
So,
∂F
= x 3 − x 2 sin y + c 0 (y ) =⇒ x 3 − x 2 sin y + c 0 (y ) = x 3 − x 2 sin y − y
∂y
=⇒ c 0 (y ) = −y
Therefore,
y2
Z
c(y ) = − ydy = − +C
2
2
∴ F (x, y ) = x 2 cos y + x 3 y − y2 = A is the general solution to the
exact DE (2x cos y + 3x 2 y )dx + (x 3 − x 2 sin y − y )dy .
2 Solve the following IVPs and find the interval of validity for
the solution.
a) 2xy − 9x 2 + (2y + x 2 + 1) dy
dx = 0, y (0) = −3
b) (2xy 2 + 4)dx = 2(3 − x 2 y )dy , y (−1) = 8
DIFFERENTIAL EQUATIONS
1st Order Linear ODEs: Method of Integrating Factor
Definition 3.10
A first order ODE is linear in the dependent variable y and the
independent variable x if it is or can be written in the form
dy
+ P(x)y = Q(x) (3.9)
dx
Theorem 3.3
dy
The linear differential equation dx + P(x)y = Q(x) has an
integration factor of the form
R
P(x)dx
I (x) = e (3.10)
We have that
DIFFERENTIAL EQUATIONS
Z Z
d
(y (x)I (x)) = Q(x)I (x) =⇒ d(yI (x)) = Q(x)I (x)dx
dx
Z
=⇒ y (x)I (x) = Q(x)I (x)dx
Z
1
=⇒ y (x) = Q(x)I (x)dx
I (x)
2 2 +1)2
= e 2 ln u = e ln u = e ln(x = (x 2 + 1)2
Thus,
Z Z
1 1 x 2 2
y (x) = Q(x)I (x)dx = 2 (x + 1) dx
I (x) (x + 1)2 x2 + 1
4
x2
Z
1 2 1 x
= 2 x(x + 1)dx = 2 + +C
(x + 1)2 (x + 1)2 4 2
DIFFERENTIAL EQUATIONS
h i
1 x4 2
Therefore, y (x) = (x 2 +1)2 4
+ x2 + C is the general solution to
the linear ODE (x 2 + 1) dydx + 4xy = x.
= e 2x+ln x
= e 2x e ln x
= xe 2x
DIFFERENTIAL EQUATIONS
Thus,
Z Z
1 1 −2x 2x
y (x) = Q(x)I (x)dx = x e xe dx
I (x) xe
Z
1
= x xdx
xe
1 x2
= x +C
xe 2
h 2 i
∴ y (x) = xe1x x2 + C is a general solution to the linear ODE
dy 2x+1
= e −2x .
dx + x
DIFFERENTIAL EQUATIONS
Bernoulli’s Equations
Definition 3.11
A 1st order ODE of the form:
dy
+ P(x)y = Q(x)y n (3.12)
dx
is called a Bernoulli’s Equation.
Theorem 3.4
Suppose that n 6= 0 or 1, then the transformation v = y 1−n
reduces the Bernoulli’s equation (3.12) to a linear equation in v .
dy
Example: Solve the differential equation dx + y = xy 3 .
DIFFERENTIAL EQUATIONS
dy
Solution: The differential equation dx + y = xy 3 is a Bernoulli’s
equation with n = 3.
y 3 dv y3
dv 2
− + y = xy 3 =⇒ − 2 = −2x ÷−
2 dx dx y 2
dv
=⇒ − 2y −2 = −2x
dx
dv
=⇒ − 2v = −2x
dx
So, P(x) = −2 and Q(x) = −2x, then
R R
I (x) = e p(x)dx
= e− 2dx
= e −2x
DIFFERENTIAL EQUATIONS
Therefore,
Z
1
v (x) = I (x)Q(x)dx
I (x)
Z Z
1
= −2x −2 xe −2x dx use integration by parts for xe −2x dx
e
2x 1 −2x 1 −2x
=e −2 − xe − e +C
2 4
1
= e 2x xe −2x + e −2x + C
2
1
= x + + Ce 2x
2
v (x) = x + 21 + Ce 2x is the general solution to the linear ODE
dv −2 , then y = √1 .
dx − 2v = −2x. Since v = y v
1 dy
∴ y (x) = q is the general solution of dx + y = xy 3 .
x+ 12 +Ce 2x
DIFFERENTIAL EQUATIONS
Exercise 3.3
1. Solve the following initial value problems (IVPs).
dv
a)
dt = 9.8 − 0.196v , v (0) = 48
b) t dy 2
dt + 2y = t − t + 1, y (1) =
1
2
2. Solve the following IVPs and find the interval of validity for
the solution.
dy
a)
dx + x4 y = x 3 y 2 , y (2) = −1, x > 0
dy
b)
dx = 5y + e −2x y −2 , y (0) = 2
DIFFERENTIAL EQUATIONS
(3.) APPLICATIONS OF 1st ODEs
Population Dynamics
Let us consider the initial population of 115 first year students in
my Engineering Mathematics II class, consisting of both male (M)
and female (F ) students. If a male and female student interact
(MF ), they will give birth to my grandstudent at a rate of b.
There is deaths due natural causes or corona virus at a rate of d.
Thus, the population increases at a rate of k = b − d.
kC0
P(0) = P0 =⇒ = P0
1 + C0
=⇒ kC0 = P0 + C0 P0
P0
=⇒ C0 =
k − P0
Therefore,
DIFFERENTIAL EQUATIONS
P0
k e akt
k−P0
P(t) =
P0
1 + k−P 0
e akt
kP0 e akt
=
k + P0 (e akt − 1)
k
is the solution to the Logistic equation (3.13). limt→∞ P(t) = P0
DIFFERENTIAL EQUATIONS
Radioactive decay
Let C (t) be the concentration of the radioactive nuclei at time t
as shown on Figure 4 below.
C (t) = C0 e −rt
DIFFERENTIAL EQUATIONS
Exercise 3.4
DIFFERENTIAL EQUATIONS
Newton’s 2nd Law
The time rate of change of momentum of a body is proportional to
the resultant force acting on the body and it is in the direction of
the this resultant force. i.e.
d
(mv ) = ma
dt
Recall: The gravitational force that the earth exerts on the body is
equal to the weight of the body.
w = mg
Rectilinear motion
R = kv or R = kv 2
Example: An 8lb object falls from rest toward the earth from a
great height. As it falls, air resistance act upon it and we assume
that this air resistance in pounds is numerically equals to 2v ,
where v is the velocity in (feet per per second). Find the velocity
and the distance fallen at time t seconds.
DIFFERENTIAL EQUATIONS
Solution: Consider the figure below.
= e −8t 4e 8t + C = 4 + Ce −8t
DIFFERENTIAL EQUATIONS
Since v (0) = 0, then C = −4. ∴ v (t) = 4(1 − e −8t ) is the
particular solution to the ODE dv
dt + 8v = 32.
dx
Since v = dt , then the displacement x(t) is given by:
Z
x(t) = v (t)dt
Z
= (4 − 4e −8t )dt
1
= 4t + e −8t + C1
2
Since x(0) = 0, then C1 = − 21 . ∴ x(t) = 4t + 12 (e −8t − 1) is the
particular solution to the ODE dx −8t )
dt = 4(1 − e
DIFFERENTIAL EQUATIONS
Mixtures Problems
DIFFERENTIAL EQUATIONS
Solution: Consider the figure below:
X (t) lb gal 3X (t)
rate out = 3 = lb/min
50 gal min 50
Therefore,
dX 3X 300 − 3X
=6− = , X (0) = 0
dt 50 50
Which is a separable differential equation. Thus,
DIFFERENTIAL EQUATIONS
Z Z
dX dt t
= = +C
300 − 3X 50 50
R dX dU
For 300−3X , let U = 300 − 3x, then dX = −3 =⇒ dX = − dU
3 .
Thus,
Z Z
dX 1 dU
=−
300 − 3X 3 U
1
= − ln |U|
3
1
= − ln |300 − 3X |
3
Therefore,
3t
ln |300 − 3X | = − + C0 (C0 = −3C )
50
3t
=⇒ 300 − 3X = e − 50 +C0
DIFFERENTIAL EQUATIONS
3t
3X = 300 − e C0 e − 50
1 3t
X = 300 − Ae − 50 (A = e C0 )
3
1 3t
= 100 − Ae − 50
3
Since X (0) = 0, then A = 300.
3t
∴ X (t) = 100 − 100e − 50 is the amount of salt in the tank at t > 0.
DIFFERENTIAL EQUATIONS
Basic Theory of Linear Homogeneous ODEs
Definition 3.13
If f1 , f2 , . . . , fn are any “n” given functions, then the expression
c1 f1 + c2 f2 + · · · + cn fn is called a linear combination of
f1 , f2 , . . . , fn .
Theorem 3.5
Any linear combination of solutions of the homogeneous linear
ODE (3.1b) is also a solution of (3.1b). i.e.
c1 f1 + c2 f2 + · · · + cn fn is a solution of (3.1b).
DIFFERENTIAL EQUATIONS
Definition 3.14
The “n” functions f1 , f2 , . . . , fn are called linearly dependent on
the interval [a, b] if the there exits constants c1 , c2 , . . . , cn not all
zeros such that
Definition 3.15
The “n” functions f1 , f2 , . . . , fn are called linearly independent on
[a, b] if the there exits constants c1 , c2 , . . . , cn such that
Provided that c1 = c2 = · · · = cn = 0.
DIFFERENTIAL EQUATIONS
Theorem 3.6
The nth order homogeneous linear ODE (3.1b) always posses “n”
linearly independent solutions.
Definition 3.16
If f1 , f2 , . . . , fn are “n” linearly independent solution of of the nth
order homogeneous linear ODE (3.1b) on the interval [a, b], then
the set {f1 , f2 , . . . , fn } is called a fundamental set of solutions of
(3.1b) and the function defined by
f (x) = c1 f1 + c2 f2 + · · · + cn fn , x ∈ [a, b]
DIFFERENTIAL EQUATIONS
Let f1 , f2 , . . . , fn be “n” real valued functions, each of which has an
(n − 1)th derivatives on the interval [a, b].
DIFFERENTIAL EQUATIONS
Theorem 3.7
The “n” solution f1 , f2 , . . . , fn of the nth order homogeneous linear
ODE (3.1b) are linearly independent if and only if
Theorem 3.8
The Wronskian of any solutions f1 , f2 , . . . , fn of the nth order
homogeneous linear ODE (3.1b) is either zero or nonzero on the
interval [a, b].
DIFFERENTIAL EQUATIONS
Solution to the nth Order Homogeneous ODE
d ny d n−1 y dy
a0 n
+ a 1 n−1
+ · · · + an−1 + an y = 0 (3.16)
dx dx dx
where a0 , a1 , . . . , an are constants, has a solution of the form
y = e rx (3.17)
DIFFERENTIAL EQUATIONS
Types of Roots of the Homogeneous ODE (3.16)
y = c1 e r1 x + c2 e r2 x + · · · + cn e rn x (3.19)
where c1 , c2 , . . . , cn are arbitrary constants.
r 2 − 3r + 2 = 0 =⇒ (r − 1)(r − 2) = 0
y = c1 e x + c2 e 2x
DIFFERENTIAL EQUATIONS
Example: Find the general solution of y 000 − 4y 00 − 3y 0 + 18y = 0.
r 3 − 4r 2 − 3r + 18 = 0 =⇒ (r + 2)(r − 3)2 = 0
y (x) = c1 e −2x + c1 e 3x + c3 xe 3x
DIFFERENTIAL EQUATIONS
(3.) Complex roots
If the auxiliary equation (3.18) of the 2nd order ODE of the form
(3.16) has complex roots of the form r1 = α + βi and r2 = α − βi,
then
y (x) = c1 e r1 x + c2 e r2 x
= c1 e (α+βi)x + c2 e (α−βi)x
= c1 e αx e βxi + c2 e αx e −βxi
= c1 e αx (cos βx + i sin βx) + c2 e αx (cos βx − i sin βx)
= e αx [(c1 + c2 ) cos βx + (c1 − c2 )i sin βx]
= e αx [A cos βx + B sin βx]
Therefore,
y (x) = e αx [A cos βx + B sin βx] (3.21)
is the general solution.
DIFFERENTIAL EQUATIONS
Example: Find the general solutions of the following ODEs:
a) y 00 + y = 0
b) y 00 − 6y 0 + 25y = 0, y (0) = −3 and y 0 (0) = −1
Solution
a) We have that r 2 + 1 = 0 is the auxiliary equation of
y 00 + y = 0.
√
r 2 + 1 = 0 =⇒ r = ± −1
=⇒ r = ±i
DIFFERENTIAL EQUATIONS
b) We have that r 2 − 6r + 25 = 0 is the auxiliary equation of
y 00 − 6y 0 + 25y = 0.
√
r 2 − 6r + 25 = 0 =⇒ r = 3 ± −16
=⇒ r = 3 ± 4i
Therefore,
y (x) = e 3x [−3 cos 4x + 2 sin 4x]
is the general solution of y 00 − 6y 0 + 25y = 0.
DIFFERENTIAL EQUATIONS
SOLUTION 2nd LINEAR NON-HOMOGENEOUS ODE
a0 y 00 + a1 y 0 + a2 y = G (x) (3.22)
a0 y 00 + a1 y 0 + a2 y = 0 (3.23)
DIFFERENTIAL EQUATIONS
Theorem 3.9
The general solution of the nonhomogeneous ODE (3.22) can be
written as
DIFFERENTIAL EQUATIONS
(1.) The Method of Undetermined Coefficients
Definition 3.17
We call the function G (x) an undetermined coefficient function if
it is either:
(1.) A function defined by one of the following:
i) x n , where n is a positive integer or zero.
ii) e ax , where a is a constant, a 6= 0.
iii) sin(bx + c) or cos(bx + c) where a, b are constants, b 6= 0.
or,
a) y 00 + y 0 − 2y = x 2
b) y 00 + 4y = e 3x
c) y 00 + y 0 − 2y = sin x
DIFFERENTIAL EQUATIONS
Solution: By making use of appropriate undetermined coefficients
sets, we have the following:
a) The auxiliary equation of y 00 + y 0 − 2y = 0 is
r 2 + r − 2 = 0 =⇒ (r − 1)(r + 2) = 0
Therefore, we have real and distinct roots r1 = 1 and
r2 = −2. So, the complementary solution is
yc (x) = c1 e x + c2 e −2x
Since G (x) = x 2 , which is a polynomial of degree 2, then we
seek a particular solution of the form
yp = Ax 2 + Bx + C
And yp0 = 2Ax + B and yp00 = 2A. Substituting into the given
ODE, we have
yp00 + yp0 − 2yp = (2A) + (2Ax + B) − 2(Ax 2 + Bx + C ) = x 2
=⇒ −2Ax 2 + (2A − 2B)x + (2A + B − 2C ) = x 2
DIFFERENTIAL EQUATIONS
Polynomials are equal, when their coefficients are equal. Thus,
−2A = 1; 2A − 2B = 0; 2A + B − 2C = 0
DIFFERENTIAL EQUATIONS
b) The auxiliary equation of y 00 + 4y = 0 is r 2 + 4 = 0 with
complex roots r1 = −2i and r2 = 2i. The complementary
solution is given by
Theorem 3.10
If G (x) is the product of functions of the preceding types, then we
take the trial solution to be the product of the same type. For
example, in solving the ODE
y 00 + 2y 0 + 4y = x cos 3x
we would try
a0 y 00 + a1 y 0 + a2 y = G1 (x) + G2 (x)
yp0 2 = −2C sin 2x + 2D cos 2x, yp002 = −4C cos 2x − 4D sin 2x. So,
yp002 − 4yp2 = −4C cos 2x − 4D sin 2x − 4(C cos 2x + D sin 2x) = cos 2x
=⇒ −8C cos 2x − 8 sin 2x = cos 2x
DIFFERENTIAL EQUATIONS
Therefore, −8C = 1 and −8D = 0. So, C = − 81 and D = 0.
1
yp2 (x) = − cos 2x
8
By Theorem (3.11), the general solution is
−2x 2x 1 2 1
y (x) = yc +yp1 +yp2 = −c1 e +c2 e + − x − e x − cos 2x
3 9 8
We summarize the Method of Undetermined Coefficients as
follows:
1 If G (x) = e ax P(x), where P(x) is a polynomial of degree n,
DIFFERENTIAL EQUATIONS
Exercise 3.5
1 Solve the following IVP using the method of undetermined
coefficients.
a) y 00 − 4y 0 + 3y = 9x 2 + 4, y (0) = 6, y 0 (0) = 8
b) y 00 + 5y 0 + 4y = 16x + 20e −x , y (0) = 0, y 0 (0) = 3
DIFFERENTIAL EQUATIONS
(2.) The Method of Variation of Parameters
Definition 3.18
Suppose we already solved the homogeneous ODE
a0 y 00 + a1 y 0 + a2 y = 0 and written the solution as
DIFFERENTIAL EQUATIONS
By differential Equation (3.26) w.r.t x, we get
or
u1 (a0 y100 +a1 y10 +a2 y1 )+u2 (a0 y200 +a1 y20 +cy2 )+a0 (u10 y10 +u20 y20 ) = G
(3.29)
DIFFERENTIAL EQUATIONS
Since y1 and y2 are solutions of the complementary equations, then
G
u10 y10 + u20 y20 = (3.30)
a0
DIFFERENTIAL EQUATIONS
Solution: We make use the system of equations
G
u10 y1 + u20 y2 = 0 and u10 y10 + u20 y20 =
a0
DIFFERENTIAL EQUATIONS
cos x 0
u10 y1 + u20 y2 = 0 =⇒ u10 cos x + u20 sin x = 0 =⇒ u20 = − u
sin x 1
and
G (x)
u10 y10 + u20 y20 = =⇒ −u10 sin x + u20 cos x = tan x
a0
cos2 x 0
=⇒ −u10 sin x − u = tan x
sin x 1
(sin2 x + cos2 x)
=⇒ −u10 = tan x
sin x
sin2 x cos2 x − 1
=⇒ u10 = − = = cos x − sec x
cos x cos x
and
cos x 0 cos x sin2 x
u20 = − u1 = = sin x
sin x sin x cos x
DIFFERENTIAL EQUATIONS
Z
u1 = u10 dx
Z
= (cos x − sec x)dx
Since sec x + tan x > 0 for 0 < x < π/2, then the particular
solution is given by
yp (x) = − cos x sin x + cos x[sin x − ln(sec x + tan x)]
= − cos x ln(sec x + tan x)
and the general solution is
y (x) = yc (x) + yp (x) = c1 cos x + c2 sin x − cos x ln(sec x + tan x)
DIFFERENTIAL EQUATIONS
b) The auxiliary equation is r 2 − 3r + 2 = 0, with roots r1 = 1
and r2 = 2. The complementary solution is given by:
yc (x) = c1 e x + c2 e 2x
1
u10 e x + u20 e 2x = 0 and u10 e x + 2u20 e 2x =
1 + e −x
DIFFERENTIAL EQUATIONS