First Order
First Order
Eegunjobi A S
Lecture note
F (x, y , y 0 ) = 0 (b)
or the form
y 0 = f (x, y ) (c)
An explicit form of a general solution contains one arbitrary
constant: y = y (x, C).
Quite often a general solution is implicit:
φ(x, y , C) = 0.
1
∴ y (x) = −
x −2
This solution, existing ”in the vicinity of the point (1, 1),” does
not exist for x = 2, and thus it cannot be extended into the
domain x > 2.
1
b. The function f (y ) = y 3 is not differentiable at y = 0;
therefore, the conditions of the Existence and Uniqueness
Theorem are not satisfied. To understand the consequences,
let us first rewrite the equation as
dx 1
= y−3 .
dy
3 2
x= y3 +c
2
To satisfy the initial condition, we must take C = 0. That gives
us two solutions for x > 0 :
2x 3 2x 3
2 2
y (x) = + and y (x) = −
3 3
Moreover, it is obvious that there exists one more solution, y(x)
= 0 for any x. We see that in this example, the violation of
the conditions of the Existence and Uniqueness Theorem
leads to nonuniqueness of the IVP solution. Note that in
both situations (a) and (b), the functions f(x,y) are nonlinear
with respect to y.
Exercises
y 0 = f (x, y )
dy
= g(x) (1)
dx
can be solved by integration. Solving equation (1), we have
Z
y = g(x)dx = H(x) + c
R
where H(x) = g(x)dx.
Example 1: Solve:
(a) y 0 = 1 + e2x .
(b) y 0 = sin x
Definition:
dy g(x)
= f (x, y ), where, f (x, y ) =
dx h(y )
dy
h(y ) = g(x). (2)
dx
If h(y ) = 1, we see that (2) reduces to (1). Suppose y = f (x)
denoting a solution of (2), we have
Note that dy 0 0
dx = f (x) which implies dy = f (x)dx substitute this
into (3), we have
Z Z
h(y )dy = g(x)dx + c. (4)
x2 2
(i) y 0 (x) = y (vii) y 0 = 3y 3 , y (2) = 0.
x2
(ii) y0 = y (1+x 3 )
. (viii) y 0 = cos(x − y − 1)
(iii) y0 = p y 2 sin x
(ix) (y 2 + xy 2 )dx + (x 2 −
(iv) xy 0 = p 1 − y2
x 2 y )dy = 0
(v) xydy = y 2 + 1dx
(vi) (x 2 − 1)y 0 + 2xy 2 = (x) (1 + y 2 )(e2x dx −
0, y (0) = 1 e−y dy ) − (1 + y )dy = 0
Outline
FIRST ORDER DIFFERENTIAL EQUATIONS
Homogeneous Equations
Solution of Homogeneous differential Equations
Differential Equations Reducible to homogeneous form
Linear Equation
Exact Equations
Steps for solving exact ODEs
Bernoulli Differential Equations
Method of solution
Riccati Differential Equations
Applications of first order ordinary differential equations
Higher order Differential Equations
Homogeneous Equations
(b)
q
3
f (x, y ) = x2 + y2
q
f (tx, ty ) = 3 (tx)2 + (ty )2
q
2
= t 3 3 x2 + y2
2
= t 3 f (x, y )
(c)
f (x, y ) = x 3 + y 3 + 1
f (tx, ty ) = (tx)3 + (ty )3 + 1
= t 3 (x 3 + y 3 ) + 1
6= t 3 f (x, y )
(d)
x
f (x, y ) = +4
2y
tx
f (tx, ty ) = +4
2ty
x
= t0 +4
2y
dv
v +x = Ψ(v )
dx
which implies
dv
= Ψ(v ) − v ,
x (12)
dx
Applying separation of variable
dv dx
=
Ψ(v ) − v x
y
Integrate and put v = x to get the final solution
Example
Solve
dy dy
y −x =y +x
dx dx
Solution:
The differential equation can be written as
dy
(y + x) =y −x
dx
dy y −x
= f (x, y ) =
dx y +x
ty − tx t(y − x) y −x
f (tx, ty ) = = = = f (x, y )
ty + tx t(y + x) y +x
It is homogenous, then let
y = vx
1 y 2 y
ln + 1 + tan−1 = − ln x + c
2 x x
1 2 1 y
ln y + x 2 − ln x 2 + tan−1 = − ln x + c
2 2 x
1 2 y
ln y + x 2 + tan−1 =c
2 x
Exercises
dy ax + by + c
= 0 (3.1)
dx a x + b0 y + c 0
dY aX + bY + (ah + bk + c)
= 0 (3.4)
dX a X + b0 Y + (a0 h + b0 k + c 0 )
h=k =1
Therefore
dY X + 2Y + (1 + 2 − 3) X + 2Y
= =
dX 2X + Y + (2 + 1 − 3) 2X + Y
where X = x − 1 and Y = y − 1.
Since this is homogeneous, then let Y = vX ,
dY dv
=v +X
dX dx
Therefore,
dv X + 2vX
v +X =
dx 2X + vX
2+v dX
dv =
1 − v2 X
2+v
Resolve 1−v 2
to partial fraction, we obtain
2+v 1 3
2
= +
1−v 2(1 + v ) 2(1 − v )
Therefore
Z Z Z
1 3 dX
dv + dv =
2(1 + v ) 2(1 − v ) X
1 3
ln(1 + v ) − ln(1 − v ) = ln X + C
2 2
1+v
ln = ln X 2 + 2C
(1 − v )3
1+v
ln = 2C
X 2 (1 − v )3
1+v
= A, where, A = e2C
X 2 (1 − v )3
1+v
= AX 2
(1 − v )3
Y y −1
Since Y = vX then v = X = x−1 we get
x + y − 2 = A(x − y )3
Example 2: Solve
dy x −y +3
= .
dx 2x − 2y + 5
dv v
1− =
dx 2(v − 3) + 5
2v − 1
dv = dx
v −1
1
2+ dv = dx
v −1
Z Z
1
2+ dv = dx
v −1
2v + ln(v − 1) = x + c
ln(v − 1) = x + c − 2v
v − 1 = ex+c−2v
x − y + 2 = Ae2y −x−6
where A = ec
Exercises:
dy
a(x) + b(x)y = g(x), (4.1)
dx
is said to be a linear equation in the variable y. The standard
form is
dy
+ P(x)y = f (x), (4.2)
dx
b(x) g(x)
where P(x) = a(x) and f (x) = a(x) .
Method of Solution
the left hand side of equation (4.2) can be remodelled by
multiplying it with µ(x) 6= 0.
Multiplying both sides of equation (4.2) by special function µ(x)
dy
µ(x) + µ(x)P(x)y , (4.3)
dx
Note that
d dy dµ(x)
µ(x)y = µ(x) +y , (4.4)
dx dx dx
Compare Eq.(4.3) and Eq.(4.4) i.e
dy dµ(x) dy
µ(x) +y = µ(x) + µ(x)P(x)y ,
dx dx dx
Hence
dµ(x)
= µ(x)P(x). (4.5)
dx
Solving Eq.(4.5), we have
dµ(x)
= P(x)dx
µ(x)
Z
ln µ(x) = P(x)dx + c
ln y = 3x + c,
y = αe3x ,
where α = ec
Example 2: Solve
dy
− 3y = 6
dx
dy
Solution Compare with dx + P(x)y = f (x), we see that
P(x) = −3, hence
R R
µ(x) = e P(x)dx
= e− 3dx
= e−3x
Therefore
dy
e−3x − 3e−3x y = 6e−3x
dx
d −3x
ye = 6e−3x
dx
d ye−3x = 6e−3x dx
Z Z
d ye−3x = 6e−3x dx
ye−3x = −2e−3x + c
y = −2 + ce3x
Example 3: Solve
dy
+ 2xy = x 3
dx
dy
Solution Compare with dx + P(x)y = f (x), we see that
P(x) = 2x, hence
2
R R
P(x)dx 2xdx
µ(x) = e =e = ex
dy 2 2 2
ex + 2xex y = x 3 ex
dx
d x2 2
ye = x 3 ex
dx
Z Z
x2 2
d ye = x 3 ex dx
Z
x2 2
ye = x 3 ex dx
evaluate
x 2 x2 1 x2
Z
2
x 3 ex dx = e − e +c
2 2
therefore
2 x 2 x2 1 x2
yex = e − e +c
2 2
x2 1 2
y= − + ce−x
2 2
Outline
FIRST ORDER DIFFERENTIAL EQUATIONS
Homogeneous Equations
Solution of Homogeneous differential Equations
Differential Equations Reducible to homogeneous form
Linear Equation
Exact Equations
Steps for solving exact ODEs
Bernoulli Differential Equations
Method of solution
Riccati Differential Equations
Applications of first order ordinary differential equations
Higher order Differential Equations
Exact Equations
Definition
A differential form
M(x, y )dx + N(x, y )dy
is said to be exact in a rectangle
R = {(x, y ) : a < x < b, c < y < d},
if there is a function f (x, y ) such that
∂f ∂f
(x, y ) = M(x, y ) and (x, y ) = N(x, y ),
∂x ∂y
for all (x, y ) in R. A differential equation
M(x, y )dx + N(x, y )dy = 0
is said to be exact if and only if
∂M(x, y ) ∂N(x, y )
=
∂y ∂x
Example: Is ordinary differential equation
Solution
compare 2xydx + (x 2 − 1)dy = 0 and
M(x, y )dx + N(x, y )dy = 0, we can see that
therefore
∂M(x, y ) ∂N(x, y )
= 2x, and, = 2x
∂y ∂x
hence
∂M(x, y ) ∂N(x, y )
= 2x =
∂y ∂x
The ODE is exact.
Example: Is ordinary differential equation
Solution
compare (6xy − y 3 )dx + (4y + 3x 2 − 3xy 2 )dy = 0 and
M(x, y )dx + N(x, y )dy = 0 , we can see that
therefore
∂M(x, y ) ∂N(x, y )
= 6x − 3y 2 , and, = 6x − 3y 2
∂y ∂x
hence
∂M(x, y ) ∂N(x, y )
= 6x − 3y 2 =
∂y ∂x
The ODE is exact.
Example: Is ordinary differential equation
Solution
compare ydx + 3xdy and M(x, y )dx + N(x, y )dy = 0, we can
see that
M(x, y ) = y , and, N(x, y ) = 3x
therefore
∂M(x, y ) ∂N(x, y )
= 1, and, =3
∂y ∂x
hence
∂M(x, y ) ∂N(x, y )
= 1 6= 3 =
∂y ∂x
The ODE is not exact.
Outline
FIRST ORDER DIFFERENTIAL EQUATIONS
Homogeneous Equations
Solution of Homogeneous differential Equations
Differential Equations Reducible to homogeneous form
Linear Equation
Exact Equations
Steps for solving exact ODEs
Bernoulli Differential Equations
Method of solution
Riccati Differential Equations
Applications of first order ordinary differential equations
Higher order Differential Equations
Steps for solving exact ODEs
Let F (x, y ) be the solution of the problem
Step 1: Write the DE into form
Z Z
F (x, y ) = M(x, y )dx+g(y ), or F (x, y ) = N(x, y )dy +h(x)
Step 3: Plug
F (x, y ) into appropriate Eq.(4.3.2) to obtain the constant of
integration as a fuction of other variable.
Step 4: write the solution.
Example: Solve
2xydx + (x 2 − 1)dy = 0
Solution
Since we have established that it is exact, then let F (x, y ) be
the solution.
∂F (x, y ) ∂F (x, y )
= 2xy , = x2 − 1
∂x ∂y
Z
F (x, y ) = 2xy dx = x 2 y + g(y )
∂F (x, y )
= x 2 + g 0 (y )
∂y
but
∂F (x, y )
= x2 − 1
∂y
therefore equate it to each other, we have
x 2 − 1 = x 2 + g 0 (y )
d(g(y )
g 0 (y ) = −1, = −1, g(y ) = −y + k
dy
F (x, y ) = x 2 y − y + k
Example: Solve
Solution
∂F (x, y ) ∂F (x, y )
= 2x − 1, = 3y + 7
∂x ∂y
∂F (x, y ) ∂F (x, y )
=0=
∂x ∂y
Z
F (x, y ) = (2x − 1)dx = x 2 − x + g(y )
∂F (x, y )
= g 0 (y )
∂y
but
∂F (x, y )
= 3y + 7
∂y
therefore equate it to each other, we have
g 0 (y ) = 3y + 7
dg(y ) 3 2
= 3y + 7, g(y ) = y + 7y + c
dy 2
3
F (x, y ) = x 2 − x + y 2 + 7y + c
2
Example: Solve
dy 3x 2 sin2 x
+ y =
dx 1 + x3 1 + x3
Solution
dy 3x 2 sin2 x dy
+ y = , compare with, + P(x)y = f (x)
dx 1 + x3 1 + x3 dx
3x 2 sin2 x
P(x) = , , f (x) =
1 + x3 1 + x3
This is not exact, therefore
3x 2
R
− dx 3)
R
P(x)dx
µ(x) = e =e 1+x 3 = eln(1+x = 1 + x3
2
dy 3x 2 3 sin x
(1 + x 3 ) + (1 + x 3 ) y = (1 + x )
dx 1 + x3 1 + x3
d
(1 + x 3 )y = sin2 x
dx
Z
3
(1 + x )y = sin2 xdx
Z
3
1
(1 + x )y = 1 − cos 2xdx
2
1 sin 2x
(1 + x 3 )y = x− +c
2 2
x sin 2x c
y= − +
2(1 + x ) 2(1 + x ) (1 + x 3 )
3 3
Exercises
y 0 + P(x)y = Q(x)
Step 1: Set
v = y 1−n
Step 2: Differentiate wrt x
dv dy
= (1 − n)y −n
dx dx
Step 3: Substitute step 1 and 2 into
Step 4: solve.
Example: Solve
dy x2
+ xy = y 2 e 2 sin x
dx
Solution
dy x2
+ xy = y 2 e 2 sin x
dx
Divide through by y 2 , we have
dy x2
y −2 + xy −1 = e 2 sin x
dx
let
v = y −1
dv dy
= −y −2 ,
dx dx
therefore
dy dv
= −y 2
dx dx
dv x2
y −2 − y 2 + xv = e 2 sin x
dx
dv x2
− xv = −e 2 sin x
dx
This is not exact, therefore P(x) = −x, hence
x2
R R
µ(x) = e P(x)dx
= e− xdx
= e− 2
dv x2
− xv = −e 2 sin x
dx
we have
x2 dv x2 x2 x2
e− 2 − xve− 2 = (e− 2 )(−e 2 ) sin x
dx
2 Z
− x2
ve =− sin xdx
2
Z
− x2
ve =− sin xdx = cos x + c
Z
1 − x2
e 2 =− sin xdx = cos x + c
y
x2
e− 2
y=
cos x + c
Example: Solve
dy
x + y = x 3y 6
dx
Solution
dy
x + y = x 3y 6
dx
Divide through by x, we have
dy y
+ = x 2y 6
dx x
Divide through by y 6 we get
dy y 1−6
y −6 + = x2
dx x
set
v = y −4
dv dy
= −5y −6
dx dx
dy y 6 dv
=−
dx 5 dx
substitute all these into
dy y −5
y −6 + = x2
dx x
we have
y 6 dv v
y −6 − + = x2
5 dx x
1 dv v
− + = x2
5 dx x
dv 5v
− = −5x 2
dx x
This is linear differential equation which is not exact, therefore
P(x) = − x5 and f (x) = −5x 2
R R 5 1
µ(x) = e P(x)dx
= e− x
dx
= e−5 ln x =
x5
1 dv 1 5v 1 2
− = − 5x
x 5 dx x5 x x5
d v 1
5
= 3
dx x x
Hence Z
v 1
5
= −5 dx
x x3
v 5
= +c
x5 2x 2
substitute the value of v we have
5 3 5
x y + cx 5 y 5 = 1
2
Exercises: Solve
(a) dy
dx + y
x = y .
2
(b) dy
dx + y
x = y x
2
(c) dy
dx = x 3 3
y − xy
(d) 6y 2dx − x(2x 3 + y )dy = 0
(e) 3(1 + x 2) dy 3
dx = 2xy (y − 1)
Outline
FIRST ORDER DIFFERENTIAL EQUATIONS
Homogeneous Equations
Solution of Homogeneous differential Equations
Differential Equations Reducible to homogeneous form
Linear Equation
Exact Equations
Steps for solving exact ODEs
Bernoulli Differential Equations
Method of solution
Riccati Differential Equations
Applications of first order ordinary differential equations
Higher order Differential Equations
Riccati Differential Equations
dy
= p(x)y 2 + q(x)y + r (x), (6.1)
dx
If r (x) = 0, it reduces to the Bernoulli’s differential equations.
z0
y 0 (x) = y10 (x) − 2
z
2 1 2y1 (x) 1
= p(x) y1 (x) + 2 + + q(x) y1 (x) + + r (x)
z z z(x)
after re-arranging, we have
therefore
0 = −z 0 + p(x) 2y1 (x)z + z 2 + q(x)z
z 0 = p(x)z 2 + z 2y1 (x)p(x) + q(x)
z 0 = p(x)z 2 + U(x)z,
dy
= (y − x)2 + 1
dx
Solution
This can be rewritten as
dy
= y 2 − 2xy + x 2 + 1
dx
which is Riccati. It is also clear that y1 (x) = x is a solution.
Method 1
1
y (x) = y1 (x) +
z(x)
1
=x+
z(x)
Thus,
dy z0
= 1 − 2.
dx z
Therefore
z0
2 2x 1 1
1− 2
= x + + 2
− 2x x + + x2 + 1
z z z z(x)
z 0 = −1
z(x) = −x + c
1
y (x) = x +
c−x
Method 2
Then,
dy dz
=1+ ,
dx dx
dz
1+ = x 2 + 2xz(x) + z 2 (x) − 2x x + z(x) + x 2 + 1
dx
dz
= z 2 (x)
dx
This is a Bernoulli type equation and it is also separable.
Re-write this we have
dz
= dx
z 2 (x)
Z Z
dz
= dx
z 2 (x)
1
− =x +c
z
which gives
1
z(x) =
c−x
1
y (x) − x =
c−x
1
y (x) = x +
c−x
Exercises: Solve
dy
(a) dx = 1 + 14 (x − y )2 , y1 (x) = x
dy 2
(b) dx + y2 = x2
, y1 (x) = xc , where c=constant
dy
(c) dx + 2xy = 1 + x + y 2 , y1 (x) = x
2
Outline
FIRST ORDER DIFFERENTIAL EQUATIONS
Homogeneous Equations
Solution of Homogeneous differential Equations
Differential Equations Reducible to homogeneous form
Linear Equation
Exact Equations
Steps for solving exact ODEs
Bernoulli Differential Equations
Method of solution
Riccati Differential Equations
Applications of first order ordinary differential equations
Higher order Differential Equations
Population Growth and Decay
dN(t)
= kN(t)
dt
where N(t) denotes population at time t and k is a constant of
proportionality, serves as a model for population growth and
decay of insects, animals and human population at certain
places and duration.
N(t) = Cekt ,
Solution
Let N(t) denote the population at time t. Let N0 denote the
initial population (population at t = 0).
N(t) = N0 ekt
N0 e6k = N(6) = 2N0 ⇐⇒ e6k = 2
ln 2
k=
6
Find t when
N(t) = 3N0 ⇐⇒ N0 ekt = 3N0
ln 3 6 ln 3
t= = = 9.5years
k ln 2
Radioactive Decay and Carbon Dating
dm
= −km
dt
where minus sign indicates that the mass is decreasing. It is a
separable equation. Separating the variables, integrating, and
adding a constant in the form ln c, we get i.e
dm
= −kdt =⇒ ln m = −kt + c =⇒ m = e−kt × ec
m
m = αe−kt where α = ec
To find α recall that m = 200 when t = 0. Putting these values
of m and t we have
Therefore
m = 200e−kt
The value of k is determined by substituting t = 2 and m = 150.
150 150
150 = 200e−2k =⇒ e−2k = =⇒ −2k = ln
200 200
−2k = −0.2877
0.2877
k= ≈ 0.14
2
∴ m = 200e−0.14t
The mass of the isotope remaining after t years is then given by
m = 200e−0.14t
ln(0.5)
th = = 4.95years
−0.14
Chemical Reactions
dS(t) mS nS
∝ M− N−
dt m+n m+n
This is the nonlinear differential equation for a second order
reaction
Chemical Mixtures
The rate R1 at which the salt enters the tank in kg/min is given
by
R1 = (n gal/min).(p kg) = n.p
The rate R2 at which salt is leaving is given by
n
R2 = (n gal/min).(P/m kg/gal) = Pkg/min
m
Then
dP(t) n
= R1 − R2 = n.p − P (∗)
dt m
The solution of (∗) will provide the amount of salt at any time t.
Example
A tank contains 300 litres of fluid in which 20 grams of salt is
dissolved. Brine containing 1 gm of salt per litre is then pumped
into the tank at a rate of 4L/min; the well-mixed solution is
pumped out at the same rate. Find the number N(t) of grams of
salt in the tank at time t.
Solution:
With information in this example we have
P(t) = N(t), n = 4, p = 1, m = 300
Therefore
dP(t) n dN(t) n
= n.p − P =⇒ = n.p − N
dt m dt m
dN(t) 4 N
= 4(1) − N =4−
dt 300 75
or
dN(t) N(t)
+ =4
dt 75
This is a linear differential of first order in P whose integrating
factor is R dt t
µ(t) = e 75 dt = e 75
tdN(t) t N(t) t
e 75 + e 75 = 4e 75
dt 75
d t
t
N(t)e 75 = 4e 75
dt
t
t
d N(t)e 75 = 4e 75 dt
Z Z
t t
d N(t)e 75 = 4e 75 dt
t t
N(t)e 75 = 300e 75 + c
t
N(t) = 300 + ce− 75
Since N(0) = 20 is given we have
T = 30 + ce−kt
Ti − T0 = 80 − 30 = ce0 =⇒ c = 50
∴ T = T0 + ce−kt = 30 + 50e−kt
when t = 12, T = 60 =⇒ 60 = 30 + 50e−12k
1 3
k = log
2 5
when t = 24,
1 3
− 12 ×24× log 5
T = 30 + 50e
= 48
(ii) Let T be the temperature of the body at time t. By
Newton’s Law of Cooling
dt
= −k (T − T0 ) =⇒ T − T0 = ce−kt
dt
Temperature of the surrounding medium T0 = 15
T = 15 + ce−kt
Initial temperature t = 0
when t = 1, T = 60 =⇒ 60 = 15 + 90e−k
1
e−k =
2
when T = 37.5
37.5 = 15 + 90e−kt
1 t
=⇒ 15 + 90 =⇒ t = 2
2
Additional time required = 2 hr - 1 hr = 1 hr.
Logistic Equation
dP(t)
= P(t)(a − bP(t))
dt
where a and b are constants.
Using variable saparable, we have
dP(t)
= dt
P(t)(a − bP(t))
Decompose
dP(t)
P(t)(a − bP(t))
into partial fraction, we obtained
!
1 b
a a
+ dP(t) = dt
P(t) a − bP(t)
1 1
ln P(t) − ln(a − bP(t)) = t + c
a a
P(t)
ln = at + ac
a − bP(t)
P(t)
= αeat , where α = eac
a − bP(t)
aαeat aα
P(t) = =
1 + bαe at bα + e−at
If P(0) = P0 , P0 6= a/b, we find
P0
α= ,
a − bP0
aP0
P(t) = .
bP0 + (a − bP0 )e−at
Example
dP(t)
= P(t)k (1000 − P(t)), P(0) = 1
dt
By making the identifications a = 1000k and b = k , we have
immediately our logistic equation that
1000k 1000
P(t) = −1000kt
= .
k + 999ke 1 + 999e−1000kt
Now, using the information P(4) = 50,, we determine k from
1000
50 =
1 + 999e−4000k
k = −0.0009906
Thus
1000
P(t) = .
1 + 999e−0.9906t
Lastly,
1000
P(6) = = 276students.
1 + 999e−5.9436
Exercises