8394712

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 155

CHAPTER 2

First-Order Differential
Equations
Contents

 2.1 Solution Curves Without a Solution


 2.2 Separable Variables
 2.3 Linear Equations
 2.4 Exact Equations
 2.5 Solutions by Substitutions
 2.6 A Numerical Methods
 2.7 Linear Models
 2.8 Nonlinear Model
 2.9 Modeling with Systems of First-Order DEs

CH2_2
2.1 Solution Curve Without a Solution

 Introduction:
Begin our study of first-order DE with analyzing a D
E qualitatively.
 Slope
A derivative dy/dx of y = y(x) gives slopes of tangent
lines at points.
 Lineal Element
Assume dy/dx = f(x, y(x)). The value f(x, y) represents
the slope of a line, or a line element is called a lineal
element. See Fig2.1

CH2_3
Fig2.1

CH2_4
Direction Field

 If we evaluate f over a rectangular grid of points, and


draw a lineal element at each point (x, y) of the grid w
ith slope f(x, y), then the collection is called a directio
n field or a slope field of the following DE
dy/dx = f(x, y)

CH2_5
Example 1

 The direction field of dy/dx = 0.2xy is shown in Fig2.


2(a) and for comparison with Fig2.2(a), some represe
ntative graphs of this family are shown in Fig2.2(b).

CH2_6
Fig2.2

CH2_7
Example 2

Use a direction field to draw an approximate solution cu


rve for dy/dx = sin y, y(0) = −3/2.
Solution:
Recall from the continuity of f(x, y) and f/y = cos y. T
heorem 2.1 guarantees the existence of a unique solutio
n curve passing any specified points in the plane. Now s
plit the region containing (-3/2, 0) into grids. We calcula
te the lineal element of each grid to obtain Fig2.3.

CH2_8
Fig2.3

CH2_9
 Increasing/Decreasing
If dy/dx > 0 for all x in I, then y(x) is increasing in I.
If dy/dx < 0 for all x in I, then y(x) is decreasing in I.

 DEs Free of the Independent variable


dy/dx = f(y) (1)
is called autonomous. We shall assume f and f 
are continuous on some I.

CH2_10
Critical Points

 The zeros of f in (1) are important. If f(c) = 0, then c i


s a critical point, equilibrium point or stationary poi
nt.
Substitute y(x) = c into (1), then we have 0 = f(c) = 0.
 If c is a critical point, then
y(x) = c, is a solution of (1).
 A constant solution y(x) = c of (1) is called an equili
brium solution.

CH2_11
Example 3

The following DE
dP/dt = P(a – bP)
where a and b are positive constants, is autonomous.
From f(P) = P(a – bP) = 0, the equilibrium solutions ar
e P(t) = 0 and P(t) = a/b.
Put the critical points on a vertical line. The arrows in Fi
g 2.4 indicate the algebraic sign of f(P) = P(a – bP). If t
he sign is positive or negative, then P is increasing or de
creasing on that interval.

CH2_12
Fig2.4

CH2_13
Solution Curves

 If we guarantee the existence and uniqueness of (1), t


hrough any point (x0, y0) in R, there is only one soluti
on curve. See Fig 2.5(a).

 Suppose (1) possesses exactly two critical points, c1,


and c2, where c1 < c2. The graph of the equilibrium sol
ution y(x) = c1, y(x) = c2 are horizontal lines and split
R into three regions, say R1, R2 and R3 as in Fig 2.5(b).

CH2_14
Fig 2.5

CH2_15
 Some discussions without proof:
(1) If (x0, y0) in Ri, i = 1, 2, 3, when y(x) passes throu
gh (x0, y0), will remain in the same subregion. See
Fig 2.5(b).
(2) By continuity of f , f(y) can not change signs in a
subregion.
(3) Since dy/dx = f(y(x)) is either positive or negative
in Ri, a solution y(x) is monotonic.

CH2_16
(4)If y(x) is bounded above by c1, (y(x) < c1), the gra
ph of y(x) will approach y(x) = c1;
If c1 < y(x) < c2, it will approach y(x) = c1 and y
(x) = c2;
If c2 < y(x) , it will approach y(x) = c2;

CH2_17
Example 4

Referring to example 3, P = 0 and P = a/b are two


critical points, so we have three intervals for P:

R1 : (-, 0), R2 : (0, a/b), R3 : (a/b, )

Let P(0) = P0 and when a solution pass through P0, we


have three kind of graph according to the interval where
P0 lies on. See Fig 2.6.

CH2_18
Fig 2.6

CH2_19
Example 5

The DE: dy/dx = (y – 1)2 possesses the single critical p


oint 1. From Fig 2.7(a), we conclude a solution y(x) is in
creasing in - < y < 1 and 1 < y < , where - < x < .
See Fig 2.7.

CH2_20
Fig2.7

CH2_21
Attractors and Repellers

 See Fig 2.8(a). When y0 lies on either side of c, it will


approach c. This kind of critical point is said to be as
ymptotically stable, also called an attractor.
 See Fig 2.8(b). When y0 lies on either side of c, it will
move away from c. This kind of critical point is said
to be unstable, also called a repeller.
 See Fig 2.8(c) and (d). When y0 lies on one side of c, i
t will be attracted to c and repelled from the other side.
This kind of critical point is said to be semi-stable.

CH2_22
Fig 2.8

CH2_23
Autonomous DEs and Direction Field

 Fig 2.9 shows the direction field of dy/dx = 2y – 2.


It can be seen that lineal elements passing through poi
nts on any horizontal line must have the same slope.
Since the DE has the form dy/dx = f(y), the slope dep
ends only on y.

CH2_24
Fig 2.9

CH2_25
2.2 Separable Variables
 Introduction: Consider dy/dx = f(x, y) = g(x). The DE
dy/dx = g(x)
(1)
can be solved by integration.
Integrating both sides to get y =  g(x) dx = G(x) + c.
eg: dy/dx = 1 + e2x, then
y =  (1 + e2x) dx = x + ½ e2x + c
DEFINITION 2.1
Separable Equations
A first-order DE of the form
dy/dx = g(x)h(y)
is said to be separable or to have separable variables.
CH2_26
 Rewrite the above equation as
dy
p( y )  g ( x)
dx
(2)

where p(y) = 1/h(y).


When h(y) = 1, (2) reduces to (1).

CH2_27
 If y = (x) is a solution of (2), we must have
P ( ( x)) ' ( x)  g ( x)
and
 P( ( x)) ' ( x)dx
(3)

But dy =  (x) dx, (3) is the same as


 P( y)dy   g ( x)dx or H ( y)  G ( x)  c
(4)

CH2_28
Example 1

Solve (1 + x) dy – y dx = 0.
Solution:
Since dy/y = dx/(1 + x), we have
dy dx
 y  1  x
ln y  ln 1  x  c1
y  eln 1 x c1  eln 1 x  ec1  1  x ec1
c1
  e (1  x)
Replacing  ec1 by c, gives y = c(1 + x).
CH2_29
Example 2
dy x
Solve  , y (4)  3
dx y
Solution:
y2 x2
 ydy    xdx and 2   2  c1
We also can rewrite the solution as
x2 + y2 = c2, where c2 = 2c1
Apply the initial condition, 16 + 9 = 25 = c2
See Fig2.18.

CH2_30
Fig2.18

CH2_31
Losing a Solution

 When r is a zero of h(y), then y = r is also a solution


of dy/dx = g(x)h(y). However, this solution will not sh
ow up after integration. That is a singular solution.

CH2_32
Example 3

Solve dy/dx = y2 – 4.
Solution:
Rewrite this DE as
dy  1 1

 dx or  4  4
 dy  dx
 y  2 y  2 
2
y 4
(5) 1 1
then ln y  2  y  2  x  c1 ,
4 4
y2
ln  4 x  c2 ,
y2
y2 4 x  c2
e
y2
CH2_33
Example 3 (2)

Replacing exp(c2) by c and solving for y, we have


1  ce 4 x
y2 (6)
1  ce 4 x
If we rewrite the DE as dy/dx = (y + 2)(y – 2), from the
previous discussion, we have y =  2 is a singular soluti
on.

CH2_34
Example 4
2y dy
Solve cos x(e  y )  e y sin 2 x, y (0)  0
dx
Solution:
Rewrite this DE as
e2 y  y sin 2 x
y
dy  dx
e cos x
using sin 2x = 2 sin x cos x, then
 (ey – ye-y) dy = 2  sin x dx
from integration by parts,
ey + ye-y + e-y = -2 cos x + c (7)
From y(0) = 0, we have c = 4 to get
ey + ye-y + e-y = 4 −2 cos x (8)

CH2_35
Use of Computers

 Let G(x, y) = ey + ye-y + e-y + 2 cos x. Using some co


mputer software, we plot the level curves of G(x, y) =
c. The resulting graphs are shown in Fig2.19 and Fig2.
20.

CH2_36
Fig2.19 Fig2.20

CH2_37
 If we solve
dy/dx = xy½ , y(0) = 0
(9)
The resulting graphs are shown in Fig2.21.

CH2_38
Fig2.21

CH2_39
2.3 Linear Equations
 Introduction:
Linear DEs are friendly to be solved. We can find so
me smooth methods to deal with.
DEFINITION 2.2
Linear Equations

A first-order DE of the form


a1(x)(dy/dx) + a0(x)y = g(x) (1)
is said to be a linear equation in y. When g(x) = 0,
(1) is said to be homogeneous; otherwise it is
nonhomogeneous.

CH2_40
 Standard Form
The standard for of a first-order DE can be written as
dy/dx + P(x)y = f(x)
(2)
 The Property
DE (2) has the property that its solution is sum of two
solutions, y = yc + yp, where yc is a solution of the ho
mogeneous equation
dy/dx + P(x)y = 0
(3)
and yp is a particular solution of (2).
CH2_41
 Verification
d
[ yc  yo ]  P ( x)[ yc  y p ]
dx
 dyc   dy p 
  P ( x) yc     P( x) yP   f ( x)
 dx   dx 
Now (3) is also separable. Rewrite (3) as
dy
 P ( x)dx  0
y
 Solving for y gives
  P ( x ) dx
y  ce  cy ( x)
1
CH2_42
Variation of Parameters

 Let yp = u(x) y1(x), where y1(x) is defined as above.


We want to find u(x) so that yp is also a solution. Subs
tituting yp into (2) gives
dy1 du
u  y1  P ( x)uy1  f ( x)
dx dx
or
 dy1  du
u  P ( x) y1   y1  f ( x)
 dx  dx

CH2_43
 Since dy1/dx + P(x)y1 = 0, so that y1(du/dx) = f(x) Rea
rrange the above equation,
f ( x) f ( x)
du  dx and u   dx
y1 ( x) y1 ( x)

From the definition of y1(x), we have


  P ( x ) dx   P ( x ) dx  P ( x ) dx
y  yc  y p  ce e  e f ( x)dx
(4)

CH2_44
Solving Procedures
 If (4) is multiplied by
 P ( x ) dx (5)
e
then
(6)
e  P ( x ) dx y  c   e P ( x ) dx f ( x)dx
is differentiated
d   P ( x ) dx  (7)
e y e  P ( x ) dx
f ( x)
dx  
we get
dy (8)
e  P ( x ) dx
 P ( x )e 
P ( x ) dx
y  e
P ( x ) dx
f ( x)
Dividing (8) bydx gives (2).
e  P ( x ) dx

CH2_45
Integrating Factor

 We call y1(x) = e  P ( x ) dx is an integrating factor and w


e should only memorize this to solve problems.

CH2_46
Example 1

Solve dy/dx – 3y = 6.
Solution:
Since P(x) = – 3, we have the integrating factor is
e  ( 3) dx
e 3 x
then 3 x dy
e  3e 3 x y  6e 3 x
dx
is the same as
d 3 x
[ e y ]  6e  3 x
dx
So e-3xy = -2e-3x + c, a solution is y = -2 + ce-3x, - < x
< .
CH2_47
Notes

 The DE of example 1 can be written as


dy
 3( y  2)
dx
so that y = –2 is a critical point.

CH2_48
General Solutions

 Equation (4) is called the general solution on some int


erval I. Suppose again P and f are continuous on I. W
riting (2) as Suppose again P and f are continuous on
I. Writing (2) as y = F(x, y) we identify
F(x, y) = – P(x)y + f(x), F/y = – P(x)
which are continuous on I.
Then we can conclude that there exists one and only o
ne solution of
dy
 P ( x) y  f ( x), y ( x0 )  y0
(9) dx

CH2_49
Example 2
dy 6 x
Solve x  4 y  x e
dx
Solution:
Dividing both sides by x, we have
dy 4
 y  x 5e x
dx x (1
0)
So, P(x) = –4/x, f(x) = x5ex, P and f are continuous on
(0, ).
 4  dx / x ln x  4
Since x > 0,e we write
e the
4 ln xintegrating
e  xfactor
4 as

CH2_50
Example 2

Multiply (10) by x-4,


4 dy 5 y d 4
x  4 x  xe , [ x y ]  xe x
x
dx dx
Using integration by parts, it follows that the general
solution on (0, ) is
x-4y = xex – ex + c or y = x5ex – x4ex + cx4

CH2_51
Example 3
dy 2
Find the general solution of ( x  9)  xy  0
dx
Solution:
Rewrite as
dy x
 2 y0 (1
1) dx x  9

So, P(x) = x/(x2 – 9). Though P(x) is continuous on


(-, -3), (-3, 3) and (3, ), we shall solve this DE on t
he xdx
first 2 and third
/( x 9 )
1
 2 intervals.
xdx /( x 2
 9 ) The
1
ln xintegrating
2
9
2
factor is
e  e2  e2  x 9

CH2_52
Example 3 (2)

then multiply (11) by this factor to get


d
dx
 
x2  9 y  0
and
x2  9 y  c
Thus, either for x > 3 or x < -3, the general solution is
y  c / x2  9

 Notes: x = 3 and x = -3 are singular points of the DE a


2
nd y  c / x is9discontinuous at these points.

CH2_53
Example 4
dy
Solve  y  x , y ( 0)  4
dx
Solution:
We first have P(x) = 1 and f(x) = x, and are continuou
s on (-, ).
The integrating factor is e  dx / x
 e x, so
d x
[e y ]  xe x
dx
gives exy = xex – ex + c and y = x – 1 + ce-x
Since y(0) = 4, then c = 5. The solution is
y = x – 1 + 5e-x, – < x <  (1
2)

CH2_54
 Notes: From the above example, we find
yc = ce-x and yp = x – 1
we call yc is a transient term, since yc  0 as x .
Some solutions are shown in Fig2.24.
Fig2.24

CH2_55
Example 5
dy
Solve  y  f ( x), y (0)  0 , where
dx
1, 0  x  1
f ( x)  
0, x  1
Solution:
First we see the graph of f(x) in Fig2.25.
Fig2.25

CH2_56
Example 5 (2)

We solve this problem on 0  x  1 and 1 < x < .


For 0  x  1,
dy d x
 y  1, [e y ]  e x
dx dx
then y = 1 + c1e-x
Since y(0) = 0, c1 = -1, y = 1 - e-x

For x > 1,
dy/dx + y = 0 then y = c2e-x

CH2_57
Example 5

We have 1  e  x , 0  x  1
y   x
c2e , x  1
Furthermore, we want y(x) is continuous at x = 1,
that is, when x  1+, y(x) = y(1) implies c2 = e – 1.
As in Fig2.26, the function
1  e  x , 0  x 1
y x (1
3) (e  1)e , x  1

are continuous on [0, ).

CH2_58
Fig2.26

CH2_59
Functions Defined by Integrals

 We are interested in the error function and complem


entary error function
2 x t 2 2  t 2
erf ( x) 
 0
e dt anderfc( x) 
 x
e dt (1
4)
 t 2
(2 /  )  e dt  1
0
Since , we find erf(x) + erfc(x) = 1

CH2_60
Example 6

Solve dy/dx – 2xy = 2, y(0) = 1.


Solution:
We find the integrating factor is exp{-x2},
d  x2  x2 x 2 x t 2 x2
dx
[ e ]  2e we get y  2e 0 e dt  ce (15)

Applying y(0) = 1, we have c = 1. See Fig2.27

CH2_61
Fig2.27

CH2_62
2.4 Exact Equations
 Introduction:
Though ydx + xdy = 0 is separable, we can solve it in
an alternative way to get the implicit solution xy = c.

CH2_63
Differential of a Function of Two Variables

 If z = f(x, y), its differential or total differential is


f f
dz  dx  dy
x y
(1)
Now if z = f(x, y) = c,
 f dx   f dy  0
   
 x   y 
(2)

eg: if x2 – 5xy + y3 = c, then (2) gives


(2x – 5y) dx + (-5x + 3y2) dy = 0
(3)
CH2_64
DEFINITION 2.3
Exact Equation
An expression M(x, y) dx + N(x, y) dy is an exact
differential in a region R corresponding to the
differential of some function f(x, y). A first-order DE
of the form
M(x, y) dx + N(x, y) dy = 0
is said to be an exact equation, if the left side is an
exact differential.

CH2_65
THEOREM 2.1
Criterion for an Extra Differential

Let M(x, y) and N(x, y) be continuous and have


continuous first partial derivatives in a region R defined
by a < x < b, c < y < d. Then a necessary and
sufficient condition that M(x, y) dx + N(x, y) dy be an
exact differential is
M N
 (4)
y x

CH2_66
Proof of Necessity for Theorem 2.1

 If M(x, y) dx + N(x, y) dy is exact, there exists some f


unction f such that for all x in R
M(x, y) dx + N(x, y) dy = (f/x) dx + (f/y) dy
Therefore
f f
M(x, y) = , N(x, y) =
x y
and
M   f   2 f   f  N
     
y y  x  yx x  y  x
The sufficient part consists of showing that there is a
function f for which
f = M(x, y) andf = N(x, y)
x y
CH2_67
Method of Solution

 Since f/x = M(x, y), we have


f ( x, y )   M ( x, y )dx  g ( y ) (5)

Differentiating (5) with respect to y and assume


f/y = N(x, y)
Then
f 
  M ( x, y )dx  g ' ( y )  N ( x, y )
y y
and

g ' ( x)  N ( x, y )   M ( x, y )dx (6)
y

CH2_68
Integrate (6) with respect to y to get g(y), and substitu
te the result into (5) to obtain the implicit solution f(x,
y) = c.

CH2_69
Example 1

Solve 2xy dx + (x2 – 1) dy = 0.


Solution:
With M(x, y) = 2xy, N(x, y) = x2 – 1, we have 
M/y = 2x = N/x
Thus it is exact.
There exists a function f such that
f/x = 2xy, f/y = x2 – 1
Then
f(x, y) = x2y + g(y)
f/y = x2 + g’(y) = x2 – 1
g’(y) = -1, g(y) = -y
CH2_70
Example 1 (2)

Hence f(x, y) = x2y – y, and the solution is


x2y – y = c, y = c/(1 – x2)
The interval of definition is any interval not containin
g x = 1 or x = -1.

CH2_71
Example 2

Solve (e2y – y cos xy)dx+(2xe2y – x cos xy + 2y)dy = 0.


Solution:
This DE is exact because
M/y = 2e2y + xy sin xy – cos xy = N/x
Hence a function f exists, and
f/y = 2xe2y – x cos xy + 2y
that is,
f ( x, y )  2 x  e 2 y dy  x  cos xydy  2  ydy
2y 2
 xe  sin xy  y  h( x)
f
 e 2 y  y cos xy  h' ( x)  e 2 y  y cos xy
x
CH2_72
Example 2 (2)

Thus h’(x) = 0, h(x) = c. The solution is


xe2y – sin xy + y2 + c = 0

CH2_73
Example 3
dy xy 2  cos x sin x
Solve  2
, y ( 0)  2
dx y (1  x )
Solution:
Rewrite the DE in the form
(cos x sin x – xy2) dx + y(1 – x2) dy = 0
Since
M/y = – 2xy = N/x (This DE is exact)
Now
f/y = y(1 – x2)
f(x, y) = ½y2(1 – x2) + h(x)
f/x = – xy2 + h’(x) = cos x sin x – xy2

CH2_74
Example 3 (2)

We have
h(x) = cos x sin x
h(x) = -½ cos2 x
Thus ½y2(1 – x2) – ½ cos2 x = c1
or
y2(1 – x2) – cos2 x = c (7)

where c = 2c1. Now y(0) = 2, so c = 3.


The solution is
y2(1 – x2) – cos2 x = 3

CH2_75
Fig 2.28

Fig 2.28 shows the family curves of the above


example and the curve of the specialized VIP is
drawn in color.

CH2_76
Integrating Factors

 It is sometimes possible to find an integrating factor


(x, y), such that
(x, y)M(x, y)dx + (x, y)N(x, y)dy = 0 (8)
is an exact differential.
Equation (8) is exact if and only if
(M)y = (N)x
Then
My + yM = Nx + xN,
or
xN – yM = (My – Nx)  (9)

CH2_77
 Suppose  is a function of one variable, say x, then
x = d /dx
(9) becomes d M  N
 y x
 (10)
dy N
If we have (My – Nx) / N depends only on x, then (10) i
s a first-order ODE and is separable.
Similarly, if  is a function of y only, then
d N x  M y (11)
 
dy M
In this case, if (Nx – My) / M is a function of y only, the
n we can solve (11) for .
CH2_78
 We summarize the results for
M(x, y) dx + N(x, y) dy = 0 (12)
If (My – Nx) / N depends only on x, then
M y Nx
 dx
(13)
 ( x)  e N

If (Nx – My) / M depends only on y, then

N x M y
 dy
 ( y)  e M
(14)

CH2_79
Example 4

The nonlinear DE: xy dx + (2x2 + 3y2 – 20) dy = 0 is not


exact. With M = xy, N = 2x2 + 3y2 – 20, we find
My = x, Nx = 4x. Since
M y  Nx x  4x  3x
 2  2
N 2 x  3 y  20 2 x  3 y 2  20
2

depends on both x and y.


Nx  M y 3

M y
depends only on y.
The integrating factor is
e  3dy/y = e3lny = y3 = (y)
CH2_80
Example 4 (2)

then the resulting equation is


xy4 dx + (2x2y3 + 3y5 – 20y3) dy = 0
It is left to you to verify the solution is
½ x2y4 + ½ y6 – 5y4 = c

CH2_81
2.5 Solutions by Substitutions
 Introduction
If we want to transform the first-order DE:
dx/dy = f(x, y)
by the substitution y = g(x, u), where u is a function o
f x, then
dy du
 g x ( x, u )  g u ( x, u )
dx dx
Since dy/dx = f(x, y), y = g(x, u),
du
f ( x, g ( x, u ))  g x ( x, u )  gu ( x, u )
dx
Solving for du/dx, we have the form du/dx = F(x, u). I
f we can get u = (x), a solution is y = g(x, (x)).
CH2_82
Homogeneous Equations

 If a function f has the property f(tx, ty) = tf(x, y), the


n f is called a homogeneous function of degree .
eg: f(x, y) = x3 + y3 is homogeneous of degree 3,
f(tx, ty) = (tx)3 + (ty)3 = t3f(x, y)
 A first-order DE:
M(x, y) dx + N(x, y) dy = 0
(1)
is said to be homogeneous, if both M and N are homo
geneous of the same degree, that is, if
M(tx, ty) = tM(x, y), N(tx, ty) = tN(x, y)

CH2_83
 Note: Here the word “homogeneous” is not the same
as in Sec 2.3.
 If M and N are homogeneous of degree ,
M(x, y)=x M(1, u), N(x, y)=xN(1, u), u=y/x (2)
M(x, y)=y M(v, 1), N(x, y)=yN(v, 1), v=x/y (3)
Then (1) becomes
x M(1, u) dx + x N(1, u) dy = 0,
or
M(1, u) dx + N(1, u) dy = 0
where u = y/x or y = ux and dy = udx + xdu,

CH2_84
then
M(1, u) dx + N(1, u)(u dx + x du) = 0,
and
[M(1, u) + u N(1, u)] dx + xN(1, u) du = 0
or
dx N (1, u )dx
 0
x M (1, u )  uN (1, u )

CH2_85
Example 1

Solve (x2 + y2) dx + (x2 – xy) dy = 0.


Solution:
We have M = x2 + y2, N = x2 – xy are homogeneous o
f degree 2.
Let y = ux, dy = u dx + x du, then
(x2 + u2x2) dx + (x2 - ux2)(u dx + x du) = 0
1 u dx
du   0
1 u x
 1  2  du  dx  0
 1  u  x

CH2_86
Example 1 (2)

Then
 u  2 ln 1  u  ln x  ln c
y y
  2 ln 1   ln x  ln c
x x
Simplify to get
( x  y)2 y
ln  or ( x  y ) 2  cxe y / x
cs x
 Note: We may also try x = vy.

CH2_87
Bernoulli’s Equation

 The DE: dy/dx + P(x)y = f(x)yn (4)


where n is any real number, is called Bernoulli’s Equ
ation.

 Note for n = 0 and n = 1, (4) is linear, otherwise, let


u = y1-n
to reduce (4) to a linear equation.

CH2_88
Example 2

Solve x dy/dx + y = x2y2.


Solution:
Rewrite the DE as
dy/dx + (1/x)y = xy2
With n = 2, then y = u-1, and
dy/dx = -u-2(du/dx)
From the substitution and simplification,
du/dx – (1/x)u = -x
The integrating factor on (0, ) is
  dx / x ln x ln x 1
e e e  x 1

CH2_89
Example 2 (2)
du 1
Integrating  u  x
dx x
gives x-1u = -x + c, or u = -x2 + cx.

Since u = y-1, we have y = 1/u and a solution of the D


E is y = 1/(−x2 + cx).

CH2_90
Reduction to Separation of Variables

 A DE of the form

dy/dx = f(Ax + By + C)
(5)

can always be reduced to a separable equation by mea


ns of substitution u = Ax + By + C.

CH2_91
Example 3

Solve dy/dx = (-2x + y)2 – 7, y(0) = 0.


Solution:
Let u = -2x + y, then du/dx = -2 + dy/dx,
du/dx + 2 = u2 – 7 or du/dx = u2 – 9
This is separable. Using partial fractions,
du
 dx
(u  3)(u  3)
or
1 1 1 
 du  dx
6 u  3 u  3

CH2_92
Example 3 (2)

then we have
1 u 3
ln  x  c1
6 u3
or 3(1  ce6 x )
y  2x 
1  ce6 x
Solving the equation for u and the solution is
3(1  ce6 x )
or u 6x
1  ce
(6)
3(1  e6 x )
y  2x  u  2x  6x
Applying y(0) = 0 gives c = -1. 1  e

CH2_93
Example 3 (3)
The graph of the particular solution
6x
3(1  e )
y  2x  u  2x 
1  e6 x
is shown in Fig 2.30 in solid color.

CH2_94
Fig 2.30

CH2_95
2.6 A Numerical Method
 Using the Tangent Line
Let us assume
y’ = f(x, y), y(x0) = y0 (1)
possess a solution.
For example, y '  0.1 y  0.4 x 2 , y (2)  4the resulting
graph is shown in Fig 2.31.

CH2_96
Fig 2.31

CH2_97
Euler’s Method

 Using the linearization of the unknown solution y(x) o


f (1) at x0,
L(x) = f(x0, y0)(x - x0) + y0 (2)
Replacing x by x1 = x0 + h, we have
L(x1) = f(x0, y0)(x0 + h - x0) + y0
or y1 = y0 + h f(x0, y0)
and yn+1 = yn + h f(xn, yn) (3)
where xn = x0 + nh. See Fig 2.32

CH2_98
Fig 2.32

CH2_99
Example 1
2
Consider y '  0 . 1 y  0 . 4 x , y (2)  4. Use Euler’s
method to obtain y(2.5) using h = 0.1 and then h = 0.05.
Solution:
Let f ( x, y )  0.1 y  0.4 x 2 the results step by step are
shown in Table 2.1 and table 2.2.

CH2_100
Table 2.1 Table 2.2
Table 2.1 h = 0.1 Table 2.2 h = 0.05
xn yn xn yn
2.00 4.0000 2.00 4.0000
2.10 4.1800 2.05 4.0900
2.20 4.3768 2.10 4.1842
2.30 4.5914 2.15 4.2826
2.40 4.8244 2.20 4.3854
2.50 5.0768 2.25 4.4927
2.30 4.6045
2.35 4.7210
2.40 4.8423
2.45 4.9686
2.50 5.0997
CH2_101
Example 2

Consider y’ = 0.2xy, y(1) = 1. Use Euler’s method to obt


ain y(1.5) using h = 0.1 and then h = 0.05.
Solution:
We have f(x, y) = 0.2xy, the results step by step are sho
wn in Table 2.3 and table 2.4.

CH2_102
Table 2.3

Table 2.3 h = 0.1


xn yn Actual Absolute % Rel.
Value Error Error
1.00 1.0000 1.0000 0.0000 0.00
1.10 1.0200 1.0212 0.0012 0.12
1.20 1.0424 1.0450 0.0025 0.24
1.30 1.0675 1.0714 0.0040 0.37
1.40 1.0952 1.1008 0.0055 0.50
1.50 1.1259 1.1331 0.0073 0.64

CH2_103
Table 2.4
Table 2.4 h = 0.05
xn yn Actual Absolute % Rel.
Value Error Error
1.00 1.0000 1.0000 0.0000 0.00
1.05 1.0100 1.0103 0.0003 0.03
1.10 1.0206 1.0212 0.0006 0.06
1.15 1.0318 1.0328 0.0009 0.09
1.20 1.0437 1.0450 0.0013 0.12
1.25 1.0562 1.0579 0.0016 0.16
1.30 1.0694 1.0714 0.0020 0.19
1.35 1.0833 1.0857 0.0024 0.22
1.40 1.0980 1.1008 0.0028 0.25
1.45 1.1133 1.1166 0.0032 0.29
1.50 1.1295 1.1331 0.0037 0.32
CH2_104
Numerical Solver

 See Fig 2.33 to know the comparisons of numerical


methods.
Fig 2.33

CH2_105
Using a Numerical Solver

 When the result is not helpful by numerical solvers,


as in Fig 2.34, we may decrease the step size, use
another method, or use another solver.

Fig 2.34

CH2_106
2.7 Linear Models
 Growth and Decay
dx
 kx, x(t0 )  x0
(1) dt

CH2_107
Example 1: Bacterial Growth

P0 : initial number of bacterial = P(0)


P(1) = 3/2 P(0)
Find the time necessary for triple number.
Solution:
Since dP/dt = kt, dP/dt – kt = 0,
we have P(t) = cekt, using P(0) = P0
then c = P0 and P(t) = P0ekt
Since P(1) = 3/2 P(0), then P(1) = P0ek = 3/2 P(0)
So, k = ln(3/2) = 0.4055.
Now P(t) = P0e0.4055t = 3P0 , t = ln3/0.4055 = 2.71.
See Fig 2.35.
CH2_108
Fig 2.35

CH2_109
Fig 2.36

 k > 0 is called a growth constant, and k > 0 is called


a decay constant. See Fig 2.36.

CH2_110
Example 2: Half-Life of Plutonium

A reactor converts U-238 into the isotope plutonium-23


9. After 15 years, there is 0.043% of the initial amount
A0 of the plutonium has disintegrated. Find the half-life
of this isotope.
Solution:
Let A(t) denote the amount of plutonium remaining at ti
me t. The DE is as
dA (2)
 kA, A(0)  A0
dt
The solution is A(t) = A0ekt. If 0.043% of A0 has disinteg
rated, then 99.957% remains.
CH2_111
Example 2 (2)

Then, 0.99957A0 = A(15) = A0e15k, then


k = (ln 0.99957) / 15 =-0.00002867
Let A(t) = A0e-0.00002867t = ½ A0
Then
ln 2
T  24180 years.
0.00002867

CH2_112
Example 3: Carbon Dating

A fossilized bone contains 1/1000 the original amount


C-14. Determine the age of the fossil.
Solution:
We know the half-life of C-14 is 5600 years.
Then A0 /2 = A0e5600k, k = −(ln 2)/5600 = −0.00012378.
And
A(t) = A0 /1000 = A0e -0.00012378t
ln1000
T  55800 years.
0.00012378

CH2_113
Newton’s Law of Cooling


dT
 k (T  Tm )
dx
(3)

where Tm is the temperature of the medium around the


object.

CH2_114
Example 4

A cake’s temperature is 300F. Three minutes later its


temperature is 200F. How long will it for this cake to
cool off to a room temperature of 70F?
Solution:
We identify Tm = 70, then
dT
 k (T  70), T (0)  300
dx (4)
and T(3) = 200. From (4), we have
dT
 kdt , ln T  70  kt  c1
T  70
kt
T (t )  70  c2e
CH2_115
Example 4 (2)

Using T(0) = 300 then c2 = 230


Using T(3) = 200 then e3k = 13/23, k = -0.19018
Thus T(t) = 70 + 230e-0.19018t (5)
From (5), only t = , T(t) = 70. It means we need a re
asonably long time to get T = 70. See Fig 2.37.

CH2_116
Fig 2.37

CH2_117
Mixtures

dx
 Rin  Rout
(6) dt

CH2_118
Example 5

Recall from example 5 of Sec 1.3, we have


dx 1
 x  6, x(0)  50
dt 100
How much salt is in the tank after along time?
Solution:
Since d
t / 100 t / 100 t / 100
[e x ]  6e , x(t )  600  ce
dt
Using x(0) = 50, we have
x(t) = 600 - 550e-t/100 (7)
When t is large enough, x(t) = 600.

CH2_119
Fig 2.38

CH2_120
Series Circuits

 See Fig 2.39. di


L  Ri  E (t )
(8) dt

See Fig 2.40. 1


Ri  q  E (t )
C
(9)
dq 1
R  q  E (t )
dt C

(10)

CH2_121
Fig 2.39

CH2_122
Fig2.40

CH2_123
Example 6

Refer to Fig 2.39, where E(t) = 12 Volt, L = ½ Henry


R = 10 Ohms. Determine i(t) where i(0) = 0.
Solution:
From (8), 1 di
 10i  12, i (0)  0
2 dt
Then d 20
[e i ]  24e 20t
dt
6
i (t )   ce20t
5
Using i(0) = 0, c = -6/5, then i(t) = (6/5) – (6/5)e-20t.

CH2_124
Example 6 (2)

A general solution of (8) is


e ( R / L ) t ( R / L ) t

( R / L ) t
i (t )  e E (t ) dt  ce (11)
L
When E(t) = E0 is a constant, (11) becomes
Eo
i (t )   ce ( R / L )t (12)
R
where the first term is called a steady-state part, and the
second term is a transient term.

CH2_125
Note:
Referring to example 1, P(t) is a continuous function. H
owever, it should be discrete. Keeping in mind, a mathe
matical model is not reality.
See Fig 2.41.

CH2_126
Fig 2.41

CH2_127
2.8 Nonlinear Models
 Population Dynamics
If P(t) denotes the size of population at t, the relative
(or specific), growth rate is defined by
dP / dt (1)
P
When a population growth rate depends on the presen
t number , the DE is
dP / dt dP (2)
 f ( P ) or  Pf ( P )
P dt
which is called density-dependent hypothesis.

CH2_128
Logistic Equation

 If K is the carrying capacity, from (2) we have


f(K) = 0, and simply set f(0) = r. Fig 2.46 shows three
functions that satisfy these two conditions.

CH2_129
Fig 2.46

CH2_130
 Suppose f (P) = c1P + c2. Using the conditions, we have
c2 = r, c1 = −r/K. Then (2) becomes
dP  r 
 P r  P  (3)
dt  K 
Relabel (3), then
dP (4)
 P (a  bP)
dt
which is known as a logistic equation, its solution is call
ed the logistic function and its graph is called a logistic c
urve.

CH2_131
Solution of the Logistic Equation

 From dP
 dt
P (a  bP)
1 b/a 
 ln P  dP  dt
a ln a  bP 
P
ln  at  ac
( a  b) P
After simplification, we have
ac1e at ac1
P (t )  
1  bc1e at
bc1  e at

CH2_132
 If P(0) = P0  a/b, then c1 = P0/(a – bP0)
aP0
P (t ) 
bP0  (a  bP0 )e at
(5)

CH2_133
Graph of P(t)
 Form (5), we have the graph as in Fig 2.47.
When 0 < P0 < a/2b, see Fig 2.47(a).
When a/2b < P0 < a/b, see Fig 2.47(b).
Fig 2.47

CH2_134
Example 1

Form the previous discussion, assume an isolated


campus of 1000 students, then we have the DE
dx
 kx(1000  x), x(0)  1
dt
Determine x(6).
Solution:
Identify a = 1000k, b = k, from (5)
1000
x(t ) 
1  999e 1000kt

CH2_135
Example 1 (2)
Since x(4) = 50, then -1000k = -0.9906, Thus
x(t) = 1000/(1 + 999e-0.9906t)
1000
x(t ) 
1  999e 0.9906t
1000
x ( 6)  5.9436
 276 students
1  999e

See Fig 2.48.

CH2_136
Fig 2.48

CH2_137
Modification of the Logistic Equation

 dP
 P (a  bP)  h
dt
or
dP
 P (a  bP)  h
(6) dt

or dP
 P (a  b ln P )
dt

(7)

which is known as the Gompertz DE.


CH2_138
Chemical Reactions


dX  M  N
 a  X  b  X 
dt  M  N  M N 
(8)

or
dX
 k (  X )(   X )
dt
(9)

CH2_139
Example 2
The chemical reaction is described as
dX  X  4 
  50   32  X 
dt  5  5 
Then dX
 k (250  X )(40  X )
dt
By separation of variables and partial fractions,
250  X 250  X 210 kt
ln  210kt  c1 or  c2e (10)
40  X 40  X
Using X(10) = 30, 210k = 0.1258, finally
1  e 0.1258t (11)
X (t )  1000
25  4e 0.1258t
See Fig 2.49.
CH2_140
Fig 2.49

CH2_141
2.9 Modeling with Systems of First-Order DEs

 Systems
dx dy
 g1 (t , x, y )  g 2 (t , x, y )
(1) dt dt

where g1 and g2 are linear in x and y.


dx Series
 Radioactive Decay
 1 x
dt
dy
(2)  1 x  2 y
dt
dz
 2 y
dt
CH2_142
Mixtures

 From Fig 2.52, we have


dx1 2 1
  x1  x2
dt 25 50
(3) dx2 2 2
 x1  x2
dt 25 25

CH2_143
Fig 2.52

CH2_144
A Predator-Prey Model
 Let x, y denote the fox and rabbit populations at t.
When lacking of food,
dx/dt = – ax, a > 0 (4)
When rabbits are present,
dx/dt = – ax + bxy (5)
When lacking of foxes,
dy/dt = dy, d > 0 (6)
When foxes are present,
dy/dt = dy – cxy (7)

CH2_145
Then
dx
 ax  bxy  x( a  by )
dt
(8) dy
 dy  cxy  y (d  cx)
dt

which is known as the Lotka-Volterra predator-prey


model.

CH2_146
Example 1

 Suppose
dx
 0.16 x  0.08 xy
dt
dy
 4.5 y  0.9 xy, x(0)  4, y (0)  4
dt

Figure 2.53 shows the graph of the solution.

CH2_147
Fig 2.53

CH2_148
Competition Models
 dx/dt = ax, dy/dt = cy (9)
Two species compete, then
dx/dt = ax – by
dy/dt = cy – dx (10)
or
dx/dt = ax – bxy
dy/dt = cy – dxy (11)
or
dx/dt = a1x – b1x2
dy/dt = a2y – b2y2 (12)

CH2_149
or
dx/dt = a1x – b1x2 – c1xy
dy/dt = a2y – b2y2 – c2xy (1
3)

CH2_150
Network

 Referring to Fig 2.54, we have


i1(t) = i2(t) + i3(t)
(14) di2
E (t )  i1R1  L1  i2 R2
dt
di3
(15)E (t )  i1R1  L2
dt

(16)

CH2_151
 Using (14) to eliminate i1, then
di2
L1  ( R1  R2 )i2  R3i3  E (t )
dt
(17)
di3
L2  R1i2  R1i3  E (t )
dt

Referring to Figdi2.55, please verify


L 1  Ri2  E (t )
dt
di2
(18) RC  i2  i1  0
dt
CH2_152
Fig 2.54

CH2_153
Fig 2.55

CH2_154

You might also like