0% found this document useful (0 votes)
34 views57 pages

First Order Differential

The document discusses first order differential equations. It defines differential equations and classifies them by order and type. It also covers solutions of differential equations, verifying solutions, separation of variables, homogeneous functions, and worked examples of solving first order differential equations using separation of variables.

Uploaded by

shellodkoma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views57 pages

First Order Differential

The document discusses first order differential equations. It defines differential equations and classifies them by order and type. It also covers solutions of differential equations, verifying solutions, separation of variables, homogeneous functions, and worked examples of solving first order differential equations using separation of variables.

Uploaded by

shellodkoma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Differential Equations

Differential equations
First Order ODE

TUT Lecturer

Department of Mathematics, Sciences,


and Technology Education

01/07/2021

First Order Differential Equations


Differential Equations

Definition
A differential equation is an equation involving a function and
one or more of its derivatives. If the function has only one
independent variable the equation it is called an Ordinary
differential equation.

Definition
A differential equation involving a function of several variables
and its partial derivative is called a Partial differential
equation.
The order of the differential equation is determined by the
highest-order derivative in the equation.

First Order Differential Equations


Classification of Differential Equations

Differential equations are classified according to order and type.

Equation Type Order


d 2s
dt 2
=0 Ordinary 2
∂2u ∂2u
∂x 2
+ ∂y 2 = 0 Partial 2
y − sin y 0 = 0 Ordinary 1
y 0 − 2y = 0 Ordinary 1
y 000 − 27y = 0 Ordinary 3

First Order Differential Equations


Solution of Differential Equation

Definition
A function y = f (x) is called a solution of a differential
equation if the equation is satisfied when y and its derivatives
are replaced by f (x) and its derivatives. For example
y 0 + 2y = 0 has y = Ce−2x as its general solution.

First Order Differential Equations


Verifying Solutions

Determine whether or not the given functions are solutions to


the differential equation

y 00 − y = 0

(a) y = sin x
(b) y = e2x
(c) y = 4e−x
(d) y = Cex .

First Order Differential Equations


Verifying Solutions

Given that y 00 − y = 0 and for y = sin x we have that


y 0 = cos x, y 00 = − sin x. The substitution in the equation
yields that

y 00 − y = − sin x − sin x
= −2 sin x 6= 0

Thus y = sin x is not a solution of the equation. Test the rest of


the solutions.

First Order Differential Equations


Particular Solutions

A particular solution of a differential equation is any solution


that is obtained by assigning specific values to the constants in
the general solution. Particular solutions are obtained from the
initial conditions that give the value of the dependent variable
or one of its derivatives for a particular value of the independent
variable. For the differential equation

xy 0 − 3y = 0,

verify that
y = Cx 3
is its general solution and find the particular solution
determined by the initial condition y = 2 when x = −3.

First Order Differential Equations


Solution
For the differential equation

xy 0 − 3y = 0,

the substitution for

y = Cx 3 , y 0 = 3x 2

in the equation yields that

LHS = xy 0 − 3y
= x3Cx 2 − 3Cx 3
= 3Cx 3 − 3Cx 3
= 0 = RHS.

The substitution for the initial condition y = 2 when x = −3


2 2 3
yields that C = − 27 . The particular solution is thus y = − 27 x .
First Order Differential Equations
Separation of variables

We look at the procedure for solving a first order differential


equation of the form

dy
M(x, y ) + N(x, y ) = 0, (1)
dx
where M is a continuous function of x alone and N is a
continuous function of y alone. For this type of equation, all x
terms can be collected with dx and all y terms with dy , and the
solution can be obtained by integration. The equations are
said to be separable and the solution procedure is called
separation of variables.

First Order Differential Equations


Procedure

1 Express the equation in the differential form:

M(x, y )dx + N(x, y )dy = 0

or
M(x, y )dx = −N(y )dy
2 Integrate to obtain the general solution:
Z Z
M(x)dx + N(y )dy = C

First Order Differential Equations


Examples

Example
Find the general solution of (x 2 + 4) dy
dx = xy .

Example
Given the initial condition y (0) = 1, find the particular solution
2
to the equation xydx + e−x (y 2 − 1)dy = 0.

Example
Find the equation of the curve that passes through point (1, 3)
and has a slope xy2 at the point (x, y )

First Order Differential Equations


Solution to example 1
We apply separation of variables and collect all functions x and
dx as well as all functions y and dy together and integrate to
obtain the general solution. In the first example we have the
equation (x 2 + 4) dy
dx = xy . The solution is obtained thus

dy
(x 2 + 4) = xy
dx
dy x
= dx
y +4 x2
Z Z
dy x
= 2
dx
y x +4
1
ln y − ln(x 2 + 4) = C
2 p
∴ y = C x2 + 4

The general solution is y = C x 2 + 4.

First Order Differential Equations


Solution to example 2
In the second example we have the equation
2
xydx + e−x (y 2 − 1)dy = 0 subject to the initial condition
y (0) = 1. The initial conditions imply that we obtain a particular
solution.
2
xydx + e−x (y 2 − 1)dy = 0
2 y2 − 1
xex dx + dy = 0
y
Z Z Z
2 dy
xex dx + ydy − = 0
y
1 x2 1 2
e + y − ln y = C
2 2

2
The general solution is 21 ex + 12 y 2 − ln y = C. The substitution
of the initial condition in the general solution yields that C = 1.
2
Thus the particular solution is 12 ex + 21 y 2 − ln y = 1.
First Order Differential Equations
Solution to example 3
In the third example we have the equation dy y
dx = x 2 subject to
the initial condition y (1) = 3. The initial conditions imply that we
obtain a particular solution.

dy y
= 2
Z dx Zx
dy dx
=
y x2
1
ln y = − +C
x
1
y = Ce− x

1
The general solution is y = Ce− x . The substitution of the initial
condition in the general solution yields that C = 3e. Thus the
1
particular solution is y = 3e1− x .
First Order Differential Equations
Homogeneous Function

Definition
A function given by
z = f (x, y )
is said to be homogeneous of degree n if

f (tx, ty ) = t n f (x, y ) (2)

where n is a real number.

First Order Differential Equations


Examples of homogeneous functions

Example
Determine whether the functions
1 f (x; y ) = x 2 y − 4x 3 + 3xy 2
x
2 f (x; y ) = xe y + ysin( yx )
3 f (x; y ) = x + y 2
are homogeneous or not. If they are, what are their degrees?

First Order Differential Equations


Solution to example 1

In the first example we test the homogeneity of the function


f (x; y ) = x 2 y − 4x 3 + 3xy 2 The solution is obtained thus

f (tx; ty ) = (tx)2 ty − 4(tx)3 + 3(tx)(ty )2


= t 2 x 2 ty − 4t 3 x 3 + 3txt 2 y 2
= t 3 x 2 y − 4t 3 x 3 + 3t 3 xy 2
= t 3 (x 2 y − 4x 3 + 3xy 2 )
∴ f (tx; ty ) = t 3 (f (x; y ))

Thus the function f (x; y ) = x 2 y − 4x 3 + 3xy 2 is homogeneous


and its degree is 3.

First Order Differential Equations


Solution to example 2

In the second example we test the homogeneity of the function


x
f (x; y ) = xe y + ysin( yx ) The solution is obtained thus
tx ty
f (tx; ty ) = txe ty + tysin()
tx
x y
= txe y + tysin( )
x
x y
= t(xe + ysin( ))
y
x
∴ f (tx; ty ) = t(f (x; y ))
x
Thus f (x; y ) = xe y + ysin( yx ) is a homogeneous function of
degree 1.

First Order Differential Equations


Solution to example 3

In the third example we test the homogeneity of the function


f (x; y ) = x + y 2 The solution is obtained thus

f (tx; ty ) = tx + (ty )2
= tx + t 2 y 2
1
= t( x + y 2 )
t
∴ f (tx; ty ) 6= t(f (x; y ))

Thus f (x; y ) = x + y 2 is NOT a homogeneous function .

First Order Differential Equations


Homogeneous Differential Equations

Definition
A homogeneous differential equation is an equation of the form

M(x, y )dx + N(x, y )dy = 0 (3)

where M and N are homogeneous functions of the same


degree.

First Order Differential Equations


Change of variables for homogeneous equations.

If
M(x, y )dx + N(x, y )dy = 0
is homogeneous, then it can be transformed into a differential
equation whose variables are separable by the substitution

y = vx, (4)

where v is a differentiable function of x such that

dy = vdx + xdv (5)

First Order Differential Equations


Examples for homogeneous equations

Example
Find the general solution to the differential equation
1 (x 2 − y 2 )dx + 3xydy = 0.
2 In the preservation of food, cane sugar is broken down
(inverted) into two simpler sugars: glucose and fructose. In
dilute solutions, the inversion rate is proportional to the
concentration y (t) of unaltered sugar. If the concentration
1 1
is 50 when t = 0 and 200 after 3 hours, find the
concentration of unaltered sugar after 6 hours and after 12
hours.

First Order Differential Equations


Solution to example 1

In the first example both functions M(x, y ) and N(x, y ) are


homogeneous of the degree 2.The solution is obtained thus.
We apply change of variables y = vx and dy = vdx + xdv .

(x 2 − v 2 x 2 )dx + 3x 2 v (xdv + vdx) = 0


(x 2 − v 2 x 2 )dx + 3x 3 vdv + 3x 2 v 2 dx) = 0
(x 2 + 2v 2 x 2 )dx + 3x 3 vdv = 0
dx 3v
+ dv = 0
Z x Z 1 + 2v 2 Z
dx 3v
+ dv = 0
x 1 + 2v 2

First Order Differential Equations


Continuation of solution to example 1

3
ln x + ln(1 + 2v 2 ) = C
4
ln x 4 + ln(1 + 2v 2 )3 = C
y2
x 4 (1 + 2 2 )3 = C
x
∴ (x 2 + 2y 2 )3 = Cx 2

Thus the general solution is (x 2 + 2y 2 )3 = Cx 2 .

First Order Differential Equations


Solution to example 2
We let y (t) denote the concentration of unaltered sugar at time
t. In dilute solution we have that dydt(t) ≈ y (t). We thus have a
separable variable equation
dy (t)
= kdt
y (t)
where k is a constant of proportionality. Thus
dy (t)
= kdt
y (t)
Z Z
dy (t)
= kdt
y (t)
ln y (t) = kt + C
y (t) = ekt+C
y (t) = ekt eC
y (t) = Cekt

First Order Differential Equations


Continuation of solution to example 2

The general solution is given by y (t) = Cekt where C is a


1
constant. We substitute the initial conditions y (0) = 50 to get
1 1
C = 50 and y (3) = 200 to get k = − ln34 ≈ −0, 46209812. The
particular solution is thus

1 −0,46209812t
y (t) = e
50
The concentration unaltered sugar after 6 hours and after 12
hours respectively is given by

1 −0,46209812×6 1 −2,77258872
y (6) = e = e = 0.00125
50 50
1 −0,46209812×12 1 −5,54517744
y (12) = e = e = 0.000078125
50 50

First Order Differential Equations


Differential

Definition
If z = f (x, y ) and ∆x and ∆y are increments of x and y , then
the differentials of x and y are dx = ∆x and dy = ∆y and the
total differential of z is
∂z ∂z
dz = dx + dz = fx (x, y )dx + fy (x, y )dy
∂x ∂y

Example
Find the total differentials of
1 z = 2x sin y + 3x 2 y 2 .
2 w = x 2 + y 2 + z2

First Order Differential Equations


Solution to Differential

The total differential for z = 2x sin y + 3x 2 y 2 is given by

∂z ∂z
dz = dx + dy
∂x ∂y
dz = (2 sin x + 6xy 2 )dx + (2x cos y + 6x 2 y )dy

The total differential for w = x 2 + y 2 + z 2 is given by

∂w ∂w ∂w
dw = dx + dy + dz
∂x ∂y ∂z
dw = 2xdx + 2ydy + 2zdz

First Order Differential Equations


Exact First-Order Equation

The equation
M(x, y )dx + N(x, y )dy = 0
is an exact differential equation if there exists a function f of
two variable x and y having continuous partial derivatives such
that
∂f
= fx (x, y ) = M(x, y ) (6)
∂x
and
∂f
= fy (x, y ) = N(x, y ) (7)
∂y
The general solution to the equation is

f (x, y ) = C (8)

First Order Differential Equations


Test For Exactness

Let M and N have continuous partial derivatives on an open


disc R. The differential equation

M(x, y )dx + N(x, y )dy = 0

is exact if and only if


∂M ∂N
= (9)
∂y ∂x
Expressed differently

∂2f ∂2f
= (10)
∂y ∂x ∂x∂y

First Order Differential Equations


Exact First-Order Equation continued

Example
Test the exactness of the following differential equations:
(a) (xy 2 + x)dx + yx 2 dy = 0
(b) (2xy + 3x 2 )dx + (x 2 − 2y )dy = 0
(c) (y 2 + cos x − x sin x)dx + 2yxdy = 0
(d) ydx + 2xdy = 0

First Order Differential Equations


Testing the exactness of a differential equation

Example
We consider the differential equation given as

(xy 2 + x)dx + yx 2 dy = 0.

The functions M(x; y ) = xy 2 + x and N(x; y ) = x 2 y . We thus


have that
∂M ∂N
= 2xy and = 2xy .
∂y ∂x
This equation given as (xy 2 + x)dx + yx 2 dy = 0 is Exact
because
∂M ∂N
= 2xy =
∂y ∂x
Try the rest of the Exercises.

First Order Differential Equations


Integrating factor

If a differential equation

M(x, y )dx + N(x, y )dy = 0

is not exact, it may be possible to make it exact by multiplying


by an appropriate factor

u(x, y )

called the integrating factor.

First Order Differential Equations


Integrating factor continued

Consider the differential equation

M(x, y )dx + N(x, y )dy = 0

1
1 IfN(x,y ) [My (x, y ) − Nx (x, y )] = h(x) is a function of x
R
alone, then e h(x)dx is an integrating factor.
1
2 IfM(x,y ) [Nx (x, y ) − My (x, y )] = k (y ) is a function of y
R
alone, then e k (y )dy is an integrating factor.

First Order Differential Equations


Finding integrating factor

Example
Find the integrating factor in the following differential equations:
(a) 2ydx + xdy = 0
(b) ydx − xdy = 0
(c) (y 2 − x)dx + 2ydy = 0

First Order Differential Equations


Finding integrating factor

Example
We consider the differential equation given as

2ydx + xdy = 0

The functions M(x; y ) = 2y and N(x; y ) = x. We thus have that

∂M ∂N
= 2 and =1
∂y ∂x

. This equation given as 2ydx + xdy = 0 is NOT Exact because

∂M ∂N
6=
∂y ∂x

First Order Differential Equations


Finding integrating factor
Example
We use the expression

1
[My (x, y ) − Nx (x, y )] = h(x)
N(x, y )

and have that


2−1 1
=
x x
Thus the integrating factor is
1
R
dx
e x = x

The exact equation is found by multiplying 2ydx + xdy = 0 by x


that is 2xydx + x 2 dy = 0. It is important to note that the
integrating factor is not UNIQUE.
First Order Differential Equations
Solving an exact differential equation

If a differential equation

M(x, y )dx + N(x, y )dy = 0

is exact, the solution could be found by


1 Integrate both functions separately, M with respect to x and
N with respect to y and reconcile the two to obtain f (x, y )
2 Integrate M(x, y ) with respect to x to obtain f (x, y ) with the
constant as f (y ). Differentiate the f (x, y ) with respect to y
and reconcile this with N(x, y ) OR Integrate N(x, y ) with
respect to y to obtain f (x, y ) with the constant as f (x).
Differentiate the f (x, y ) with respect to x and reconcile this
with M(x, y )

First Order Differential Equations


Examples

Example
Determine the exactness of the following differential equations.
If exact, solve it. If not, make it exact and solve it.
(a) (xy 2 + x)dx + yx 2 dy = 0
(b) (2xy + 3x 2 )dx + (x 2 − 2y )dy = 0
(c) (y 2 + cos x − x sin x)dx + 2yxdy = 0
(d) ydx + 2xdy = 0

First Order Differential Equations


Solving an Exact differential equation
Example
We consider the differential equation given as

(xy 2 + x)dx + yx 2 dy = 0

which is EXACT. We integrate the two parts and reconcile.


Z
(xy 2 + x)dx = 12 x 2 y 2 + 21 x 2
R
M(x, y )dx =
Z
(xy 2 )dy = 12 x 2 y 2
R
N(x, y )dy =

When we reconcile, we obtain that representing each term


once in the solution gives that

1 2 2 1 2
f (x, y ) = x y + x +C
2 2

First Order Differential Equations


Solving an Exact differential equation

Example
Alternatively we integrate one function, say M(x, y ) with
respect to x, or N(x, y ) with respect to y and reconcile. Thus
integrating M(x, y ) we get
Z
(xy 2 + x)dx = 12 x 2 y 2 + 21 x 2 + g(y )
R
f (x, y ) = M(x, y )dx =

We differentiate f (x, y ) with respect to y , and reconcile with


d
N(x, y ). Thus dy f (x, y ) = 2xy + g 0 (y ).But N(x; y ) = 2xy , thus
g 0 (y ) = 0 making g(y ) = C. The general solution is

1 2 2 1 2
f (x, y ) = x y + x +C
2 2

First Order Differential Equations


First-order Linear ODE

A first-order linear differential equation is an equation of the


form
dy
+ P(x)y = Q(x) (11)
dx
where P and Q are continuous functions of x.
To solve a first-order linear differential equation, we use the
integrating factor u(x), to convert the left side into the derivative
of the product u(x)y . That is we need a factor u(x) such that

dy du(x)y
u(x) + u(x)P(x)y = (12)
dx dx

First Order Differential Equations


First-order ODE continued

By expanding the right side and using prime notation, we find


that
u(x)y 0 + u(x)P(x)y = u(x)y 0 + yu 0 (x)
u(x)P(x)y = yu 0 (x)
u 0 (x)
P(x) = u(x)

First Order Differential Equations


First-order Linear ODE continued

R
Integration with respect to x yields that u(x) = Ce P(x)dx . We
let C = 1 to avoid the most general integrating factor.An
integrating factor for the first-order linear differential equation

dy
+ P(x)y = Q(x)
dx
is R
P(x)dx
u(x) = e . (13)

First Order Differential Equations


First-order ODE continued

The solution of the differential equation is


R Z R
ye P(x)dx = Q(x)e P(x)dx dx + C (14)

which simplifies to
Z R R R
y = ( Q(x)e P(x)dx dx)e− P(x)dx + Ce− P(x)dx (15)

This can be interpreted as


Z
1
y= { Q(x)IFdx + C}
IF

Where I F represents the Integrating factor.

First Order Differential Equations


Examples

Example
Find the general solutions to the following first-order linear
differential equations:
(a) xy 0 − 2y = x 2
(b) y 0 − y tan t = 1
(c) xy 0 − y = x

First Order Differential Equations


Solution to example 1

We first express the equation in standard form.


The equation xy 0 − 2y = x 2 in standard form is y 0 − 2 yx = x.
The integrating factor for equation in standard form is
2 1
ln
R
e− x = e−2 ln x = e x 2 = x12 . We multiply each term in the
equation by x12 . We thus have

y0 y 1
2
−2 3 =
x x x
d y 1
2
=
Zdx x Zx
y 1
d 2 = dx
x x
y
= ln x + C
x2
The general solution is y = x 2 ln x + Cx 2 .

First Order Differential Equations


Bernoulli Equation

A Bernoulli differential equation is an equation of the form

dy
+ P(x)y = Q(x)y n (16)
dx
The equation is linear if n = 0, and has separable variables if
n = 1. To solve the Bernoulli equation, let z = y 1−n , and
multiply the whole equation by (1 − n) to

dz
+ (1 − n)P(x)z = (1 − n)Q(x) (17)
dx
which is linear.

First Order Differential Equations


General solution Bernoulli equations

The integrating factor is


R
(1−n)P(x)dx
u(x) = e .

The general solution is determined from


Z
1−n 1
y = { (1 − n)IFQ(x)dx + C}.
IF

Example
Find the general solutions to the following Bernoulli equations:
2
(a) y 0 + xy = xe−x y −3
(b) y 0 + 3x 2 y = x 2 y 3

First Order Differential Equations


Solution to example 1
2
For the equation y 0 + xy = xe−x y −3 we have n = −3 and
1 − n = 4. We divide the equation by y −3 and multiply each
2
term by 4. The new equation becomes 4y 0 y 3 + 4xy 4 = 4xe−x .
2
We let z = y 4 and the integrating factor is e2x . We multiply
2
each term in the equation by e2x . We thus have
2 2 2
4y 0 y 3 e2x + 4xy 4 e2x = 4xex
dz 2x 2 2 2
e + 4xy 4 e2x = 4xex
dx Z Z
2 2
dze2x = 4xex dx
2 2
ze2x = 2ex + C
2 2
z = 2e−x + Ce−2x
2 2
The general solution is y 4 = 2e−x + Ce−2x .

First Order Differential Equations


Application: Model on population growth

The expression for modeling population growth is

dP P
= kP(1 − )
dt M

where dPdt is the rate of population growth, k is the


proportionality constant, P stands for the population, and M is
P
the carrying capacity. If P is small compared to M, then M is
dP P
closer to 0, and dt ≈ kP. If P > M, then 1 − M is negative and
so dP
dt < 0, then the population decreases.

Example
dP P
Solve dt = 1.2P(1 − M)

First Order Differential Equations


Solution to example

The example dP P
dt = 1.2P(1 − M ) is a separable variable
problem. We thus have
Z Z
dP
P
= 1, 2dt
P(1 − M )
P
ln P − ln(1 − ) = 1, 2t + C
M
P
P
= Ce1,2t
1− M
PC 1,2t
P = Ce1,2t − e
M
Ce1,2t
P = C 1,2t
1+ M e

First Order Differential Equations


Model for electric current

The expression for electric current in a circuit where resistance


is 12Ω and the inductance is 4H with a battery giving a
constant voltage of 60V and switched on at t = 0 is

dI
4 + 12I = 60
dt
Determine I(t)

First Order Differential Equations


Newton’s law of cooling and heating

Newton’s law of cooling states that if an object is hotter than the


enveloping (ambient) temperature then the rate of cooling of
the object is proportional to the temperature difference.


= −k (θ − A)
dt
with θ(t0 ) = θ0 , where θ(t) is the object’s temperature, A is the
ambient temperature (constant) and k is a positive constant.
This is a first-order linear ODE

+ k (θ) = kA
dt
Find θ(t) for the given initial condition

First Order Differential Equations


Half- life

Definition
The half-life of a radioactive element is the time required for half
of the radioactive nuclei present in a sample to decay (i.e. for
the quantity to be reduced to half.) This is represented by the
equation
dy
= ky
dt
where y0 is the number of nuclei present initially, and y is the
number of nuclei present at time t.

Example
Find the half-life of plutonium-210 if the disintegration constant
is k = −4.95 × 10−3

First Order Differential Equations


Falling object under the action of gravity

An object with mass m is dropped from rest and assume that


air resistance is proportional to the speed of the object. If s(t) is
the distance dropped after t seconds, then the speed is v (t)
and the acceleration is v 0 (t). If g is the acceleration due to
gravity then the downward force of the object is mg − cv , where
c is a positive constant, Newton’s second law gives

dv
m = mg − cv .
dt
If v = 0, when t = 0,
mg tc
1 (a) Show that v = c (1 − e− m )
2 (b) Find the distance the object has fallen in t seconds.

First Order Differential Equations


References

Larson,R.,Hostetler,R.,Edwards,H.1994. Calculus with


Analytic Geometry.(5th ed) . Lexington,
Massachusetts.D.C.Heath.
Stewart,J. 1995. Calculus . Pacific Grove,
Carlifonia.Brooks/Cole.

First Order Differential Equations

You might also like