Professional Documents
Culture Documents
Math 350 Notes 2
Math 350 Notes 2
Contents
First Order D.E. 2
Separable Equations 2
Bernoulli Equations 12
1
First Order D.E.
The method of obtaining the solution of a D.E. depends on the type of D.E. We proceed by considering a first
order D.E. The standard form of a first order D.E. is given as:
dy
= f (x, y)
dx
Separable Equations
A first order D.E. which can be written in the form
dy
= f (x)g(y) (1)
dx
where f (x) and g(y) are given functions is called a separable equation. i.e. a separable equation is a first order
dy
DE in which the expression for dx can be factored as a function of x times a function of y; f (x)g(y)
The following equations are examples of separable equations:
dy
1. = 2xy 2
dx
dy
2. y −1 = (x + 1)−1
dx
dy
3. (3y 2 + ey ) = cosx
dx
From equation 1, we have, for separable equation,
1 dy
= f (x)
g(y) dx
Examples
Solution
rhs can be written in separable form.
Comparing with equation 1,
2 Chisara P. Ogbogbo
1
f (x) = 2+x and g(y) = 1 + y
Separating the variables, we have
1 dy 1
=
1 + y dx 2+x
Integrating, we have
Z Z
dy dx
=
1+y 2+x
Hence, ln (1 + y) = ln (2 + x) + C
= ln (2 + x) + ln A where C = ln A is a constant
ln (1 + y) = ln A(2 + x)
1 + y = A(2 + x)
y = A(2 + x) − 1, where A is an arbitrary constant
q(y)dy = h(x)dx
Q(y) = H(x) + c
3 Chisara P. Ogbogbo
Example N1
dy
= dx
y(y + 2)
dy
There are values of y for which g(y) = 0: y = 0 and y = −2. These are also solutions. For y = 0, dx =0
dy
Also, for y = −2, dx =0
Now,
Z Z
dy
= dx + c
y(y + 2)
So,
Z Z
1 1 1
− dy = dx + c
2 y y+2
1
[ln|y| − ln|y + 2|] = x + c
2
1 y
ln =x+c
2 y+2
y
ln = 2x + 2c
y+2
y
ln = 2x + c1
y+2
y = 0, y = −2
4 Chisara P. Ogbogbo
Example N2
Solution
Z Z
2x du
dx = = ln|u| = ln(x2 + 4)
x2 + 4 u
We now have
ln|y| = ln(x2 + 4) + c
let c = lnc1 , c1 > 0
ln|y| = ln(x2 + 4) + lnc1
ln|y| = ln(c1 (x2 + 4)) ⇒ y = c1 [x2 + 4]
If a body cools in a surrounding medium, it might be expected that the rate of change of the temperature
of the body would depend on the difference between the temperature of the body and that of the surrounding
medium.
Newton’s law of cooling asserts that the rate of change is directly proportional to the difference of the tem-
perature. Thus, if u(t) is the temperature of the body at a time, t, and u0 is the constant temperature of the
surrounding medium, then
du
= −k(u(t) − u0 ), where k is a positive constant (3)
dt
The negative sign at rhs of equation 3 occurs because du
dt will be negative when u > u0 , that is, when the body
is expected to cool down from high temperature to that of the surrounding environment.
Example N3
5 Chisara P. Ogbogbo
This equation is separable as
dy
= k ; Integrating, we have
y
Z Z
dy
= k dt
y
ln|y| = kt + c
taking exponential on both sides, we have
|y| = ekt+c = ec ekt
y = Cekt , putting ec as one constant C
Example N4
Class to solve
dy
(x + 1) = 2y
dx
Example N5
dy
−y
= 2dx ⇒ ey dy = 2dx
Z e Z
So, ey dy = 2 dx
⇒ ey = 2x + c
taking log on both sides, y = ln|2x + c|
Example N6
dy x2 + 6x + 3
=
dx y2
Solution
Z Z
y 2 dy = (x2 + 6x + 3) dx
y3 x3
= + 3x2 + 3x + c
3 3
y 3 = x3 + 9x2 + 9x + 3c
p
3
∴ y = x3 + 9x2 + 9x + 3c
6 Chisara P. Ogbogbo
Example N7
y2 + 4 4 + y2
dy 1
= =
dx 2xy 2y x
Z Z
2y 1
So, 2
dy = dx
4+y x
Integral on the lhs can be obtained using technique of substitution
Z
2y
dy ; let u = y 2 + 4
+4 y2
du = 2ydy
Z Z
2y du
Hence, dy = = ln|u| = ln |y 2 + 4|
y2 + 4 u
∴ ln |y 2 + 4| = lnx + c = lnx + lnc
Example N8
Solution
Z Z
dy
= (x3 + 1) dx
y2
Z Z
−2
y dy = (x3 + 1) dx
x4
−y −1 = +x+c
4
4
1 x
− = +x+c
y 4
1 x4 + 4x + 4c
− =
y 4
Applying the initial condition y(2) = 1,
1 24
−= +2+c
1 4
⇒ −1 = 4 + 2 + c
6 + c = −1
c = −7
4
∴ y=−
x4 + 4x − 28
7 Chisara P. Ogbogbo
Example
Suppose that an object is heated to 300o F and allowed to cool to a room temperature of 80o F . If after
10 minutes, the temperature is 250o F , what will its temperature be after 20 minutes?
Solution
From equation 3,
du
= −k(u − 80) (4)
dt
and the initial conditions are u(0) = 300 and u(10) = 250
Equation 4 is linear and separable. To determine the constant k, we have
Z 250 Z 10
du
= −k dt (5)
300 u − 80 0
Z 300 Z 10
du
− = −k dt
250 u − 80 0
300 10
ln |u − 80| = kt
250 0
ln |300 − 80| − ln|250 − 80| = 10k
ln |220| − ln |170| = 10k
220
ln = 10k
170
1 220
∴ k= ln
10 170
= 0.0258
To determine the temperature u(t) of the body when t = 20, we use either equation 4 or equation 5 to write
Z u Z 20
du
= −k dt
300 u − 80 0
8 Chisara P. Ogbogbo
Solving Linear Equations Using Integrating Factor (I.F)
A first order linear equation is an equation that can be put in the form
dy
+ P (x)y = Q(x)
dx
P and Q are constants or continuous functions of x on the interval. Without going into details of how the IF
is derived, we will define it and give an expression for it. An example of this type is the following:
xy ′ + y = 5x (6)
d
IF × lhs = (IF.y)′ = (IF.y)
dx
R
P (x)dx
For IF given as e , we demonstrate taking derivative of IF.y
d R P (x)dx d R P (x)dx dy R P (x)dx
(e .y) = e .y + e
dx dx dx
R dy R P (x)dx
= ye P (x)dx .P (x) + e
dx
R dy
= e P (x)dx yP (x) +
dx
d R P (x)dx R
e y = e P (x)dx Q(x) (9)
dx
But Q(x) = lhs R
d P (x)dx
So we started with dx (IF y) and ended up with e × (lhs) as expected
9 Chisara P. Ogbogbo
Integrating Equation 9, we have
Z Z
d R P (x)dx R
P (x)dx
e y= e Q(x)dx + c
dx
R
Z R
P (x)dx P (x)dx
ye = e Q(x)dx + c
R
P (x)dx
R
e Q(x)dx +c
∴y= R
e (x)dx
P
Z
R R
− P (x)dx P (x)dx
y=e e Q(x)dx + c
Examples
(a) Solve
y ′ + 2xy = 1
2
R R
P (x) dx 2x dx
∴ IF = e =e = ex
2
Then, by ex , we get
2 2 2
y ′ ex + 2xyex = ex
2 2
such that (ex y)′ = ex
Integrating on both sides, we have
Z
x2 2
e y = ex dx + c
Z
1 2 2
y = x2 ex dx + ce−x
e
Z
2 2 2
y = e−x ex dx + ce−x
x2 y ′ + xy = 1 x>0 y(1) = 2
10 Chisara P. Ogbogbo
Solution
Given, y(1) = 2
ln 1 + c 0+c
2= = =2
1 1
c=2
Therefore, the solution of the I.V. problem is
lnx + 2
y=
x
(c) Solve the D.E.
dy
(x + 1) − 3y = (x + 1)5
dx
Solution
x2
Z
y(x + 1)−3 = (x + 1) dx + c = +x+c
2
2
3 x
∴ y = (x + 1) +x+c
2
11 Chisara P. Ogbogbo
Class to solve
Solution
Z
ysecx = secxsecx dx + c
Z
ysecx = sec2 x dx + c
ysecx = tanx + c
tanx c
∴y= +
secx secx
y = sinx + c cosx
Bernoulli Equations
A differential equation which can be written in the form
dy
+ P (x)y = Q(x)y n
dx
(where P (x) and Q(x) are constants or functions of x alone and n is an integer not equal to zero or 1) is called
a Bernoulli Equation.
To solve this equation, we transform it into a linear DE and solve using IF . Then, we recover original variables
by substitution.
1. We divide the given equation by y n
dy
y −n + P (x)y 1−n = Q(x) (i)
dx
z = y 1−n (ii)
12 Chisara P. Ogbogbo
dz dy
∴ = (1 − n)y −n
dx dx
dy dz 1
y −n = . (iii)
dx dx (1 − n)
Substitute iii in i to obtain an equation in z
1 dz
+ P (x)z = Q(x) (iv)
(1 − n) dx
dz
+ (1 − n)P (x)z = (1 − n)Q(x) (v)
dx
We can now solve Equation v as a linear D.E. to obtain z. Then we use Equation ii to obtain y.
Example 1
dy
+ y = xy 3
dx
Solution
dz dy
= −2y −3
dx dx
dy 1 dz
⇒ y −3 =−
dx 2 dx
dy
Substituting for y −3 dx in Equation ∗ we have
1 dz
− +z =x
2 dx
In standard linear form (multiply through by -2) we have
dz
− 2z = −2x (∗∗)
dx
From Equation ∗∗
13 Chisara P. Ogbogbo
Solving the linear D.E., we have
Z Z
−2x −2x
ze = e (−2x) = −2 e−2x xdx + c
1 −2x
ze−2x = e (2x + 1) + c
2
1
z = x + + ce2x (c is an arbitrary constant)
2
1
But z = y −2 = 2
y
1 1
∴ 2 = x + + ce2x
y 2
Example 2
dy
x + y = xy 3
dx
Divide through by x to get
dy y
+ = y3
dx x
1 dy 1
+ y −2 = 1 (∗ ∗ ∗)
y 3 dx x
14 Chisara P. Ogbogbo
Z Z Z
1 R
P (x)dx 1 1
z= e Q(x) + C = (−2) = −2 dx + C
x2 x2 x2
−1
1 x 2
2
z = −2 +C = +C
x −1 x
(Multiply through by x2 )
z = 2x + Cx2
1 1
But z = 2 ; y 2 =
y z
1
y2 =
2x + Cx2
Example 3
dy 1
+ y = ex y 4
dx 3
The equation is of the form
dy
+ P (x)y = Q(x)y n
dx
n = 4, p(x) = 31 , q(x) = ex
e−x z = −3x + c
−3x c
∴ z= + −x = −3xex + cex
e−x e
z = ex (c − 3x)
1 1
But z = 3 ⇒ 3 = ex (c − 3x)
y y
1
y3 = x
e (c − 3x)
15 Chisara P. Ogbogbo
Exercise
1.
dy 1
− y = xy 2
dx x
2.
dy y
+ = y2
dx x
3.
dy
5x + y = xy 3
dx
4.
dy 1
+ y = ex y 4
dx 3
5.
dy 2
+ y = −x2 (cosx)y 2
dx x
6.
dy (4x + 5)2 3
2 + ytanx = y
dx cosx
7.
dy
x + y = y 2 x2 lnx
dx
8.
dy
= ycotx + y 3 cosecx
dx
16 Chisara P. Ogbogbo