Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

First-order Ordinary Differential Equations (Part ii)

CHAPTER 1 (Part ii)


FIRST-ORDER
ORDINARY DIFFERENTIAL EQUATIONS
This Part ii notes will cover the qualitative analysis (i.e. direction
field), existence and uniqueness theorem as well as some mathematical model
involving first-order ordinary differential equations and autonomous equation.
Besides, one of the numerical methods for solving first-order ordinary
differential equations will also be discussed at the end of this writing.

1.6 Direction Field

Besides solving the first-order ordinary differential equations


analytically by using the methods of solutions such as separation of variable,
method of integrating factor (for linear equation) etc., we could also know the
behaviour of the solution by using qualitative analysis, namely by plotting
the direction field for the differential equations.

Definition
Direction Field

Direction field, also known as slope field, is a graphical way to visualize


qualitatively the solutions to the differential equations.

The following example will illustrate the basic idea about sketching direction
fields.

Example 1.18 …………………………………………………………..…..…


dy
For the differential equation = 2.4 − 0.2 y ,
dt
(a) construct a table to list down the values of y′ for y = 0(2)20.
(b) sketch the estimated slopes from Part (a).
Solution:
(a) y 0 2 4 6 8 10 12 14 16 18 20
y′ 2.4 2 1.6 1.2 0.8 0.4 0 -0.4 -0.8 -1.2 -1.6

y'
(b) 20 Note that the values of y′ do not
depend on t.

12
10

0 t
………………………..........................................................................................

1
First-order Ordinary Differential Equations (Part ii)

The arrows in the direction field give tangent lines to solution curves, and
indicate where solution is increasing or decreasing (as well as how much the
increment). The horizontal solution curves are called equilibrium solutions.

Definition
Equilibrium Solutions

In general, for a first-order ordinary differential equation of the form


dy
= ay − b ,
dt
dy
the equilibrium solutions can be found by setting = 0 and solve for y, that
dt
b
is y (t ) = .
a

For the differential equation as simple as in Ex. 1.18 above, it is still


possible for us to sketch its direction field. For other differential equations,
especially when its slope y′ are depend on independent variable (i.e. t or x),
the mathematical software such as Maple can be used to plot its direction field.
Sample Maple commands in classical worksheet are presented in the following
example.

Example 1.19 …………………………………..…………………………..…


dy
Given the differential equation = 2.4 − 0.2 y .
dt
(a) By using Maple, plot the direction fields by using an appropriate window.
(b) Based on the direction field, determine the behaviour of y as t → ∞ .
(c) Describe the dependency of its solution on the initial value of y at t = 0.
Solution:
(a) with(DEtools);
DEplot(diff(y(t),t)=2.4-
0.2*y(t), y(t), t=0..10,
y=0..20, color=black);

dy
(b) Note that by setting =0,
dt
2.4 − 0.2 y = 0
y = 12
As can be seen from the direction field, the equilibrium solution appears
to be y(t) = 12 as t → ∞ , to which all other solutions converge.

(c)
For y > 12, the slopes are negative and hence the solutions decrease;
For y < 12, the slopes are positive and hence the solutions increase.
…………………………………………………....……Try Question 1, Exercise 1G

2
First-order Ordinary Differential Equations (Part ii)

Example 1.20 ………………………………………………..……………..…


dy
Given the differential equation = 2.4 − 0.2 y .
dt
(a) Find the general solution of the differential equation.
(b) Find the specific solution for (i) y(0) = 0, (ii) y(0) = 12.
(c) By using Maple, plot the solution curves for initial conditions, y(0) = 0,
5, 12, 15 and 20.
Solution:
(a) By using method of integrating factor for linear differential equation,
dy
+ 0.2 y = 2.4
dt
Step 1: p (t ) = 0.2 , q (t ) = 2.4
Step 2: Integrating factor, I = e ∫
0.2 dt
= e 0.2t
Step 3: Use formula y ⋅ I = ∫ q (t ) ⋅ I dt
y ⋅ e0.2t = ∫ 2.4e 0.2t dt
y ⋅ e0.2t = 12e 0.2t + C
∴ y = 12 + Ce − 0.2t
Note: We can also solve this differential equation by using the method
of separation variables.

(b) (i) Given y(0) = 0, 0 = 12 + Ce − 0.2( 0 ) => C = −12


∴ the specific solution is y = 12 − 12e − 0.2t .
(ii) Given y(0) = 12, 12 = 12 + Ce − 0.2( 0) => C = 0
∴ the specific solution is y = 12 .

(c) DEplot(diff(y(t),t)=2.4-
0.2*y(t), y(t), t=0..10,
y=0..20, [[y(0)=0],
[y(0)=5],[y(0)=12],[y(0)=15
],[y(0)=20]],linecolor=blue
, color=black);

Note: The lowest solution curve in the


figure beside is the specific solution for
y(0) = 0, i.e. y = 12 − 12e − 0.2t ; The only
one horizontal solution curve is the specific solution for y(0) = 12, i.e.
y = 12 . In other words, if we did not solve the differential equation
analytically, we could also obtain its specific solution (in graphical form)
by plotting its direction field and solution curve.
…………………………………………………....……Try Question 3, Exercise 1G

Example 1.21 ……………………………………………………………....…


dy
Write down a differential equation of the form = ay + b , a and b are real
dt
numbers, whose solutions have the required behaviour as t → ∞.

3
First-order Ordinary Differential Equations (Part ii)

(a) All solutions approach y = 23 .


(b) All other solutions diverge from y = 2.
Solution:
(a) For all solutions to approach the equilibrium solution y = 23 , we must
have y′ < 0 for y > 23 , and y′ > 0 for y < 23 .
∴ the differential equation is given by y′ = 2 − 3 y .

(b) For solutions other than y = 2 to diverge from y = 2 , y (t ) must be an


increasing function for y > 2 , and a decreasing function for y < 2 .
∴ the differential equation is given by y′ = y − 2 .

Check:

(a) direction fields for y′ = 2 − 3 y (b) direction fields for y′ = y − 2


…………………………………………………....……Try Question 2, Exercise 1G

Example 1.22 ………………………………………………..……………..…


dy
Given the following initial value problem = ay − b , y (0) = y0 , where a and
dt
b are arbitrary constants.
(a) Find the general solution of the initial value problem.
(b) Find its specific solution, in term of a and b.
(c) State its equilibrium solution.
(d) Describe its solution behaviour without plotting its direction fields.
Solution:
(a) By using method of separation of variables,
dy  b
= a y − 
dt  a
1
∫ y − ba dy = ∫ a dt
ln y − ba = at + c1
y − ba = Ce at (C = ec1 )
∴ y = ba + Ce at

(b) When t = 0 , y = y0 ,
y0 = ba + Ce a ( 0) ⇒ C = y0 − ba
b  b
∴ y= +  y0 −  e at
a  a

4
First-order Ordinary Differential Equations (Part ii)

dy b
(c) By setting = ay − b ≡ 0 , the equilibrium solution is y (t ) = .
dt a
(d) The solution behaviour is divided into the following cases.
(i) If y0 = ba , then y is constant, with y (t ) = ba .
(ii) If y0 > ba and a > 0 , then y increases exponentially without bound.
(iii) If y0 > ba and a < 0 , then y decays exponentially to ba .
(iv) If y0 < ba and a > 0 , then y decreases exponentially without bound.
(v) If y0 < ba and a < 0 , then y increases asymptotically to ba .
…………………………………………………....……Try Question 4, Exercise 1G

Exercise 1G

1. Draw the direction field for the given differential equations. Based on
the direction field and its equilibrium solution(s) of y as t → ∞ , describe
the dependency of its solution on the initial value of y at t = 0.
(a) y′ = 5 − 2 y (b) y ′ = 5 + 2 y
(c) y ′ = − y (3 − y ) (d) y ′ = y ( y − 1.5) 2

dy
2. Write down a differential equation of the form = ay + b , a and b are
dt
real numbers, whose solutions have the required behavior as t → ∞.
(b) All solutions approach y = 4
(b) All other solutions diverge from y = 4
(c) All solutions approach y = 3/5
(d) All other solutions diverge from y = 1/2

3. Consider the initial value problem


dy 3
− y = 3t + 2e t , y (0) = y0 .
dt 2
(a) Find the particular solution.
(b) Find the value of y0 that separates solutions that grow positively as
t → ∞ from those that grow negatively.
(c) How does the solution that corresponds to this critical value of y0
behave as t → ∞ ?

4. Consider the differential equation


dy
= − py + q , where both p and q are positive numbers.
dt
(a) Solve the differential equation.
(b) Sketch the solution for five different initial conditions, take p = 1
and q = 2 .
(a) Describe how the solutions change under each of the following
conditions:
(i) p increase, (ii) q increases,
(iii) both p and q increases, but the ratio q/p remains the same.

5
First-order Ordinary Differential Equations (Part ii)

Answers to Exercise 1G
1. (a) (b)

For y > 2.5, the slopes are negative and For y > -2.5, the slopes are positive and
hence the solutions decrease; For y < 2.5, hence the solutions increase; For y < -2.5,
the slopes are positive and hence the the slopes are negative and hence the
solutions increase; The equilibrium solutions decrease; All solutions appear to
solution appears to be y(t) = 2.5, to which diverge away from equilibrium solution
all other solutions converge. y(t) = -2.5

(c) (d)

Note that y ′ = 0 for y = 0 and y = 3. The Note that y ′ = 0 for y = 0 and y = 1.5. The
two equilibrium solutions are y(t) = 0 and two equilibrium solutions are y(t) = 0 and
y(t) = 3; For y > 3, the solutions with initial y(t) = 1.5; For y > 1.5, the solutions with
values greater than 3 diverge from the initial values greater than 1.5 diverge from
solution y(t) = 3; For 0 < y < 3, the slopes the solution y(t) = 1.5; For 0 < y < 1.5, the
are negative and hence the solutions with slopes are positive and hence the solutions
initial values between 0 and 3 all decrease with initial values between 0 and 1.5 all
towards the solution y(t) = 0; For y < 0, the increase towards the solution y(t) = 1.5;
slopes are positive and hence the solutions For y < 0, the slopes are negative and
with initial values less than 0 approach the hence the solutions with initial values less
solution y(t) = 0. than 0 diverge from the solution y(t) = 0.

2. (a) y ′ = 4 − y etc. (For all solutions to approach the equilibrium solution y (t ) = 4 , we


must have y ′ < 0 for y > 4 , and y ′ > 0 for y < 4 )
(b) y ′ = y − 4 etc. (For solutions other than y (t ) = 4 to diverge from y = 4 , y (t ) must
be an increasing function for y > 4 , and a decreasing function for y < 4 )
(c) y′ = 4 − 5 y etc. (For all solutions to approach the equilibrium solution y (t ) = 4 / 5 ,
we must have y′ < 0 for y > 4 / 5 , and y′ > 0 for y < 4 / 5 )
(d) y′ = 2 y − 1 etc. (For solutions other than y (t ) = 1 / 2 to diverge from y = 1 / 2 , we
must have y′ > 0 for y > 1 / 2 , and y′ < 0 for y < 1 / 2 )
3
t
3. (a) y (t ) = −2t − 34 − 4e t + ( 163 + y 0 ) e 2
3
t
(b) y 0 = −16 / 3 [As t → ∞ , the term containing e 2 will
dominate the solution. Its sign will determine the divergence
properties. Hence, the critical value of the initial condition
is given by 16 / 3 + y 0 = 0 .]
(c) y (t ) = −2t − 43 − 4e t will decrease without bound.

6
First-order Ordinary Differential Equations (Part ii)

− pt − pt
4. (a) y (t ) = p + Ce or y (t ) = 1p (q − Ce ) , where C is an
q
(b)
arbitrary constant.
(c) (i) As p increases, the equilibrium solution gets closer to
y(t) = 0; The convergence rate of all solutions, i.e. p is
also increases.
(ii) As q increases, the equilibrium solution y(t) = q/p
becomes larger; The convergence rate remains the
same.
(iii) If both p and q increase (but q/p = constant), then the
equilibrium solution y(t) = q/p remains the same; The
convergence rate of all solutions increases.
_______________________________________________________________

1.7 Existence and Uniqueness Theorem

A first-order ODE in the general form of y′ = f ( x, y ) is said to be


linear if f is linear in y and nonlinear if f is nonlinear in y. For instance,
y′ = x 2 y − e 2 x is the linear differential equation while y′ = 2xy 2 is non-linear
differential equation.

In this section, we will see the first-order linear and non-linear


equations differ in a number of ways, including the theory describing
existence and uniqueness of solutions and its corresponding domains, are
different.

Theorem
The Existence and Uniqueness of Solutions for
First-order Linear Ordinary Differential Equation

For a first-order linear ordinary differential equation, with initial value


problem, as follows:
dy
+ p ( x ) y = q ( x) , y ( x0 ) = y0
dx
If the functions p(x) and q(x) are continuous on an open interval a < x < b
containing the point x = x0 , then there exists a unique solution y = φ (x) that
satisfies the initial value problem for each x in (a, b) .

Example 1.23 ………………………………………………..……………..…


Without solving the problem, determine an interval of x in which the solution
of the given initial value problem is certain to exist.
dy y dy y
(a) = 2 x 2 − , y (1) = 2 (b) = 2 x 2 − , y (−2) = 2
dx x dx x
dy dy 1
(c) + (cot x) y = cos x , y ( π2 ) = 1 (d) + (tan x) y = , y ( 32 ) = 4
dx dx x −1
Solution:

7
First-order Ordinary Differential Equations (Part ii)

dy 1
(a) Rewrite the differential equation as + y = 2 x 2 , the function
dx x
p ( x) = 1x is continuous everywhere except x = 0 . Since the initial
condition is specified at x = 1 , the given initial value problem has a
unique solution on the interval x > 0 .

(b) Same as Part (a), but since the initial condition is specified at x = −2 , the
given initial value problem has a unique solution on the interval x < 0 .

cos x
(c) The function p ( x) = cot x = is discontinuous at x = 0 or x = π (of
sin x
course there is many other discontinuous points for this p (x) ). Since
0 < π2 < π , the initial value problem has a unique solution on the interval
0< x<π .

The function p ( x ) = tan x is discontinuous at x = ..., − π2 , π2 , 32π , ... ,


(d)
meanwhile the function q ( x) = 1 /( x − 1) is discontinuous at x = 1 . Since
1 < 32 < π2 , the initial value problem has a unique solution on the interval
1 < x < π2 .
…………………………………………………....……Try Question 1, Exercise 1H

We have seen that the intervals in which the unique solution for the
initial value problem of first-order linear ordinary differential equation is
certain to exist, not only depend on the continuity of the function p(x) and q(x),
but also the initial value of x (i.e. x0 ). It means that we could not simply
choose any values for the initial condition in order to obtain the particular (or
specific) solution of a first-order ordinary differential equation.

For first-order non-linear ordinary differential equation, we have the


following theorem.

Theorem
The Existence and Uniqueness of Solutions for
First-order Non-linear Ordinary Differential Equation

For a first-order non-linear ordinary differential equation, with initial value


problem, as follows:
dy
= f ( x, y ) , y ( x0 ) = y0
dx

Suppose that f ( x, y ) and f ( x, y ) are continuous on a closed rectangular R
∂y
of the xy-plane that it contains the point ( x0 , y0 ) . Then, there exists a unique
solution y = φ (x) that satisfies the initial value problem on some interval of x
that containing x0 .

8
First-order Ordinary Differential Equations (Part ii)

The above theorem is sufficient but not necessary to guarantee the


existence of a solution, and the continuity of f ( x, y ) ensures the existence but
not uniqueness of the y = φ (x) . For instance, if the solution for a differential
equation is given by y = 1 ± 2 x 2 + 3 or y = ± ( 23 t )
3/ 2
, the solution is said to
be exist but not unique.

Example 1.24 ………………………………………………..……………..…


For the following first-order nonlinear ordinary differential equation, state the
region(s) in the xy-plane where the theorem existence and uniqueness
guarantee a unique solution through any given initial point in the region.
dy 3 dy
(a) = y (b) = 4 − x2 − y2
dx dx
dy x +1
(c) =
dx y 2 − 2 y
Solution:
(a) The function f ( x, y ) = y1 / 3 continuous everywhere, but its derivatives
∂f 1 − 2 / 3
= y doesn’t continuous at y = 0 . Thus, the unique solution
∂y 3
exists on entire rectangular region on xy-plane except intersected by line
y = 0 (or x-axis).

(b) The function f ( x, y ) = 4 − x 2 − y 2 continuous when 4 − x 2 − y 2 ≥ 0


∂f −y
(i.e. x 2 + y 2 ≤ 22 ), but its derivatives = continuous
∂y 4 − x2 − y 2
when 4 − x 2 − y 2 > 0 (i.e. x 2 + y 2 < 2 2 ). Thus, the unique solution exists
on rectangular region x 2 + y 2 < 22 on xy-plane.

x +1 ∂f ( x + 1)(2 − 2 y )
(c) The function f ( x, y ) = and its derivatives =
y − 2y 2
∂y ( y 2 − 2 y) 2
is not continuous at y 2 − 2 y = 0 . Thus, the unique solution exists on
rectangular region not intersected by lines y = 0 or y = 2 on xy-plane.
…………………………………………………....……Try Question 2, Exercise 1H

Besides the theory that describes the existence and uniqueness of the
solution for first-order linear and non-linear ordinary differential equations are
different, the linear differential equations have explicitly defined solutions
while the nonlinear differential equations typically do not have. In other
words, the nonlinear differential equations may or may not have implicitly
defined solutions.

Exercise 1H

1. Without solving the problem, determine an interval of x in which the


solution of the given initial value problem is certain to exist.

9
First-order Ordinary Differential Equations (Part ii)

(a) x( x − 5) y′ + y = 0 , y (3) = 1 (b) (4 − x 2 ) y′ + 2 xy = x 2 , y (1) = −3


(c) y′ = xy , y (0) = 1 (d) y′ = y / x , y (1) = 1
(e) xy′ = y , y (−1) = 1 (f) y′ − y = e x sec 2 x , y (0) = 1
(g) y′ + (tan x ) y = sin x , y (0) = 0 (h) y′ + (tan x ) y = cos 2 x , y (π ) = 0

2. State the region(s) in the xy-plane where the theorem existence and
uniqueness guarantee a unique solution through any given initial point in
the region.
(a) y′ = e x y − y 3 (b) y′ = 2 y1/ 2
(c) ( x + 1) y′ = y1 / 3 (d) y′ = xy 2 − 1 /(3 y + x)
dy 25 − x 2 − y 2
(e) = (f) y′ = ( x 2 + y 2 ) 3 / 2
dx x + y +1
dy x− y dy 1 + x 2
(g) = (h) =
dx 2 x + 5 y dx 3 y − y 2
(i) y′ = 1 − x 2 − y 2

3. Solve the initial value problem and determine the interval in which the
solution exists.
(a) 2 y′ + y 3 = 0 , y (0) = −1 (b) y ′ = y 2 , y (0) = 1
(c) y ′ = y 2 , y (2) = 1 (d) yy′ = − x , y (0) = 1

Answers to Exercise 1H
1
1. (a) 0 < x < 5 [Rewrite the DE as y′ + y = 0 . The coefficient 1 / x( x − 5) is
x( x − 5)
continuous everywhere except at x = 0, 5. Since the initial condition is specified at
x = 3 , this assures the existence of a unique solution on the interval 0 < x < 5 .]
2x x2
(b) −2 < x < 2 [Rewrite the DE as y′ + y= . The coefficient 2 x /( 4 − x 2 ) and
4−x 2
4 − x2
function x 2 /( 4 − x 2 ) is discontinuous at x = ±2 . Since the initial condition is specified
at x = 1 , the IVP has a unique solution on the interval (−2, 2) .]
(c) −∞ < x < ∞ [Rewrite the DE as y′ − xy = 0 . The coefficient − x is continuous
everywhere. The IVP has a unique solution on the interval (−∞, ∞) .]
(d) x > 0 [Rewrite the DE as y′ − 1x y = 0 . The coefficient − 1x is continuous everywhere
for x > 0 or x < 0 . Since the initial condition is specified at x = 1 (> 0) , the IVP has a
unique solution on the interval (0, ∞) .]
(e) x < 0 [Rewrite the DE as y′ − 1x y = 0 . The coefficient − 1x is continuous everywhere
for x > 0 or x < 0 . Since the initial condition is specified at x = −1 (< 0) , the IVP has
a unique solution on the interval (−∞, 0) .]
(f) − π2 < x < π
2 [The function e x / cos 2 x is discontinuous at x = − π2 or x = π
2 etc.. Since
− π2 < 0 < π
2 , the IVP has a unique solution on the interval (− π2 , π2 ) . ]
(g) − π2 < x < π
2 [The function tan x is discontinuous at odd multiples of π
2 . Since
− π2 < 0 < π
2 , the IVP has a unique solution on the interval (− π2 , π2 ) .]
(h) π
2 < x < 32π [The function tan x is discontinuous at odd multiples of π
2 . Since
π
2 < π < 32π , the IVP has a unique solution on the interval ( π2 , 32π ) . ]

10
First-order Ordinary Differential Equations (Part ii)

∂f
2. (a) Any rectangular region. [The function f = e x y − y 3 and its derivatives = e x − 3y 2
∂y
continuous everywhere.]
(b) Any rectangular region y > 0 . [The function f = 2 y1/ 2 continuous everywhere, its
∂f 1
derivatives = continuous for all x and y > 0 .]
∂y y
(c) Any rectangular region not intersected by line x = −1 or y = 0 . [The function
∂f 1
f = y1 / 3 /( x + 1) and its derivatives = continuous for all region except
∂y 3( x + 1) y 2 / 3
x + 1 = 0 or y = 0 .]
(d) Any rectangular region except intersected by straight line y = − x / 3 . [The function
∂f 3
f = xy 2 − 1 /(3 y + x) and its derivatives = 2 xy + continuous for all
∂y (3 y + x) 2
region except 3 y + x = 0 .]
(e) Any rectangular region lying wholly inside the circle x 2 + y 2 = 25 and not containing
25 − x 2 − y 2
any part of line y = − x − 1 . [The function f = continuous for all region
x + y +1
∂f x 2 − yx − y − 25
x 2 + y 2 ≤ 25 but not for y + x + 1 = 0 ; Its derivatives =
∂y 25 − x 2 − y 2 ( x + y + 1) 2
continuous for all region x 2 + y 2 < 25 but not for y + x + 1 = 0 .]
(f) Any rectangular region. [The function f = ( x 2 + y 2 )3 / 2 and its derivatives
∂f
= 3 y x 2 + y 2 continuous everywhere.]
∂y
x− y
(g) Any rectangular region not intersected by line y = −0.4 x . [The function f =
2x + 5 y
∂f −7 x
and its derivatives= not continuous at 2 x + 5 y = 0 .]
∂y (2 x + 5 y ) 2
(h) Any rectangular region not intersected by the lines y = 0 or y = 3 . [The function
1+ x2 ∂f (1 + x 2 )(2 y − 3)
f = and its derivatives = not continuous at
3y − y2 ∂y (3 y − y 2 ) 2
3 y − y 2 = 0 .]
(i) Any rectangular region x 2 + y 2 < 1 . [The function f = 1 − x 2 − y 2 continuous when
∂f −y
1 − x2 − y2 ≥ 0 and its derivatives = continuous when
∂y 1 − x2 − y 2
1 − x 2 − y 2 > 0 .]

3. (a) y ( x) = 1 / x + 1 ; x > −1
(b) y ( x) = 1 /(1 − x) ; x < 1 [The solution y ( x) = 1 /(1 − x) in not continuous at x = 1 , since
the initial condition is specified at x = 0 , the interval of existence of this solution is
(−∞, 1) .]
(c) y ( x) = 1 /(3 − x) ; x < 3 [The solution y ( x) = 1 /(3 − x) in not continuous at x = 3 , since
the initial condition is specified at x = 2 , the interval of existence of this solution is
x < 3 .]
(d) y ( x) = 1 − x 2 ; −1 < x < 1

11
First-order Ordinary Differential Equations (Part ii)

1.8 Modelling in First-order Ordinary Differential


Equations

In science and engineering, the physical systems are often


characterized into mathematical models by using differential equations.
There are three main steps in mathematical modelling, as follows.

Procedure
Three Main Steps in Mathematical Modelling

Step 1: Model construction: The physical situations are translated into


mathematical terms. The physical principles that believed to govern
the process have to be clearly stated. In this case, the differential
equation is a mathematical model of process, typically an
approximation.
Step 2: Analysis of model: The governing differential equation is solved
analytically or numerically, as well as obtaining the qualitative
solution for better understanding. The model could be simplified, as
long as the physical essentials are preserved.
Step 3: Comparison with experiment or observation:
The solution is verified with experimental data or observation.
Suggestions for the refinement of model will also be given.

In this section, we will focus more on the step 1 and 2 above, with
those the mathematical models can be expressed in first-order ordinary
differential equations.

Exercise 1I

1. A certain drug is being administered intravenously to a hospital patient


in the district of Town S. Fluid containing 6 mg/cm3 of the drug enters
the patient’s bloodstream at a rate of 80 cm3/hr. The drug is absorbed by
body tissues or otherwise leaves the bloodstream at a rate proportional to
the amount present, with a rate constant of 0.5 (hr)-1.
(a) Assuming that the drug is always uniformly distributed throughout
the bloodstream, write a differential equation for the amount of the
drug that is present in the bloodstream at any time. Let P(t) be the
total amount of the drug (in milligrams) in the patient’s body at any
given time t (hrs).
(b) How much of the drug is present in the bloodstream after a long
time?

2. Free fall equation: Given that the force of gravity (acting downward) is
mg, and the force of air resistance (acting upward) is γ v, where m =
mass, g = gravity and v = velocity.

12
First-order Ordinary Differential Equations (Part ii)

(a) By applying Newton’s Second Law, F = ma , formulate a


differential equation describing motion of an object falling in the
atmosphere near sea level.
(b) Given that the mass of object, m = 10 kg, by taking g = 9.8
m/second2 and γ = 2 kg/second, find the equilibrium solution of the
differential equation.
(c) Suppose that the object is dropped from 300 m above the ground.
(i) Find the velocity at any time t.
(ii) How long until the object hits the ground?
(iii) How fast will it be moving?

3. Modelling population: Consider a population p of field mice that grows


at a rate proportional to the current population, so that
dp
= rp , where t (months).
dt
(a) Find the rate constant r if the population doubles in 30 days.
(b) Find r if the population doubles in N days.

4. Modelling population: Consider a mouse population that reproduces at a


rate proportional to the current population, with a rate constant equal to
0.6 mice/month (assuming no owls present). When owls are present, they
eat mice. Suppose that the owls eat on average 12 mice per day.
(a) Write a differential equation describing mouse population in the
presence of owls. Assume that there are 30 days in a month.
(b) Discuss the solution curve behaviour and find the equilibrium
solution.

5. Modelling leaking problem: The height, h, of water in a leaking bucket


can be modelled as in the differential equation below:
dh
= −2 h , h ( 0) = 4 .
dt
(a) Solve the problem using method of separation of variables.
(b) Observe that the solution is defined for all t, but that beyond t = 2
it stops being a realistic description of the height of water in a
bucket. What physical event occurs at t = 2 ?
(c) Write down a function that uses the solution of Part (a) up to the
time t = 2 and then uses a realistic solution for t > 2 ?

6. Modelling epidemics: Suppose that a given population can be divided


into two parts: First, those who have a given disease and can infect
others, and second, those who do not have it but are susceptible. Let x be
the proportion of susceptible individuals and y the proportion of
infectious individuals, then x + y = 1. Assume that the disease spreads by
contact between sick and well members of the population and that the
dy
rate of spread is proportional to the number of such contacts.
dt
Besides, assume that members of both groups move about freely among
each other, so the number of contacts is proportional to the product of x
and y. Since x = 1 – y, we obtain the initial value problem

13
First-order Ordinary Differential Equations (Part ii)

dy
= α y (1 − y ), y (0) = y0 ,
dt
where α is a positive proportionality factor, and y0 is the initial
proportion of infectious individuals.
(a) Find the equilibrium points for the differential equation and
determine whether each is asymptotically stable or unstable.
(b) Show that the solution for the initial value problem is given by
y 0 eα t
y (t ) = .
1 − y 0 + y 0 e αt
(c) Show that y (t ) → 1 as t → ∞ , which means that ultimately the
disease spreads through the entire population.

7. Modelling population: The population of mosquitoes in a certain area


increases at a rate, r proportional to the current population, P(t), where t
(day).
(a) Write a differential equation that models the population. Solve the
equations using suitable method.
(b) In the absence of other factors, the population doubles each week.
Show that the growth rate of the population is given by
r ≈ 0.09902 per day.
(c) There are 200 000 mosquitoes in the area initially, and predators
(birds, bats, and so forth) eat 20 000 mosquitoes per day. By
assuming the same growth rate of the population (as in Part (b)),
determine the population of mosquitoes in the area at any time.

8. Modelling salt solution: At time t = 0 , a container contain 4 g of salt


dissolved in 100 ml of water. Suppose that brine containing 2 g of salt
per ml is allowed to enter the container at a rate of 5 ml / min and the
mixed solution is flow out from the container at the same rate.
(a) Let y(t) be the amount of salt (in grams) after t minutes. Write a
first-order differential equation to model the salt solution.
(b) Find the specific solution of the differential equation.
(c) Find the amount of salt in the container after 8 minutes.
(d) State the amount of salt in the container when t → ∞ .

9. Consider a tank used in certain experiments. After one experiment the


tank contains 200 liters of a dye solution with a concentration of 1 g/l.
To prepare the next experiment, the tank is to be rinsed with fresh water
in at a rate of 2 l/min, the well-stirred solution flowing out at the same
rate.
(a) Let y(t) be the amount of dye (in grams) after t minutes. Write a
first-order differential equation to model the salt solution. State the
initial condition as well.
(b) Find the specific solution of the differential equation.
(c) Find the time that will elapse before the concentration of dye in the
tank reaches 1% of its original value.

10. A tank originally contains 100 liter (l) of plain water. Then, water
containing 0.5 g of chemical material per liter is poured into the tank at a

14
First-order Ordinary Differential Equations (Part ii)

rate of 2 l/min, the mixture is allowed to leave at the same rate. After 10
min the process is stopped and plain water is poured into the tank at a
rate of 2 l/min, with the mixture again leaving at the same rate. Find the
amount of chemical material in the tank at the end of an additional 10
min.

11. At time t = 0 , a tank contain y0 gram of salt dissolved in 100 ml of


water. Assume that water containing 0.25 gram of salt/ml is entering
tank at rate of r ml/min, and leaves at the same rate.
(a) Model this salt solution flow process into an initial value problem.
(b) Find the amount of salt y(t) in tank at any given time.
(c) Find limiting amount yL of salt y(t) in tank after a very long time.
(d) If r = 3 and y0 = 2 y L , find time T after which salt is within 2% of
yL.
(e) Find flow rate r required if T is not exceed 45 min.

Answers to Exercise 1I

dP
1. (a) = 480 − 0.5 P (mg/hr) (b) 960 mg (within a few fours)
dt
dv dv
2. (a) m = mg − γ v (b) = 9.8 − 0.2 v ; equilibrium solution, v (t ) = 49
dt dt
(c) (i) v(0) = 0 ; v = 49 (1 − e −2t ) (ii) ≈ 10.51 seconds (iii) 43.01 m/second
3. (a) r = ln 2 per month (b) r = (30 / N ) ln 2 per month
dy
4. (a) = 0.6 y − 360 , y (0) = y0 (b) For y0 > 600 , the slopes are positive and hence the
dt
solutions increase; For y0 < 600 , the slopes are negative and hence the solutions
decrease; All solutions appear to diverge away from unstable equilibrium solution
y(t) = 600.
(2 − t ) 2 , 0 ≤ t ≤ 2
5. (a) h(t ) = (2 − t ) 2 (b) The bucket is empty. (c) h(t ) = 
 0, t>2
6. (a) The equilibrium points are at y(t) = 0 (unstable) and y(t) = 1 (asymptotically stable).
dp
7. (a) = rP , P(0) = P0 ; Its solution: P(t ) = P0 e rt
dt
dp
(c) = 0.09902P − 20 000 , P(0) = 200 000 ; P(t ) = 201 979.4 − 1 979.4 e 0.09902t
dt
1
dy y − t
8. (a) + = 10 , y (0) = 4 (b) y (t ) = 200 − 196 e 20 (c) 68.62 g (d) y = 200 g
dt 20
t
dy y −
9. (a) =− , y (0) = 200 (b) y (t ) = 200 e 100
dt 100
(c) 1% of its original value = 2 g; When y = 2 g, t ≈ 460.5 min
dy y
10. 7.42 g [Two IVPs involved. First, solve for = 1− , y (0) = 0 , at t = 10, we obtained
dt 50
dy y
y (10) = 50 − 50e −0.2 ; Second, solve for =− , y (10) = 50 − 50e −0.2 , at t = 20,
dt 50
we obtained y (20) = 50(e 0.2 − 1)e −0.4 ≈ 7.42 .]
dy r
11. (a) + y = 0.25r , y (0) = y0 (b) y (t ) = 25(1 − e − rt / 100 ) + y0e − rt / 100
dt 100
(c) yL = lim y (t ) = 25 gram (d) T ≈ 130.4 min (e) r ≈ 8.69 gram/min
t →∞

15
First-order Ordinary Differential Equations (Part ii)

1.9 Autonomous Equations

Definition
Autonomous Equations

An ordinary differential equation is called autonomous if it can be written as


y′ = f ( y ) ,
where the independent variable t (or x) does not appear explicitly in the
equation. For instance, y′ = 2 y .

Since the autonomous equation, y′ = f ( y ) , is separable, we could find its


solution by method of separation of variables, as follows.
1
∫ f ( y) dy = t + C
However, the integral above is often not easy or impossible to be solved! In
this case, its solution can be investigated by qualitative analysis, which is by
looking at the direction fields.

Example 1.25 ………………………………………………..……………..…


Consider a population of y that is governed by differential equation
y′ = ry , y (0) = y0
where r is an arbitrary constant.
(a) Without solving the differential equation, estimate y′ for positive y.
(b) Solve the initial value problem and verify the answers in Part (a) by
plotting direction fields for r = 2 and -2.
Solution:
(a) For positive y, y′ is positive for r > 0 ;
For positive y, y′ is negative for r < 0 .

(b) By method of separation of variables, the solution of the above initial


value problem is y (t ) = y0 e rt .

(a) (b)
Direction fields of y′ = ry where (a) r = 2 , (b) r = −2

As can be seen from the direction fields above, for r = 2 ( > 0 ) , the
population have an exponential growth (i.e. y′ is positive); for

16
First-order Ordinary Differential Equations (Part ii)

r = −2 (< 0 ) , the population have an exponential decay (i.e. y′ is


negative).
…………………………………………………....….…Try Question 1, Exercise 1J

In example above, we simply defined the population growth rate, r,


by a numeric value. The growth rate can be assumed to depend on population
size. For this purpose, we replace r by a function h( y ) , hence we have
y′ = h ( y ) × y --- (1)

We want to choose the growth rate h( y ) so that


(i) h( y ) ≈ r when y is small,
(ii) h( y ) decreases as y grows larger, and
(iii) h( y ) < 0 when y is sufficiently large.
The simplest function for such purposes is h( y ) = r − ay , where a is an
arbitrary constant and a > 0 . Thus, eq. (1) becomes
y′ = (r − ay ) y , where r , a > 0 --- (2)
The eq. (2) is known as the Verhulst, or logistic, equation.

Definition
Logistic Equation

The logistic equation, as given in (2) is often written in the following form
dy  y
= r 1 −  y ,
dt  K
r
where K = . The constant r is called the intrinsic growth rate, and K
a
represents the carrying capacity (or saturation level) of the population.

Example 1.26 ………………………………………………..……………..…


dy  y
Show that the solution to logistic equation = r 1 −  y , y (0) = y0 is
dt  K
y0 K
given by y (t ) = .
y0 + ( K − y0 ) e − rt
Solution:
By using the method of separation of variables,
1
∫ (1 − y / K ) y dt = ∫ r dt , (provided y ≠ 0 and y ≠ K ).
Expanding using partial fraction, we have
1 A B
≡ +
(1 − y / K ) y 1 − y / K y
1 = Ay + B (1 − y / K )
Let y = 0 , B = 1 ; Let y = K , A = 1 / K
1/ K 1
∫ 1 − y / K + y dt = ∫ r dt

17
First-order Ordinary Differential Equations (Part ii)

y
− ln 1 − + ln y = rt + C
K
y
ln = rt + C
1− y / K
y
= Ce rt
1− y / K
y0
At t = 0 , y = y0 , we have C =
1 − y0 / K
y  y0  rt
Thus, =  e
1 − y / K  1 − y0 / K 
y K − y
Rearranging, y = K −0y0 e rt ×  
K  K 
Ky0e rt y e rt
y= − 0 y
K − y0 K − y0
 y e rt  Ky0e rt
1 + 0  y =
 K − y0  K − y0
Ky0e rt  K − y0 y e rt 
y=
÷  + 0 
K − y0  K − y0 K − y0 
Ky0e rt K − y0 ÷ e rt
y= ×
K − y0 K − y0 + y0e rt ÷ e rt
y0 K
∴ y (t ) =
y0 + ( K − y0 ) e − rt
…………………………………………………………………………………..

Definition
Equilibrium Solutions for Autonomous Equations

The equilibrium solutions of a general first-order autonomous equation


y′ = f ( y ) can be found by locating roots of f ( y ) = 0 . These roots of f ( y )
are called critical points. For example, the critical points of the logistic
dy  y
equation = r 1 −  y are y = 0 and y = K .
dt  K

To better understand the nature of solutions to the autonomous


equations, we could carry out the qualitative analysis and sketch the general
curve of f ( y ) versus y, as illustrated in the following example.

Example 1.27 ………………………………………………..……………..…


dy  y
Given the logistic equation = r 1 −  y .
dt  K

18
First-order Ordinary Differential Equations (Part ii)

dy
(a) By letting = f ( y ) , find the maximum or minimum point(s), if any,
dt
for f(y).
(b) Sketch the graph of f ( y ) versus y.
(c) Perform the test for concavity and determine the inflection point(s), if
any.
(d) Based on the information obtained in Part (b) and (c), sketch the solution
curves y for different initial conditions.
Solution:
 y
(a) f ( y ) = r 1 −  y --- (*), differentiate with respect to y,
 K
 y  1  r
f ′( y ) = r 1 −  + y −  = ( K − 2 y )
 K   K  K
r K
Let f ′( y ) = 0 ⇒ ( K − 2 y) = 0 ∴ y =
K 2
K K  ( K / 2)  K rK
When y = , f   = r 1 −  =
2 2  K 2 4
Since eq. (*) is a quadratic equation with a = − Kr (< 0) , thus the critical
 K rK 
point  ,  is a maximum point.
2 4 
f (y)
(b) (K/2, rK/4) From this graph, we know that
rK/4 - Graph of y increasing when
0< y<K
- Graph of y decreasing when y > K
- Slope of y approximate 0 when
y
0 K/2 K y ≈ 0 or K

dy
(c) Since = f ( y) ,
dt
d 2 y d  dy  d d dy
2
=  = f ( y) = f ( y) × = f ′( y ) × f ( y )
dt dt  dt  dt dy dt

Test for concavity:-


Interval 0 < y < K2 <y<K
K
2
y>K
Sign for f ( y ) + + −
Sign for f ′( y ) + − −
Sign for f ( y ) × f ′( y ) + - +
Concavity concave up concave down concave up

∴ the inflection point occurs when y = K2 .


Note: Since y = K is the critical point, we are not emphasize y = K is
the inflection point in this case.

19
First-order Ordinary Differential Equations (Part ii)

(d)From Part (c), we know that the y


graph of y concave up when y(t) = K
0 < y < K2 and y > K , concave
K
down when K2 < y < K , meanwhile
inflection point when y = K2 . Using K/2
this information, together with Part
(b), we can sketch the solution y(t) = 0
curves y for several different initial t
0
conditions, as shown in figure.
…………………………………………………………………………………..

Exercise 1J

1. Suppose that a population y(t) grows in accordance with the logistic


dy
model = 20 (1 − 0.1 y ) y .
dt
(a) What is the carrying capacity?
(b) What is the value of intrinsic growth rate?
(c) For what value of y is the population growing most rapidly?

2. Consider the logistic ordinary differential equation


dy  y 
= 1 −  y
dt  20 
(a) Solve the initial value problems when y (0) = 5, 10, 20, 30 .
(b) By using a graphing utility, graph the solutions in Part (a) on the
interval 0 ≤ t ≤ 10 . Highlight the carrying capacity.
(c) Identify the type of each equilibrium point(s).

3. A colony of bacteria grows according to the logistic law, with a carrying


capacity of 4 × 10 7 individuals and natural growth rate r = 0.02 per day.
What is the population after 3 days if the initial population is 1× 10 7 ?

4. Suppose that a certain population obeys the logistic equation


dy  y
= r 1 −  y .
dt  K
(a) If y0 = K / 3 and r = 0.02 per year, find the time, t at which the
initial population has doubled.
(b) If y0 = 0.1K and r = 0.025 per year, find the value of time T at
which y (T ) = 0.9 K .

Answers to Exercise 1J
1. (a) 10 (b) 20 (c) 5 [ Since K = 10, the graph of y is steepest at K/2 ]
y0 K
2. (a) By using the solution y (t ) = , where y0 = y (0) ,
y 0 + ( K − y0 ) e −rt
since r = 1 and K = 20, substituting the given initial conditions
y0 = 5, 10, 20, 30 , we obtain the following results:
20 20
For y0 = 5 , y (t ) = −t
; For y0 = 10 , y (t ) = ;
1 + 3e 1 + e −t

20
First-order Ordinary Differential Equations (Part ii)

60
For y0 = 20 , y(t ) = 20 ; For y0 = 30 , y (t ) = .
3 − e −t
(b) See figure. Carrying capacity (or saturation level) is y = K = 20.
(c) There are 2 equilibrium points, i.e. y = 0 (unstable) and y = 20 (asymptotically stable).
3. ≈ 1.046 × 10 7
4. (a) 69.31 years (b) 175.78 years

1.10 Numerical Solutions


In the previous sections, we obtained the solution to the first-order
ordinary differential equations by using analytical method or qualitative
analysis (which is based on direction fields). In this section, we will learn one
of the numerical methods in solving first-order ordinary differential
equations. Unlike the analytical methods where the solution of differential
equations are given in an expression or equation either implicitly or explicitly,
the numerical solution is an approximation to the y values in some discrete
points of x (or t).

In this subject, we will only discuss one of the simplest numerical


method in solving first-order ordinary differential equation, namely Euler’s
method. Other methods of approximating the solutions of ordinary differential
equation will be discussed in other subjects.

Formula
Euler’s Method
Truncate the Taylor’s series after two terms, we obtained
y ( xi +1 ) = y ( xi ) + hy ′( xi ) .
It is called Euler’s method (or first-order Taylor series method). Or, we
write in more simpler notation as
y i +1 = y i + hf ( xi , y i ) .

Example 1.28………………………………………………………………...
Solve the following first-order initial value problem (IVP) at x = 0 (0.2) 1 by
Euler’s method.
2 y ′ + 3 y = e 2 x , with initial condition y (0) = 1 .
3x
1 6 −
Given the exact solution is y ( x) = e 2 x + e 2 .
7 7
Solution:
Step 1: Write in the form of y ′ = f ( x, y ) .
e2x − 3y e2x − 3y
From 2 y ′ + 3 y = e 2 x , hence y ′ = or f ( x, y ) = .
2 2

Step 2: Consider the initial condition and sketch the diagram.

21
First-order Ordinary Differential Equations (Part ii)

y 0 = y ( x 0 ) = y (0) = 1
y2
y1 y3 y4 y5
y0
h = 0.2

x
x0 = 0 x1 = 0.2 x 2 = 0.4 x3 = 0.6 x 4 = 0.8 x5 = 1

Step 3: Apply Euler’s method, y i +1 = y i + hf ( xi , y i ) .


y1 = y0 + hf ( x0 , y0 ) = 1 + 0.2 f (0, 1) = 0.800
y2 = y1 + hf ( x1 , y1 ) = 0.8 + 0.2 f (0.2, 0.8) = 0.709
y3 = y2 + hf ( x2 , y2 ) = 0.709 + 0.2 f (0.4, 0.709) = 0.719
y4 = y3 + hf ( x3 , y3 ) = 0.719 + 0.2 f (0.6, 0.719) = 0.835
y5 = y4 + hf ( x4 , y4 ) = 0.835 + 0.2 f (0.8, 0.835) = 1.080

Alternative: To find y1 , y2 , K, y5 one by one sequentially by using one


formula, we use the following calculator formula.
Y + 0.2 (e(2X )−3Y ) ÷ 2 ( calculator formula )

Step 4: Write the result in tabular form. Find its errors.


i xi Approximate solution, yi Exact solution Error
0 0 1.000 1.000 0
1 0.2 0.800 0.848 0.048
2 0.4 0.709 0.788 0.079
3 0.6 0.719 0.823 0.104
4 0.8 0.835 0.966 0.131
5 1.0 1.080 1.247 0.167
Note:
The last column of the table above is calculated by using the formula
Error = | exact solution − approximate solution | .
This type of error is known as absolute error.
……………………………………………………...Try Question 1 − 4, Exercise 1K

Exercise 1K

Solve the following first-order initial value problem (IVP) by Euler’s method
with step size h = 0.2 . Find its absolute errors.

1. y ′ + 2 y = xe 3 x , in interval 0 ≤ x ≤ 1 with initial condition y (0) = 0 ;


1 1 1
Given that the exact solution is y ( x) = xe 3 x − e 3 x + e − 2 x .
5 25 25

2. y ′ = cos 2 x + sin 3 x , in interval 0 ≤ x ≤ 1 with initial condition y (0) = 1 ;

22
First-order Ordinary Differential Equations (Part ii)

1 1 4
Given that the exact solution is y ( x) = sin 2 x − cos 3 x + .
2 3 3

3. y ′ + 5 y = 5t 2 + 2t , in interval 0 ≤ t ≤ 1 with initial condition y (0) = 1 / 3 ;


Given that the exact solution is y (t ) = t 2 + 13 e −5t .

2
y  y
4. y′ = 1 + +   , in interval 1 ≤ x ≤ 2 with initial condition y (1) = 0 ;
x x
Given that the exact solution is y ( x) = x tan(ln x) .

5. Consider the initial value problem below.


y ′ = 3 + x − y , y ( 0) = 1
By using Euler’s method with step size h = 0.1 , find the approximate
solution for x = 0.1, 0.2, 0.3, 0.4, and 0.5 . Find its absolute errors.
Compare the answers if step size h = 0.05 is used.

Answers to Exercise 1K
1. 3.
i xi yi exact error i ti yi exact error
0 0 0 0 0 0 0 0.333 0.333 0
1 0.2 0.000 0.027 0.027 1 0.2 0.000 0.163 0.163
2 0.4 0.073 0.151 0.078 2 0.4 0.120 0.205 0.085
3 0.6 0.309 0.496 0.187 3 0.6 0.320 0.377 0.057
4 0.8 0.911 1.331 0.420 4 0.8 0.600 0.646 0.046
5 1.0 2.310 3.219 0.909 5 1.0 0.960 1.002 0.042

2. 4.
i xi yi exact error i xi yi exact error
0 0 1 1.000 0 0 1.0 0 0 0
1 0.2 1.200 1.253 0.053 1 1.2 0.200 0.221 0.021
2 0.4 1.497 1.571 0.074 2 1.4 0.439 0.490 0.051
3 0.6 1.823 1.875 0.052 3 1.6 0.721 0.813 0.092
4 0.8 2.090 2.079 0.011 4 1.8 1.052 1.199 0.147
5 1.0 2.219 2.118 0.101 5 2.0 1.437 1.661 0.224

5. Exact solution, y ( x) = x + 2 − e − x
i xi exact yi (h = 0.1) error yi (h = 0.05) error
0 0 1 1 0 1 0
1 0.1 1.195 1.200 0.005 1.198 0.003
2 0.2 1.381 1.390 0.009 1.386 0.005
3 0.3 1.559 1.571 0.012 1.566 0.007
4 0.4 1.730 1.744 0.014 1.738 0.008
5 0.5 1.893 1.910 0.017 1.902 0.009
The solutions with step size h = 0.05 is more accurate than solutions with step size h = 0.1.
_______________________________________________________________

23

You might also like