You are on page 1of 47

SSCE1793

DIFFERENTIAL EQUATIONS
CHAPTER 1

FIRST ORDER ORDINARY DIFFERENTIAL


EQUATIONS
LAST UPDATE: JANUARY 2019
TABLE OF CONTENTS

CONTENTS PAGE

1.1 Basic Definitions and Terminologies 3

1.2 Types of First Order ODEs and


Methods of Solution
1.2.1 Separable Equation 8
1.2.2 Homogenous Equation 13
1.2.3 Exact Differential Equation 18
1.2.4 Linear First Order Differential
26
Equations
1.2.5 The Bernoulli Equation 32

1.3 Applications of First ODEs


1.3.1 Newton’s Law of Cooling 35
1.3.2 Natural Growth and Decay 39
1.3.3 Electric Circuits Model 43
1.3.4 Vertical Motion – Newton’s 46
Second Law of Motion

2
1.1 BASIC DEFINITIONS AND TERMINOLOGIES

 Differential equation

A differential equation is any equation which contains derivatives, either


ordinary derivatives or partial derivatives.

 Ordinary Differential Equations (ODE)

 Contains one or more dependent variables


 with respect to one independent variable

Examples:

y is the dependent variable,


which depends on one
independent variable, x.

 Partial Differential Equations (PDE)

 involve one or more dependent variables


 and two or more independent variables

Examples:

u – dependent variable
x, y – independent variables

3
u – dependent variable
x, t – independent variables

u – dependent variable
x, y – independent variables

Can you determine which one is the DEPENDENT


VARIABLE and which one is the INDEPENDENT
VARIABLES from the following equations ???
∂w ∂w
+ =0=¿ w x + wt =0 Dependent Variable:
∂ x ∂t

Independent Variable:

∂2 u ∂2 u ∂u xy xy
2
+ + =e =¿ u xx +u xy +u y =e
∂x ∂ x ∂ y ∂ y

Dependent Variable:

Independent Variable:

 Order of Differential Equation

 Determined by the highest derivative

4
 Degree of Differential Equation

 Exponent of the highest derivative

More examples:

dy 2
a) ( )
dx
+ y=sin x Order : Degree:

∂2 u 2
b) ∂ t2
+u =cos t Order : Degree:

∂2 w ∂ w 2
c) ∂x 2
+( )
∂x
+ w=e
x
Order : Degree:

4
∂3 z ∂z 2
d) ( )( )
∂ y3
+
∂y
+ z=0 Order : Degree:

 Linear Differential Equations

 Dependent variables and their derivatives are of degree 1


 Each coefficient of the derivatives depends only on the
independent variable

5
Examples:

Linear
Nonlinear – because
dy
the derivative dx is
not of degree 1

Nonlinear – why?

Nonlinear – why?

 Nonlinear Differential Equations

 Other than linear differential equations

 Initial & Boundary Value

Initial conditions: will be given on specified given point


Boundary conditions: will be given on some points

6
Examples :

1) y ( 0 )=1 ; y ' (0)=2 Initial condition

2) y ( 1 )=5 ; y ( 2 ) =2 Boundary condition

 Initial Value Problems (IVP)

d2 y dy Initial Conditions:
2
+2 + y +sin x
dx dx

y ( 0 )=0; y ' ( 0 )=1

 Boundary Value Problems (BVP)

d2 y dy Boundary Conditions:
2
+2 + y +sin x
dx dx

y ( 0 )=1 ; y ( 1 )=2

1.2 FIRST ORDER ORDINARY DIFFERENTIAL


EQUATIONS (ODE)

7
Types of first order ODE
- Separable equation
- Homogenous equation
- Exact equation
- Linear equation
- Bernoulli Equation

1.2.1 SEPARABLE EQUATION

How to identify?

dy
Suppose f ( x , y )= dx =u ( x ) v ( y )

Hence this become a SEPARABLE EQUATION if it can be written


as

dy
=u ( x ) dx
v( y)

Method of Solution: integrate both sides of equation

1
∫ v ( y) dy=∫ u ( x ) dx

Before we proceed with the complete examples, let’s try to rewrite the
following functions into separable form:

8
9
Example 1:

Solve the initial value problem

dy y cos x
= , y ( 0 )=1
dx 1+2 y 2

Solution:

i) Separate the functions

ii) Integrate both sides

iii) Use the initial condition given, y ( 0 )=1

iv) Final answer ln y + y 2=sin x +1

Note: Some DE may not appear separable initially but


through appropriate substitutions, the DE can be
separable.
10
Example 2:

dy 2
Show that the differential equation dx =(x + y ) can be reduced to a separable equation
by using substitution z=x + y . Then obtain the solution for the original differential
equation.

Solutions:

i) Differentiate both sides of the substitution wrt x

ii) Substitute into the DE

iii) Write into separable form

iv) Integrate the separable equation

11
Questions from past year Test 1:

1.2.2 HOMOGENOUS EQUATION

How to identify?

dy
Suppose f ( x , y )= dx , f ( x , y ) is homogenous if

f ( λx , λy )=f ( x , y )

for every real value of λ

Method of Solutions:

i) Determine whether the equation homogenous or not


Solve the following differential equation.
dy dv
ii) Use substitution y=vx1 and
dy dx x=v + x in the original DE
dx
dx =
+y
e
x
iii) Separate the variable x and v Separable
iv) Integrate both sides equation
method
v) Use initial condition (if given) to find the constant value

12
Example 1:

Determine whether the DE is homogenous or not

a) dy x 2+ y 2
=
dx ( x− y ) (x+ y )

b) dy
x − y =x √ x2 + y 2
dx

Solutions:

a) dy x 2+ y2
f ( x , y )= =
dx ( x− y )(x + y )

f ( λx , λy )=¿

b) dy y
f ( x , y )= = + √ x2 + y 2
dx x

Example 2:

Solve the homogenous equation


13
( y 2 + xy ) dx−x 2 dy=0
Solutions:

Note:
Example 3: Non-homogenous can be reduced to a homogenous equation by
using the right substitution.

14
Find the solution for this non-homogenous equation
dy y −2 (1)
=
dx x + y−5
by using the following substitutions
x=X + 3 , y =Y +2 (2),(3)
Solutions:

15
Questions from past year Test 1

1.2.3 EXACT EQUATION

How to identify?

−M ( x , y)
Suppose f ( x , y )= N ( x , y ) ,

Therefore the first order DE is given by

dy −M ( x , y)
=
dx N (x , y )

¿> M
⏟ ( x , y ) dx + ⏟
N ( x , y ) dy=0
∂u ∂u
∂x ∂y

Condition for an exact equation.

∂M ∂ N
=
∂ y ∂x

Method of Solution (Method 1):

i) Write the DE in the form


M ( x , y ) dx+ N ( x , y ) dy=0
And test for the exactness

∂M ∂ N
=
∂ y ∂x 16

ii) If the DE is exact, then


iii) To determine ϕ ( y), differentiate (3) wrt y to get
∂u ∂
= [∫ M ( x , y ) dx ] +ϕ' ( y )=N
∂y ∂y

iv) Integrate ϕ ' ( y ) to get ϕ ( y )


v) Replace ϕ ( y) into (3). If there is any initial conditions given,
substitute the condition into the solution.
vi) Write down the solution in the form
u ( x , y )= A , where A is a constant

Method of Solution (Method 2):

i) Write the DE in the form


M ( x , y ) dx+ N ( x , y ) dy=0
And test for the exactness

∂M ∂ N
=
∂ y ∂x

ii) If the DE is exact, then


∂u ∂u
M=
∂x
,N=
∂y (1), (2)

iii) To find u(x , y) from M , integrate (1) wrt x to get

u ( x , y )=∫ M ( x , y ) dx+ ϕ1 ( y )
(3)

iv) To find u(x , y) from N , integrate (2) wrt y to get

u ( x , y )=∫ N ( x , y ) dy +ϕ 2(x )
(4)

v) Compare (3) and ( 4) to get value for ϕ 1( y) and ϕ 2(x ).


vii) Replace ϕ 1( y) into (3) OR ϕ 2(x ) into (4).
viii) If there are any initial conditions given, substitute the conditions
into the solution.
ix) Write down the solution in the form 17

, where A is a constant
Example 1:

Solve ( 2 xy+ 3 ) dx+ ( x2−1 ) dy=0

Solution (Method 1):

18
Exercise :

19
Try to solve Example 1 by using Method 2

Note:
Some non-exact equation can be turned into exact
equation by multiplying it with an integrating factor.

Example 2:

20
Show that ( xy + y 2 + y ) dx + ( x+ 2 y ) dy=0is not exact. Then, by multiplying both
sides with the integrating factor, μ ( x , y )=e x, solve the equation.

Solutions:

21
Questions from Past Year Test 1

22
1.2.4 LINEAR EQUATION

How to identify?
23
The general form of the first order linear DE is given by

dy
NOTE:

Must be +¿ here!!

24
Example 1:

Solve this first order DE

dy 1+ x ex
dx ( )
+
x
y=
x

Solution:

i) Determine p ( x) and q ( x )

ii) Find integrating factor, μ ( x )=e∫ p ( x ) dx

iii) Write down the equation

25
iv) Final answer

ex C
y= +
2 x x ex

Note:
Non-linear DE can be converted into linear DE by using
the right substitution.

Example 2:

Using z= y 2, convert the following non-linear DE into linear DE.

dy
x2 y −x y 2=1 ; y (1 ) =1
dx

Solve the linear equation.

Solutions:

dy
i) Differentiate z= y 2 to get dx and replace into the non-linear
equation.

26
ii) Change the equation into the general form of linear equation
& determine p ( x ) and q ( x )

iii) Find the integrating factor, μ ( x )=e∫


p ( x ) dx

27
iv) Find y

v) Use the initial condition given, y ( 1 )=1.

28
Questions from Past Year Test 1

29
1.2.5 BERNOULLI EQUATION

How to identify?

The general form of the Bernoulli equation is given by


dy (1)
+ b ( x ) y=c ( x ) y n
dx

wheren ≠ 0 , n≠ 1
To reduce the equation to a linear equation, use substitution

z= y 1−n (2)

Method of Solution :

i) Divide ( 1 ) with y n
dy (3)
y−n +b ( x ) y 1−n=c ( x )
dx

dy
ii) Differentiate ( 2 ) wrt x ( to get dx )

dz dy
=( 1−n ) y−n
dx dx

1 dz dy (4)
= y −n
( 1−n ) dx dx

iii) Replace ( 4 ) into ( 3 )


1 dz
+ b ( x ) z=c ( x )
( 1−n ) dx
dz
+ ( 1−n ) b ( x ) z=( 1−n ) c ( x )
dx ⏟ ⏟
p (x) q (x)

iv) Solve using the linear equation solution


 Find integrating factor, μ ( x )=e∫ p ( x ) dx
d
 Solve dx ( μ ( x ) z )=μ ( x ) q( x )

30
Example 1:

Solve
dy 1
+ y =e x y 4
dx 3
Solutions:

Questions from Past Year Final

31
32
1.3 APPLICATIONS OF THE FIRST ORDER ODE

1.3.1 The Newton’s Law of Cooling

The Newton’s Law of Cooling is given by the following equation


dT
=−k (T −T s )
dt
where Do you know
k is a constant of proportionality what type of
T s is the constant temperature of the surrounding DE is this?
medium

The general solution is given by:

33
Example 1:

According to Newton’s Law of cooling, the rate of change of the


temperature T satisfies

dT
=−k (T −T s )
dt

where T s is the ambient temperature, k is a constant and t is time in


minutes. When object is placed in room with temperature 10 °C, it was
found that the temperature of the object drops from 90 °C to 30 °C in 30
minutes. Then determine the temperature of an object after 20 minutes.

Solution:

i) Determine all the information given.


Room temperature =
When t=0 , T 0=¿
When t=30 , T 30=¿

Question: Temperature after 20 minutes, t=20 , T =?

ii) Find the solution for T ( t )

iii) Use the conditions given to find A and k


34
iv) t=20 , T =?

35
Exercise:

1. A pitcher of buttermilk initially at 25⁰C is to be cooled by setting it


on the front porch, where the temperature is 0 ℃ . Suppose that the
temperature of the buttermilk has dropped to 15 ℃ after 20 minutes.
When will it be at 5 ℃ ?

2. Just before midday the body of an apparent homicide victim is


found in a room that is kept at a constant temperature of 70⁰F. At
12 noon, the temperature of the body is 80⁰F and at 1pm it is 75⁰F.
Assume that the temperature of the body at the time of death was
98.6⁰F and that it has cooled in accord with Newton’s Law. What
was the time of death?

3. (Past Final)

4. (Past final)

36
1.3.2 Natural Growth and Decay

The differential equation


dx Do you know
=kx what type of
dt
where DE is this?
k is a constant
x is the size of population / number of dollars / amount of radioactive

The problems can be seen in the applications of:


1. Population Growth
2. Compound Interest
3. Radioactive Decay
4. Drug Elimination
5. Chemical reaction

Example 1:

A certain city had a population of 25000 in 1960 and a population of


30000 in 1970. Assume that its population will continue to grow
exponentially at a constant rate. What populations can its city planners
expect in the year 2000?

Solution:

1) Extract the information

2) Solve the DE
37
3) Use the initial & boundary conditions

Questions from Past Year Final


38
39
40
1.3.3 Electric Circuits - RC

Given that the DE for an RL-circuit is


dI
L + RI=E (t )
dt Do you know
where what type of DE
E(t ) is the voltage source is this?
L is the inductance
R is the resistance

CASE 1 : E ( t )=E0 (constant)


dI (1)
L + RI=E 0
dt

i) Write in the linear equation form

dI R E0
+ I=
dt L L

R E0
Hence, p (t)=
L
, q (t)=
L

ii) Find the integrating factor, μ (t)

∫ ( RL ) dt
μ ( t ) =e

Rt
¿e L

iii) Write down the equation as follows

Rt Rt
d L
dt
(
e I = eL ) ( ) ( EL ) 0

iv) Integrate the equation to find I

41
Rt Rt
( e I )=∫ ( e )( EL ) dt
L L 0

Rt

[ ]
−Rt
I=
1
Rt
( e )( EL )( RL )+ C = ER +C e
L 0 0 L

eL

CASE 2 : E ( t )=E0 sin wt or E ( t )=E0 cos wt

Consider E ( t )=E0 sin wt , the DE can be written as

dI
L + RI=E 0 sin wt
dt

i) Write into the linear equation form and determine p (t) and q ( t )

dI R E0
+ I = sin wt
dt L L

R E0
Hence, p (t)=
L
, q ( t ) = sin wt
L

ii) Find integrating factor, μ ( t )

∫ ( RL ) dt
μ ( t ) =e
Rt
L
¿e
iii) Write down the equation with the integrating factor

Rt Rt
E
d L
dt
( ) ( )
e I = e L 0 sin wt
L

iv) Integrate the equation to find I

42
Rt
E0
I=
1
( )(
e
Rt
L
L )∫ ( e ) sin wt dt
L
(1)

Use tabular method, or integration by parts to solve


Rt

∫ ( e ) sin wt dt . Then, substitute the results in (1) to obtain a


L

complete solution to I.

Example 1:

Two 9-volt batteries are connected to a series in which the inductance is


0.25 Henry and the resistance is 8 ohms. Determine the current, I(t) if the
initial current is zero. Then, determine I when t → ∞ (steady state).

Example 2:

Consider the circuit given in the figure with R=4, L=2, and V=cos 3t. Find
the current, I(t) .

Vertical Motion – Newton’s Second Law of Motion

The Newton’s Second Law of Motion is given by


43
dV
m =F
dt
Where
F is the external force
m is the mass of the body
v is the velocity of the body with the same direction with F
t is the time

Image from http://spiff.rit.edu/classes/phys311.old/lectures/freebody/freebody.html

Example 1:

44
A parachutist falling towards earth with velocity v. His acceleration is given
by
dv
 32  2v
dt .
Assume that the parachutist starts from rest (i.e at t  0, v(0)  0 ). Find the
velocity v = v(t) and the distance, x = x(t) that the parachutist has fallen
after t seconds.

Solution for v(t):

Solution for x(t):

Example 2:

45
A particle moves vertically under the force of gravity, g against air
resistance k v 2, where k is a constant. The movement of the particle is
govern by the differential equation
dv
=g−k v 2 .
dt

If the particle starts off from rest, show that the velocity of that particle at
any time t is given by:
λ ( e 2 λkt −1 )
v=
( e 2 λkt +1 )
g
such that λ= √ k
. Then, find the velocity as the time approaches infinity.

Solutions:

46
47

You might also like