Uploaded by Elvin Gitonga

SMA-2271-ODE PAUL WACHIRA

advertisement
PAUL WACHIRA GITHAIGA
EMAIL: wachipaul@gmail.com
CONTACT: +254 702909635
SMA 2271: ORDINARY DIFFERENTIAL EQUATIONS
c
⃝Francis
O. Ochieng
francokech@gmail.com
Department of Pure and Applied Mathematics
PURE AND APPLIED MATHEMATICS
Course content
• First order differential equations: solution by separation of variables, homogeneous, exact and
integrating factor.
• Second order linear equations: homogeneous with constant and variable coefficients, using inverse
differential operators, variation of parameters.
• Systems of linear differential equations.
• Laplace transform: methods of solution.
• Power series solutions including Bessel and Legendre functions.
• Applications: dynamics, catenaries, circuits and wave motion.
• Sets: elements, specification, finite and infinite, universal, empty and disjoint. Subsets. Venn
diagram: union, intersection, complement, difference, number of elements and logical arguments.
• Boolean algebra: truth values, logical equivalence, truth tables, NOT, OR and AND operators,
and their applications to electric circuits.
References
[1] Calculus With Analytic Geometry (5th edition) by Larson Roland E., Hostetler Robert P., and
Bruce H. Edwards
[2] Advanced Engineering Mathematics (10th ed.) by Erwin Kreyszig
[3] Swift R. J., & Wirkus S. (2014). A Course in Ordinary Differential Equations, 2nd Edition, 807 p,
Published by Chapman and Hall/C, ISBN-13: 978-1466509085.
[4] Noonburg, V. W. (2014). Ordinary Differential Equations: From Calculus to Dynamical Systems,
334 p, Published by Mathematical Association of America, ISBN-13: 978-1939512048.
[5] Journal of Differential Equations, ISSN: 0022-0396.
[6] Journal of Dynamics and Differential Equations, ISSN: 1040-7294
Lecture 1
1
1
Definitions and basic concepts
Definition 1.1 (Dependent and independent variable). Suppose y = y(x), then y is the dependent
variable while x is the independent variable. Also, suppose z = z(x, y), then z is the dependent variable
while x and y are the independent variables.
Definition 1.2 (Differential equation (DE)). A differential equation is an equation that involves
derivatives of a function which depends on either one or more than one independent variable(s). For
example,
dy
2
= 2xex
dx
(1)
∂z
∂z
+
= 2(x + y)
∂x ∂y
(2)
There are two types of differential equations: ODE and PDE.
Definition 1.3 (Ordinary differential equation (ODE)). An ODE is a differential equation which
contains derivative(s) of a function which depends on only one independent variable. For example,
equation (1) is an ODE since it contains ordinary derivatives.
Definition 1.4 (Partial differential equation (PDE)). A PDE is a differential equation which
contains derivative(s) of a function which depends on more than one independent variable. For
example, equation (2) is a PDE since it contains partial derivatives. Other examples of PDEs are:
∂u
∂2u
= α2 2 (1D heat equation)
∂t
∂x
2
∂2 u
2∂ u
=
c
(1D wave equation)
∂t2
∂x2
∂2 u ∂2u ∂2 u
+ 2 +
= 0 (Laplace equation)
∂x2
∂y
∂z 2
1.1
Order and degree of a differential equation
Definition 1.5 (Order of a differential equation). The order of a differential equation is the order
of the highest-ordered derivative which occurs in the differential equation. For example, the equation
d2 y
dy
+ 2y = ex
−3
dx2
dx
is of order 2 since
(3)
d2 y
is the highest ordered derivative which occurs in the equation (3).
dx2
Definition 1.6 (Degree of a differential equation). The degree of a differential equation is the greatest
power of the highest-ordered derivative which occurs in the differential equation. For example, equation
d2 y
(3) is of degree 1 since
is the highest-ordered derivative and its power is 1.
dx2
More examples,
dy
+ y 2 = cos x,
dx
( )2
dy
+ y = sin x,
dx
( )3
d2 y
dy
+
+ y = ex ,
2
dx
dx
(order 1, degree 1)
(order 1, degree 2)
(order 2, degree 1)
Exercise:
Determine the order and degree of the following differential equations.
2
(a)
d4 y
d2 y
−
− 6y = 0.
dx4 dx2
(
(b)
1.2
d2 y
dx2
)4
(
−
dy
dx
)5
+ 3y = ex .
Classification of ODEs
Ordinary differential equations are classified into two groups: linear and nonlinear.
Definition 1.7 (Linear ordinary differential equation). A linear ODE of order n in the dependent
variable y and independent variable x is one which can be expressed in the form
an (x)
dn y
dn−1 y
dn−2 y
d2 y
dy
+
a
(x)
+
a
(x)
+
·
·
·
+
a
(x)
+ a1 (x)
+ a0 (x)y = F̃ (x),
n−1
n−2
2
dxn
dxn−1
dxn−2
dx2
dx
(4)
where an (x) ̸= 0 and which is such that
(i) Dependent variable y and its derivatives are of power 1 only.
(ii) No product of the dependent variable, y, and/or its derivatives are present.
(iii) No transcendental functions of the dependent variable, y, and its derivatives occur. For example,
cos(y), ln y or ey is absent.
Examples of linear differential equations are:
d2 y
dy
− 3y = 0
−7
2
dx
dx
x
(linear equation with constant coefficient)
3
2
d4 y
2d y
3d y
−
x
+
x
− e−x y = cos(x) (linear equation with variable coefficient)
dx4
dx3
dx2
→ Note: trigonometric, exponential, and logarithmic functions are called transcendental functions.
A differential equation that does not satisfy all the three conditions above is called nonlinear
d2 y
dy
differential equation. For example, the equation
+ y 2 = ex is nonlinear because of the
+ xy
2
dx
dx
dy
d2 y
and y 2 . Similarly, the equation
terms xy
+ cos(y) = 0 is nonlinear because cos(y) is a
dx
dx2
transcendental function of y.
Exercise:
Classify the following ODEs into linear or nonlinear, giving reasons.
(
d2 y
dy
−7
(a)
2
dx
dx
(b)
− 4y = 0.
d3 y
dy
−5
+ 6y 2 = 9.
dx3
dx
(
(c) x
1.3
)2
d2 y
dy
+ x
−y
2
dx
dx
)2
− 3y 2 = 0.
Origin/formation of ODEs
Ordinary differential equations occur in connection to numerous problems that we encounter in various
branches of science and engineering: geometric problems, physical problems, and primitives.
3
1.3.1
Geometric problem
Example(s):
A curve is defined by the condition that at each point the slope is 2 times the sum of the coordinates.
Form an ODE from the information given.
Solution
∆y
dy
The general slope/gradient of the curve is defined by lim
≡
.
∆x→0 ∆x
dx
dy
information, we have
= 2 (x + y), which is the required ODE.
dx
1.3.2
Thus, from the given
Physical problem
Example(s):
Powdered milk is being transformed to liquid milk at a rate that is directly proportional to the
unconverted milk. If originally there was 30kg of powdered milk. Find the ODE describing this
information.
Solution
Let y kg be the mass of converted milk at any time t. Thus, the mass of unconverted milk at time t
dy
dy
∝ (30 − y) ⇒
= k(30 − y), where k is a
is (30 − y) kg. From the given statement, we have
dt
dt
constant of proportionality.
1.3.3
Elimination of essential arbitrary constants from primitives
Definition 1.8 (Arbitrary constant). An arbitrary constant refers to an undefined constant in a
function. For example, consider the function
y = ax3 + bx2 + cx2 + 3x + 4
(5)
From equation (5), the constants 3 and 4 are defined constants while a, b and c are undefined constants.
Thus, a, b and c are called arbitrary constants.
Definition 1.9 (Essential arbitrary constant). Arbitrary constants are said to be essential if they
cannot be reduced to a lower number of constants. For example, equation (5) can be simplified as
y = ax3 + (b + c)x2 + 3x + 4
⇒
y = ax3 + dx2 + 3x + 4
(6)
The arbitrary constants, a, b and c , in equation (5) are not all essential constants because they can be
reduced to 2 constants by replacing (b + c) with another constant d, as shown in equation (6). Hence,
there are only 2 essential arbitrary constants, i.e., a and d in equation (6).
Definition 1.10 (Primitive). A primitive is a function which involves essential arbitrary constants.
For example, the function (6) is called a primitive.
→ Note: to obtain a differential equation from a primitive, we differentiate the given primitive a
number of times equal to the number of essential arbitrary constants then manipulate algebraically
the derivatives to eliminate the essential arbitrary constants.
→ Note: a primitive involving n essential arbitrary constants gives rise to a differential equation of
order n.
Example(s):
Obtain a differential equation associated with the following primitives
4
(a) y = Ax2 + Bx.
Solution
Since we have two essential arbitrary constants, we differentiate the given primitive 2 times.
Thus,
y = Ax2 + a2 x ⇒ y ′ = 2Ax + B and y ′′ = 2A
1
⇒ A = y ′′ and B = y ′ − 2Ax = y ′ − xy ′′
2
Substituting in the given primitive yields
y=
(
)
x2 ′′
y + x y ′ − xy ′′
2
⇒
x2 y ′′ − 2xy ′ + 2y = 0
or
x2
d2 y
dy
− 2x
+ 2y = 0
dx2
dx
(b) y = A cos 2x + B sin 2x.
Solution
Since we have two essential arbitrary constants, we differentiate the given primitive 2 times.
y = A cos 2x + B sin 2x
⇒
y ′ = −2A sin 2x + 2B cos 2x and
⇒ y ′′ = −4y
or
y ′′ = −4 (A cos 2x + B sin 2x)
d2 y
+ 4y = 0
dx2
(c) y = Ae2x + Be−3x .
Solution
Since we have two essential arbitrary constants, we differentiate the given primitive 2 times.
Thus,
y = Ae2x + Be−3x · · · (i)
y ′ = 2Ae2x − 3Be−3x · · · (ii)
y ′′ = 4Ae2x + 9Be−3x · · · (iii)
Eliminating A between equations (i)and (ii), we obtain y ′ − 2y = −5Be−3x · · · (∗).
Eliminating A between equations (ii)and (iii), we obtain y ′′ − 2y ′ = 15Be−3x · · · (∗∗).
Eliminating B between equations (∗)and (∗∗), we obtain
y ′′ + y ′ − 6y = 0
Alternatively, equations (i), (ii) and (iii) can be written in matrix form as
 

 
0
A
e2x
e−3x
−y
   
 2x
−3e−3x −y ′  B  = 0
2e
0
1
4e2x 9e−3x −y ′′
The above matrix is a homogeneous system of equations in the unknowns A and B. To obtain a
non-trivial solution (i.e., for A ̸= 0 and B ̸= 0), the determinant of the coefficient matrix should
be equal to zero. That is,
e2x
e−3x
−y
2x
−3x
2e
−3e
−y ′ = 0
2x
−3x
4e
9e
−y ′′
⇒
e2x [3e−3x y ′′ + 9e−3x y ′ ] − e−3x [−2e2x y ′′ + 4e2x y ′ ] − y[18e−x + 12e−x ] = 0
y ′′ + y ′ − 6y = 0
Exercise:
5
(a) y = e2x (A cos x + B sin x).
Solution
Since we have two essential arbitrary constants, we need to differentiate the given primitive 2
times. Now,
y = e2x (A cos x + B sin x) ⇒ ye−2x = A cos x + B sin x
Differentiating implicitly, using product rule on the left hand side, yields
e−2x [y ′ − 2y] = −A sin x + B cos x
Differentiating again yields
e−2x [y ′′ − 4y ′ + 4y] = −(A cos x + B sin x)
⇒
e−2x [y ′′ − 4y ′ + 4y] = −ye−2x
y ′′ − 4y ′ + 5y = 0
⇒
[ans: y ′′′ − 3y ′′ + 2y ′ = 0]
(b) y = Ae2x + Bex + C.
[ans: y ′′′ − 3y ′′ + 16y ′ − 48y = 0]
(c) y = A sin(4x + B) + Ce3x .
(d) y = Ae2x + Bex + Ce−x .
[ans: y ′′′ − 2y ′′ − y ′ + 2y = 0]
(e) y = Ax3 + Bx2 + C.
[ans: x2 y ′′′ − 2xy ′′ + 2y ′ = 0]
[ans: y ′′ − 8y ′ + 25y = 0]
(f) y = e4x (A cos 3x + B sin 3x).
[ans: y ′′ − 5y ′ + 6y = 6x2 − 10x + 2]
(g) y = x2 + Ae2x + Be3x .
1.4
Solution of differential equations
A solution of a differential equation is any function that satisfies the given differential equation. There
are two types of solutions: general solution and particular solution.
Definition 1.11 (General solution). A general solution of an ODE is the primitive associated with
the given differential equation. The number of essential arbitrary constants in the solution should be
equal to the order of the given differential equation. For example, the primitive y = mx + c is a general
solution of the equation y ′′ = 0, where m and c are essential arbitrary constants (parameters). The
function y = mx + c is a family of straight lines on the xy-plane.
Definition 1.12 (Particular solution). A particular solution of an ODE is obtained from the general
solution by assigning numerical values to the essential arbitrary constants. For example, if we are
given the initial conditions, say y(0) = 3 and y ′ (0) = 4, then we would get the particular solution as
y = 4x + 3. The function y = 4x + 3 is a single straight line on the xy-plane.
Example(s):
1. Show that y = e2x and y = e−3x are both solutions to the differential equation defined by
d2 y
dy
+
− 6y = 0 − − − (∗)
2
dx
dx
Solution
d2 y
dy
= 2e2x and
= 4e2x . Substituting these derivatives in the
From y = e2x − − − (i) ⇒
dx
dx2
given differential equation yields
(
)
4e2x + 2e2x − 6 e2x = 0
Therefore, (i) is a solution to the given differential equation (∗).
6
dy
d2 y
Similarly, y = e−3x −−−(ii) ⇒
= −3e2x and 2 = 9e2x . Substituting these derivatives
dx
dx
in the given differential equation yields
(
)
9e2x − 3e2x − 6 e−3x = 0
Therefore, (ii) is a solution to the given differential equation (∗).
→ Note: if y1 , y2 , · · · , yn are each solution to a DE, then their linear combination is also a solution
to the differential equation. That is, y = a1 y1 + a2 y2 + · · · + an yn , where ai , i = 1, 2, 3, · · · , n are
arbitrary constants. For instance, y = a1 e2x + a2 e−3x is also a solution to the given differential
equation (∗).
2. Verify that the given function is a solution of the corresponding differential equation.
d2 y
+ y = 0; y = cos x
dx2
dy
d2 y
+4
(b)
+ 13y = 0; y = e−2x (cos 3x + sin 3x)
dx2
dx
(a)
Lecture 2
2
First order ODEs
A first order ordinary differential equation takes the general form:
. (x, y)dy = 0
M (x, y)dx + N
(7)
Equation (7) can be categorized into 5 groups:
1. Separable equation
2. Homogeneous equation
3. Exact differential equation
4. Linear differential equation
5. Bernoulli’s equation
2.1
Separable equations
If equation (7) can be rearranged to take the form of A(x)dx + B(y)dy = 0, then equation (7) is said
to be an equation with variables separable. The solution is then obtained by integrating directly -i.e.,
∫
∫
A(x)dx +
B(y)dy = C,
where C is a constant of integration.
Example(s):
Solve the following differential equations
(a) sin x cos ydx + cos x sin ydy = 0.
Solution
Dividing the equation through by cos x cos y and then integrating we get
∫
sin x
dx +
cos x
∫
sin y
dy =
cos y
∫
0
⇒
− ln | cos x| − ln | cos y| = − ln |C|
7
⇒
cos x cos y = C
(b) (x2 y 2 + x2 + y 2 + 1)dx + (xy + y)dy = 0
Solution
(x2 y 2 + x2 + y 2 + 1)dx + (xy + y)dy = 0
⇒
(x2 + 1)(y 2 + 1)dx + y(x + 1)dy = 0
∫
Dividing through by (x +
1)(y 2
+ 1) and integrating we get
x2 + 1
dx +
x+1
∫
y
dy =
2
y +1
∫
0.
By long division,
x−1
)
x2
x+1
+1
− x2 − x
−x+1
x+1
2
So,
x2 + 1
2
= (x − 1) +
. Thus, we have
x+1
x+1
∫
(x − 1)dx +
⇒
∫
2
dx +
x+1
∫
y
dy =
y2 + 1
∫
0
x2
1
− x + 2 ln |x + 1| + ln |y 2 + 1| = C
2
2
Exercise:
(a) Solve xy ′ = y + y 2 .
[ans:
[ans: x2 + ln(xy) = C or xy = a1 e−x ]
2
(b) Solve (2x2 y + y)dx + xdy = 0.
(c) Solve
dy
y2 − 1
=
.
dx
x
(d) Solve the initial value problem: (x2 + 9)
(e) Solve (y + 1)
y
= C]
x(1 + y)
[ans:
dy
+ xy = 0;
dx
dy
+ x(y 2 + 2y) = x.
dx
y(0) = 2.
y−1
= Cx2 ]
y+1
[ans: y 2 (x2 + 9) = 36]
[ans: y 2 + 2y = 1 + Ce−x ]
2
(f) Determine the family of curves such that at each point the slope is given by 2xy 2 .
1
x2 + = C]
y
(g) Show that the solution of the differential equation (1 + y 2 )dx + (1 + x2 )dy = 0;
xy − x − y − 1 = 0.
2.2
2.2.1
[ans:
y(0) = −1 is
Reduction to separable equation
Substitution method
Consider equation (7) such that the functions of x and y in both M and N are scalar multiples of
each other, then equation (7) can be reduced to an equation with variables separable.
Example(s):
Solve the following differential equations
(a) (x + 2y + 1)dx + (3x + 6y + 5)dy = 0.
Solution
8
Let u = x + 2y ⇒ du = dx + 2dy
differential equation, we get
⇒
dy =
1
(du − dx). Substituting in the given
2
1
(3u + 5)
(u + 1)dx + (3u + 5)(du − dx) = 0 ⇒ dx −
du = 0
2
u+3
∫
∫
∫
3u + 5
4
3u + 5
Integrating yields dx −
du = 0. By long division,
= 3−
. So we have
u+3
u+3
u+3
)
∫
∫ (
∫
∫
∫
∫
4
4
dx −
3−
du = 0 ⇒
dx − 3du +
du = C
u+3
u+3
⇒ x − 3u + 4 ln |u + 3| = C
⇒
x − 3(x + 2y) + 4 ln |x + 2y + 3| = C
⇒
(b)
x + 3y − 2 ln |x + 2y + 3| = a1
dy
= (x + y)2 .
dx
Solution
dy
From
= (x + y)2 ⇒ dy − (x + y)2 dx = 0. Let u = x + y ⇒
dx
du − dx. Substituting in the given DE yields (du − dx) − u2 dx = 0
Rearranging and integrating we get
∫
du
=
1 + u2
∫
du = dx + dy
⇒
⇒
dy =
du − (1 + u2 )dx = 0.
dx − − − −(∗)
Let u = tan θ.
⇒
du = sec2 θdθ
Therefore, equation (∗) becomes
∫
∫
sec2 θdθ
=
dx
2 θ
tan
1+
∫
⇒
∫
dθ =
⇒
dx
θ = x + C,
where C is a constant of integration. Back substitution yields
tan−1 (u) = x + C
(c)
⇒
tan−1 (x + y) = x + C
⇒
x + y = tan (x + C)
dy
= sin(x + y).
dx
Solution
dy
From
= sin(x + y) ⇒ sin(x + y)dx − dy = 0. Let u = x + y ⇒ du = dx + dy ⇒
dx
dy = du − dx. Substituting in the given DE yields sin udx − (du − dx) = 0 ⇒ (1 + sin u)dx −
du = 0. Rearranging and integrating we get
∫
∫
du
=
1 + sin u
Here, we use t substitution by letting t = tan( u2 ).
dx −
( )
⇒
u
1
du
dt = sec2
2
2
⇒
du =
∫
0 − − − −(∗)
2dt
2dt
2dt
(u) =
u =
2
2
sec ( 2 )
1 + t2
1 + tan 2
Consider the following diagram
√
1 + t2
t
u
2
.
1
(
)
( )
( )
u u
u
u
sin u = sin
+
= 2 sin
cos
2
2
2
2
2
2dt/(1 + t )
2dt
du
=
= 2
∴
2t
1 + sin u
t
+
2t + 1
1 + 1+t2
9
=
=
2t
1 + t2
2dt
(t + 1)2
Therefore, equation (∗) becomes
∫
dx −
∫
2dt
=
(t + 1)2
∫
0
⇒
x+
2
= C,
t+1
where C is a constant of integration. Back substitution yields
x+
2
tan
(u)
2
+1
=C
⇒
(
x+
tan
2
x+y
2
)
=C
+1
Exercise:
Solve the following differential equations
(a)
(
dy
= sin(x + y) + cos(x + y).
dx
[hint: put u = x + y, ans: 1 + tan
(b) (x + y)dx + (3x + 3y − 4)dy = 0.
(c)
2.2.2
dy
x+y+1
=
.
dx
2y + 3 + 2x
x+y
2
)
= Cex ]
[hint: put u = x + y, ans: x + 3y + 2 ln(x + y − 2) = C]
[hint: put u = x + y, ans:
2
1
(x + y) + ln |3x + 3y + 4| = x + C]
3
9
Homogeneous equations
A function f (x, y) is said to be homogeneous of degree n if and only if there exists a real number λ
such that
f (λx, λy) =. λn f (x, y)
For example,
Let f (x, y) = x3 + x2 y + 4y 2 x
⇒
f (λx, λy) = (λx)3 + (λx)2 (λy) + 4(λy)2 (λx)
= λ3 x3 + λ3 x2 y + 4λ3 y 2 x
= λ3 (x3 + x2 y + 4y 2 x)
= λ3 f (x, y)
Therefore, f (x, y) is homogeneous of degree 3.
Equation (7) is said to be homogeneous if and only if both M (x, y) and N (x, y) are homogeneous and
of the same degree. Note that if the sum of the powers of each term in equation (7) is the same, then
equation (7) is said to be homogeneous. If equation (7) is homogeneous, then the substitution
y = ux
reduces equation (7) to an equation with variables separable as follows. Let y = ux
udx + xdu. Equation (7) reduces to the simpler form
M (x, ux)dx + N (x, ux)[udx + xdu] = 0
⇒
xn M (u)dx + xn N (u)[udx + xdu] = 0, x ̸= 0
⇒
[M (u) + uN (u)]dx + xN (u)du
dx
N (u)du
⇒
+
x
M (u) + uN (u)
∫
∫
dx
N (u)du
⇒
+
x
M (u) + uN (u)
∫
N (u)du
⇒ ln |x| +
M (u) + uN (u)
Example(s):
Solve the following differential equations
10
= 0
= 0
∫
=
= C
0
⇒
dy =
(a) (x − 2y)dx + xdy = 0.
Solution
First, we need to test for homogeneity as follows: M (x, y) = x − 2y
λx − 2(λy) = λ(x − 2y) = λM (x, y), which is homogeneous of degree 1.
⇒
M (λx, λy) =
Similarly, N (x, y) = x ⇒ N (λx, λy) = (λx) = λ(x) = λN (x, y) which is homogeneous of degree
1.
Therefore, the given DE is homogeneous of degree 1. Next, let
⇒
y = ux
dy = udx + xdu
Substituting in the given DE yields
(x − 2ux)dx + x (udx + xdu) = 0
⇒
⇒
⇒
(1 − 2u)dx + udx + xdu = 0
∫
∫
∫
du
dx
−
=
0
(1 − u)dx + xdu = 0 ⇒
x
u−1
(
ln |x| − ln |u − 1| = ln |C|
⇒
x = C(u − 1)
⇒
⇒
(b)
(√
)
y
−1
x
= C (y − x)
x = C
x2
)
x2 − y 2 dx = ydx − xdy.
Solution
Clearly, the given equation is homogeneous of degree 1. Next, let
⇒
y = ux
dy = udx + xdu
Substituting in the given DE yields
(√
)
x2 − u2 x2 − ux dx + x(udx + xdu) = 0
(√
⇒
∫
⇒
ln |x| + sin−1 u = − ln |C|
⇒
(c) xy
)
1 − u2 dx + xdu = 0
⇒
⇒
(√
)
1 − u2 − u dx + (udx + xdu) = 0
∫
∫
du
√
= 0, [hint: put u = sin θ]
1 − u2
( )
−1 y
y
− sin−1
= ln |Cx| ⇒ Cx = e− sin ( x )
x
dx
+
x
dy
= y 2 + 2x2 .
dx
Solution
The given DE can be written as (y 2 + 2x2 )dx − xydy = 0 − − − (∗). Clearly, equation (∗) is
homogeneous of degree 2. Next, let
y = ux
⇒
dy = udx + xdu
Substituting in equation (∗) yields
(
)
u2 x2 + 2x2 dx − x2 u(udx + xdu) = 0
⇒
⇒
1
2 ln |x| − u2 = −C
2
⇒
⇒
(
)
u2 + 2 dx − u(udx + xdu) = 0
2dx − xudu = 0
(
)
u2 = 2 C + ln(x2 )
Exercise:
Solve the following equations
11
⇒
⇒
∫
2dx
− udu =
x
∫
0
y 2 = 2x2 (C + ln x2 )
(a)
dy
x+y−2
=
.
dx
x−y+2
Solution
Put v = y − 2
⇒
dv = dy. Substituting in the given DE yields
x+v
dv
=
dx
x−v
⇒
(x − v)dv − (x + v)dx = 0 − − − (∗)
Clearly, this equation is homogeneous of degree 1. Next, let
⇒
v = ux
dv = udx + xdu
Substituting in equation (∗) yields
(x − ux)(udx + xdu) − (x + ux)dx = 0
⇒
⇒
(1 − u)(udx + xdu) − (1 + u)dx = 0
∫
∫
∫
u−1
dx
2
+
du = 0
(u + 1)dx + x(u − 1)du = 0 ⇒
x
u2 +
1
∫
∫
∫
u
1
1
ln |x| +
du −
du = ln |C|, [hint: put u = tan θ in
du]
2
2
2
u +1
u +1
u +1
1
1
⇒ ln |x| + ln |u2 + 1| − tan−1 u = − ln |C|
2
2
[
(
)]
2
2
⇒ ln Cx u + 1 = 2 tan−1 (u)
Back substitution yields
[
(
⇒
(b) x
y2
dy
=y+
dx
x
(c) x
dy
= x cos(y/x) + y
dx
(d) xdy − ydx =
(e) xy
2.3
)]
v2
+1
x2
( )
v
x
)
(
[ {
}]
2
2
−1 y − 2
ln C (y − 2) + x
= 2 tan
x
⇒ ln Cx
2
= 2 tan
−1
[ans: −
x
= ln x + C]
y
[ans: sec(y/x) + tan(y/x) = Cx]
√
[ans: sinh−1 (y/x) = ln x + C]
x2 + y 2 dx
√
dy
= y 2 + x x2 + y 2
dx
[ans:
1√ 2
x + y 2 = ln x + C]
x
Exact differential equations
Equation (7) is said to be exact differential if a function (solution) ϕ(x, y) (read as “phi”) can be found
such that
dϕ = M (x, y)dx + N (x, y)dy − − − (∗)
But from differential calculus, dϕ =
∂ϕ
dx +
∂x
∂ϕ
∂y dy.
So equation (∗) can be written as
∂ϕ
∂ϕ
dx +
dy = M (x, y)dx + N (x, y)dy
∂x
∂y
Comparing the coefficients of the differentials, we have
M (x, y) =
∂ϕ
− −(i),
∂x
and
N (x, y) =
∂ϕ
− −(ii)
∂y
Differentiating equation (i) partially with respect to y and equation (ii) partially with respect to x,
we get
∂M
∂2ϕ
=
∂y
∂y∂x
and
12
∂N
∂2ϕ
=
,
∂x
∂x∂y
respectively. From differential calculus,
∂2ϕ
∂2ϕ
=
. Therefore,
∂y∂x
∂x∂y
∂M . ∂N
=
∂y
∂x
(8)
Equation (8) is the necessary condition for equation (7) to be exact. Now, from equation (i), we have
∂ϕ = M (x, y)∂x. Integrating yields
∫
∫
∂ϕ =
⇒
M (x, y)∂x
∫
ϕ(x, y) =
M (x, y)dx + g(y), − − −(∗∗)
where g is an arbitrary function. Equation (∗∗) is the solution of equation (7) so long as g(y) is
determined as follows: differentiating (∗∗) partially with respect to y, we get
∂ϕ
∂
=
∂y
∂y
∂
Comparing with equation (ii), we obtain
∂y
∫ [
g(y) =
∫
∫
M (x, y)dx + g ′ (y)
M (x, y)dx + g ′ (y) = N (x, y). Therefore,
N (x, y) −
∂
∂y
]
∫
M (x, y)dx dy + C,
where C is a constant of integration.
Example(s):
Solve the following differential equations
(a) (2xy + cos y)dx + (x2 − x sin y)dy = 0.
Solution
First, we need to test whether the given DE is exact. Here,
M = 2xy + cos y
⇒
N = x2 − x sin y
and
∂M
= 2x − sin y
∂y
and
∂N
= 2x − sin y
∂x
∂N
∂M
=
= 2x − sin y, therefore, the given DE is exact. Now, let the solution to the
∂y
∂x
given DE be ϕ(x, y) (which we need to determine) such that dϕ = M dx + N dy. That is,
Since
∂ϕ
∂ϕ
dx +
dy = (2xy + cos y)dx + (x2 − x sin y)dy
∂x
∂y
Comparing coefficients of the differentials, we have
∂ϕ
= 2xy + cos y − − − (i) and
∂x
∂ϕ
= x2 − x sin y − − − (ii)
∂y
From (i), we have ∂ϕ = (2xy + cos y) ∂x. Integrating partially with respect to x, yields
∫
∫
∂ϕ =
(2xy + cos y)∂x + g(y)
Thus,
ϕ(x, y) = x2 y + x cos y + g(y), − − −(∗)
where g is an arbitrary function of integration. Equation (∗) is the solution provided g(y) is
determined. Differentiating equation (∗) partially wrt y yields
∂ϕ
= x2 − x sin y + g ′ (y)
∂y
13
Comparing with equation (ii), we have
′
x − x sin y + g (y) = x − x sin y
2
⇒
2
′
g (y) = 0
∫
⇒
g (y) =
0dy = C
Therefore, the solution (∗) to the given DE is
ϕ(x, y) = x2 y + x cos y + C
(b) (x3 + x tan y)dx + (y ln y + 12 x2 sec2 y)dy = 0.
Solution
First, we need to test whether the given DE is exact. Here,
M = x3 + x tan y
⇒
and
∂M
= x sec2 y
∂y
1
N = y ln y + x2 sec2 y
2
∂N
= x sec2 y
∂x
and
∂M
∂N
=
= x sec2 y, therefore, the given DE is exact. Now, let the solution to the given
∂y
∂x
DE be ϕ(x, y) (which we need to determine) such that dϕ = M dx + N dy. That is,
Since
∂ϕ
∂ϕ
1
dx +
dy = (x3 + x tan y)dx + (y ln y + x2 sec2 y)dy
∂x
∂y
2
Comparing coefficients of the differentials, we have
∂ϕ
= x3 + x tan y − − − (i)
∂x
⇒
∫
ϕ(x, y) =
(x3 + x tan y)dx + g(y) − − − (ii)
From (i), we have ∂ϕ = (2xy + cos y) ∂x. Integrating partially with respect to x, yields
∫
∫
∂ϕ =
(x3 + x tan y)∂x + g(y)
Thus,
x4 1 2
+ x tan y + g(y), − − −(∗)
4
2
where g is an arbitrary function of integration. Equation (∗) is the solution provided g(y) is
determined. Differentiating equation (∗) partially wrt y yields
ϕ(x, y) =
∂ϕ
1
= x2 sec2 y + g ′ (y)
∂y
2
Comparing with equation (ii), we have
1 2 2
1
x sec y + g ′ (y) = y ln y + x2 sec2 y
2
2
⇒
′
g (y) = y ln y
⇒
∫
g (y) =
Integration by parts yields [hint: put u = ln y, dv = ydy]:
(
1
1
g(y) = y 2 ln y −
2
2
)
+C
Therefore, the solution (∗) to the given DE is
(
1
1
1
1
ϕ(x, y) = x4 + x2 tan y + y 2 ln y −
4
2
2
2
Exercise:
14
)
+C
y ln ydy + C
1. Find the general solution of the following equations
(a) (2x + sin x tan y)dx − cos x sec2 ydy = 0.
[ans ϕ(x, y) = x2 − cos x tan y + C]
(b) (3x2 + 4xy)dx + (2x2 + 2y)dy = 0.
[ans ϕ(x, y) = x3 + 2x2 y + y 2 + C]
2. Show that the following DEs are exact and find their general solution.
3
1
2
[ans: ϕ(x, y) = x2 y 4 + x2 − y 3 + 7y + C]
2
2
3
)
2
2
xy
− 3y dy = 0.
[ans: ϕ(x, y) = e + x4 − y 3 + C]
(a) (3xy 4 + x)dx + (6x2 y 3 − 2y 2 + 7)dy = 0.
(
(b)
2
)
(
y 2 exy + 4x3 dx + 2xyexy
2
3. Find the value of n such that when the differential equation (x+y 3 )dx+6xy 2 dy = 0 is multiplied
by xn makes it exact and hence solve it.
[ans: n = − 21 , ϕ(x, y) = 2x1/2 y 3 + 32 x3/2 + C]
(
4. Show that the equation
ϕ(−1, 2) = 0.
(
)
)
y 2 − 2x
3−y
dx
+
dy = 0 is exact. Hence, find ϕ(x, y) given that
x2
xy 2
y−3 2
[ans: ϕ(x, y) =
+ − 2]
x
y
Lecture 3
2.4
Linear differential equations of first order
Suppose equation (7) can be re-written to take the form
dy
+ P (x)y = Q(x),
dx
(9)
then equation (9) is said to be linear in the dependent variable y. To solve equation (9), we first
multiply it by the integrating factor µ(x), which makes it an exact differential equation. Hence,
equation (9) becomes
µ(x)
dy
+ µ(x)P (x)y = µ(x)Q(x)
dx
⇒
[µ(x)P (x)y − µ(x)Q(x)] dx + µ(x)dy = 0
(∗)
Comparing equation (∗) with equation (7), we have
M (x, y) = µ(x)P (x)y − µ(x)Q(x)
Since equation (∗) is exact, we require that
N (x, y) = µ(x)
∂M
∂N
=
. Now,
∂y
∂x
∂M
= µ(x)P (x)
∂y
Equating yields
and
and
∂N
dµ
=
∂x
dx
dµ
dµ
= µ(x)P (x). Separating the variables, we get
= P (x)dx. Integrating yields
dx
µ
∫
dµ
=
µ
∫
P (x)dx
⇒
∫
ln(µ) =
P (x)dx
⇒
∫
µ=e
P (x)dx
Therefore, the integrating factor is defined by
∫
µ = e . P (x)dx
→ Note: in finding the integrating factor, we don’t write the constant of integration.
Example(s):
Solve the following differential equations
15
(a) xdy + (2xy − x)dx = 0.
Solution
The given DE can be rewritten as
dy
+ 2y = 1 · · · (∗)
dx
∫
⇒
Here, P (x) = 2
(linear ODE in dependent variable y)
∫
P (x)dx =
2dx = 2x. Therefore, the integrating factor is
∫
µ=e
P (x)dx
= e2x
Multiplying equation (∗) by e2x yields
e2x
dy
+ 2e2x y = e2x
dx
⇒
d ( 2x )
ye
= e2x
dx
Integrating with respect to x yields
∫
ye
2x
1
ye2x = e2x + C
2
⇒
e2x dx
=
⇒
y=
1
+ Ce−2x
2
which is the solution.
(b) y 2 dx + (2xy − 4y 3 )dy = 0.
Solution
The given DE can be rewritten as
dx 2
+ x = 4y · · · (∗)
dy y
Here, P (y) =
2
y
⇒
∫
(linear ODE in dependent variable x)
∫
2
dy = 2 ln y = ln(y 2 ). Therefore, the integrating factor
y
P (y)dy =
∫
is
µ=e
P (y)dy
2
= eln(y ) = y 2
Multiplying equation (∗) by y 2 yields
y2
dx
+ 2yx = 4y 3
dy
⇒
d ( 2)
xy = 4y 3
dy
Integrating with respect to y yields
∫
2
xy =
4y 3 dx
⇒
xy 2 = y 4 + C,
which is the solution.
(c) (y + x3 )dx − xdy = 0.
Solution
The given DE can be rewritten as
dy
1
− y = x2 · · · (∗)
dx x
1
Here, P (x) = −
x
factor is
⇒
∫
(linear ODE in dependent variable y)
∫
P (x)dx =
∫
µ=e
1
− dx = − ln x = ln(1/x). Therefore, the integrating
x
P (x)dx
16
= eln(1/x) =
1
x
Multiplying equation (∗) by
1
yields
x
1 dy
1
− 2y = x
x dx x
⇒
d
dx
( )
y
x
=x
Integrating with respect to x yields
y
=
x
∫
xdx
⇒
y
1
= x2 + C,
x
2
which is the solution.
Exercise:
1. Find the general solution of the following differential equation
dy
+ 2xy = 2x.
dx
dy
(b)
+ y tan x = sin 2x.
dx
dy
(c) x
− 2y = x4 ex .
dx
[ans: y = 1 + Ce−x ]
2
(a)
[ans: y = −2 cos2 x + C cos x]
[ans:
2. Show that the transformation u = f (y) reduces the equation
a linear DE. Hence, solve (y + 1)
dy
+ x(y 2 + 2y) = x.
dx
y
= (x − 1)ex + C]
x2
df (y) dy
·
+ P (x)f (y) = Q(x) to
dy
dx
[ans: y 2 + 2y = 1 + Ce−x ]
2
dy
3. Solve the differential equation defined by x
− 2y = x6 sin x.
dx
y
= (6x − x3 ) cos x + (3x2 − 6) sin x + C]
x2
4. Solve the initial value problem m2
2.5
dC
+ 2mC = 2; C(2) = 4.
dm
[ans:
[ans: C =
2
12
+ 2]
m m
Bernoulli’s equation
This is a differential equation of the form
dy
+ P (x)y = Q(x)y n
dx
(10)
where n is a real number. Equation (10) is linear if n = 0 or n = 1. Otherwise, it is nonlinear and
can be reduced to a linear equation by making the substitution
z = y. 1−n ,
as follows: dividing equation (10) by y n yields
y −n
dy
+ P (x)y 1−n = Q(x)
dx
(11)
Let z = y 1−n . By chain rule, differentiating both sides with respect to the independent variable
dz
dy
dy
1 dz
x, we have
= (1 − n)y −n
⇒ y −n
=
. Substituting in equation (11), we get
dx
dx
dx
1 − n dx
1 dz
+ P (x)z = Q(x). Multiplying through by (1 − n) yields
1 − n dx
dz
+ (1 − n)P (x)z = (1 − n)Q(x),
dx
which is a linear ODE in the dependent variable z and independent variable x.
Example(s):
Solve the following differential equations
17
(a)
dy
+ y = xy 4 .
dx
Solution
dy
+ y = xy 4
dx
Let z = y −3
dz = −3y −4 dy
⇒
−1 dz
+z =x
3 dx
dy
+ y −3 = x
dx
dy
1 dz
y −4
=−
. So,
dx
3 dx
y −4
⇒
⇒
dz
− 3z = −3x − − − (∗) (linear ODE in dependent variable z)
dx
⇒
The integrating factor is
∫
−3dx
µ=e
= e−3x
Multiplying equation (∗) through by e−3x yields
e
−3x dz
dx
− 3e
−3x
−3x
z = −3xe
d
(ze−3x ) = −3xe−3x
dx
⇒
⇒
ze
−3x
= −3
∫
xe−3x dx + C
Integrating by parts and rearranging we get [hint: put u = x, dv = e−3x dx]
(b)
3y −3 = 3x + 1 + Ce3x
⇒
3z = 3x + 1 + Ce3x
dy
+ y = y 2 (sin x + cos x).
dx
Solution
dy
+ y = y 2 (sin x + cos x)
dx
Let z = y −1
dz = −y −2 dy
⇒
dy
+ y −1 = sin x + cos x
dx
dy
dz
y −2
= − . So,
dx
dx
⇒
y −2
⇒
dz
− z = −(sin x + cos x) − − − (∗) (linear in z)
dx
The integrating factor is
∫
µ=e
(−1)dx
= e−x
Multiplying equation (∗) through by e−x , we get
e−x
⇒
dz
− e−x z = −e−x (sin x + cos x)
dx
ze
−x
=−
∫
e
−x
⇒
d
(ze−x ) = −e−x (sin x + cos x)
dx
[∫
(sin x + cos x)dx = −
e
−x
∫
sin xdx +
e
−x
]
cos xdx
Now, using the idea of Euler’s representation of a complex number, we have
∫
e
−x
∫
cos xdx + i
e
−x
∫
sin xdx =
e
−x
∫
(cos x + i sin x)dx =
e
−x
· e dx =
ix
∫
e(i−1)x dx
1 (i−1)x
e−x
e
+C =−
(1 + i)eix + C
i−1
2
e−x
= −
(1 + i)(cos x + i sin x) + C
2
e−x
e−x
= −
(cos x − sin x) − i
(cos x + sin x) + C
2
2
=
⇒
∫
e−x cos xdx = −
Therefore,
ze
e−x
(cos x − sin x) + a1
2
∫
and
e−x sin xdx = −
[
−x
⇒
e−x
(cos x + sin x) + a2
2
]
e−x
e−x
=− −
(cos x + sin x) + a1 −
(cos x − sin x) + a2 = e−x cos x + C
2
2
z = cos x + Cex
⇒
y −1 = cos x + Cex
18
⇒
y (cos x + Cex ) = 1
Exercise:
(a) Solve
dy
y
− = y3.
dx x
(b) Solve
dy 1
1
3
−
1+
y = y3.
dx 2
x
x
(
[ans: 3
)
(c) Solve x(6x2 − y − 1)dy + 2ydx = 0.
x2
+ 2x3 = C]
y2
[ans:
x
= Ce−x − 6]
y2
[ans:
y
= 6 + Ce−y ]
x2
dy
(d) Prove that the transformation z = y 1−n reduces the equation
+ P (x)y = Q(x)y n to a linear
dx
dy
x
equation in z and x. Hence, solve the initial value problem
[ans:
+ xy = 3 ; y(0) = 2.
dx
y
2
y 4 = 1 + 15e−2x ]
2.6
2.6.1
Applications of first order ODEs
Geometry
Example(s):
(a) A curve is defined by the condition that at each point the gradient is equal to twice the sum of
the coordinates. Find the equation of the curve.
Solution
dy
= 2(x + y)
dx
2.6.2
⇒
dy
1
− 2y = 2x which is linear in y. Solving it yields y = −x − + Ce2x .
dx
2
Orthogonal trajectories
Let F (x, y) = c be a family of curves. Then if there exists another family of curves G(x, y) = k such
that each curve in the family G intersects with every curve in the family F at 90o , then F and G are
said to be orthogonal trajectories of each other. The product of their gradients is −1. In case the two
families are identical, then we say that the family is self-orthogonal.
Suppose the ODE corresponding to the first
family F (x, y) = c is given by M dx + N dy = 0
then the ODE for the orthogonal family (i.e.,
second family) is given by
M dy − N dx = 0,
(∗)
since the product of their gradients is −1.
The general solution of (∗) gives the required
orthogonal trajectories.
→ Note 1: orthogonal trajectories has important applications in the field of physics and engineering.
For example, the equipotential lines and the streamlines in an irrotational two-dimensional flow are
orthogonal.
→ Note 2: the differential equation for the other family is obtained by replacing
Example(s):
19
dy
−1
by
.
dx
dy/dx
1. Find the orthogonal trajectories of the curves whose equations are.
(a) x + y = c.
Solution
Here, F (x, y) ≡ x + y = c
⇒
dF ≡ dx + dy = 0, which is the DE for the family F (x, y).
dy
dx
The DE for the orthogonal trajectories is obtained by replacing
by − . Hence, the
dx
dy
DE for the orthogonal trajectories is dy − dx = 0. Integrating yields y − x = k, which is
the required orthogonal trajectories.
x
(b) y =
.
c+x
Solution
x
ydx − xdy
− dx = 0 ⇒ (y 2 − y)dx + xdy = 0,
− x = c ⇒ dF ≡
y
y2
which is the DE for the family F (x, y). The DE for the orthogonal trajectories is obtained by
dy
dx
replacing
by − . Hence, the DE for the orthogonal trajectories is (y 2 −y)dy −xdx = 0.
dx
dy
Integrating yields 2y 3 − 3y 2 − 3x2 = k, which is the required orthogonal trajectories.
Here, F (x, y) ≡
(c) x2 + y 2 = c.
[ans: orthogonal trajectories are y = kx]
2. (a) Find the orthogonal trajectories of all parabolas having their vertices at the origin and foci
on the x-axis.
Solution
The equation of parabolas having their vertices at the origin and foci on the x-axis is given by
y2
2xydy − y 2 dy
y 2 = cx. Here, F (x, y) ≡
= c ⇒ dF ≡
= 0 ⇒ 2xdy − ydx = 0,
x
x2
which is the DE for the family F (x, y). The DE for the orthogonal trajectories is obtained
dx
dy
by − . Hence, the DE for the orthogonal trajectories is 2xdx + ydy = 0.
by replacing
dx
dy
Integrating yields 2x2 + y 2 = k, which is the required orthogonal trajectories.
(b) Find the orthogonal trajectories of family of straight lines through the origin. [hint: the
equation of the family of straight lines through the origin is y = mx, answer: orthogonal
trajectories are x2 + y 2 = k]
2.6.3
Real life situations
Example(s):
(a) A substance cools from 100o C to 60o C in 10 seconds. Find the temperature of the substance
after 40 seconds, assuming room temperature to be 20o C.
Solution
We apply Newton’s law of cooling which states that “the rate at which a substance cools is
directly proportional to the excess temperature above the room temperature.”
Let the temperature of the substance at time t be T . Then Newton’s law of cooling becomes:
dT
∝ (T − 20)
dt
⇒
dT
= k(T − 20),
dt
where k is a constant of proportionality. Separating the variables, we obtain
dT
= kdt.
T − 20
20
Integrating and applying the given conditions, we get
∫60
100
[
dT
=
T − 20
]T
Also, ln(T − 20)
∫10
kdt
]60
ln(T − 20)
[
100
]40
= kt
⇒
0
⇒
0
k = 0.1 ln(0.5)
ln(T − 20) − ln(80) = 40k
T − 20
= e40k = e40×0.1 ln(0.5) = e4 ln(0.5)
80
⇒
]10
= kt
0
[
100
[
⇒
⇒
T = 80e4 ln(0.5) + 20 = 25
Therefore, T = 25o C, when t = 40 seconds.
(b) The population of Juja constituency in 1964 and 1970 was 12 thousand and 18 thousand
1
respectively. Find the year when the population was 5 thousand, given that the rate of
3
growth of the population is directly proportional to the population.
Solution
dP
Let P be the population at time t. Then we have
= kP
dt
applying the given conditions, we get
∫18
dP
=
P
1970
∫
⇒
kdt
k=
⇒
dP
= kdt. Integrating and
P
1
ln(1.5)
6
1964
12
Also,
1
∫5 3
∫t
dP
=
P
12
kdt
⇒
[
]5 1
ln(P )
3
12
[ ]t
=k t
1964
⇒
ln(16/3) − ln(12) =
[
]
1
ln(1.5) t − 1964
6
1964
⇒
t = 1952
Exercise:
(a) An electric circuit has a constant electromotive force E = 40v, a resistor of R = 10Ω and an
inductance L = 0.2 henry (H), with initial current I = 0 at t = 0 and basic differential equation
(
)
dI
is: L + RI = E. Determine the current at any time t.
[ans: I = 4 1 − e−50t ]
dt
(b) The JKUAT engineering students’ population N (t) at any time t is assumed to satisfy the logistic
dN
1
10000
growth law
=
N (10000 − N ). Prove that N (t) =
, where C is an arbitrary
dt
500
1 + Ce−20t
constant.
(c) If a body in air at 25o C cools from 100o C to 75o C in one minute. Find its temperature at the
end of three minutes.
(d) A company is using Newspaper advertising to introduce a new product to a community of 50,000
people. It was assumed that the rate at which people learn about the new product is proportional
to the product of the number of people who have heard about it and the number of people who
have not heard about it. If 100 individuals were aware of the product initially and 500 people
dN
were aware about it after 10 days of the campaign
[hint:
∝ N (50000 − N )]
dt
i) How many people will be aware of the product after 20 days?
[6 mks]
ii) When will half of the community be aware of the product?
[3 mks]
Lecture 4
21
3
Second order linear ODEs
Consider the linear ODE of order 2, with variable coefficients:
d2 y
dy
+ a1 (x)
+ a0 (x)y = F̃ (x),
(12)
2
dx
dx
where a2 (x) ̸= 0. If F̃ (x) = 0, then equation (12) is said to be homogeneous. Otherwise, it is
non-homogeneous. If the coefficients are constants, then equation (12) is called linear ODE with
constant coefficients, and is written as
a2 (x)
d2 y
dy
+ a1
+ a0 y = F̃ (x),
2
dx
dx
where a0 , a1 , a2 are constants and a2 ̸= 0.
a2
3.1
(13)
Differential operator notation
Let y be an n-times differentiable function of the independent variable x.
differentiation with respect to x is denoted by the differential operator D, i.e.,
The operation of
d2
d3
3
,
D
=
, etc
dx2
dx3
2
dy
d2 y
2 y, d y + 3 dy + 2y = (D 2 + 3D + 2)y,
Hence, the derivative
=
D
is denoted by Dy. Likewise,
dx
dx2
dx2
dx
etc. Thus, in terms of the D operator, equation (13) is written as
D=
d
dx
[
⇒
D2 =
]
a2 D2 + a1 D + a0 y = F̃ (x)
(14)
Definition 3.1 (Shift operator). Let y be differentiable function of x. Then,
D(eαx y) = eαx (D + α)y
That is, to shift eαx to the LHS of D, shift it but in place of D substitute (D + α).
Proof.
(
)
d αx
dy
d
D(e y) =
(e y) = eαx
+ αeαx y = eαx
+ α y = eαx (D + α)y
dx
dx
dx
αx
Similarly,
eαx Dy = (D − α)eαx y
That is, to shift eαx to the RHS of D, shift it but in place of D substitute (D − α).
3.2
Solution of homogeneous linear ODEs with constant coefficients
Consider a homogeneous linear ODE of order 2, with constant coefficients:
a2
where a2 ̸= 0. Let D =
d2 y
dy
+ a1
+ a0 y = 0,
2
dx
dx
(15)
d
, then in terms of the D-operator equation (15) becomes:
dx
[
]
a2 D2 + a1 D + a0 y = 0
For non-trivial solution of y, we require that [a2 D2 + a1 D + a0 ] = 0 − − − (∗). Equation (∗) is called
the characteristic equation (or auxiliary/subsidiary equation) of the differential equation (15).
The non-trivial solution of y is dependent on the roots of the characteristic equation (∗). The roots
can be classified into one of the three cases:
(i) Real and distinct roots
(ii) Real and equal roots
(iii) Complex conjugate roots
We shall consider the three cases above.
22
Case 1: When the roots of the auxiliary equation are real and distinct
Let the roots be α and β. Then the general solution is given by
y = Aeαx + Beβx ,
where A and B are arbitrary constants.
Proof. If the roots are α and β, then the DE is of the form
(D − α)(D − β)y = 0
Pre-multiplying by e−αx yields
e−αx (D − α)(D − β)y = 0
⇒
⇒
(D − α − −α)[e−αx (D − β)y] = 0
D−1 D[e−αx (D − β)y] = D−1 (0),
⇒
e−αx (D − β)y = A1
⇒
D[e−αx (D − β)y] = 0
(D−1 is the Integral Operator)
⇒
(D − β)y = A1 eαx
Pre-multiplying by e−βx yields
e−βx (D − β)y = A1 e(α−β)x
⇒
(D − β − −β)[e−βx y] = A1 e(α−β)x
⇒
⇒
⇒
D[e−βx y] = A1 e(α−β)x
D−1 D[e−βx y] = D−1 (A1 e(α−β)x )
e−βx y = A1 (α − β)−1 e(α−β)x + B
Multiplying by eβx and letting A1 (α − β)−1 = A yields
y = Aeαx + Beβx
Example(s):
Solve the following differential equations
(a)
d2 y
dy
+ 6y = 0.
−5
2
dx
dx
Solution
In terms of the D operator the given DE becomes (D2 − 5D + 6)y = 0. Thus, the auxiliary
equation is D2 − 5D + 6 = 0. Hence, the roots are α = 2 and β = 3. The general solution to the
given DE is y = Ae2x + Be3x .
(b) 2
d2 y
dy
−
− 10y = 0.
dx2 dx
Solution
In terms of the D operator the given DE becomes (2D2 − D − 10)y = 0. The auxiliary equation
is 2D2 − D − 10 = 0. Hence, the roots are α = −2 and β = 52 . The general solution is
5
y = Ae−2x + Be 2 x .
(c)
d2 y
dy
−
= 0.
dx2 dx
[ans: y = Aex + B]
Generalization:
Consider a homogeneous linear ODE of order n, with constant coefficients:
[
]
an Dn + an−1 Dn−1 + an−2 Dn−2 + · · · + a2 D2 + a1 D + a0 y = 0,
23
(16)
where an ̸= 0. Let the roots of the auxiliary equation be α1 , α2 , · · · , αn , where α1 ̸= α2 ̸= · · · ̸= αn .
The general solution is given by
y = A1 eα1 x + A2 eα.2 x + · · · + An eαn x
Example(s):
Solve the following differential equation
(a)
d3 y
d2 y
dy
−
2
−
+ 2y = 0.
3
2
dx
dx
dx
Solution
In terms of the D operator the given DE becomes (D3 − 2D2 − D + 2)y = 0. The auxiliary
equation is D3 −2D2 −D+2 = 0 ⇒ (D−2)(D+1)(D−1) = 0. The roots are α1 = 2, α2 = −1
and α3 = 1. Thus, the general solution is y = A1 e2x + A2 e−x + A3 ex .
Case 2: When the roots of the auxiliary equation are real and equal
Let the roots be D1 = D2 = α. The general solution is given by
y = (Ax + B)eαx ,
where A and B are arbitrary constants.
Proof. If the roots are D1 = D2 = α, then the DE is of the form
(D − α)2 y = 0
Pre-multiplying by e−αx yields
e−αx (D − α)2 y = 0
⇒
⇒
(D − α − −α)2 [e−αx y] = 0
⇒
D2 [e−αx y] = 0
D−2 D2 [e−αx y] = D−2 (0) = D−1 (D−1 (0))
⇒
e−αx y = D−1 (A) = Ax + B
Multiplying by eαx yields
y = (Ax + B)eαx
Example(s):
Solve the following differential equations
(a)
d2 y
dy
−4
+ 4y = 0.
2
dx
dx
Solution
In terms of the D operator the equation becomes (D2 − 4D + 4)y = 0. The auxiliary equation
is D2 − 4D + 4 = 0. Hence, the roots are α1 = α2 = 2. The general solution is y = (Ax + B)e2x .
(b)
d2 y
dy
+ 10
+ 25y = 0.
2
dx
dx
Solution
In terms of the D operator the equation becomes (D2 + 10D + 25)y = 0. The auxiliary equation
is (D2 + 10D + 25) = 0. Hence, the roots are α1 = α2 = −5. The general solution is y =
(Ax + B)e−5x .
24
Exercise:
(a) Find the general solution of
d2 y
dy
+ y = 0.
−2
dx2
dx
(b) Solve the initial value problem
y = (2x −
4)e−3x ]
[ans: y = (Ax + B)ex ]
d2 y
dy
+6
+ 9y = 0; y(0) = −4 and y ′ (0) = 14.
2
dx
dx
[ans:
Generalization:
Consider equation (16). Let the roots of the auxiliary equation be α1 , α2 , · · · , αn , where α1 = α2 =
· · · = αn . The general solution is given by
. · · · + An−1 x + An )eαx
y = (A1 xn−1 + A2 xn−2 +
Example(s):
Solve the following differential equation
(a)
d3 y
d2 y
dy
−
3
+3
− y = 0.
3
2
dx
dx
dx
Solution
In terms of the D operator the given DE becomes (D3 − 3D2 + 3D − 1)y = 0. The auxiliary
equation is D3 − 3D2 + 3D − 1 = 0 ⇒ (D − 1)(D − 1)(D − 1) = 0. Hence the roots are
D1 = D2 = D3 = 1. The general solution is y = (A1 x2 + A2 x + A3 )ex .
Case 3: When the roots of the auxiliary equation are complex conjugate
Let the roots be D = (α ± iβ). The general solution is given by
y = eαx (A cos βx + B sin βx) ,
where A and B are arbitrary constants.
Proof. Let the roots be D1 = (α + iβ) and D2 = (α − iβ). The general solution is given by
y = A1 e(α+iβ)x + B1 e(α−iβ)x
= eαx [A1 eiβx + B1 e−iβx ]
= eαx [A1 (cos βx + i sin βx) + B1 (cos βx − i sin βx)]
= eαx [(A1 + B1 ) cos βx + i(A1 − B1 ) sin βx]
= eαx [A cos βx + B sin βx],
where A = A1 + B1 and B = i(A1 − B1 ).
Example(s):
Solve the following differential equations
(a)
d2 y
dy
+6
+ 13y = 0.
dx2
dx
Solution
In terms of the D operator the given DE becomes (D2 + 6D + 13)y = 0. The auxiliary equation
is D2 + 6D + 13 = 0. Hence, the roots are D = −3 ± i2 (complex conjugate). From which we
obtain α = −3, β = 2. Thus, the general solution is y = e−3x (A cos 2x + B sin 2x).
25
(b)
d2 y
dy
−8
+ 25y = 0.
2
dx
dx
Solution
In terms of the D operator the given DE becomes (D2 − 8D + 25)y = 0. The auxiliary equation
is D2 − 8D + 25 = 0. Hence, the roots are D = 4 ± i3 (complex conjugate). From which we
obtain α = 4, β = 3. Thus, the general solution is y = e4x (A cos 3x + B sin 3x).
Exercise:
(a) Find the general solution of
dy
d2 y
−2
+ 5y = 0.
2
dx
dx
(b) Find the general solution of
d3 y
d2 y
dy
− 3 2 + 16 − 48y = 0.[ans: y = A cos 4x + B sin 4x + Ce3x ]
3
dx
dx
dx
(c) Solve the initial value problem
y = 2 cos 3x − sin 3x]
(d) Solve the initial value problem
y=
e3x (2 sin 4x
− 3 cos 4x)]
[ans: y = ex (A cos 2x + B sin 2x)]
d2 y
+ 9y = 0; y(π) = −2 and y ′ (π) = 3.
dx2
[ans:
d2 y
dy
−6
+ 25y = 0; y(0) = −3 and y ′ (0) = −1.
2
dx
dx
[ans:
Lecture 5
3.3
Solution of non-homogeneous linear ODEs with constant coefficients
Consider equation (14) above, then the solution comprises of 2 parts i.e.,
1. Complementary solution, yc (x)
2. Particular integral, yp (x)
[
]
The complementary solution is obtained from the auxiliary equation a2 D2 + a1 D + a0 = 0.
The particular integral of equation (14) is given by
yp (x) =
1
F̃ (x),
[a2 D2 + a1 D + a0 ]
which makes use of inverse differential operator. We will consider 9 cases of F̃ (x).
→ Note: In finding the particular integral, we don’t write constants of integration, since these can be
absorbed with the constants of the complementary solution.
Case 1: When F̃ (x) = eαx
In this case, we substitute D with α.
Justification: this substitution is valid since
D(eαx ) = αeαx
D2 (eαx ) = α2 eαx
..
..
.
.
Dn (eαx ) = αn eαx
Example(s):
26
⇒
D=α
d2 y
dy
−3
+ 2y = e−3x .
2
dx
dx
(a) Find the particular integral of
Solution
In terms of the D operator the given DE becomes
(D2 − 3D + 2)y = e−3x
⇒
yp (x) =
1
e−3x
D2 − 3D + 2
Substituting D with −3 yields
yp (x) =
(b) Find the complete solution of
(−3)2
1
1
e−3x = e−3x
− 3(−3) + 2
20
d2 y
dy
d3 y
−
6
+ 12
− 8y = ex + e3x .
dx3
dx2
dx
Solution
In terms of the D operator the given DE becomes (D3 − 6D2 + 12D − 8)y = ex + e3x .
i) The complementary solution
The auxiliary equation is D3 − 6D2 + 12D − 8 = 0.
Hence, the roots are
D1 = D2 = D3 = 2. Thus, the complementary solution is yc (x) = (Ax2 + Bx + C)e2x
ii) The particular integral
1
(ex + e3x )
−
+ 12D − 8
1
1
=
ex + 3
e3x
3
2
2
D − 6D + 12D − 8
D − 6D + 12D − 8
1
1
=
ex +
e3x
3
2
3
2
(1) − 6(1) + 12(1) − 8
(3) − 6(3) + 12(3) − 8
= −ex + e3x
yp (x) =
D3
6D2
Therefore, the complete solution is y = yc (x) + yp (x). i.e.,
y = (Ax2 + Bx + C)e2x − ex + e3x
Exercise:
d2 y
dy
d3 y
(a) Find the complete solution of 5 2 + 2
+ e2x = 3 + 24y.
dx
dx
dx
1 2x
−2x
3x
4x
y = Ae
+ Be + Ce + e ]
8
Case 2: When F̃ (x) = cos αx or F̃ (x) = sin αx
In this case, we substitute D2 with −α2 .
Justification: this substitution is valid since
D(cos αx) = −α sin αx
D2 (cos αx) = −α2 cos αx
⇒
D2 = −α2
⇒
D2 = −α2
Similarly,
D(sin αx) = α cos αx
D2 (sin αx) = −α2 sin αx
Example(s):
27
[ans:
(a) Find the particular integral of
d2 y
+ 4y = cos 3x
dx2
Solution
In terms of the D operator the given DE becomes (D2 + 4)y = cos 3x. Thus, the particular
integral is given by
yp (x) =
=
1
cos 3x. Substituting D2 with −(3)2 yields.
D2 + 4
1
1
cos 3x = − cos 3x
2
−(3) + 4
5
(b) Find the complete solution of
dy
d2 y
+2
+ y = sin 2x.
2
dx
dx
Solution
In terms of the D operator the given DE becomes (D2 + 2D + 1)y = sin 2x.
i) The complementary solution
The auxiliary equation is D2 + 2D + 1 = 0. Hence, the roots are D1 = D2 = −1. Thus, the
complementary solution is yc (x) = (Ax + B)e−x .
ii) The particular integral
yp (x) =
=
=
=
=
1
1
sin 2x =
sin 2x
2
+ 2D + 1
−(2) + 2D + 1
1
sin 2x (Introduce a D2 in the denominator -multiply by conjugate)
2D − 3
2D + 3
2D + 3
2D + 3
sin 2x =
sin 2x =
sin 2x
2
(2D − 3)(2D + 3)
4D − 9
−4(2)2 − 9
}
1{
2D + 3
sin 2x = −
−
2D[sin 2x] + 3 sin 2x
25
25
1
− (4 cos 2x + 3 sin 2x)
25
D2
Therefore, the complete solution is y = yc (x) + yp (x).
Case 3: When F̃ (x) is a polynomial
In this case, we drop terms of D with higher powers than the degree of the polynomial.
Justification: the dropping of terms is valid since
D2 x = 0
D3 x2 = 0
⇒
Dk xn = 0 if k > n
→ Note: the dropping of terms is valid only if there exists at least one term in the denominator
which doesn’t contain the operator D (i.e., if a0 ̸= 0). If, however, a0 = 0, we need to factor out D in
the denominator and operate with the integral operator, D−1 , first.
We then apply the Maclaurin’s series expansion of the resulting inverse differential operator. Recall
from Maclaurin’s series expansion that:
1
= 1 + x + x2 + x3 + · · ·
1−x
and
28
1
= 1 − x + x2 − x3 + · · ·
1+x
Hence,
1
= 1 + 2D + 4D2 + 8D3 + · · ·
1 − 2D
{
1
1+
D
2
} =1−
D D2 D3
+
−
+ ···
2
4
8
e.t.c.
Example(s):
Find the particular integral of the following ODEs
(a)
d2 y
dy
+2
+ y = x + 1.
2
dx
dx
Solution
In terms of the D operator the given equation becomes (D2 + 2D + 1)y = x + 1. The particular
integral is given by
1
(x + 1). Here, D is not common in every term of (D2 + 2D + 1).
+ 2D + 1
1
(x + 1), (we drop D2 since (x + 1) is of degree 1 and 2 > 1).
=
2D
+
1
[
]
[
]
yp (x) =
D2
1 − 2D + 4D2 + · · · (x + 1) = (x + 1) − 2D(x + 1) + 4D2 (x + 1) + 0
=
= [(x + 1) − 2(1) + 4(0)] = [x + 1 − 2] = x − 1
(b)
d2 y
dy
= x − 2.
+2
2
dx
dx
Solution
In terms of the D operator the given equation becomes (D2 + 2D)y = x − 2. The particular
integral is given by
yp (x) =
=
=
=
=
1
(x − 2). We first factor out D since it is common in every term of (D2 + 2D).
+ 2D
(
(
)
)
x2
1
D−1
1
x2
1
}
(x − 2) =
(x − 2) =
− 2x = {
− 2x
D
D(D + 2)
D+2
D+2 2
2
2
+1
2
(
)
[
](
)
1
x2
1
D D2 D3
x2
1
}
{
− 2x =
1−
+
−
+ ···
− 2x
D
2
2
2
2
4
8
2
1+
2
[(
)
(
)
(
)
]
2
x
1
x2
1 2 x2
1
− 2x − D
− 2x + D
− 2x + 0
2
2
2
2
4
2
D2
1
2
[(
)
]
[
]
)
x2
1
1
1 x2
1
1
1( 2
− 2x − (x − 2) + (1) =
− 2x − x + 1 +
=
2x − 10x + 5
2
2
4
2 2
2
4
8
Case 4: When F̃ (x) = eαx f (x) where f (x) = cos βx, f (x) = sin βx or f (x) is a polynomial
In this case, we use the shift operator.
Example(s):
(a) Find the particular integral of the differential equation
Solution
29
d2 y
dy
+2
+ y = ex (x + 1).
dx2
dx
In terms of the D operator the given equation becomes (D2 + 2D + 1)y = ex (x + 1). The
particular integral is
1
ex (x + 1). Shifting ex to the left yields.
+ 2D + 1
1
1
= ex
(x + 1) = ex 2
(x + 1), (Drop D2 since 2 > 1).
2
(D + 1) + 2(D + 1) + 1
D + 4D + 4
]
1
1
1
1 [
= ex
(x + 1) = ex
(x + 1) = ex 1 − D + D2 + · · · (x + 1)
4D + 4
4 D+1
4
]
1
1 x[
1
=
e (x + 1) − D(x + 1) + D2 (x + 1) + 0 = ex [x + 1 − 1 + 0] = xex
4
4
4
yp (x) =
D2
(b) Find the general solution of the differential equation
d2 y
dy
−2
− 3y = e−2x cos 3x.
2
dx
dx
Solution
In terms of the D operator the given equation becomes (D2 − 2D − 3)y = e−2x cos 3x.
i) The complementary solution
The auxiliary equation is D2 − 3D − 3 = 0. Hence, the roots are D1 = 3 and D2 = −1.
Thus, the complementary solution is yc (x) = Ae3x + Be−x .
ii) The particular integral
yp (x) =
=
=
=
=
=
=
=
1
e−2x cos 3x. Shifting e−2x to the left yields.
− 2D − 3
1
e−2x
(x + 1)
(D − 2)2 − 2(D − 2) − 3
1
e−2x 2
cos 3x (replace D2 with −(3)2 )
D − 6D + 5
1
1
e−2x
cos 3x = e−2x
cos 3x
2
−(3) − 6D + 5
−(6D + 4)
(6D − 4)
(6D − 4)
−e−2x
cos 3x = −e−2x
cos 3x (replace D2 with −(3)2 )
(6D + 4)(6D − 4)
36D2 − 16
(6D − 4)
(6D − 4)
1 −2x
−e−2x
cos 3x = −e−2x
cos 3x =
e (6D − 4) cos 3x
36(−9) − 16
36(−9) − 16
340
}
}
1 −2x {
1 −2x {
e
6D[cos 3x] − 4 cos 3x =
e
− 18 sin 3x − 4 cos 3x
340
340
}
1 −2x {
−
e
9 sin 3x + 2 cos 3x
170
D2
Therefore, the general solution is y = yc (x) + yp (x). That is,
y = Ae3x + Be−x −
}
1 −2x {
e
9 sin 3x + 2 cos 3x
170
Exercise:
d2 y
dy
(a) Find the particular integral of the differential equation
+3
+ 2y = e−2x (x + 1).
2
dx
dx
(
)
1 2
x + 2x + 2 ]
yp (x) = −e−2x
2
d2 y
dy
(b) Find the complete solution of the differential equation
+3
− 4y = xe−4x .
2
dx
dx
1
y = Ae−4x + Bex − xe−4x (5x + 2)]
50
30
[ans:
[ans:
(c) Find the complete (general) solution of the differential equation
[ans: y = A + Bex + Ce2x + 5x + e2x (x2 − 3x)]
d3 y
d2 y
dy
−
3
+2
= 10 + 4xe2x .
3
2
dx
dx
dx
d3 y
d2 y
dy
+
3α
+ 3α2
+ α3 y = 0 is
dx3
dx2
dx
d3 y
d2 y
dy
y = (Ax2 +Bx+C)e−αx . Hence, find the complete solution of 3 −6 2 +12 −8y = e2x (x+1).
dx
dx
dx
(
)
1
[ans: y = (Ax2 + Bx + C)e−2x + e2x x4 + 4x3 ]
24
(d) [Assignment 1 ] Show that the solution of the equation
Lecture 6
Case 5: When F̃ (x) = eαx and F (α) = 0
In this case, we use the shift operator.
Example(s):
Find the complete solution of the following ODEs
(a)
d2 y
dy
−2
+ y = ex .
2
dx
dx
Solution
In terms of the D operator the given equation becomes (D2 − 2D + 1)y = ex .
i) The complementary solution
The auxiliary equation is D2 − 2D + 1 = 0 and so the roots are D1 = D2 = 1. Hence, the
complementary solution is yc (x) = (Ax + B)ex .
ii) The particular integral
1
ex . Shifting ex to the left yields.
D2 − 2D + 1
1
1
1
= ex
= ex 2 (1) = ex D−2 1 = ex D−1 x = ex x2
2
(D + 1) − 2(D + 1) + 1
D
2
yp (x) =
Therefore, the complete solution isy = yc (x) + yp (x). That is,
1
y = (Ax + B)ex + ex x2
2
(b)
d2 y
dy
+3
− 4y = e−4x .
dx2
dx
Solution
In terms of the D operator the equation becomes (D2 + 3D − 4)y = e−4x .
i) The complementary solution
The auxiliary equation is D2 + 3D − 4 = 0 ⇒ (D + 4)(D − 1) = 0. Hence, the roots
are D1 = 1, D2 = −4. Thus, the complementary solution is yc (x) = Aex + Be−4x .
ii) The particular integral
1
e−4x . Shifting e−4x to the left yields.
+ 3D − 41
1
1
1
1
= e−4x 2
(1) = e−4x
D−1 (1) = e−4x
x
= e−4x
2
(D − 4) + 3(D − 4) − 4
D − 5D
D−5
D−5
[
]
1
1
1 −4x
D
1
= − e−4x {
x
=
−
e
1
+
+
·
·
·
x = − e−4x (1 + 5x)
}
D
5
5
5
25
1−
5
yp (x) =
D2
31
Therefore, the general solution is y = yc (x) + yp (x). That is,
y = Aex + Be−4x −
1 −4x
e (1 + 5x)
25
Exercise:
d2 y
dy
(c) Find the complete solution of the differential equation
−6
+ 9y = 6e3x + 7e−2x − log 2.
2
dx
dx
7
1
[ans: y = (Ax + B)e3x + 3x2 e3x + e−2x − log 2]
25
9
Case 6: When F̃ (x) = cos αx or F̃ (x) = sin αx and F (−α2 ) = 0
In this case, we substitute cos αx or sin αx with eiαx then use the shift operator. For F̃ (x) = sin αx
we extract the imaginary part while for F̃ (x) = cos αx we extract the real part.
Example(s):
Find the particular integral of the following ODEs
(a)
d2 y
+ 4y = sin 2x.
dx2
Solution
In terms of the D operator the equation becomes (D2 + 4)y = sin 2x. The particular integral is
given by
1
1
sin 2x = 2
ei2x . Shifting ei2x to the left yields.
+4
D +4
1
1
1
D − i4
1
= ei2x
(1) = ei2x 2
(1) = ei2x
x = ei2x 2
x = ei2x (1 − i4x)
2
(D + i2) + 4
D + i4D
D + i4
D + 16
16
1
=
(1 − i4x)(cos 2x + i sin 2x)
16
1
Extracting the imaginary part we get yp (x) = (sin 2x − 4x cos 2x).
16
yp (x) =
(b)
D2
d2 y
+ 9y = cos 3x.
dx2
[ans: yp (x) =
1
(6x sin 3x + cos 3x)]
36
Case 7: When F̃ (x) consists of products of sin αx or cos αx
In this case, we use the following trigonometric identities.
sin(A + B) = sin A cos B + cos A sin B
sin(A − B) = sin A cos B − cos A sin B
Thus,
sin A cos B =
1
[sin(A. + B) + sin(A − B)]
2
Also,
cos(A + B) = cos A cos B − sin A sin B
cos(A − B) = cos A cos B + sin A sin B
Let A = B = θ. Substituting yields cos 2θ = cos2 θ − sin2 θ and 1 = cos2 θ + sin2 θ. Thus, we have
1 .
sin2 θ = (1
− cos 2θ)
2
and
Example(s):
Find the particular integral of the following equations.
32
1.
cos2 θ = (1
+ cos 2θ)
2
(a)
d2 y
+ 4y = sin 2x cos 3x.
dx2
Solution
1
1
(sin(2x + 3x) + sin(2x − 3x)) = (sin 5x − sin x). In terms of the D operator
2
2
1
2
the given equation becomes (D + 4)y = (sin 5x − sin x). The particular integral is given by
2
sin 2x cos 3x =
(
yp (x) =
=
(b)
)
1 1
1
1
1
(sin 5x − sin x) =
sin 5x − 2
sin x
2
2
2D +4
2 D +4
D +4
)
)
(
(
1
1
1
1 1
1
sin
5x
−
sin
x
=
−
sin
5x
+
sin
x
2 −(5)2 + 4
−(1)2 + 4
2 21
3
d2 y
dy
+2
+ y = cos2 x.
2
dx
dx
Solution
1
(1 + cos 2x). In terms of the D operator the given equation becomes
2
1
(D2 + 2D + 1)y = (1 + cos 2x). The particular integral is given by
2
cos2 x =
(
yp (x) =
=
=
=
)
1
1
1
1
1
(1 + cos 2x) =
(1) + 2
cos 2x
2
2
2 D + 2D + 1
2 D + 2D + 1
D + 2D + 1
(
)
(
)
1
1
1
1
1+
cos 2x =
1+
cos 2x
2
2
−(2) + 2D + 1
2
2D − 3
(
)
(
)
(
)
1
2D + 3
1
2D + 3
1
1
1+
cos
2x
=
1
+
cos
2x
=
1
−
(2D
+
3)
cos
2x
2
4D2 − 9
2
−4(2)2 − 9
2
25
(
)
4
3
1
1+
sin 2x −
cos 2x
2
25
25
Exercise:
d2 y
dy
(a) Find the complete solution of
+ y = sin x cos 2x.
+2
2
dx
dx
1
1
(6 cos 3x + 8 sin 3x) + cos x]
y = (Ax + B)e−x −
200
4
(b) Solve the differential equation
d2 y
dy
−4
+ 2y = ex sin2 ( x2 ).
2
dx
dx
d2 y
dy
(c) Solve the differential equation
−2
+ 4y = ex sin2 ( x2 ).
2
dx
dx
(
√
√ )
1
y = ex A cos 3x + B sin 3x + ex (2 − 3 cos x)]
12
[ans:
[ans: ]
[ans:
Case 8: When F̃ (x) is a product of sin αx or cos αx and a polynomial
In this case, we substitute sin αx or cos αx with eiαx then use the shift operator. In case of cos αx we
extract the real part and in case of sin αx we extract the imaginary part.
Example(s):Find the particular integral of the following differential equations.
(a)
d2 y
+ y = (x + 1) sin x.
dx2
SolutionIn terms of the D operator the given equation becomes (D2 + 1)y = (x + 1) sin x. The
33
particular integral is given by
1
1
(x + 1) sin x = 2
(x + 1)eix . Shifting eix to the left yields.
+1
D +1
(
)
−1
1
1
1
x2
ix
ix
i2x D
ix
= e
(x + 1) = e
(x + 1) = e
(x + 1) = e
+x
(D + i)2 + 1
D2 + i2D
D + i2
D + i2 2
yp (x) =
D2
(
)
[
](
)
eix
1
x2
eix
D D2
x2
=
+x =
1−
+
+ ···
+x
{
}
D
i2
2
i2
i2 −4
2
1+
i2
(
)
2
ix
)
e
x
x+1 1
eix ( 2
2x + 4x + i2x + i2 − 1
=
+x+i
−
=
i2
2
2
4
i8
(
)
i
= − (cos x + i sin x) 2x2 + 4x + i2x + i2 − 1
8
Extracting the imaginary part we get yp (x) = −
]
1[ 2
(2x + 4x − 1) cos x − (2x + 2) sin x .
8
Lecture 7
Case 9: When F̃ (x) is any other function
In this case, we use two methods to find the particular integral.
1. Method of undetermined coefficients (UC)
2. Method of variation of parameters
3.3.1
Method of undetermined coefficients (UC)
This method is used to find the particular integral if the complementary solution is known. The
method is applicable when F̃ (x) is eαx , sin αx, cos αx, a polynomial or sum (or product) of such
functions.
We let yp (x) be the general form of the function, F̃ (x), on the RHS of the given differential equation.
The choice of yp (x) is given in the table below.
How to choose the undetermined coefficient
Term in F̃ (x)
Choice of yp (x)
αx
e
Aeαx
n
x
An xn + An−1 xn−1 + An−2 xn−2 + · · · + A2 x2 + A1 x + A0
cos βx or sin βx
A cos βx + B sin βx
eαx cos βx or eαx sin βx eαx [A cos βx + B sin βx]
Rules:
1. If F̃ (x) is one of the function in the first column of the above table, choose corresponding function
in second column.
2. If yp (x) contains a term that is obtainable from yc (x), then refine yp (x) by multiplying the
affected term by x (or by x2 if this solution is a double root). For example, if yc (x) = a1 ex +a2 e2x
and F̃ (x) = e2x , then the appropriate choice for yp (x) will be yp (x) = Axe2x , where A is the
undetermined coefficient.
3. If F̃ (x) is sum of functions listed in several lines of the above table in the first column, then the
choice for yp (x) will be the sum of the function in the corresponding lines in the second column.
34
→ Note: once an appropriate choice for yp (x) is found, we then compute the respective derivatives of
yp (x). Substitute yp (x) and its derivatives in the given differential equation, and determine the
values of the constants by equating the coefficients and then solve the resulting system of algebraic
equations to obtain the values of the undetermined coefficients.
Example(s):
Use the method of undetermined coefficients to find the complete solutions of the following differential
equations.
(a)
dy
d2 y
−2
+ 2y = x sin x.
2
dx
dx
Solution
In terms of the D operator the given DE becomes (D2 − 2D + 2)y = x sin x. We first need to
find the complementary solution.
i) The complementary solution
The auxiliary equation is D2 − 2D + 2 = 0. Hence, the roots are D = 1 ± i (complex
conjugate). The complementary solution is given by
yc (x) = ex (A1 cos x + B1 sin x) = A1 ex cos x + B1 ex sin x
ii) The particular integral
By the method of undetermined coefficients, let yp (x) = (A2 x + B2 )(A3 sin x + B3 cos x).
Expanding yields
yp (x) = Ax sin x + Bx cos x + C cos x + D sin x
(∗)
Clearly, none of the terms in yp (x) is contained in yc (x) so we cannot refine the yp (x).
Equation (∗) is a solution to the given DE and so it must satisfy it. Computing the
respective derivatives of equation (∗), we obtain
yp′ (x) = Ax cos x − Bx sin x + (A − C) sin x + (B + D) cos x
yp′′ (x) = −Ax sin x − Bx cos x + (2A − C) cos x − (2B + D) sin x
(∗∗)
(∗ ∗ ∗)
Substituting equations (∗), (∗∗) and (∗ ∗ ∗) in the given DE yields
yp′′ (x) − 2yp′ (x) + 2yp (x) = x sin x
That is,
−Ax sin x − Bx cos x + (2A − C) cos x − (2B + D) sin x − 2Ax cos x + 2Bx sin x
−2(A − C) sin x − 2(B + D) cos x + 2Ax sin x + 2Bx cos x + 2C cos x + 2D sin x
= x sin x
⇒
(−A + 2A + 2B)x sin x + (−2A − B + 2B)x cos x + (2A − C − 2B − 2D + 2C) cos x
+(−2B − D − 2A + 2C + 2D) sin x = x sin x
⇒
(A + 2B)x sin x + (−2A + B)x cos x + (2A − 2B + C − 2D) cos x
+(−2A − 2B + 2C + D) sin x = x sin x
Equating the coefficients we get: A + 2B = 1, −2A + B = 0, 2A − 2B + C − 2D = 0, and
−2A − 2B + 2C + D = 0. Solving yields
1
2
14
2
A = ,B = ,C = ,D =
5
5
25
25
Substituting the values of A, B, C and D in equation (∗) yields:
1
2
14
2
yp (x) = x sin x + x cos x +
cos x +
sin x
5
5
25
25
35
Therefore, the complete (general) solution is y = yc (x) + yp (x). That is,
1
2
14
2
y = ex (A1 cos x + B1 sin x) + x sin x + x cos x +
cos x +
sin x
5
5
25
25
(b)
d2 y
dy
−2
− 3y = xe−x .
2
dx
dx
Solution
In terms of the D operator the given equation becomes (D2 − 2D − 3)y = xe−x . We first need
to find the complementary solution.
i) The complementary solution
The auxiliary equation is D2 − 2D − 3 = 0. Hence, the roots are D1 = −1, D2 = 3. The
complementary solution is given by yc (x) = A1 e−x + A2 e3x .
ii) The particular integral
By the method of undetermined coefficients, let yp (x) = (A1 + B1 x)(A2 e−x ). Expanding
yields yp (x) = Ae−x + Bxe−x . Since Ae−x is contained in yc (x), we refine yp (x) by
multiplying the term Ae−x (on the RHS) by x2 . Hence, the particular integral becomes
yp (x) = Ax2 e−x + Bxe−x
(∗)
This is a solution to the given differential equation and so it must satisfy the given
differential equation. Computing the respective derivatives, we obtain
yp′ (x) = −Ax2 e−x + (2A − B)xe−x + Be−x
yp′′ (x) = Ax2 e−x + (−4A + B)xe−x + (2A − 2B)e−x
(∗∗)
(∗ ∗ ∗)
Substituting equations (∗), (∗∗) and (∗ ∗ ∗) in the given DE yields
yp′′ (x) − 2yp′ (x) − 3yp (x) = xe−x
That is,
Ax2 e−x + (−4A + B)xe−x + (2A − 2B)e−x + 2Ax2 e−x + (−4A + 2B)xe−x
−2Be−x − 3Ax2 e−x − 3Bxe−x = xe−x
⇒
(A + 2A − 3A)x2 e−x + (−4A + B − 4A + 2B − 3B)xe−x + (2A − 2B − 2B)e−x = xe−x
⇒
(−8A)xe−x + (2A − 4B)e−x = xe−x
Equating the coefficients we get: −8A = 1 and 2A − 4B = 0. Solving yields
1
1
A = − ,B = −
8
16
Substituting the values of A and B in equation (∗) yields:
1
1
yp (x) = − x2 e−x − xe−x
8
16
Therefore, the complete (general) solution is y = yc (x) + yp (x). That is,
1
1
y = A1 e−x + A2 e3x − x2 e−x − xe−x
8
16
Exercise:
36
(a)
d2 y
dy
−3
+ 2y = 2x2 + ex + 2xex + 4e3x .
2
dx
dx
Solution
In terms of the D operator the given equation becomes (D2 − 3D + 2)y = 2x2 + ex + 2xex + 4e3x .
We first need to find the complementary solution.
i) The complementary solution
The auxiliary equation is D2 − 3D + 2 = 0. Hence, the roots are D1 = 1, D2 = 2. The
complementary solution is given by yc (x) = A1 ex + A2 e2x .
ii) The particular integral
By the method of undetermined coefficients, let yp (x) = Ax2 +Bx+C +Dxex +Eex +F e3x .
Since ex is contained in yc (x), we refine our yp (x) by multiplying the term Eex (on the RHS)
by x2 . Hence, the particular integral becomes
yp (x) = Ax2 + Bx + C + Dxex + Ex2 ex + F e3x
(∗)
This is a solution to the given differential equation and so it must satisfy the given
differential equation. Computing the respective derivatives, we obtain
yp′ (x) = 2Ax + B + Dxex + Dex + Ex2 ex + 2Exex + 3F e3x
yp′′ (x) = 2A + Dxex + 2Dex + Ex2 ex + 4Exex + 2Eex + 9F e3x
(∗∗)
(∗ ∗ ∗)
Substituting equations (∗), (∗∗) and (∗ ∗ ∗) in the given DE yields
yp′′ (x) − 3yp′ (x) + 2yp (x) = 2x2 + ex + 2xex + 4e3x
That is,
2A + Dxex + 2Dex + Ex2 ex + 4Exex + 2Eex + 9F e3x − 6Ax − 3B − 3Dxex − 3Dex
−3Ex2 ex − 6Exex − 9F e3x + 2Ax2 + 2Bx + 2C + 2Dxex + 2Ex2 ex + 2F e3x
= 2x2 + ex + 2xex + 4e3x
⇒
(2A)x2 + (2B − 6A)x + (2A − 3B + 2C) + (2D + 2E − 3D)ex
+(D + 4E − 3D − 6E + 2D)xex + (E − 3E + 2E)x2 ex
+(9F − 9F + 2F )e3x = 2x2 + ex + 2xex + 4e3x
⇒
(2A)x2 + (2B − 6A)x + (2A − 3B + 2C) + (2E − D)ex + (−2E)xex + (2F )e3x
= 2x2 + ex + 2xex + 4e3x
Equating the coefficients we get:
2A = 2, 2B − 6A = 0, 2A − 3B + 2C = 0, 2E − D = 1, −2E = 2, 2F = 4
Solving yields
7
A = 1, B = 3, C = , D = −3, E = −1, F = 2
2
Substituting the values of A, B, C, D, E and F in equation (∗) yields:
yp (x) = x2 + 3x +
7
− 3xex − x2 ex + 2e3x
2
Therefore, the complete (general) solution is y = yc (x) + yp (x). That is,
y = A1 ex + A2 e2x + x2 + 3x +
37
7
− 3xex − x2 ex + 2e3x
2
(b)
d2 y
dy
−3
− 4y = 2 sin x.
2
dx
dx
1
y = A1 e−x + A2 e4x + (3 cos x − 5 sin x)]
17
(c)
dy
d2 y
−2
+ y = 6xex .
dx2
dx
(d)
d2 y
dy
+3
+ 2y = cos x.
2
dx
dx
(e)
d2 y
dy
+2
+ y = x2 + 1.
dx2
dx
[hint: let yp (x) = A cos x + B sin x,
[hint: let yp (x) = Ax3 ex + Bx2 ex ,
[ans: y =
ans: y = ex (A1 + A2 x + x3 )]
1
(3 sin x + cos x) + Ae−x + Be−2x ]
10
[ans: y = x2 − 4x + 7 + (Ax + B)e−x ]
(f) y ′′ − 3y ′ − 4y = −8ex cos 2x.
[ans: y = Ae4x + Be−x +
d2 y
dy
d3 y
−
3
+2
= 10 + 4xe2x .
3
2
dx
dx
dx
ans: y = A1 + A2 ex + A3 e2x + 5x + e2x (x2 − 3x)]
(g) [Assignment]
3.3.2
ans:
ex
(10 cos 2x + 2 sin 2x)]
13
[hint: let yp (x) = Ax + Bx2 e2x + Cxe2x ,
Method of variation of parameters
This method is used to find the particular integral if the complementary solution is known. This
method has much more applicability than the method of undetermined coefficients. It can be best
explained by using an example.
Example(s):
Use the method of variation of parameters to find the complete solution of the following differential
equations.
(a)
d2 y
+ y = sec x.
dx2
Solution
In terms of the D operator the given DE becomes (D2 + 1)y = sec x. We first need to find the
complementary solution.
i) The complementary solution
The auxiliary equation is D2 + 1 = 0. Hence, the roots are D = ±i (complex conjugate).
Thus, the complementary solution is given by yc (x) = A cos x + B sin x, where A and B are
arbitrary constants.
ii) The particular integral
To find the particular integral, we let the constants A and B to be arbitrary functions of
x, which we need to determine. Thus, the particular integral to the given DE is given by
yp (x) = A(x) cos x + B(x) sin x
(∗)
Equation (∗) is a solution to the given differential equation and so in must satisfy it. Now,
yp′ (x) = −A(x) sin x + B(x) cos x + A′ (x) cos x + B ′ (x) sin x
To make calculations easier, we impose the condition that the sum containing the derivatives
of the arbitrary functions should be equal to zero. i.e.,
A′ (x) cos x + B ′ (x) sin x = 0
Hence,
(i)
yp′ (x) = −A(x) sin x + B(x) cos x
yp′′ (x) = −A(x) cos x − B(x) sin x − A′ (x) sin x + B ′ (x) cos x
38
(∗∗)
Substituting equations (∗) and (∗∗) in the given differential equation yields
yp′′ (x) + yp (x) = sec x i.e,
−A(x) cos x − B(x) sin x − A′ (x) sin x + B ′ (x) cos x + A(x) cos x + B(x) sin x = sec x
⇒
−A′ (x) sin x + B ′ (x) cos x = sec x
(ii)
In matrix form, equations (i) and (ii) yield
(
)[
cos x sin x
− sin x cos x
]
A′ (x)
=
B ′ (x)
(
)
0
sec x
Using Cramer’s rule, we obtain
A′ (x) =
0
sin x
sec x cos x
= − tan x
cos x sin x
− sin x cos x
B ′ (x)
=
cos x
0
− sin x sec x
cos x sin x
− sin x cos x
⇒
=1
∫
A(x) =
⇒
− tan xdx = ln | cos x|
∫
B(x) =
1dx = x
Substituting A(x) and B(x) in equation (∗) yields
yp (x) = cos x ln | cos x| + x sin x
Therefore, the general solution is given by y = yc (x) + yp (x). That is,
y = A cos x + B sin x + cos x ln | cos x| + x sin x
(b)
d2 y
dy
+ y = ex ln(x),
−2
2
dx
dx
1
[ans: y = (Ax + B)ex + x2 ex (2 ln x − 3)]
4
x > 0.
Solution
In terms of the D operator the given DE becomes [D2 − 2D + 1]y = ex ln(x). We first need to
find the complementary solution.
i) The complementary solution
The auxiliary equation is D2 − 2D + 1 = 0. Hence, the roots are D1 = D2 = 1. Thus,
the complementary solution is given by yc (x) = (Ax + B) ex , where A and B are arbitrary
constants.
ii) The particular integral
To find the particular integral, we let the constants A and B to be arbitrary functions of
x, which we need to determine. Thus, the particular integral is given by
yp (x) = [xA(x) + B(x)] ex
(∗)
Equation (∗) is a solution to the given differential equation and so in must satisfy it. Now,
[
]
yp′ (x) = ex (x + 1)A(x) + B(x) + xA′ (x) + B ′ (x)
To make calculations easier, we impose the condition that the sum containing the derivatives
of the arbitrary functions should be equal to zero, i.e.,
xA′ (x) + B ′ (x) = 0
39
(i)
Hence,
yp′′ (x) = e
yp′ (x) = ex [(x + 1)A(x) + B(x)]
x[
(∗∗)
]
(x + 2)A(x) + B(x) + (x + 1)A′ (x) + B ′ (x)
(∗ ∗ ∗)
Substituting equations (∗), (∗∗) and (∗∗) in the given differential equation yields
yp′′ (x) − 2yp′ + yp (x) = ex ln(x) i.e,
[
]
ex (x + 2)A(x) + B(x) + (x + 1)A′ (x) + B ′ (x) − 2ex [(x + 1)A(x) + B(x)]
+ex [xA(x) + B(x)] = ex ln(x)
(x + 1)A′ (x) + B ′ (x) = ln x
⇒
(ii)
In matrix form, equations (i) and (ii) yield
(
)[
x
1
(x + 1) 1
]
A′ (x)
=
B ′ (x)
(
)
0
ln x
Using Cramer’s rule, we obtain
A′ (x) =
B ′ (x) =
0 1
ln x 1
= ln x
x
1
(x + 1) 1
x
0
(x + 1) ln x
x
1
(x + 1) 1
= −x ln x
Solving for A(x) and B(x), we get
∫
A(x) =
ln xdx
Using integration by parts: put u = ln x, dv = dx
⇒
A(x) = x ln x −
Similarly,
B(x) = −
∫
⇒
du =
1
dx, v = x.
x
dx = x[ln(x) − 1]
∫
x ln xdx
Using integration by parts: put u = ln x, dv = xdx
x2
B(x) = − ln x +
2
⇒
∫
⇒
du =
1
x2
dx, v =
.
x
2
x
x2
dx =
[1 − 2 ln(x)]
2
4
Substituting A(x) and B(x) in equation (∗) yields
]
[
1
x2
(1 − 2 ln x) ex = x2 ex (2 ln x − 3)
yp (x) = x (ln x − 1) +
4
4
2
Therefore, the general solution is given by y = yc (x) + yp (x). That is,
1
y = (Ax + B) ex + x2 ex (2 ln x − 3)
4
40
Exercise:
(a)
d2 y
+ 4y = tan 2x.
dx2
Solution
In terms of the D operator the given equation becomes (D2 + 4)y = tan 2x. We first need to
find the complementary solution.
i) The complementary solution
The auxiliary equation is D2 + 4 = 0. Hence, the roots are D = ±i2 (complex conjugate).
Thus, the complementary solution is yc (x) = A cos 2x + B sin 2x.
ii) The particular integral
To find the particular integral, we let the constants A and B be arbitrary functions of x,
which we need to determine. Thus, the particular integral to the given DE is given by
yp (x) = A(x) cos 2x + B(x) sin 2x
(∗)
Equation (∗) is a solution to the given differential equation and so it must satisfy it. Now,
yp′ (x) = −2A(x) sin 2x + 2B(x) cos 2x + A′ (x) cos 2x + B ′ (x) sin 2x
To make calculations easier, we impose the condition that the sum containing the derivatives
of the arbitrary functions should be equal to zero. i.e.,
A′ (x) cos 2x + B ′ (x) sin 2x = 0
Hence,
(i)
yp′ (x) = −2A(x) sin 2x + 2B(x) cos 2x
(∗∗)
yp′′ (x) = −4A(x) cos 2x − 4B(x) sin 2x − 2A′ (x) sin 2x + 2B ′ (x) cos 2x
(∗ ∗ ∗)
Substituting equations (∗) and (∗ ∗ ∗) in the given differential equation yields yp′′ (x) +
4yp (x) = tan 2x i.e,
−4A(x) cos 2x−4B(x) sin 2x−2A′ (x) sin 2x+2B ′ (x) cos 2x+4A(x) cos 2x+4B(x) sin 2x = tan 2x
⇒
−2A′ (x) sin 2x + 2B ′ (x) cos 2x = tan 2x =
sin 2x
cos 2x
(ii)
In matrix form, equations (i) and (ii) yield
(
)[
cos 2x
sin 2x
−2 sin 2x 2 cos 2x
]
A′ (x)
=
B ′ (x)
(
0
tan 2x
)
Using Cramer’s rule, we obtain
A′ (x) =
0
sin 2x
tan 2x 2 cos 2x
cos 2x
sin 2x
−2 sin 2x 2 cos 2x
B ′ (x) =
=
1
− sin 2x tan 2x
= − sin 2x tan 2x
2
2
cos 2x
0
−2 sin 2x tan 2x
cos 2x
sin 2x
−2 sin 2x 2 cos 2x
=
1
cos 2x tan 2x
= sin 2x
2
2
Solving for A(x) and B(x), we get
1
A(x) = −
2
41
∫
sin 2x tan 2xdx
⇒
Using integration by parts: put u = tan 2x, dv = sin 2xdx
1
− cos 2x.
2
[
1
1
A(x) = − − cos 2x tan 2x +
2
2
⇒
∫
]
du = 2 sec2 2xdx, v =
[
1
1
cos 2x sec 2xdx = − − sin 2x +
2
2
∫
2
dx
cos 2x
]
By t substitution we have, let
t = tan x
⇒
⇒
dt = sec2 xdx = (1 + tan2 x)dx = (1 + t2 )dx
dx =
dt
1 + t2
1
t
cos x = √
, sin x = √
2
1+t
1 + t2
⇒
Hence,
1 − t2
cos 2x = cos x − sin x =
1 + t2
2
[
⇒
∫ (
=
)
(
)
1
1
dt
+
1+t 1−t
]
1
1
1
1
1
1
1
− sin 2x +
+
dt = sin 2x + ln (1 − t)
2
2
2
1+t 1−t
4
2
1
1
sin 2x − [ln(1 + t) − ln(1 − t)]
4(
4
)
1
1+t
sin 2x − ln
4
1−t
A(x) = −
=
dx
1
dt
=
=
2
cos 2x
1−t
2
⇒
2
By back substitution we have
(
A(x) =
1 + tan x
1
sin 2x − ln
4
1 − tan x
Similarly,
1
B(x) =
2
∫
)
=
1
(sin 2x − ln |sec 2x + tan 2x|)
4
1
sin 2xdx = − cos 2x
4
Substituting A(x) and B(x) in equation (∗) yields
1
1
(sin 2x − ln |sec 2x + tan 2x|) cos 2x − cos 2x sin 2x
4
4
1
= − cos 2x ln |sec 2x + tan 2x|
4
yp (x) =
Therefore, the general solution is given by y = yc (x) + yp (x). That is,
y = A cos 2x + B sin 2x −
(b)
1
cos 2x ln |sec 2x + tan 2x|
4
d2 y
dy
1
+3
+ 2y =
.
2
dx
dx
1 + ex
Solution
In terms of the D operator the given equation becomes (D2 + 3D + 2)y =
to find the complementary solution.
1
. We first need
1 + ex
i) The complementary solution
The auxiliary equation is D2 + 3D + 2 = 0. Hence, the roots are D1 = −1, D2 = −2. The
complementary solution is given by yc (x) = Ae−x + Be−2x .
42
ii) The particular integral
To find the particular integral, we let the constants A and B to be arbitrary functions of
x, which we need to determine. Thus, the particular integral to the given DE is given by
yp (x) = A(x)e−x + B(x)e−2x
(∗)
Equation (∗) is a solution to the given differential equation and so in must satisfy it. Now,
yp′ (x) = −A(x)e−x − 2B(x)e−2x + A′ (x)e−x + B ′ (x)e−2x
To make calculations easier, we impose the condition that the sum containing the derivatives
of the arbitrary functions should be equal to zero. i.e.,
A′ (x)e−x + B ′ (x)e−2x = 0
Hence,
(i)
yp′ (x) = −A(x)e−x − 2B(x)e−2x
(∗∗)
yp′′ (x) = A(x)e−x + 4B(x)e−2x − A′ (x)e−x − 2B ′ (x)e−2x
(∗ ∗ ∗)
Substituting equations (∗) and (∗ ∗ ∗) in the given differential equation yields yp′′ (x) +
1
3yp′ (x) + 2yp (x) =
i.e,
1 + ex
A(x)e−x +4B(x)e−2x −A′ (x)e−x −2B ′ (x)e−2x +−3A(x)e−x −6B(x)e−2x +2A(x)e−x +2B(x)e−2x =
−A′ (x)e−x − 2B ′ (x)e−2x =
⇒
1
1 + ex
(ii)
In matrix form, equations (i) and (ii) yield
(
e−2x
e−x
−e−x −2e−2x
)[
]


0
= 1 
′
B (x)
1 + ex
A′ (x)
Using Cramer’s rule, we obtain
0
e−2x
1
−2e−2x
x
1
−ex
−e−2x
1
+
e
′
A (x) =
·
=
=
1 + ex e−3x
1 + ex
e−x
e−2x
−x
−2x
−e
−2e
e−x
B ′ (x) =
−e−x
e−x
−e−x
0
1
−x
1
e2x
ex
1 + ex = e
x
·
=
=
e
−
1 + ex e−3x
1 + ex
1 + ex
e−2x
−2x
−2e
Solving for A(x) and B(x), we get
∫
A(x) =
Similarly,
∫ (
B(x) =
−ex
dx = − ln |1 + ex |
1 + ex
)
ex −
ex
dx = ex − ln |1 + ex |
1 + ex
Substituting A(x) and B(x) in equation (∗) yields
yp (x) = −e−x ln |1 + ex | + e−2x (ex − ln |1 + ex |)
43
1
1 + ex
Therefore, the general solution is given by y = yc (x) + yp (x). That is,
y = Ae−x + Be−2x − e−x ln |1 + ex | + e−2x (ex − ln |1 + ex |)
(c)
d2 y
+ y = tan x.
dx2
(d)
d2 y
dy
ex
−2
+ y = 2.
2
dx
dx
x
[ans: y = A cos x + B sin x − cos x ln |sec x + tan x|]
[ans: y = (Ax + B) ex − (1 + ln x) ex ]
d2 y
+ y = x − cot x.
dx2
d2 y
ii)
+ y = x sin x.
dx2
(e)
i)
[ans: y =]
[ans: y =]
Lecture 8
3.4
Linear differential equations of Euler-Cauchy type
This is an equation with variable coefficients that takes the general form
an xn
n−1 y
n−2 y
2
dn y
dy
n−1 d
n−2 d
2d y
+
a
x
+
a
x
+
·
·
·
+
a
x
+ a1 x
+ a0 y = F̃ (x),
n−1
n−2
2
dxn
dxn−1
dxn−2
dx2
dx
(17)
where a0 , a1 , · · · , an are constants. The transformation x = et reduces equation (17) to a linear
differential equation with constant coefficients.
Theorem 3.1. Let y be n-times differentiable function of x. Let x = et . Then,
(i) x
dy
dy
=
dx
dt
(ii)
d2 y
x2 2
dx
d
=
dt
(iii)
d3 y
x3 3
dx
d
=
dt
(
(
)
d2 y dy
d
−1 y = 2 −
dt
dt
dt
)(
d
−1
dt
)
d
d3 y
d2 y
dy
−2 y = 3 −3 2 +2
dt
dt
dt
dt
etc.
Proof.
(i) From the chain rule, we have
∴
dy
dx
dy
x
dx
=
=
dy dt
1 dy
=
,
dt dx
x dt
dy
dt
(since x = et
⇒
t = ln x
⇒
dt
1
= )
dx
x
(ii) Differentiating the result in proof (i) above with respect to x yields
(
⇒
)
dy
d
x
dx
dx
d2 y
dy
x 2+
dx
dx
2y
d
∴ x2 2
dx
(
=
=
=
)
(
)
d dy
d dy dt
=
(by chain rule)
dx dt
dt dt dx
2
1 d2 y
d2 y
dy
2d y
⇒
x
=
−x
2
2
2
x dt
dx
dt
dx
d2 y dy
−
dt2
dt
44
(iii) Differentiating the result in proof (ii) above with respect to x yields
(
d
d2 y
x2 2
dx
dx
⇒
)
d2 y
x
+
2x
dx3
dx2
2d
3y
3d
⇒
x
∴
x3
3y
dx3
d3 y
dx3
(
d2 y dy
−
dt2
dt
)
d2 y dy
−
dt2
dt
=
=
1
x
=
d3 y d2 y
d2 y dy
−
−
2
−
dt3
dt2
dt2
dt
=
d3 y
d2 y
dy
−
3
+2
3
2
dt
dt
dt
(
d3 y d2 y
− 2
dt3
dt
)
d
=
dt
(
d
dx
⇒
x3
(
)
dt
dx
(by chain rule)
2
d3 y
d3 y d2 y
2d y
=
−
−
2x
dx3
dt3
dt2
dx2
)
Example(s):
Solve the following differential equations
(a) x2
dy
d2 y
− 5x
+ 8y = 2 ln x.
2
dx
dx
Solution
dy
dy
d2 y
d2 y
dy
Let x = et . Then, x
=
and x2 2 = 2 −
. Substituting in the given equation, we
dx
dt
dx
dt
dt
get
d2 y dy
dy
d2 y
dy
−
5
+
8y
=
2t
⇒
(∗)
−
− 6 + 8y = 2t
dt2
dt
dt
dt2
dt
d
Let D = . Then in terms of the D operator, equation (∗) becomes
dt
[D2 − 6D + 8]y = 2t
i) The complementary solution
The auxiliary equation is D2 − 6D + 8 = 0. Thus, the roots are D1 = 4, D2 = 2. Hence,
the complementary solution is
yc (t) = Ae4t + Be2t
ii) The particular integral
yp (t) =
=
=
1
(2t). Drop the term is D2 since 2 > 1.
− 6D + 8
[
]
1
1
1
1
3D 9D2
} (t) =
(2t) = {
1+
+
+ · · · (t)
3D
−6D + 8
4
4
4
16
1−
4
[
]
1
3
t
3
t+
= +
4
4
4 16
D2
3
t
Therefore, the general solution is y = yc (x) + yp (x). That is, y = Ae4t + Be2t + + . Back
4 16
substitution yields
ln x
3
y = Ax4 + Bx2 +
+
4
16
(b) x
d2 y
dy
2
+2
− y = ln x.
2
dx
dx x
[ans: y = Ax +
Solution
45
B
x ln x
+
[3 ln x − 2]]
2
x
18
d2 y
dy
+ 2x
− 2y = x ln x, which is of the Euler-Cauchy
2
dx
dx
dy
dy
d2 y
d2 y
dy
equation. Let x = et . Then, x
=
and x2 2 =
−
. Substituting in the given
dx
dt
dx
dt2
dt
equation, we get
The equation can be written as x2
dy
d2 y dy
−
+ 2 − 2y = et t
dt2
dt
dt
Let D =
⇒
d2 y dy
+
− 2y = et t
dt2
dt
(∗)
d
. Then in terms of the D operator, equation (∗) becomes
dt
[D2 + D − 2]y = et t
i) The complementary solution
The auxiliary equation is D2 + D − 2 = 0. Thus, the roots are D1 = 1, D2 = −2. Hence,
the complementary solution is
yc (t) = Aet + Be−2t
ii) The particular integral
1
(et t). Shifting et to the left yields.
D2 + D − 2
1
1
1
= et
(t) = et 2
(t) = et 2
(t)
2
(D + 1) + (D + 1) − 2
D + 2D + 1 + D + 1 − 2
D + 3D
yp (t) =
1
1
D−1 (t) = et
= e
D+3
D+3
=
(
t2
2
)
(
1
1
}
= et {
D
3
1+
3
[
]( )
[
2
3
2
1 t
D D
D
t
1
t2
e 1−
+
−
+ ···
= et
−
3
3
9
27
2
3
2
t
t2
2
)
.
Maclaurin’s expansion yields.
]
t
1
tet
1
+
=
[3t − 2] + et
3 9
18
27
Therefore, the general solution is y = yc (x) + yp (x). That is,
y = Aet + Be−2t +
tet
1
tet
[3t − 2] + et = A1 et + Be−2t +
[3t − 2]
18
27
18
Back substitution yields
y = A1 x +
B
x ln x
+
[3 ln(x) − 2]
x2
18
Exercise:
(a) x2
(b) x
4
d2 y
dy
ln x
−x
− 3y =
,
2
dx
dx
x
x > 0.
d2 y
dy 2y
−
+
= (ln x)2 .
2
dx
dx
x
[ans: y =
{
A
ln x
+ Bx3 −
(2 ln x + 1)]
x
16x
}
[ans: y = x A cos(ln x) + B sin(ln x) + (ln x)2 − 2 ]
Systems of linear ODEs
To solve a system of ODEs, we write the system in terms of the D operator then solve it using
elimination method and/or substitution method.
Example(s):
(a) Solve the system defined by
dy
+ x = e3t
dt
dx
−y = 0
dt
46
subject to the initial conditions x(0) =
1
1
and y(0) = .
2
5
Solution
Let D =
d
. In terms of the D operator the system becomes
dt
x + Dy = e3t
Dx − y = 0
(i)
(ii)
Operating with D on equation (ii) and adding the result to equation (i), we get (D2 + 1)x = e3t .
i) The complementary solution
The auxiliary equation is D2 + 1 = 0. Hence, the roots are D1 = −i, D2 = i. The
complementary solution is
xc (t) = A cos t + B sin t
ii) The particular integral
xp (t) =
D2
1
1
1
e3t = 2
e3t = e3t
+1
3 +1
10
Therefore, x = xc (x) + xp (x). That is,
x = A cos t + B sin t +
1 3t
e
10
From equation (ii), y = Dx. Hence,
y = −A sin t + B cos t +
Using the initial conditions, x(0) =
x=
3 3t
e
10
1
1
2
1
and y(0) = , we obtain A = and B = − . Therefore,
2
5
5
10
)
1 (
4 cos t − sin t + e3t
10
and
y=
)
1 (
−4 sin t − cos t + 3e3t
10
(b) Solve the system of ODEs defined by
dy
dx
−y+x+
dt
dt
dy
dx
3 +x−y+2
dt
dt
2
= 0
(i)
= et
(ii)
Solution
Let D =
d
. In terms of the D operator the system becomes
dt
(2D − 1)y + (D + 1)x = 0
(3D − 1)y + (2D + 1)x = et
Eliminating x between the above equations, we get
(2D + 1)(2D − 1)y + (2D + 1)(D + 1)x = 0
−(D + 1)(3D − 1)y − (2D + 1)(D + 1)x = −(D + 1)et
Adding yields:
(2D + 1)(2D − 1)y − (D + 1)(3D − 1)y = −(D + 1)et
⇒
(
(4D2 − 2D + 2D − 1)y − (3D2 − D + 3D − 1)y = − et + et
⇒
(D2 − 2D)y = −2et
47
)
i) The complementary solution
The auxiliary equation is D2 − 2D = 0. Hence, the roots are D1 = 0, D2 = 2. The
complementary solution is
yc (t) = A + Be2t
ii) The particular integral
yp (t) =
(
)
−2
1
t
−2e
=
et = 2et
2
2
D − 2D
(1) − 2(1)
Therefore, y = yc (t) + yp (t). That is,
y = A + Be2t + 2et
To find x, we need to eliminate
dx
between equations (i) and (ii). Thus, we have
dt
dy
dx
−4 + 2y − 2x − 2
= 0
dt
dt
dy
dx
3 +x−y+2
= et
dt
dt
Adding yields:
−
⇒
x=−
dy
+ y − x = et
dt
⇒
x=−
dy
+ y − et
dt
)
d (
A + Be2t + 2et + A + Be2t + 2et − et = −2Be2t − 2et + A + Be2t + 2et − et
dt
Therefore,
x = A − Be2t − et
Exercise:
[ans: x = Aet + Be−t and y = −Aet + Be−t + cos t]
(a) Solve the system of ODEs defined by.
dx
+ y = cos t
dt
dy
+ x = − sin t
dt
[ans: x = 4e3t − 5e2t and y = 8e3t − 5e2t ]
(b) Solve the following system.
dx
= x+y
dt
dy
= −2x + 4y
dt
subject to the initial conditions x(0) = −1 and y(0) = 3.
1
5
[ans: y = Aet + Be−3t + t +
and
8
12
(c) Solve the following system of equations.
1
11
2
x = −2Aet + Be−3t − t − ]
3
3
36
dx
dy
− 2 − 3x = t
dt
dt
dx
dy
2
+ 2 + 3x + 8y = 2
dt
dt
2
(d) Solve the following system of equations.
2
[ans: ]
dx dy
+
− 2x − 2y = 5et
dt
dt
dx dy
+
+ 4x + 2y = 5e−t
dt
dt
Lecture 9
48
5
Laplace transform
Suppose a function f (t) is defined for t ≥ 0. Also, let L be the Laplace transform operator, then the
Laplace transform, with respect to t, of f (t) is a function defined by
∫∞
L [f (t)] =
e−st f (t)dt = F (s), Re(s) > 0, where s is a dummy variable.
0
5.1
Properties of the Laplace transform
Example(s):
Find the Laplace transform of the following functions:
(a) f (t) = 1
(b) f (t) = eat , where a is a constant.
(c) f (t) = t2
[hint: put u = cos bt and dv = e−st dt]
(d) f (t) = cos bt, where b is a constant.
(e) f (t) = teat , where a is a constant.
(f) f (t) = cos2 3t.
[hint: cos2 θ =
(g) f (t) = sin3 t.
[hint: sin3 t =
1
(1 + cos 2θ)]
2
1
3
sin t − sin 3t]
4
4
Theorem 5.1 (First shifting property). The first shifting property of Laplace transforms states that
if L [f (t)] = F (s) then
[
]
L eat f (t) = F (s − a)
Proof. From the definition of Laplace transform, with respect to t, of a function f (t) we have
∫∞
L [f (t)] =
e−st f (t)dt
0
Then it follows that
[
at
∫∞
]
L e f (t)
=
e
−st
· e f (t)dt =
0
∫∞
=
∫∞
at
e−(s−a)t f (t)dt. Put s − a = u
0
e−ut f (t)dt = F (u) = F (s − a)
0
For example, we know that L[t2 ] =
2
. Then from the first shifting property, we have
s3
L[e4t t2 ] =
2
(s − 4)3
Similarly,
L[cos 2t] =
s2
s
+4
⇒
L[et cos 2t] =
Exercise:
49
s−1
(s − 1)2 + 4
1. Verify the following properties of Laplace transform.
[ ]
1
1
L[1] =
L eat =
s
s−a
[ at n ]
n!
n!
n
L [t ] = n+1 , n ≥ 0 L e t =
s
(s − a)n+1
[ at
]
s
s−a
L [cos bt] = 2
L e cos bt =
2
s +b
(s − a)2 + b2
[ at
]
b
b
L [sin bt] = 2
L e sin bt =
2
s +b
(s − a)2 + b2
[ at
]
s
s−a
L [cosh bt] = 2
L e cosh bt =
2
s −b
(s − a)2 − b2
[
]
b
b
L [sinh bt] = 2
L eat sinh bt =
s − b2
(s − a)2 − b2
2. Find the Laplace transform of the following functions:

(
)

cos t − 3 π ,
2
(a) f (t) =


if t > 23 π
if t < 32 π
0,
Solution
3
∫∞
L [f (t)] =
e
−st
∫2 π
f (t)dt =
0
e
−st
∫∞
e
f (t)dt +
0
−st
∫∞
f (t)dt = 0 +
(
3
π
2
3
π
2
3
3
Put t − π = u ⇒ dt = du. Changing limits of integration: when t = π
2
2
and when t = ∞ ⇒ u = ∞. Therefore,
∫∞
L [f (t)] =
e
−s(u+ 32 π)
u=0
= e
{
(b) h(t) =
(t + 1),
3,
− 23 πs
(
cos (u) du = e
s
2
s +1
)
3
e−st cos t − π dt
2
∫∞
− 32 πs
⇒
u=0
e−su cos (u) du = e− 2 πs L [cos (u)]
3
u=0
)
if 0 ≤ t ≤ 2
.
if t > 2
Solution
∫∞
L [h(t)] =
e
−st
∫2
h(t)dt =
0
Put u = t + 1 and dv = e−st dt
[
L [h(t)] =
e
⇒
1
−(t + 1) e−st
s
]2
−
t=0
∫2
0
=
(t + 1)dt +
e−st 3dt
2
du = dt,
[
=
∫∞
0
3
1 1
= − e−2s + +
s
s s
=
−st
1
v = − e−st . Integration by parts yields
s
∫2 (
)
1
− e−st dt + 3
s
0
∫∞
2
e−st dt + 3
]
∫∞
2
e−st dt
[
2
3
1 1
1
1
− e−2s + +
− e−st
+ 3 − e−st
s
s s
s
s
t=0
3 −2s 1
1 −2s
1
3 −2s
− e
+ − 2e
+ 2+ e
s
s s
s
s
)
1 (
1
−2s
+
1−e
s s2
f (t) = e−3t (2 cos 5t − 3 sin 3t).
3. Find the Laplace transform of
3
s+3
−3
]
2
2
(s + 3) + 25
(s + 3)2 + 9
50
e−st dt
]∞
t=2
[ans:
5.2
Inverse Laplace transform
Let L−1 be the inverse Laplace transform operator. If L [f (t)] = F (s) then f (t) = L−1 [F (s)] is called
the inverse Laplace transform. For example,
[ ]
[
]
[
]
1
n!
1
L
= 1,
L−1 2 = t,
L−1 n+1 = tn
s
s
s
[
]
[
]
[
]
1
1
n!
−1
at
−1
at
−1
L
=e ,
L
= e t,
L
= eat tn
s−a
(s − a)2
(s − a)n+1
[
]
[
]
s
a
−1
−1
L
= cos at,
L
= sin at
s2 + a2
s2 + a2
[
]
[
]
s
a
L−1 2
= cosh at,
L−1 2
= sinh at
2
s −a
s − a2
−1
Example(s):
1. Find the inverse Laplace transform of the following functions
(a) F (s) =
1
2
6
+
+ 4.
s−2 s+5 s
Solution
L−1 [F (s)] = L−1
(b) F (s) =
[
2
6
1
+
+ 4
s−2 s+5 s
]
[
]
[
]
[
1
1
3!
+ 2L−1
+ L−1 3+1
s−2
s − (−5)
s
2t
−5t
3
= e + 2e
+t
= L−1
]
s+4
1
s−2
+
+
.
(s − 2)2 + 25 (s + 4)2 + 81 (s + 2)2 + 9
Solution
[
]
s−2
s+4
1
+
+
(s − 2)2 + 25 (s + 4)2 + 81 (s + 2)2 + 9
]
]
[
]
[
[
1 −1
3
s−2
s − (−4)
−1
−1
= L
+L
+ L
(s − 2)2 + 52
(s − (−4))2 + 92
3
(s − (−2))2 + 32
1
= e2t cos 5t + e−4t cos 9t + e−2t sin 3t
3
L−1 [F (s)] = L−1
2. Evaluate L−1
[
]
5s + 3
.
(s − 1)(s2 + 2s + 5)
Solution
Since the denominator consists of products of functions of s, we decompose the given function
A
Bs + C
5s + 3
=
+ 2
.
into its partial fractions. Let
2
(s − 1)(s + 2s + 5)
s − 1 s + 2s + 5
⇒
A(s2 + 2s + 5) + (Bs + C)(s − 1) = 5s + 3
Put s = 1 ⇒ A(1 + 2 + 5) = 5 + 3 ⇒ A = 1
Put s = 0 ⇒ 5A − C = 3 ⇒ 5 − C = 3 ⇒ C = 2
Put s = −1 ⇒ A(1 − 2 + 5) − 2(C − B) = −5 + 3 ⇒ 4 − 2(2 − B) = −2
Therefore,
5s + 3
1
−s + 2
=
+
(s − 1)(s2 + 2s + 5)
s − 1 s2 + 2s + 5
51
⇒
B = −1.
Hence,
−1
∴L
[
5s + 3
(s − 1)(s2 + 2s + 5)
]
[
]
1
−s + 2
L
+ 2
s − 1 s + 2s + 5
[
[
]
]
1
s−2
L−1
− L−1 2
s−1
s + 2s + 5
]
[
]
[
1
s−2
L−1
− L−1
, (completing the square)
s−1
(s + 1)2 + 22
[
]
[
]
1
s+1
3
2
L−1
− L−1
−
s−1
(s + 1)2 + 22 2 (s + 1)2 + 22
3
et − e−t cos 2t + e−t sin 2t
2
−1
=
=
=
=
=
Exercise:
(a) Find the inverse Laplace transform, with respect to t, of
5.3
s+2
5
3
. [ans: f (t) = e3t − et ]
s2 − 4s + 3
2
2
Laplace transform of derivatives
[
]
[
]
L f ′ (t) = sL[f (t)] − f (0)
L f ′′ (t) = s2 L[f (t)] − sf (0) − f ′ (0)
..
. [
]
L f (n) (t) = sn L[f (t)] − sn−1 f (0) − sn−2 f ′ (0) − sn−3 f ′′ (0) − · · · − f (n−1) (0)
Proof. From the definition of Laplace transform, we have
∫∞
L [f (t)] =
e−st f (t)dt
0
It follows that
[
′
∫∞
]
L f (t) =
e−st f ′ (t)dt
0
Using integration by parts, put u =
Integration by parts yields
[
[
]
′
e−st
L f (t)
=
e
and dv = f ′ (t)dt
−st
]∞
f (t)
0
−
∫∞
⇒
du = −se−st dt,
v = f (t).
f (t)(−se−st dt)
0
= −f (0) + s
∫∞
e−st f (t)dt
0
= sL[f (t)] − f (0)
Similarly,
[
′′
]
∫∞
L f (t) =
e−st f ′′ (t)dt
0
Using integration by parts, put u =
Integration by parts yields
[
′′
]
L f (t)
[
=
e
−st ′
]∞
f (t)
0
−
∫∞
e−st
and dv = f ′′ (t)dt
⇒
du = −se−st dt,
v = f ′ (t).
f ′ (t)(−se−st dt)
0
= −f ′ (0) + s
∫∞
e−st f ′ (t)dt = sL[f ′ (t)] − f ′ (0) = s {sL[f (t)] − f (0)} − f ′ (0)
0
= s2 L[f (t)] − sf (0) − f ′ (0)
52
By induction, we have
[
]
L f (n) (t) = sn L[f (t)] − sn−1 f (0) − sn−2 f ′ (0) − sn−3 f ′′ (0) − · · · − f (n−1) (0)
5.4
Applications of Laplace transform in differential equations
Consider the second order differential equation
a
d2 y
dy
+ b + cy = f (t) or ay ′′ + by ′ + cy = f (t)
dt2
dt
(18)
where a, b, c are constants. Taking the Laplace transform on both sides of equation (18), we get
[
]
[ ]
aL y ′′ + bL y ′ + cL [y] = L [f (t)]
{
}
a s2 L [y] − sy(0) − y ′ (0) + b {sL [y] − y(0)} + cL [y] = L [f (t)]
⇒
(19)
Given the initial conditions, equation (19) can be solved for Y (s). We then take the inverse Laplace
transform on both sides to get the solution, y(t).
Example(s):
Solve the following differential equations using the Laplace transform method
(a) y ′′ − 6y ′ + 9y = t2 e3t subject to the initial conditions y(0) = 2 and y ′ (0) = 6.
Solution
Taking the Laplace transform on both sides we have
[
]
[
[ ]
L y ′′ − 6L y ′ + 9L [y] = L e3t t2
{
]
}
s2 L [y] − sy(0) − y ′ (0) − 6 {sL [y] − y(0)} + 9L [y] =
⇒
2
(s − 3)3
On applying the initial conditions we get
{
}
s2 L [y] − 2s − 6 − 6 {sL [y] − 2} + 9L [y] =
⇒
(s − 3)2 L [y] − 2s + 6 =
⇒
L [y] =
2
(s − 3)3
[
2
(s − 3)3
⇒
L [y] =
]
2
1
+ 2s − 6
(s − 3)3
(s − 3)2
2
2
+
(s − 3)5 s − 3
Now taking the inverse Laplace transform on both sides, we have
−1
L
−1
[
L [y] = L
∴ y =
]
[
]
[
]
[
2
2
4!
1
2
+ L−1
= L−1
+ 2L−1
5
4+1
(s − 3)
s−3
4!
(s − 3)
(s − 3)
1 3t 4
e t + 2e3t
12
(b) y ′′ − 10y ′ + 9y = 5t subject to the initial conditions y(0) = −1 and y ′ (0) = 2.
Solution
Taking the Laplace transform on both sides we have
[
]
[ ]
L y ′′ − 10L y ′ + 9L [y] = L [5t]
⇒
{
}
s2 L [y] − sy(0) − y ′ (0) − 10 {sL [y] − y(0)} + 9L [y] =
53
5
s2
]
On applying the initial conditions we get
{
}
s2 L [y] + s − 2 − 10 {sL [y] + 1} + 9L [y] =
⇒
⇒
2
s2
[
]
5
5
1
⇒ L [y] = 2 − (s − 12)
s2
s
(s − 9)(s − 1)
(
)
1 50 45
31
162
5 + 12s2 − s3
=
+ 2 +
−
L [y] = 2
s (s − 9)(s − 1)
81 s
s
s−9 s−1
(s2 − 10s + 9)L [y] + s − 12 =
Now taking the inverse Laplace transform on both sides, we have
L
−1
[
1
81
(
)]
50 45
31
162
L [y] = L
+ 2 +
−
s
s
s−9 s−1
{
[ ]
[ ]
[
]
[
]}
1
1
1
−1 1
−1 1
−1
−1
=
50L
+ 45L
+ 31L
− 162L
81
s
s2
s−9
s−1
{
}
1
∴ y =
50 + 45t + 31e9t − 162et
81
−1
Exercise:
Use Laplace transform method to solve the following initial value problems
(a)
d2 y
+ y = e−t ; y(0) = 0,
dt2
1
2
1
[ans: y(t) = e−2t − cos t + sin t]
5
5
5
y ′ (0) = 0.
(b) y ′′ + y = t subject to the initial conditions y(0) = 0,
(c)
y ′ (0) = 2.
dy
+ 2y = 4e3t subject to the initial condition y(0) = 1.
dt
[ans: y(t) = t + sin t]
4
1
[ans: y(t) = e3t + e−2t ]
5
5
(d) y ′′ − 3y ′ + 2y = 2e3t ; y(0) = 5 and y ′ (0) = 7.
[ans: y(t) = 4et + e3t ]
(e) y ′′ + 2y ′ + y = 3te−t ; y(0) = 4 and y ′ (0) = 2.
1
[ans: y(t) = e−t 4 + 6t + t3 ]
2
(f) 2y ′′ + 5y ′ + 2y = e−2x ; y(0) = 1 and y ′ (0) = 1.
(
[ans: y(x) =
)
20 −0.5x 11 −2x 1 −2x
e
− e
− xe ]
9
9
3
Lecture 10
6
Power series solutions of linear ODEs
Power series representations are used to find solution of second order linear differential equations with
variable coefficients. The solutions are normally defined in a neighbourhood at a point where the
solution series is centered at.
Definition 6.1 (Analytic function). A function f (x) is said to be analytic (defined) at a point x = x0
if f (x) can be expanded in a power series about x0 which has a positive radius of convergence.
Thus, f (x) is analytic at x = x0 if f (x) has the representation
f (x) =
∞
∑
an (x − x0 )n
(20)
n=0
Here, an ’s are constants and (20) converges for |x − x0 | < r, where r > 0. The radius of convergence,
r, can be found from ratio test/root test. Hence, the function f (x) is single valued and possesses
derivatives of all orders in the interval |x − x0 | < r.
→ Note: a rational function
p(x)
is analytic everywhere except at those values of x at which q(x) = 0.
q(x)
54
6.1
Ordinary and singular points
Consider a linear 2nd order homogeneous ODE of the form
a2 (x)
d2 y
dy
+ a0 (x)y = 0
+ a1 (x)
dx2
dx
(21)
We can write equation (21) into the equivalent normalized form as
d2 y
dy
+ P1 (x)
+ P2 (x)y = 0,
2
dx
dx
where P1 (x) =
a1 (x)
,
a2 (x)
P2 (x) =
a0 (x)
,
a2 (x)
(22)
a2 (x) ̸= 0.
Definition 6.2 (Ordinary point). A point x = x0 is called an ordinary point of equation (22) if both
P1 (x) and P2 (x) are analytic at x = x0 .
Definition 6.3 (Singular point). If at least P1 (x) and P2 (x) in equation (22) is not analytic at the
point x = x0 , then we say that the point x0 is a singular point of the differential equation (21).
Definition 6.4 (Regular singular point). If x0 is a singular point of the differential equation (21) but
both the products, (x − x0 )P1 (x) and (x − x0 )2 P2 (x) in their simplest form, are analytic at the point
x = x0 , then the point x = x0 is called a regular singular point of the differential equation (21).
Definition 6.5 (Irregular singular point). If x0 is a singular point of the differential equation (21)
and at least (x − x0 )P1 (x) and (x − x0 )2 P2 (x), in their simplest form, is not analytic at x = x0 , then
the point x = x0 is said to be an irregular singular point of the differential equation (21).
Example(s):
(a) Determine the singular point(s) of the equation (x − 1)
d2 y
1
dy
+ y = 0.
+x
2
dx
dx x
Solution
i) Equivalent normalized form of the given equation:
1
d2 y
x dy
+
+
y = 0.
2
dx
x − 1 dx x(x − 1)
Here, P1 (x) =
x
,
x−1
P2 (x) =
1
x(x − 1)
ii) Singular points:
• For P1 (x), we have x − 1 = 0 ⇒ x = 1. Thus, P1 (x) is not analytic at the point
x = 1.
• For P2 (x), we have x(x − 1) = 0 ⇒ x = 0 or x = 1. Thus, P2 (x) is not analytic at
the points x = 0 and x = 1.
Therefore, the points x = 0 and x = 1 are the only singular points of the given differential
equation. All the other points are ordinary.
(b) Find the singular point(s) of the differential equation 2x2
classify the point(s) into regular or irregular.
d2 y
dy
−x
+ (x − 5)y = 0 and hence
2
dx
dx
Solution
i) Normal form:
d2 y
1 dy x − 5
−
+
y = 0.
2
dx
2x dx
2x2
Here, P1 (x) = −
ii) Singular points:
55
1
,
2x
P2 (x) =
x−5
2x2
• For P1 (x), we have 2x = 0
x = 0.
• For P2 (x), we have 2x2 = 0
x = 0.
⇒
x = 0. Thus, P1 (x) is not analytic at the point
⇒
x = 0. Thus, P2 (x) is not analytic at the point
Therefore, the point x = 0 is the only singular point of the given differential equation. All
the other points are ordinary.
iii) Classification:
• Let x0 = 0. Now,
(x−x0 )P1 (x)
x=x0
(
=x −
1
2x
)
=−
x=0
1
(finite ⇒
2
(x − x0 )P1 (x) is analytic at x = 0)
Also,
(x−x0 )2 P2 (x)
x=x0
= x2 ·
(x − 5)
2x2
=−
x=0
5
(finite ⇒
2
(x − x0 )2 P2 (x) is analytic at x = 0)
Since (x − x0 )P1 (x) and (x − x0 )2 P2 (x) are both analytic at x = 0, therefore, the point
x = 0 is a regular singular point of the given DE.
(c) Find the singular points of the following differential equation and determine whether they are
regular or irregular points:
x2 (1 − x)
d2 y
dy
+y =0
+ (1 − x)
dx2
dx
Solution
i) Normal form:
1
d2 y
1 dy
+
y = 0.
+
dx2 x2 dx x2 (1 − x)
Here, P1 (x) =
1
,
x2
P2 (x) =
1
x2 (1 − x)
ii) Singular points:
• For P1 (x), we have x2 = 0 ⇒
x = 0.
• For P2 (x), we have x2 (1 − x) = 0
at the points x = 0 and x = 1.
x = 0. Thus, P1 (x) is not analytic at the point
⇒
x = 0 or x = 1. Thus, P2 (x) is not analytic
Therefore, the points x = 0 and x = 1 are the only singular points of the given differential
equation. All the other points are ordinary.
iii) Classification:
• Let x0 = 0. Now,
(x−x0 )P1 (x)
x=x0
=
x·
1
x2
x=0
= ∞ (infinite ⇒ (x − x0 )P1 (x) is not analytic at x = 0)
Since (x − x0 )P1 (x) is not analytic at x = 0, therefore, the point x = 0 is an irregular
singular point of the given DE.
• Let x0 = 1. Now,
(x − x0 )P1 (x)
x=x0
= (x − 1) ·
1
x2
= (x−1)2 ·
x=1
−x2
(x
−1)
x=1
= 0 (finite ⇒ (x − x0 )P1 (x) is analytic at x = 1)
Also,
(x−x0 )2 P2 (x)
x=x0
1
= 0 (finite ⇒ (x − x0 )P1 (x) is analytic at x = 1)
Since (x − x0 )P1 (x) and (x − x0 )2 P2 (x) are both analytic at x = 1, therefore, the point
x = 1 is a regular singular point of the given DE.
56
(d) Identify all regular singular points of the following differential equation
(x3 − 3x2 + 2x)
d2 y
dy
+ x(x − 2)
+ 4x2 y = 0
dx2
dx
(e) Show that x = 0 is an ordinary point for the equation (x2 − 1)
6.2
d2 y
dy
+ xy = 0.
+ 3x
2
dx
dx
Solution about an ordinary point
The power series of a function y : R → R centered at x0 ∈ R is
y=
∞
∑
an (x − x0 )n
n=0
Example(s):
Use the power series method to solve the following differential equations about the given ordinary
points
(a) (1 − x2 )
dy
d2 y
− 2x
+ 2y = 0 about the ordinary point x0 = 0.
2
dx
dx
Solution
The solution of the given DE is given by
y=
∞
∑
an xn
n=0
Differentiating yields
y′ =
∞
∑
y ′′ =
nan xn−1 ,
n=1
∞
∑
n(n − 1)an xn−2
n=2
Substituting in the given differential equation we get
∞
∑
(1 − x2 )
n(n − 1)an xn−2 − 2x
n=2
⇒
∞
∑
nan xn−1 + 2
n=0
n(n − 1)an xn−2 −
n=2
⇒
∞
∑
∞
∑
n(n − 1)an xn−2 +
n=2
an xn = 0
n=0
n(n − 1)an xn −
n=2
∞
∑
∞
∑
∞
∑
2nan xn +
n=0
∞
∑
∞
∑
2an xn = 0
n=0
[2 − n(n − 1) − 2n] an xn = 0
(∗)
n=0
We can now change the indexing so that the series has the general term xn−2 . Plugging in
n = n − 2 in the second summation of equation (∗) yields
∞
∑
n(n − 1)an x
n−2
+
n=2
∞
∑
[2 − (n − 2)(n − 3) − 2(n − 2)] an−2 xn−2 = 0
n=2
⇒
∞
∑
[n(n − 1)an − ((n − 2)(n − 3) + 2n − 6)) an−2 ] xn−2 = 0
n=2
⇒
∞
∑
[n(n − 1)an − n(n − 3)an−2 ] xn−2 = 0
n=2
Equating the coefficients yields
n(n − 1)an − n(n − 3)an−2 = 0
⇒
57
an =
(n − 3) .
an−2 ,
(n − 1)
n≥2
The above recurrence relation is used to calculate an for n ≥ 2 in terms of a0 and a1 , which
are left arbitrary. Thus, we have
Even subscripts
Odd subscripts
−1
a3 = 0
a2 =
a0
1
1
2
a4 = a2
a5 = a3
3
4
4
3
a7 = a5
a6 = a4
5
6
..
..
.
.
(2k − 3)
(2k − 2)
a2k =
a2k−2
a2k+1 =
a2k−1 , k ≥ 1
(2k − 1)
2k
Multiplying the corresponding members of each column we get:
a
a
a
2 ·
4 ·
6 · · · a2k =
−1
a0 ·
1
1
a
2·
3 −
3
(2k
3)
a2k−2
a
·
·
·
4
5
(2k − 1)
⇒
a2k =
−1
a0
(2k − 1)
Similarly,
(2k − 2)
a2k−1
2k 4
2
a
a
a
a
a
3· 5···
3 ·
5 ·
7 · · · a2k+1 = 0 · 4
6
⇒
a2k+1 = 0
Therefore, the solution becomes
y=
∞
∑
⇒
an x n
y =
n=0
(b)
∞
∑
a2k x2k +
k=0
∞
∑
a2k+1 x2k+1 = −a0
k=0
∞
∑
x2k
(2k − 1)
k=0
d2 y
+ 4y = 0 about the ordinary point x0 = 0.
dx2
Solution
Let the solution of the given DE be
y=
∞
∑
an xn
n=0
Differentiating yields
y′ =
∞
∑
nan xn−1 ,
y ′′ =
n=1
∞
∑
n(n − 1)an xn−2
n=2
Substituting in the given differential equation we get
∞
∑
n(n − 1)an xn−2 + 4
n=2
∞
∑
an xn = 0 · · · (∗)
n=0
We can now change the indexing so that the series has the general term xn−2 . Putting n = n − 2
in the second summation of equation (∗) yields
∞
∑
n=2
n(n − 1)an x
n−2
+4
∞
∑
an−2 x
n−2
=0
⇒
n=2
∞
∑
[n(n − 1)an + 4an−2 ] xn−2 = 0
n=2
Equating the coefficients yields
n(n − 1)an + 4an−2 = 0
⇒
an =
−4 .
an−2 , n ≥ 2
n(n − 1)
The above recurrence relation is used to calculate an for n ≥ 2 in terms of a0 and a1 , which
are left arbitrary. Thus, we have
58
Even subscripts
Odd subscripts
−4
−4
a2 =
a0
a3 =
a1
2(1)
3(2)
−4
−4
a4 =
a2
a5 =
a3
4(3)
5(4)
..
..
.
.
−4
−4
a2k =
a2k−2
a2k+1 =
a2k−1 , k ≥ 1
2k(2k − 1)
(2k + 1)(2k)
Multiplying the corresponding members of each column we get:
−4
−4
−4
a
a0 ·
a2k−2
2···
2(1)
4(3)
2k(2k − 1)
⇒
a2k =
−4
−4
−4
a1 ·
a2k−1
a
3···
3(2)
5(4)
(2k + 1)(2k)
⇒
a2k+1 =
a
a
2 ·
4 · · · a2k =
(−4)k
a0
(2k)!
Similarly,
a
a
3 ·
5 · · · a2k+1 =
(−4)k
a1
(2k + 1)!
Therefore, the solution becomes
y =
=
∞
∑
n=0
∞
∑
k=0
∞
∑
an x n =
a2k x2k +
k=0
(−4)k
(2k)!
∞
∑
a2k+1 x2k+1
k=0
a0 x2k +
∞
∑
(−4)k
a1 x2k+1
(2k
+
1)!
k=0
∞
∑
∞
∑
(−1)k · 22k 2k
(−1)k · 22k+1 · 2−1 2k+1
= a0
x + a1
x
(2k)!
(2k + 1)!
k=0
k=0
= a0
∞
∑
(−1)k · (2x)2k
(2k)!
a1
y = a0 cos 2x +
sin 2x
2
+
k=0
∴
∞
a1 ∑
(−1)k · (2x)2k+1
2 k=0
(2k + 1)!
→ Note: if the initial conditions are known, we apply Taylor series expansion to obtain the
power series solution of the given IVP.
(c) Use Taylor series expansion to find the third degree power series solution of the initial value
problem (IVP) y ′′ − 2xy ′ + 3y = 0 − − − (∗); y(0) = 2, y ′ (0) = −4.
Solution
The Taylor series expansion of y(x) about the point x0 is given by
y=
∞
∑
y (n) (x0 )
n!
n=0
(x − x0 )n
Thus, the 3rd degree Taylor series solution of the given IVP is obtained by putting n = 3 and
x0 = 0. Thus, we have
y = y(0) + y ′ (0)x +
y ′′ (0) 2 y ′′′ (0) 3
x +
x + ···
2!
3!
(∗)
Now,
y ′′ = 2xy ′ − 3y
y ′′′ = 2xy ′′ + 2y ′ − 3y ′ = 2xy ′′ − y ′
y(0) = 2
y ′ (0) = −4
y ′′ (0) = 2(0)y ′ (0) − 3y(0) = −6
y ′′′ (0) = 2(0)y ′′ (0) − y ′ (0) = 4
⇒
⇒
59
Replacing these values in the series (∗) yields
2
y = 2 − 4x − 3x2 + x3 + · · ·
3
Exercise:
d2 y
dy
− 6x − 4y = 0 about the ordinary point x0 = 0.
dx2
dx
(a) Use power series method to solve (1 − x2 )
Solution
Let the solution to the given DE be
y=
∞
∑
∞
∑
an (x − x0 )n =
n=0
an x n
n=0
Differentiating yields
y′ =
∞
∑
y ′′ =
nan xn−1 ,
n=1
∞
∑
n(n − 1)an xn−2
n=2
Substituting in the given differential equation we get
∞
∑
(1 − x2 )
∞
∑
n(n − 1)an xn−2 − 6x
n=2
⇒
∞
∑
n(n − 1)an xn−2 −
n=2
∞
∑
n=1
∞
∑
n(n − 1)an xn −
n=2
∞
∑
⇒
⇒
nan xn−1 − 4
n(n − 1)an xn−2 −
6nan xn −
∞
∑
4an xn = 0
n=0
[n(n − 1) + 6n + 4]an xn = 0
n=2
∞
∑
n=0
∞
∑
n=2
n=0
n(n − 1)an xn−2 −
an x n = 0
n=0
n=1
∞
∑
∞
∑
(n + 1)(n + 4)an xn = 0 · · · (∗)
We can now change the indexing so that the series has the general term xn−2 . So we put n = n−2
in the second summation of equation (∗) and get
∞
∑
n(n − 1)an xn−2 −
n=2
⇒
∞
∑
(n − 1)(n + 2)an−2 xn−2 = 0
n=2
∞
∑
[n(n − 1)an − (n − 1)(n + 2)an−2 ] xn−2 = 0
n=2
Equating the coefficients yields
n(n − 1)an − (n − 1)(n + 2)an−2 = 0
⇒
an =
(n + 2).
an−2 , n ≥ 2
n
The above recurrence relation is used to calculate an for n ≥ 2 in terms of a0 and a1 , which
are left arbitrary. Thus, we have
Even subscripts
4
a2 = a0
2
Odd subscripts
5
a3 = a1
3
6
a4 = a2
4
7
a5 = a3
5
8
a6 = a4
6
..
.
(2k + 2)
a2k =
a2k−2
2k
9
a7 = a5
7
..
.
(2k + 3)
a2k+1 =
a2k−1 , k ≥ 1
(2k + 1)
60
Multiplying the corresponding members of each column we get:
4
a
a
a
2 ·
4 ·
6 · · · a2k = a0 ·
2
6
a
2·
4 8
(2k + 2)
a
a 4···
2k−2
6
2k
⇒
a2k = (k + 1)a0
5
7
9
(2k + 3)
a
a
a
a
a
a2k−1
3 ·
5 ·
7 · · · a2k+1 = a1 · 3· 5···
+
3
5
7
(2k
1)
⇒
a2k+1 =
Similarly,
2k + 3
a1
3
Therefore, the solution becomes
y =
=
∞
∑
n
an x =
n=0
∞
∑
∞
∑
a2k x
∞
∑
a2k+1 x2k+1
k=0
k=0
= a0
+
k=0
(k + 1)a0 x2k +
∞
∑
2k
∞
∑
2k + 3
3
k=0
(k + 1)x2k +
k=0
a1 x2k+1
∞
a1 ∑
(2k + 3)x2k+1
3 k=0
(b) Find power series solution of the following differential equations about the ordinary point x0 = 0.
(i)
dy
= 5y.
dx
[ans: y = a0
(ii) y ′ − 2y = 0.
[ans: y = a0
d2 y
∞
∑
∞
∑
k=0
k
(2x)
k=0
(iii) (1 + x2 )
(iv)
y ′′
+
xy ′
dx2
+ 2x
dy
− 2y = 0.
dx
[ans: y =
(
[ans: y = a0 1 −
+ y = 0.
(v) y ′′ + xy ′ + (x2 + 2)y = 0.
)
(
∞ 5k
∑
k!
(−1)k−1
k=0
k!
xk ]
= a0 e2x ]
1
x2k ]
2k − 1
)
+ · · · + a1 x − 31 x3 +
1 5
15 x
+ ··· ]
[ans: y = a0 (1 − x2 + 41 x4 + · · · ) + a1 (x − 21 x3 +
3 5
40 x
+ · · · )]
1 2
2x
1 4
8x
+
(c) Use Taylor’s theorem to find the third degree series solution to the following IVPs.
(i) y ′′ + (x2 + 2x + 1)y ′ + 3xy = 0; y(0) = 1, y ′ (0) = −2.
[ans: y = 1 − 2x + x2 − 61 x3 + · · · ]
1
2
[ans: y = 1 + x + x2 + x3 + · · · ]
2
3
[ans: y = 1 + 2x − x2 + 31 x3 − 61 x4 + · · · ]
(ii) y ′ = y 2 − x; y(0) = 1.
(iii) y ′′ + y ′ + x2 y = 0; y(0) = 1, y ′ (0) = 2.
(iv) xy ′′ + (x − 1)y ′ + xy = 0; y(1) = 0, y ′ (1) = 5.
(v) (x − 1)y ′′ + 2y ′ − 4y = 0; y(0) = 2, y ′ (0) = 6.
d2 y
dy
+ 3x
+ xy = 0; y(0) = 4, y ′ (0) = 6.
2
dx
dx
d2 y
dy
(vii) (2x2 − 3) 2 − 2x
+ y = 0; y(0) = 1, y ′ (0) = 7.
dx
dx
(vi) (x2 − 1)
6.2.1
Legendre’s equation and polynomials
The equation
(1 − x2 )
d2 y
dy
− 2x
+ p(p + 1)y = 0
dx2
dx
(23)
where p is a positive integer is called Legendre’s differential equation. This equation arises in
many problems in physics, especially in boundary value problems in spheres.
The equivalent normalized form of equation (23) is
2x dy p(p + 1)
d2 y
−
+
y=0
dx2 1 − x2 dx
1 − x2
⇒ P1 (x) = −
61
2x
p(p + 1)
, P2 (x) =
1 − x2
1 − x2
Therefore, the poinst x = −1 and x = 1 are the only singular points of equation (23). All other
points are ordinary. Thus, we study the general solution to equation (23) in the interval −1 < x < 1.
To solve equation (23) about the ordinary point x0 = 0, we assume that it has a power series solution
of the form
y=
∞
∑
an x n
n=0
Differentiating yields
y′ =
∞
∑
nan xn−1 ,
n=1
Substituting the values of y,
(1 − x2 )
y′,
∞
∑
∞
∑
y ′′ =
n=2
y ′′
in equation (23) we get
n(n − 1)an xn−2 − 2x
n=2
⇒
∞
∑
n(n − 1)an xn−2 −
n=2
∞
∑
⇒
n(n − 1)an xn −
n(n − 1)an xn−2 −
∞
∑
∞
∑
an xn = 0
n=0
2nan xn −
n=1
n=2
∞
∑
p(p + 1)an xn = 0
n=0
[n(n − 1) + 2n − p(p + 1)]an xn = 0
n=0
∞
∑
⇒
nan xn−1 + p(p + 1)
n=1
∞
∑
∞
∑
n=2
∞
∑
n(n − 1)an xn−2
n(n − 1)an xn−2 −
n=2
∞
∑
[n(n + 1) − p(p + 1)]an xn = 0
n=0
We can now change the indexing so that the series has the general term xn−2 . So we put n = n − 2
in the second summation and get
∞
∑
n(n − 1)an x
n−2
n=2
⇒
−
∞
∑
[(n − 2)(n − 1) − p(p + 1)]an−2 xn−2 = 0
n=2
∞
∑
[n(n − 1)an − [(n − 2)(n − 1) − p(p + 1)]an−2 ] xn−2 = 0
n=2
⇒
∞
∑
[n(n − 1)an + (p − n + 2)(p + n − 1)an−2 ] xn−2 = 0
n=2
Equating the coefficients yields
n(n − 1)an + (p − n + 2)(p + n − 1)an−2 = 0
⇒
an =
−(p − n + 2)(p .+ n − 1)
an−2 , n ≥ 2
n(n − 1)
The above recurrence relation is used to calculate an for n ≥ 2 in terms of a0 and a1 , which are
left arbitrary. Thus, we have
Even subscripts
Odd subscripts
−(p − 1)(p + 2)
−p(p + 1)
a0
a3 =
a1
a2 =
2(1)
3(2)
−(p − 2)(p + 3)
−(p − 3)(p + 4)
a4 =
a2
a5 =
a3
4(3)
5(4)
−(p − 4)(p + 5)
−(p − 5)(p + 6)
a6 =
a4
a7 =
a5
6(5)
7(6)
..
..
.
.
−(p − 2k + 1)(p + 2k)
−(p − 2k + 2)(p + 2k − 1)
a2k−2
a2k+1 =
a2k−1 , k ≥ 1
a2k =
2k(2k − 1)
(2k + 1)(2k)
Multiplying the corresponding members of each column we get:
a
a
a
2 ·
4 ·
6 · · · a2k
=
=
−(p − 2)(p + 3)
−(p − 4)(p + 5)
−(p − 2k + 2)(p + 2k − 1)
−p(p + 1)
a0 ·
a
a
a2k−2
2·
4 ···
2(1)
4(3)
6(5)
2k(2k − 1)
(−1)k p(p + 1)(p − 2)(p + 3)(p − 4)(p + 5) · · · (p − 2k + 2)(p + 2k − 1)
a0
(2k)!
62
(−1)k
⇒
k
∏
(p − 2j +.2)(p + 2j − 1)
j=1
a2k =
(2k)!
a0 , k ≥ 1
Similarly,
a
a
a
3 ·
5 ·
7 · · · a2k+1
−(p − 1)(p + 2)
−(p − 3)(p + 4) −(p − 5)(p + 6)
−(p − 2k + 1)(p + 2k)
a1 ·
a
a
a2k−1
3
5 ···
3(2)
5(4)
7(6)
(2k + 1)(2k)
(−1)k (p − 1)(p + 2)(p − 3)(p + 4)(p − 5)(p + 6) · · · (p − 2k + 1)(p + 2k)
a1
(2k + 1)!
=
=
(−1)k
⇒
k
∏
(p − 2j. + 1)(p + 2j)
j=1
a2k+1 =
(2k + 1)!
a1 , k ≥ 1
Therefore, the solution becomes
y =
∞
∑
an xn =
n=0
= a0
∞
∑
∞
∑
a2k x2k +
k=0
k
∏
(−1)k
+a1
[
a2k+1 x2k+1
k=0
(p − 2j + 2)(p + 2j − 1)
j=1
x2k
(2k)!
k=0
∞
∑
∞
∑
(−1)k
k
∏
(p − 2j + 1)(p + 2j)
j=1
x2k+1
(2k + 1)!
k=0
p(p + 1) 2 p(p + 1)(p − 2)(p + 3) 4
= a0 1 −
x +
x − ···
2!
4!
]
[
(p − 1)(p + 2) 3 (p − 1)(p + 2)(p − 3)(p + 4) 5
x +
x − ···
+a1 x −
3!
5!
]
= a0 y0 (x) + a1 y1 (x)
which is the general solution of the Legendre’s equation. The functions y0 (x) and y1 (x) are called the
Legendre’s polynomials.
6.3
Solution about a regular singular point (Frobenius method)
Let x0 be a regular singular point of equation (21). We assume a power series solution, about the
point x = x0 , of the form
y=
∞
∑
an (x − x0 )n+r , a0 ̸= 0
n=0
Example(s):
(a) Determine the power series solution of x2
d2 y
dy
+ (x2 − 3x)
+ 3y = 0 about the point x0 = 0.
2
dx
dx
Solution
Clearly, the point x = 0 is a regular singular point of the given differential equation. We assume
a power series solution of the form
y=
∞
∑
an (x − x0 )n+r , a0 ̸= 0
n=0
63
Differentiating yields
∞
∑
′
y =
(n + r)an x
n+r−1
′′
,
y =
n=0
∞
∑
(n + r)(n + r − 1)an xn+r−2
n=0
Substituting into the given differential equation yields
2
x
∞
∑
(n + r)(n + r − 1)an x
n+r−2
+ (x − 3x)
2
n=0
⇒
∞
∑
(n + r)(n + r − 1)an xn+r +
n=0
∞
∑
⇒
(n + r)an x
n=0
∞
∑
(n + r)an xn+r+1 −
n=0
∞
∑
∞
∑
n+r−1
+3
∞
∑
an xn+r = 0
n=0
3(n + r)an xn+r +
n=0
∞
∑
3an xn+r = 0
n=0
[(n + r)(n + r − 1) − 3(n + r) + 3] an xn+r +
n=0
∞
∑
(n + r)an xn+r+1 = 0
n=0
Shifting the index in the second summation i.e., putting n = n − 1 we get
∞
∑
[(n + r)(n + r − 1) − 3(n + r) + 3] an x
n+r
+
n=0
∞
∑
(n + r − 1)an−1 xn+r = 0
n=1
This can be written as
[r(r − 1) − 3r + 3] a0 xr +
∞
∑
[(n + r)(n + r − 1) − 3(n + r) + 3] an xn+r +
n=1
⇒
∞
∑
(n+r−1)an−1 xn+r = 0
n=1
∞
∑
[(r − 3)(r − 1)] a0 x +
r
{[(n + r)(n + r − 4) + 3] an + (n + r − 1)an−1 } xn+r = 0
n=1
Equating the coefficients we get
1. [(r − 3)(r − 1)] a0 = 0 (This is called indicial equation). But a0 ̸= 0
⇒
(r − 3)(r − 1) = 0
⇒
r = 3 or r = 1
2. [(n + r)(n + r − 4) + 3] an + (n + r − 1)an−1 = 0
⇒
an =
−(n + r −. 1)
an−1 , n ≥ 1
(n + r)(n + r − 4) + 3
(recurrence relation)
The above recurrence relation is used to calculate an for n ≥ 1 in terms of a0 which is left
arbitrary. We consider two cases of r.
Case 1: when r = 3
The above recurrence relation becomes an =
we have.
1
a1 = − a0
1
1
a2 = − a1
2
−1
−(n + 2)
an−1 =
an−1 , n ≥ 1. Thus,
(n + 3)(n − 1) + 3
n
1
a3 = − a2
3
1
a4 = − a3
4
···
Multiplying yields
1
1
1
1
1
a
a
a
a
a
a
a
ak−1
1 ·
2 ·
3 ·
4 · · · ak = − a0 · − 1·− 2·− 3··· − 1
2
3
4
k
Thus, we obtain
ak =
64
(−1)k
a0
k!
ak =
−1
ak−1
k
Therefore, the solution corresponding to r = 3 is
y=
∞
∑
ak x
k+3
= a0
k=0
∞
∑
(−1)k
k!
k=0
(
k+3
x
Case 2: when r = 1
The above recurrence relation becomes an =
)
4
−n
−1
an−1 =
an−1 , n ≥ 1.
(n + 1)(n − 3) + 3
n−2
Thus, we have.
a1 = −
= a0
1
1
x − x + x5 − x6 + · · ·
2
6
3
1
a2 = − a1 = −∞
0
1
a0 = a0
1−
Therefore, no power series correspond to r = 1.
Exercise:
Determine the power series solution of the following differential equations about the regular singular
point x = 0.
(a) 2x2
d2 y
dy
+ (x − 5)y = 0.
−x
2
dx
dx
(b) 2x2
d2 y
dy
+ y = 0.
+ (x + 2)
dx2
dx
(c) 2x2
d2 y
dy
+x
+ (x2 − 2)y = 0.
2
dx
dx
(d) 9x(1 − x)
6.3.1
d2 y
dy
− 12
+ 4y = 0.
dx2
dx
Bessel’s equation and functions
The equation
x2
d2 y
dy
+ (x2 − p2 )y = 0
+x
2
dx
dx
(24)
is called Bessel’s equation of order p. The solutions of equation (24) are known as Bessel functions.
The equivalent normalized form of equation (24) is
(
d2 y
1 dy
p2
+
+
1
−
dx2 x dx
x2
)
y=0
⇒
P1 (x) =
1
n2
, P2 (x) = 1 − 2
x
x
Therefore, the point x = 0 is a regular singular point of equation (24)
To solve equation (24), we assume that it has a power series solution of the form
y=
∞
∑
an xn+r , a0 ̸= 0
(25)
n=0
where x0 is the regular singular point of equation (24) about which we are finding the solution,
a0 , a1 , · · · are constants
From (25) it implies that
y′ =
∞
∑
(n + r)an xn+r−1 ,
n=0
y ′′ =
∞
∑
(n + r)(n + r − 1)an xn+r−2
n=0
65
Substituting in equation (24) yields
x2
∞
∑
(n + r)(n + r − 1)an xn+r−2 + x
n=0
⇒
∞
∑
∞
∑
(n + r)an xn+r−1 + (x2 − p2 )
n=0
(n + r)(n + r − 1)an xn+r +
n=0
∞
∑
⇒
(n + r)an xn+r +
∞
∑
[(n + r)(n + r − 1) + (n + r) − p2 ]an xn+r +
n=0
∞
∑
∞
∑
an xn+r+2 −
n=0
⇒
an xn+r = 0
n=0
n=0
∞
∑
∞
∑
[(n + r)2 − p2 ]an xn+r +
n=0
n=0
∞
∑
n=0
∞
∑
p2 an xn+r = 0
an xn+r+2 = 0
an xn+r+2 = 0
n=0
Shifting the index in the second summation i.e. putting n = n − 2 we get
∞
∑
[(n + r)2 − p2 ]an xn+r +
n=0
∞
∑
an−2 xn+r = 0
n=2
⇒ a0 (r2 − p2 )xr + a1 [(r + 1)2 − p2 ]xr+1 +
∞
∑
[(n + r)2 − p2 ]an xn+r +
n=2
∞
∑
an−2 xn+r = 0
n=2
Equating the coefficients we get
1. a0 (r2 − p2 ) = 0 (This is called indicial equation). But a0 ̸= 0
⇒
(r2 − p2 ) = 0
2. a1 [(r + 1)2 − p2 ] = 0.
[
3.
]
⇒
r = ±p
But
(n + r)2 − p2 an + an−2 = 0
[(r + 1)2 − p2 ] ̸= 0
⇒
an =
⇒
a1 = 0
−1 .
an−2 , n ≥ 2
(n + r)2 − p2
(recurrence relation)
The above recurrence relation is used to calculate an for n ≥ 2 in terms of a0 and a1 which are
left arbitrary. We consider two cases of r
Case 1: when r = p
The above recurrence relation becomes an =
−1
an−2 , n ≥ 2. Thus, we have (note a1 = 0).
(p + n)2 − p2
Even subscripts
−1
−1
a2 =
a0 =
a0
2
2
(p + 2) − p
4(p + 1)
−1
−1
a2
a4 =
a2 =
2
2
(p + 4) − p
8(p + 2)
−1
−1
a4 =
a4
a6 =
2
2
(p + 6) − p
12(p + 3)
..
.
−1
−1
a2k =
a2k−2 =
a2k−2
2
2
(p + 2k) − p
4k(p + k)
Odd subscripts
−1
a3 =
a1 = 0
(p + 3)2 − p2
−1
a5 =
a3 = 0
(p + 5)2 − p2
−1
a7 =
a5 = 0
(p + 7)2 − p2
..
.
−1
a2k+1 =
a2k−1 = 0, k ≥ 1
(p + 2k + 1)2 − p2
Multiplying the corresponding members of each column we get:
For the even subscripts,
a2 · a4 · · · a2k =
=
⇒ a2k =
a2k =
−a0
−a2
−a2k−2
·
···
4(p + 1) 8(p + 2)
4k(p + k)
k
(−1)
a0 · a2 · · · a2k−2
22k k!(p + 1)(p + 2) · · · (p + k)
(−1)k
1
a0 . We choose a0 = p
and get,
2k
2 k!(p + 1)(p + 2) · · · (p + k)
2 p!
(−1)k
1
(−1)k
(−1)k
=
=
22k k!(p + 1)(p + 2) · · · (p + k) 2p p!
2p+2k k!(p + k)!
2p+2k k!Γ(p + k + 1)
66
Similarly, for the odd subscripts,
a3 · a5 · · · a2k+1 = 0
⇒
a2k+1 = 0
Therefore,
y=
∞
∑
an xn+r
⇒
y1 =
n=0
=
∞
∑
a2k xp+2k +
k=0
∞
∑
∞
∑
a2k+1 xp+2k+1
k=0
xp+2k
·
+0
p+2k k!Γ(p + k + 1)
2
k=0
(−1)k
= Jp (x)
(26)
Equation (26) is called Bessel function and Jp (x) stands for the Bessel function of order p
Case 2: when r = −p
Similarly, the Bessel function for r = −p is [we replace p by −p in equation (26)]
y2 =
∞
∑
(−1)n · x−p+2n
= J−p (x)
n!2−p+2n Γ(−p + n + 1)
n=0
Therefore, the general solution of equation (24) is y = AJp (x) + BJ−p (x).
Lecture 11
7
Elementary set theory
A set is any well-defined collection, group, aggregate, class or conglomerate of objects. These objects
(which may be cities, countries, years, numbers, letters, or anything else) are called elements of the
set, and are often said to be members of the set. Each element occurs once in the set.
7.1
Notation and terminology
Usually capital letters of the alphabet are used to represent sets while small letters of the alphabet
are used to represent elements of a set. The elements of a set are listed inside a pair of curly brackets.
For example, the set whose elements are the first six letters of the alphabet is written as
A = {a, b, c, d, e, f }
We can also specify a set by giving a description of its elements (without actually listing the elements).
For example, the set B = {2, 4, 6, 8, 10} can also be written
B = {all even integers between 1 and 11}
Symbol
∈
∈
/
∀
∃
| or :
7.2
Meaning
Belongs to (or is a member of). For example, x ∈ A means element x belongs to the set A.
Is not a member of. For example, x ∈
/ A means element x is not a member of A.
For all
There exists
such that
Finite and infinite sets
A set is said to be finite if its members can be enumerated and it’s infinite otherwise. For example,
the set A = {1, 2, 3, 4, 6, 12} is finite while the set B = {2, 4, 6, · · · } is infinite.
67
7.3
Empty set
An empty set is a set with no elements. An empty set is usually denoted by ∅ or {}. It is a set that
arises in a variety of guises. For example, let B = {People taller than the Times Tower in Kenya}. It
is clear that the set B is empty.
7.4
Subsets
Let A and B be two sets. If every element of A is an element of B, we say that A is a subset of
B, and we write A ⊆ B. We also say that A is contained in B. For example, let A = {2, 5, 7} and
B = {1, 2, 3, 4, 5, 6, 7, 8}. Then, it is clear that A is contained in B, i.e., A ⊂ B.
7.5
Cardinality of a Set
The number of elements in a set A is called the cardinality of A, and is denoted n(A) or |A|. A set
with one element is called a singleton set. Thus, a set A is said to be finite if n(A) < ∞. A set A is
said to be infinite if n(A) = ∞. Note that n(∅) = 0.
7.6
7.6.1
Fundamental operations on Sets
Union
Let A and B be sets. The union of A and B, denoted by A ∪ B is
A ∪ B = {x : x ∈ A or x ∈ B or both}
Thus, the union of sets is the set of all objects which belong to at least one of them. For example, if
A = {Nairobi, Lagos, Kigali} and B = {Kamau, Onyango, Wanyama}, then
A ∪ B = {Nairobi, Lagos, Kigali, Kamau, Onyango, Wanyama}
Similarly, let A = {x, y, t, s}, B = {1, 4, 9, 16} and C = {0, 1, 3, 4, 5, 6, 7, 8, 20}. Then,
A ∪ B ∪ C = {x, y, t, s, 1, 4, 9, 16, 0, 3, 5, 6, 7, 8, 20}
7.6.2
Intersection
Let A and B be sets. The intersection of A and B, denoted by A ∩ B is
A ∩ B = {x : x ∈ A and x ∈ B}
Thus, the intersection of sets is the set of all objects which belong to all of them. For example, let
A = {1, 4, 9, 16} and B = {0, 1, 3, 4, 5, 6}. Then,
A ∩ B = {1, 4}
Definition 7.1 (Disjoint sets). Two sets A and B are said to be disjoint if they do not have a
member in common. That is, A ∩ B = ∅. If this is the case, we say that A and B do not intersect. If
A ∩ B ̸= ∅, we say that A and B intersect.
7.6.3
Set difference
Let A and B be sets. The set difference of A and B, denoted by A − B is defined as
A − B = {x : x ∈ A and x ∈ B}
For example, if A = {1, 2, 3, 5, 6, 7} and B = {3, 5, 9}, then
A − B = {1, 2, 6, 7} and
B − A = {9}
Similarly, if A = {New York, Cairo, Mumbai, Seoul,Beijing, Moscow, London} and
B = {Nairobi, Kigali, Pretoria, Beijing, Harare, Paris, London}; then
A − B = {New York, Cairo, Mumbai, Seoul, Moscow}
and
B − A = {Nairobi, Kigali, Pretoria, Harare, Paris}
68
7.6.4
Symmetric difference of two sets
Let A and B be sets. The symmetric difference of A and B B, denoted by A∆B is defined as
A∆B = {x : x ∈ A or x ∈ B, but not both} = (A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B)
For example, if A = {2, 1, 3, 5} and B = {x, t, 7, 1}, then A ∪ B = {1, 2, 3, 5, x, t, 7} and A ∩ B = {1}.
Therefore,
A∆B = {2, 3, 5, x, t, 7}
7.7
Universal set
A universal set U is a set which contains all elements under consideration. For example, suppose
A = {a, b, c, d}, B = {b, d, e, f }, and C = {d, e, f, g, h}. Then the universal set is probably U =
{a, b, c, d, e, f, g, h, p, q, t}. Similarly,
(a) If one considers the set of men and women, then a universal set is probably the set of human
beings.
(b) If one considers sets such as pigs, cows, chickens, or horses, the universal set is probably the set
of animals.
7.8
Complement of a set
Let U be the universal set and let A be any set. Then, the complement of A is the set of elements of
U that do not belong to A. It is denoted by Ac = U − A. Thus for the above sets, we have
Ac = {e, f, g, h, p, q, t},
B c = {a, c, g, h, p, q, t},
and
C c = {a, b, c, p, q, t}
Similarly, let the universal set be U = {0, 1, 2, 3, 5, 6} and D = {3, 5}. Clearly, Dc = {0, 1, 2, 6}.
→ Note: the complement is always with respect to a particular universal set. Thus, when discussing
complements, it is essential to define the universal set.
7.9
Venn diagrams
It is often useful a diagram called a Venn diagram to visualize and prove some of the various properties
of set operations. In a Venn diagram, the universal set U is represented/depicted by the interior of
a large rectangular area/region. Subsets within this universe are represented by interiors of circular
areas/regions and wanted regions are to be shaded. For a set A, the region/area outside the circle for
A represents Ac . Examples of set operations using Venn diagram:
69
7.10
(a) A ⊂ B
(b) Ac
(c) A − B
(d) A ∪ B
(e) A ∩ B
(f) A∆B
Applications of Venn diagrams in counting
We can use Venn diagrams to solve counting problems.
Example(s):
1. Safaricom (Kenya Ltd) surveyed 400 of its customers to determine the way they learned about
the new Kochokocho promotion. The survey shows that 180 learned about the promotion from
radio, 190 from television, 190 from newspapers, 80 from radio and television, 90 from radio and
newspapers, 50 from television and newspapers, and 30 from all three forms of media. Draw a
Venn diagram to represent this information. Hence, determine the number of customers who:
(a) learned of the promotion from at least two of the three media.
(b) learned of the promotion from exactly one of the three media.
(c) did not learn of the promotion from any of the three media.
Solution
Let the universal set be
U = {400 Safaricom customers}
R = {customers who learned about the promotion from Radio}
T = {customers who learned about the promotion from Television}
N = {customers who learned about the promotion from Newspapers}
We are given that
|U | = 400, |R| = 180, |T | = 190, |N | = 190
and
|R ∩ T | = 80, |R ∩ N | = 90, |T ∩ N | = 50, |R ∩ T ∩ N | = 30
70
(a) At least two of the media means we add : 50,60, 20 and 30 to get 160. Thus exactly 160
customers learned of the promotion from at least two of the three media.
(b) Exactly one of the media means Radio only or Television only or Newspapers only. From
the Venn diagram we have: 40 + 90 + 80 = 210.
(c) |U | − |R ∪ T ∪ N | = 400 − (40 + 50 + 60 + 30 + 90 + 20 + 80) = 30.
2. Each of the 100 students in the first year of Open Universitys Computer Science Department
studies at least one of the subsidiary subjects: mathematics, electronics and accounting. Given
that 65 study mathematics, 45 study electronics, 42 study accounting, 20 study mathematics
and electronics, 25 study mathematics and accounting, and 15 study electronics and accounting,
find the number who study:
(a) all three subsidiary subjects;
[ans: x = 8]
(b) mathematics and electronics but not accounting;
[ans: 20 − x = 12]
(c) only electronics as a subsidiary subject.
[ans: 10 + x = 18]
[hint: |U | = |M ∪ E ∪ A|]
Solution
3. A group of 150 tourists planned to visit East Africa. Among them, 3 fall ill and did not come, of
the rest 6 visited all the three countries, 8 visited Uganda and Tanzania, 26 visited Kenya and
Tanzania, 17 visited Kenya and Uganda, 27 visited Kenya only, and 45 visited Uganda only.
(a) How many visited Tanzania only?
[ans: = 36]
(b) How many visitors did each country have?
71
[ans: |K| = 64, |Uganda| = 64, |T | = 64]
Download