Ordinary Differential Equations1
Ordinary Differential Equations1
(First Edition)
1
xTHE COURSE CONTENT y
1. Introduction
1.1. The differential equations.
1.2. The ordinary differential equations (ode) and Partial differential
equations (pde).
1.3. The order and the degree of the ordinary differential equations.
1.4. Formation of the differential equations.
1.5. The Initial-Value and Boundary Problems.
2. The First Order Ordinary Differential Equations
2.1. Variable separable first order ode.
2.2. Integrable combinations.
2.3. Homogeneous first order ode.
2.4. Equations reducible to variable separable and homogeneous form.
2.5. Linear first order ode.
2.6. Equations reducible to liner form (Bernoulli’s Equations)
2.7. Exact first order ode.
2.8. Equations reducible to exact form (non exact)
3. The Second Order Ordinary Differential Equations
3.1. Linear Differential Equations.
3.2. Non Linear Differential Equations.
3.3. The Complementary Function.
3.4. The Particular Integral.
3.5. The Solution for the Second Order ode.
4. Cauchy-Euler Equations, Methods of Variation of Param-
eters
4.1. Cauchy Euler Homogeneous Linear Equations.
4.2. Legendre’s Homogeneous differential equations.
2
4.3. Method of variation of parameters.
5. Simultaneous Linear Differential Equations
5.1. Simultaneous differential equations.
6. Applications to Differential Equations
6.1. Oscillations of a string.
6.2. Projectile.
6.3. Vertical Motion.
6.4. Electrical circuits.
6.5. Mechanical Engineering problems.
3
Introduction
d2 y dy 2
(vi) dx2
+ ( dx ) − xy 2 = 0.
Example
Show that y = 2xe−3x is the specific solution of the differential equa-
d2 y dy
tion dx 2 + 6 dx + 9y = 0.
Solution
5
Bonus questions
6
of order two or greater in which the dependent variable y or its derivatives
are specified at different points.
dny 0 (n−1)
Solve: = f (x, y, y , · · · , y )
dxn
Subject to: y(a) = y0, y 0(b) = y1,
is called a boundary-value problem (BVP). The prescribed values
y(a) = y0 and y(b) = y1 are called boundary conditions.
Example
π
x00 + 14x = 0, x(0) = 0, x( ) = 0.
8
7
8
Example 2
Form the differential equation whose general solution is y = αe5x + βe−2x.
Solution
y = αe5x + βe−2x, (1),
dy
= 5αe5x − 2βe−2x, (2)
dx
d2y
2
= 25αe5x + 4βe−2x, (3)
dx
d2y dy 5x
+ 2 = 35αe ,
dx2 dx
= 5(7αe5x),
d2y dy dy
=⇒ 2 + 2 = 5( + 2y),
dx dx dx
2
dy dy
=⇒ 2 − 3 − 10y = 0.
dx dx
Bonus Questions
Form the differential equations whose general solution is
(i) y = A cos x.
(ii) y = αe−3x + βe−2x.
(iii) y = Ae4x + Be3x.
9
(iv) y 2 = 4ax.
Examples
1. Solve
(i) (1 + x)dy − ydx = 0.
Solution
dy dx
y = 1+x ,
10
dy dx
R R
= 1+x
y + C,
ln y = ln (1 + x) + C, because all two functions are logarithm then
C must be a logarithm.
ln y = ln (1 + x) + ln D, using properties of logarithms, then
y = D(1 + x)
(ii) y 0 = e3x+2y
Solution
dy 3x 2y
dx = e e ,
eR−2y dy = e3xRdx,
e−2y dy = e3xdx + C,
e−2y e3x 1 −2y
−2 = 3 + C, or 2 e + 13 e3x = C or 2e3x + 3e−2y = D
dy t
(iii) dt = y+t 2
ye
Solution
y −t2
ye dy = te R dt, 2
ye dy = te−t dt, using integration by parts gives
R y
2
yey − ey = − 21 e−t + C
(iv) sin 3x dx + 2ycos33xdy = 0
Solution
sin 3x
Rcos3sin
3x
dx + 2ydyR= 0,
3x
cos3 3x
dx = − 2ydy,
1
6cos2 3x
+ c = −y 2,
1
6cos2 3x
+ y2 = C
dy
2. Solve the initial-value problem dx = y cot 2x given that y(π/4) = 2.
Write the answer in the form of y 2 = A sin 2x.
Solution
R dy R
y = R cot2xdx,
ln y = cos 2x
sin 2x dx,
11
Let t = sin 2x,
dt = 2 cos 2xdx,
cos 2xdx = 21 dt.
ln y = cos
R 2x 1
R dt 1
sin 2x dx = 2 t = 2 ln t + c.
But t = sin 2x, thus
ln y = 21 ln (sin 2x) + c.
Since y(π/4) = 2, then
ln 2 = 12 ln (sin π/2) + c = 0 + c,
c = ln 2
Tutorial Questions
12
3. Suppose that a population develops according to the logistic equation
dP
= 0.05P − 0.0005P 2
dt
where t is measured in weeks.
What is the carrying capacity? What is the value of k?
INTEGRABLE COMBINATIONS
We shall see now that a differential equation in which the variables are not
separable can be solved if it can be arranged in integrable combinations.
Examples
1. Solve xdy = (3x2 − y)dx.
Solution
The equation cannot be separated in terms containing x only and terms
containing y only, but, by transposing the term ydx, we have
xdy + ydx = 3x2dx.
The left hand side is an integrable combination of x and y.
13
d d
R R 3
dx (xy)
= dx (x )
3
xy = x + c
Example
Classify each of the following function whether is a homogeneous or not.
a) f (x, y) = x2 − 2xy + y 2
b) f (x, y) = x − 7y + 6
c) f (x, y) = yln x
d) f (x, y) = y(ln x − ln y)
x2 y+xy 2
e) f (x, y) = 3x3 −4y 3
Solution
a) f (kx, ky) = (kx)2 − 2kx · ky + (ky)2 = k 2(x2 − 2xy + y 2) = k 2f (x, y).
Hence the function x2 − 2xy + y 2 is homogeneous of second degree.
b) f (kx, ky) = kx − 7ky + 6 . The k cannot be factored out. Hence the
function x − 7y + 6 is not homogeneous.
c) f (kx, ky) = kyln kx. The k cannot be factored out thus the function
yln x is not homogeneous.
d) f (kx, ky) = ky(ln kx − ln ky) = kyln ( xy ) = kf (x, y) Hence f (x, y)
is homogeneous of first degree.
2 2 3 2 2
·ky+kx·(ky)
e) f (kx, ky) = (kx) 3
3(kx) −4(ky)3 = k (x y+xy )
k 3 (3x3 −4y 3 )
= f (x, y) Thus the function
f (x, y) is homogeneous of degree zero.
14
A differential equation
dy
= f (x, y)
dx
is called homogeneous if f (x, y) is a homogeneous function of degree zero.
If the differential equation is written in the form
M (x, y)dx + N (x, y)dy = 0,
it will be homogeneous if M and N are homogeneous functions of the same
degree.
If a differential equation is homogeneous it can be solved by either of the
following methods:
(a) Substitute y = vx. The resulting equation is separable in v and x;
solve it, and replace v by y/x.
(b) Substitute x = vy. The resulting equation is separable in v and y;
solve it, and replace v by x/y.
Examples
1. Find the general solution of the differential equation 2xydx + (x2 +
y 2)dy = 0
Solution
Method 1
Let y = vx, dy = vdx + xdv,
2x(vx)dx + (x2 + (vx)2)(vdx + xdv) = 0,
(v 3 + 3v)dx + x(1 + v 2)dv = 0,
dx (v 2 +1)dv
x + v 3 +3v = 0,
ln x + 13 ln (v 3 + 3v) = ln C,
y 3 + 3x2y = D
Method 2
Let x = vy, dx = vdy + ydv,
2v(vdy + ydv) + (v 2 + 1)dy = 0,
(3v 2 + 1)dy + 2vydv = 0,
dy 2vdv
y + 3v 2 +1 = 0,
ln y + 13 ln (3v 3 + 1) = ln C,
y 3 + 3x2y = D
15
p
2. Solve (x + y 2 − xy)dy − ydx = 0.
Solution
Let xp = vy, dx = vdy + ydv,
(x + √ y 2 − xy)dy − ydx = 0,
(v + 1 − v)dy − (vdy + ydv) = 0,
dy √dv = 0,
y −
√
1−v
ln y + 2 1 − v = ln C,
Replacing
√ v by x/y,
ye2 1−x/y = C
3. Solve the particular solution for the differential equation (x2 − y 2)dx +
2xydy = 0.
Solution
dy y 2 − x2
= ,
dx 2xy
y2
x2
= 2xy ,
x2
( xy )2 −1
=
2( xy )
Tutorial Questions
1. Find the general solution for the following differential equations.
i. 2xydx + (x2 + 2y 2)dy = 0.
dy x+y
ii. dx = x .
The equations of such type are known as non-homogeneous ode and can
be reduced to variable separable or homogeneous form.
CASE I: Between a1x + b1y and a2x + b2y, one is a multiple of the
other say a1x + b1y = k(a2x + b2y) ∗
i.e aa12 = bb12 = k.
Example
Solve the DE (6x + 4y + 3)dx + (3x + 2y + 2)dy = 0
Solution
dy 6x+4y+3 2(3x+2y)+3
dx = − 3x+2y+2 = − 3x+2y+2 ,
Let u = 3x + 2y,
du dy
dx = 3 + 2 dx
dy
⇒ dx = 12 ( du
dx − 3),
Thus
1 du 2u+3
2 ( dx − 3) = − u+2
du −u
dx = u+2 Separating variables, we get
u+2
u du = −dx,
(1 + u2 )du = −dx, integrating we get
u + 2ln u = −x + c,
3x + 2y + 2ln (3x + 2y) + x = c
Bonus Questions
dy
1. Find the solution of dx = 2x+y−2
2x+y+1 .
dy
2. Solve dx = 1−x−y
x+y .
dy 3x+2y
3. Solve the given initial-value problem, dx = 3x+2y+2 , y(−1) = −1.
CASE II: Between a1x + b1y and a2x + b2y no one is a multiple of
the other i.e aa12 6= bb21 .
So we let x = X + h, y = Y + k ⇒ X = x − h, Y = y − k and
dx = dX, dy = dY, where h and k are constants, and substitution gives
dY a1(X + h) + b1(Y + k) + c
= ,
dX a2(X + h) + b2(Y + k) + d
a1 X + a1 h + b1 Y + b1 k + c
= ,
a2 X + a2 h + b2 Y + b2 k + d
dY a1 X + b1 Y + a1 h + b1 k + c
= ,
dX a2X + b2Y + a2h + b2k + d
For homogeneity, we let a1h + b1k + c = 0 and a2h + b2k + d = 0 and
18
solving for h and k. The new equation is
dY a1 X + b1 Y
= ,
dX a2X + b2Y
The above is homogeneous equation, then we can continue solving.
Example
dy
Solve dx = x+y−2
x−y
x = X + h, y = Y + k ⇒ X = x − h, Y = y − k and dx = dX, dy = dY,
where h and k are constants, and substituting in the equation gives
dY X +h+Y +k−2
= ,
dX X + h − (Y + k)
X +Y +h+k−2
= ,
X −Y +h−k
dY X +Y +h+k−2
= ,
dX X −Y +h−k
Bonus Questions
1. Solve (2x + y + 1)dx + (x + 3y + 2)dy = 0
2. Find the solution of the following differential equations
19
dy x+2y−3
a. dx = x+3y−2
dy y−x+1
b. dx = y+x−5
2x+6y+3
c. x+3y−2 .
dy 2x−5y+3
d. dx = 2x+4y−6 .
LINEAR EQUATIONS
A first-order ordinary differential equation of the form,
dy
f (x) + h(x)y = g(x)
dx
is said to be a linear equation in the variable y.
Dividing both sides by f (x) we get the standard form of a linear ODE
dy
+ P (x)y = Q(x).
dx
dy
The differential equations of the form dx + P (x)y = Q(x) are known as
the Leibnitz equations. The functions P and Q should be constants or
functions of x.
They are solved by the method of Integrating Factor
Manipulations:
dy
dx + P (x)y = Q(x) is multiplied by a function R(x) called integrating
factor throughout to get integrable combination.
That is,
dy
R dx + RP (x)y = RQ(x) (1)
The left hand side of Equation (1) can be written as
d dy dR
dx (Ry) = R dx + y dx (2)
Equating Equation (2) and the LHS of Equation (1) to get
dy dy
R dx + y dR
dx = R dx + RP (x)y
dR
dx = RP (x)
Separating variables we have
dR
R = P (x)dx
Integrating
R dR R both sides we have
R = P (x)dx
20
R
ln |R| R= P (x)dx
R = e P (x)dx
The above expression is known as an integrating factor.
Thus
R
EquationR (1) becomes R
P (x)dx dy
e R dx + e R P (x)y = e P (x)dxQ(x)
P (x)dx
d P (x)dx
dx [e y] = e P (x)dxQ(x)
Integrating both sides
R
Z R
e P (x)dxy = e P (x)dxQ(x)dx + C,
Z Z
1
Ry = RQ(x)dx or y = QRdx.
R
Then we can continue with integrating the RHS.
Examples
dy
1. Solve x dx − 4y = x6ex.
Solution
21
dy
Standard form dx − x4 y = x5ex
From this form we identify P (x) = −4/x and Q(x) = x5ex .
The integrating factor
R −4
is
−4 x1 dx
R R
R=e P (x)dx
=e ( x )dx
=e = e−4 ln x = x−4
Thus, Rthe general solution is
Ry = Q(x)Rdx
That is R
−4 6 x −4
R x
x y = x e x = xe
Integration by parts, we have
yx−4 = xex − ex + C
or y = x5ex − x4ex + Cx4
dy
2. Solve dx + y = x, y(0) = 4.
Solution
P (x) = 1 and Q(x) = x R R
P (x)dx
Hence the integrating factor is R = e = e dx = ex
Thus, Rthe general solution is
Ry = Q(X)Rdx
That is,R
exy = xexdx = xex − ex + C,
or y = x − 1 + ce−x.
Substituting the initial conditions yields C = 5
∴ y = x − 1 + 5e−x
22
Tutorial Questions
Solve the following differential equations.
dy y
1. x dx + 1+x = 1 − x2
dy
2. dx − xy = x−y
x−2
dy
3. x( dx − y) = x − y
dy
4. dx + 2y = 6ex.
EQUATIONS REDUCIBLE TO LINEAR FORM
(BERNOULLI’S EQUATIONS)
A differential equation of the form
dy
+ P y = Qy n,
dx
where P and Q are functions of x or constants, and n is any constant except
0 and 1 is called a Bernoulli equation.
The Bernoulli’s equations are not linear but they can be reduced to lin-
ear as follows
Step 1: Leave Q(x) alone by multiplying y −n throughout, that is
dy
y −n
+ P y 1−n = Q. (1)
dx
Step 2: Let y 1−n = z and find its derivative with respect to x,
dy dz
(1 − n)y −n = .
dx dx
dy
Step 3: Make dx the subject to get
dy y n dz
= (2)
dx 1 − n dx
Step 4: Substitute z = y n−1 and equation (2) into equation (1) to get
dz
+ (1 − n)P z = (1 − n)Q,
dx
23
which is linear ode and can be solved easily.
Example
dy
Solve x dx + y = x2 y 2 .
Solution
Dividing by y 2 and then by x gives
dy
y −2 dx + x1 y −1 = x (1)
Let z = y −1, (2)
dz −2 dy
dx = −y dx
dy dz
⇒ dx = −y 2 dx , (3)
Substitute equation (2) and (3) into equation (1) to get
dz
− dx + x1 z = x
dz 1
dx − x z = −x This is a linear equation with P = −1/x and Q = −x and
continuous
R
on x > 0
R = e (−1/x)dx = e−1ln x = x−1
x−1 dxdz
− x12 z = −1
d −1
dx (x z) = −1 Integrating gives
x−1z = −x + c ≡ x−1y −1 = −x + c or y = −x21+cx
Questions
1. Solve the following equations
dy 1 dy
i. x +y = 2 ii. − y = ex y 2
dx y dx
2. Solve the following initial-value problems.
dy 1 dy
i. x2 − 2xy = 3y 4, y(1) = ii. y 1/2 + y 3/2 = 1, y(0) = 4
dx 2 dx
EXACT EQUATIONS
A differential expression M dx + N dy = 0 is an exact if f
∂M ∂N
∂y = ∂x
The functions M and N are functions of x and y. They are sometimes
written as M (x, y) and N (x, y).
24
The symbol ∂ denotes the partial derivative.
That is, ∂M∂y
(x,y)
means differentiating the terms of M with respect to y,
keeping x constant.
∂
For instance ∂y (x2y + 2y + x) = x2 + 2.
Z Z
M dx = 2xydx = x2y.
Z Z
N dy excluding terms with x, that is −1dy = −y.
25
M = 2xy cos x2 − 2xy + 1,
∂M
= 2x cos x2 − 2x, (1)
∂y
N = sin x2 − x2 + 3,
∂N
= 2x cos x2 − 2x, (2)
∂x
∂M ∂N
=⇒ = , hence exact.
∂y ∂x
Z Z
(2xy cos x2 − 2xy + 1)dx + 3dy = c,
Z Z Z Z
(2xy cos x2)dx − 2xydx + dx + 3dy = c,
Z
(2xy cos x2)dx − x2y + x + 3y = c,
R
Consider (2xy cos x2)dx.
Let u R= x2 ⇒ du dx = 2x ⇒ dx =
R 2x
du
du
2
R
thus, (2xy cos x )dx = 2y (x cos u) 2x = y (cos u)du = y sin u.
2
But
R u = x so that
(2xy cos x2)dx = y sin x2, thus
Z
(2xy cos x2)dx − x2y + x + 3y = c,
⇒ y sin x2 − x2y + x + 3y = c
2
dy
3. Solve dx = xy −cos x sin x
y(1−x2 )
, y(0) = 2
Solution
By writing the differential equation in the form
(cos x sin x − xy 2)dx + y(1 − x2)dy = 0, y(0) = 2
M (x, y) = cos x sin x − xy 2 and N (x, y) = y(1 − x2)
∂M ∂M
∂y = −2xy and ∂x = −2xy It is exact
The
R explicit solution2 is R
(cos x sin x − xy )dx + ydy = c
Upon integration, we get
26
2 2 2
sin2 x
2 − x 2y + y2 = c
Or
sin2 x + y 2(1 − x2) = d.
Substituting the initial condition, y = 2 when x = 0.
(sin 0)2 + 22(1 − 02) = d, d = 2
Required answer
y 2(1 − x2) + sin2 x = 2.
27
Bonus Questions
Solve the following odes
Tutorial Questions
dy 2
1. Solve dx + 3x +4xy
2
2x +2y
= 0.
2. Find the explicit solution for
(5x4 + 3(xy)2 − 2xy 3)dx + (2x3y − 3(xy)2 − 5y 4)dy = 0.
3. Test whether each of the following DE is exact. If exact, solve it.
i. (2xy 4 + sin y)dx + (4x2y 3 + xcos y)dy = 0.
ii. (1 + y 2sin 2x)dx − 2ycos2 xdy = 0.
4. Solve (3x2y − 2y)dx + (x3 − 4xy + 6y 2)dy = 0.
Integrating Factors
If M (x, y)dx + N (x, y)dy = 0 is not exact, we can make it exact by
multiplying an integrating factor µ(x, y).
µ(x, y)M (x, y)dx + µ(x, y)N (x, y)dy = 0 is an exact differential if and
only if (µM )y = (µN )x where the subscripts denote partial derivatives.
Using Product Rule of Differentiation we have
µMy + µy M = µNx + µxN,
µxN − µy M = µMy − µNx,
28
µxN − µy M = (My − Nx)µ
Although M, N, My , and Nx are known functions of x and y, the difficulty
here in determining the unknown µ(x, y) from the last equation that we
must solve a partial differential equation. Since we are not prepared to
do that, we make a simplifying assumption. Suppose µ is a function of
one variable; for example, say that µ depends only on x. In this case
µx = dµ/dx and µy = 0
Therefore we have
dµ My −Nx
dx = N µ
We are still at an impasse if the quotient (My − Nx)/N depends on both
x and y. After simplifying the quotient we remain with x alone.
dµ My −Nx
µ = NR dx
µ(x) = e (My −Nx)/N dx
In the same manner if the equation depends on y alone we have
dµ Nx −My
dy = MR µ
µ(y) = e (Nx−My )/M dy
Summary
The DE equation M (x, y)dx + N (x, y)dy = 0 will have
1. x alone if
∂M
∂y − ∂N
∂x
= g(x)
N
R
g(x)dx
is a function of x alone then µ = e is an integrating factor.
2. y alone if
∂M
∂y − ∂N
∂x
= h(y)
−M
R
is a function of y alone then µ = e h(y)dy is an integrating factor.
Methods of finding Integrating Factors of non-exact DEs
1. Under what conditions will the DE
M dx + N dy = 0
have an integrating factor (IF) that is a function of x alone?
Solution
Suppose µ = h(x) is an IF. Multiplying by h(x) the above DE becomes
h(x)M dx + h(x)N dy = 0
Since it is an exact equation thus we have
29
∂ ∂
∂y (h(x)M ) = ∂x (h(x)N ),
h(x) ∂M ∂ ∂N ∂
∂y + M ∂y h(x) = h(x) ∂x + N ∂x h(x),
h(x) ∂M∂y + M · 0 = h(x) ∂N
∂x + N h0(x),
h(x) ∂y − ∂x = N h0(x),
∂M ∂N
∂M − ∂N
∂y ∂x h0 (x)
N = h(x)
∂M − ∂N R
g(x)dx
Hence if ∂y N ∂x = g(x) is a function of x alone, then µ = e is an IF
of the given DE M dx + N dy = 0.
Example
Find an integrating factor for the following DE and hence solve it
(x + 3y 2)dx + 2xydy = 0
Solution
M = x + 3y 2, N = 2xy
∂M ∂N
∂y = 6y 6= 2y = ∂x
Hence the given DE is not exact.
∂M − ∂N
Now N = 6y−2y
∂y ∂x
2xy = x2 = g(x) is a function of x alone. Hence
R R
g(x)dx
µ=e = e 2/xdx = x2 is an integrating factor of the given DE.
Multiplying by x2, the given DE becomes an exact DE as we see below
(x3 + 3x2y 2)dx + 2x3ydy = 0
Integrating, we easily see that the solution is
x4
+ x3 y 2 = c
4
2. Under what conditions will the DE
M dx + N dy = 0
have an integrating factor (IF) that is a function of y alone?
Solution
Using similar technique as above
∂M − ∂N R
If −M = h(y), a function of y alone, then µ = e h(y)dy is an IF of the
∂y ∂x
given DE M dx + N dy = 0.
Example
Find an integrating factor for the following DE and hence solve it
exdx + (excot y + 2ycsc y)dy = 0
30
Solution
M = ex, N = excot y + 2ycsc y
∂M x ∂N
∂y = 0 6= e cot y = ∂x
Hence the given DE is not exact.
∂M − ∂N x
Now R −M = 0−e
∂y ∂x
R x
−e
cot y
= cot y = h(y) is a function of y alone. Hence
µ = e h(y)dy = e cot ydy = sin y is an integrating factor of the given DE.
Multiplying by sin y, the given DE becomes an exact DE as we see below
exsin ydx + (excos y + 2y)dy = 0
Integrating, we easily see that the solution is
exsin y + y 2 = c
3. Under what conditions will the DE
M dx + N dy = 0
have an integrating factor (IF) that is a function of the product z = xy?
Solution
Suppose µ = h(z) is an IF. Multiplying by h(z) the above DE becomes
h(z)M dx + h(z)N dy = 0
Since it an exact equation we have
∂ ∂
∂y (h(z)M ) = ∂x (h(z)N ),
h(z) ∂M ∂ ∂N ∂
∂y + M ∂y h(z) = h(z) ∂x + N ∂x h(z),
0 0
h(z) ∂M
∂y + M h (z) · x = h(z) ∂N
∂x + N h (z) · y,
h(z) ∂M ∂N
∂y − ∂x = h0(z)(N y − M x),
∂M − ∂N
∂y ∂x h0 (z)
N y−M x = h(z)
∂M − ∂N R
∂y ∂x g(z)dz
Hence if N y−M x= g(z) is a function of z = xy alone, then µ = e is
an IF of the given DE M dx + N dy = 0.
Example
Find an integrating factor for the following DE and hence solve it
ydx + (x − 2x2y 3)dy = 0
Solution
M = y, N = x − 2x2y 3
∂M 3 ∂N
∂y = 1 6
= 1 − 4xy = ∂x
Hence the given DE is not exact.
∂M − ∂N
∂y ∂x 1−(1−4xy 3 ) −2 −2
Now N y−M x = (xy−2x2 y 4 )−xy
= xy = z = g(z) is a function of z = xy
31
alone. RHence R
µ=e g(z)dz
= e −2/zdz = z12 = x21y2 is an integrating factor of the given
DE.
Multiplying by x21y2 , the given DE becomes an exact DE as we see below
1 1
2
x y
dx + ( xy 2
− 2y)dy = 0
Integrating, we easily see that the solution is
1
+ y2 = c
xy
4. Under what conditions will the DE
M dx + N dy = 0
have an integrating factor (IF) that is a function of the sum z = x + y?
Solution
Suppose µ = h(z) is an IF. Multiplying by h(z) the above DE becomes
h(z)M dx + h(z)N dy = 0
Since it an exact equation we have
∂ ∂
∂y (h(z)M ) = ∂x (h(z)N )
Since it is an exact DE we have
∂ ∂
∂y (h(z)M ) = ∂x (h(z)N ),
h(z) ∂M ∂ ∂N ∂
∂y + M ∂y h(z) = h(z) ∂x + N ∂x h(z),
h(z) ∂M
∂y + M h0(z) = h(z) ∂N
∂x + N h0(z),
h(z) ∂y − ∂x = h0(z)(N − M ),
∂M ∂N
∂M − ∂N
∂y ∂x h0 (z)
N −M =h(z)
∂M − ∂N R
Hence if ∂y
N −M = g(z) is a function of z = x + y alone, then µ = e g(z)dz
∂x
is an IF of the given DE M dx + N dy = 0.
Questions
1. Find an integrating factor for the following DE and hence solve it
i) (xy − 1)dx + (x2 − xy)dy = 0 ii) (2y 2 + 3x)dx + 2xydy = 0
2. Find an integrating factor of each of the following DE.
(i) (−xysin x+2ycos x)dx+2xcos xdy = 0 (ii) (x2+2xy−y 2)dx+(y 2+2xy−
SIMULTANEOUS DIFFERENTIAL EQUATIONS
System of two first-order equations
The simplest system of simultaneous differential equations contains two
32
equations of first order in three variables (one independent variable and
two dependent variables)
dy
= M,
dx
dz
= N,
dx
where M and N are functions of x, y, and z or in the form
dx dy dz
= = ,
P Q R
where P, Q, and R are functions of x, y, and z.
Any or all of the functions M, N, P, Q and R may actually contain less
than three variables; they may even be all constant.
Solving such a system above mean finding two relations, free derivatives,
which together involve the three variables and two arbitrary constants, and
which satisfy the equations.
Examples
dy dz
1. Solve dx = 1, dx = 2,
Solution
Here each of the two equations may be integrated immediately giving the
solution
y = x + c1,
z = 2x + c2.
dy
2. Solve dx
x = 2x2 = y+z .
dz
Solution
Comparing the first and second, and the first and third, we get
dy dz y+z
dx = 2x, dx = x
Integration of the first equation gives
y = x2 + c1,
Substituting y in the second equation and rearranging the term gives
dz z c1
dx − x = x + x
Solving this linear equation we get
z c1
x = x − x + c2
z = x2 + c2x − c1.
Questions
1. Find the equation of the cylinder formed by the straight lines which
33
dy dz
satisfy the equations dx = −1, dx = 3,
2 2
and pass through the circle y + x = 1, x = 0. Ans.
2 2
(y + x) + (z − 3x) = 1
dy
2. Find the particular solution of dx = xy + 1, dx
dz
= xy − 1,
through the point (1, 2, 3) and its direction at this point. Ans. y =
xln x + 2x, z = xln x + 3, [1, 3, 1]
3. Solve the following systems of differential equations.
(a). dy y
dt − x = 0,
dx t
dt − x = 0. Ans. x2 = t2 + c1, y = c2(x + t)
dx
(b). 1+y dy
= 1+x = dzz . Ans. (1 + y)2 = (1 + x)2 + c1, z = c2(x + y + 2)
Solving system of simultaneous ordinary differential equa-
tions using Eigenvalues Method
dy 0
Consider the system X 0 = AX where X 0 = [ dx dt dt ] and A is a square
,
matrix.
Suppose A is a matrix of order 2, the eigenvalues and eigenvectors are λ1
and λ2 and v1 and v2, respectively.
Hence the solution of the system is
x1(t) = c1eλ1tv1, x2(t) = c2eλ2tv2,
where c1 and c2 are arbitrary constants, and λ1 and λ2 real and distinct
roots.
By the Principle of Superposition the general solution is
Y (t) = c1eλ1tv1 + c2eλ2tv2.
For identical/repeated eigenvalues the solution is
x1(t) = c1eλ1tv1, x2(t) = teλ1tv1 + eλ1tw,
where w satisfies (A − λ1I)w = v1.
For complex eigenvalues the solution is
x1(t) = e(α+iβ)tv1, x2(t) = e(α−iβ)tv2,
where λ1 = α + iβ and λ2 = λ¯1 = α − iβ.
Examples 0 dy1
−3 1 y1 = dt = −3y1 + y2
1. Solve the linear system dY = Y or
dt 1 −3 y20 = dydt2 = y1 − 3y2.
Solution
−3 1
A=
1 −3
34
The eigenvalues andeigenvectors of matrixA are
1 1
λ1 = −2, v1 = and λ2 = −4, v2 = .
1 −1
1 1
∴ y1(t) = c1e−2t , y2(t) = c2e−4t
1 −1
1 1
Thus the general solution is Y (t) = c1e−2t + c2e−4t .
1 −1
−1 0
2. Consider the system dX dt = X
0 −4
Find the solution of the system and then find the particular solution that
2
satisfies the initial condition X(0) =
3
Solution
The eigenvalues andeigenvectors of matrixA are
1 0
λ1 = −1, v1 = and λ2 = −4, v2 = .
0 1
1 0
∴ X1(t) = c1e−t , X2(t) = c2e−4t
0 1
1 0
Thus the general solution is X(t) = c1e−t + c2e−4t .
0 1
X1(0) 2
X(0) = =
X2(0) 3
Substituting the initial condition we have
c1 + 0 = 2 and 0 + c2 = 3 thus c1 = 2 and c 2 = 3
1 0
Thus the particular solution is X(t) = 2e−t + 3e−4t .
0 1
Questions
1. Solve the following systems of ODEs.
dx 0
= 4x + 7y y1 = y1
i. dtdy ii.
dt = x − 2y
y20 = 2y2
2. Solve the following initial-value problems.
0
y1 = y2
i. 0 , y10 (0) = 0, y20 (0) = 2.
y2 = y1
0
y1 = 3y1 + 2y2
ii. 0 , y10 (0) = 0.5, y20 (0) = −0.5.
y2 = 2y1 + 3y2
35
3. Find a real general solution of the following system. Show the details.
y10 = 10y1 − 10y2 − 4y3
y20 = −10y1 + y2 − 14y3
y30 = −4y1 − 14y2 − 2y3
36