first-order differential equations
DESCRIPTION
CHAPTER 2. First-Order Differential Equations. Chapter 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 - PowerPoint PPT PresentationTRANSCRIPT
Copyright © Jones and Bartlett;滄海書局 1
First-Order Differential Equations
CHAPTER 2
Copyright © Jones and Bartlett;滄海書局 Ch2_2
Chapter Contents
2.1 Solution Curves Without a Solution2.2 Separable Variables2.3 Linear Equations2.4 Exact Equations2.5 Solutions by Substitutions2.6 A Numerical Methods2.7 Linear Models2.8 Nonlinear Model2.9 Modeling with Systems of First-Order DEs
Copyright © Jones and Bartlett;滄海書局 Ch2_3
2.1 Solution Curve Without a Solution
Introduction Begin our study of first-order DE with analyzing a DE qualitatively.
SlopeA derivative dy/dx of y = y(x) gives slopes of tangent lines at points.
Lineal ElementAssume 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 Fig 2.1.1.
Copyright © Jones and Bartlett;滄海書局 Ch2_4
Fig 2.1.1 Solution curve is tangent to linear element at (2, 3)
Copyright © Jones and Bartlett;滄海書局 Ch2_5
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 with slope f(x, y), then the collection is called a direction field or a slope field of the following DE dy/dx = f(x, y)
Copyright © Jones and Bartlett;滄海書局 Ch2_6
Example 1 Direction Field
The direction field of dy/dx = 0.2xy is shown in Fig 2.1.2(a) and for comparison with Fig 2.1.2(a), some representative graphs of this family are shown in Fig 2.1.2(b).
Copyright © Jones and Bartlett;滄海書局 Ch2_7
Fig 2.1.2 Direction field and solution family in Ex 1
Copyright © Jones and Bartlett;滄海書局 Ch2_8
Example 2 Direction Field
Use a direction field to draw an approximate solution curve for dy/dx = sin y, y(0) = −3/2.
Solution:Recall from the continuity of f(x, y) and f/y = cos y. Theorem 1.2.1 guarantees the existence of a unique solution curve passing any specified points in the plane. Now split the region containing (-3/2, 0) into grids. We calculate the lineal element of each grid to obtain Fig 2.1.3.
Copyright © Jones and Bartlett;滄海書局 Ch2_9
Fig 2.1.3 Direction field for dy/dx=siny in Ex 2
Copyright © Jones and Bartlett;滄海書局 Ch2_10
Increasing/DecreasingIf 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.
Copyright © Jones and Bartlett;滄海書局 Ch2_11
Critical Points
The zeros of f in (1) are important. If f(c) = 0, then c is a critical point, equilibrium point or stationary point.
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.
Copyright © Jones and Bartlett;滄海書局 Ch2_12
Example 3 An Autonomous DE
The following DEdP/dt = P(a – bP)
where a and b are positive constants, is autonomous.From f(P) = P(a – bP) = 0, the equilibrium solutions are P(t) = 0 and P(t) = a/b.
Put the critical points on a vertical line. The arrows in Fig 2.1.4 indicate the algebraic sign of f(P) = P(a – bP). If the sign is positive or negative, then P is increasing or decreasing on that interval.
Copyright © Jones and Bartlett;滄海書局 Ch2_13
Fig 2.1.4 Phase portrait for Ex 3
Copyright © Jones and Bartlett;滄海書局 Ch2_14
Solution Curves
If we guarantee the existence and uniqueness of (1), through any point (x0, y0) in R, there is only one solution curve. See Fig 2.1.5(a).
Suppose (1) possesses exactly two critical points, c1, and c2, where c1 < c2. The graph of the equilibrium solution y(x) = c1, y(x) = c2 are horizontal lines and split R into three regions, say R1, R2 and R3 as in Fig 2.1.5(b).
Copyright © Jones and Bartlett;滄海書局 Ch2_15
Fig 2.1.5 Lines y(x)=c1 and y(x)=c2 partition R into three horizontal subregions
Copyright © Jones and Bartlett;滄海書局 Ch2_16
Some discussions without proof:
(1) If (x0, y0) in Ri, i = 1, 2, 3, when y(x) passes through (x0, y0), will remain in the same subregion. See Fig 2.1.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.
Copyright © Jones and Bartlett;滄海書局 Ch2_17
(4)If y(x) is bounded above by c1, (y(x) < c1), the graph 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;
Copyright © Jones and Bartlett;滄海書局 Ch2_18
Example 4 Example 3 Revisited
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.1.6.
Copyright © Jones and Bartlett;滄海書局 Ch2_19
Fig 2.1.6 Phase portrait and solution curve in each of the three subregions in Ex 4
Copyright © Jones and Bartlett;滄海書局 Ch2_20
Example 5 Solution Curves of an Autonomous DE
The DE: dy/dx = (y – 1)2 possesses the single critical point 1. From Fig 2.1.7(a), we conclude a solution y(x) is increasing in - < y < 1 and 1 < y < , where - < x < . See Fig 2.1.7.
Copyright © Jones and Bartlett;滄海書局 Ch2_21
Fig 2.1.7 Behavior of solution near y=1 on Ex 5
Copyright © Jones and Bartlett;滄海書局 Ch2_22
Attractors and Repellers
See Fig 2.1.8(a). When y0 lies on either side of c, it will approach c. This kind of critical point is said to be asymptotically stable, also called an attractor.
See Fig 2.1.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.1.8(c) and (d). When y0 lies on one side of c, it will be attracted to c and repelled from the other side. This kind of critical point is said to be semi-stable.
Copyright © Jones and Bartlett;滄海書局 Ch2_23
Fig 2.1.8 Critical point c is an attractor in (a), a repeller in (b), and semi-stable in (c) and (d)
Copyright © Jones and Bartlett;滄海書局 Ch2_24
Autonomous DEs and Direction Fields
Fig 2.1.9 shows the direction field of dy/dx = 2y – 2.It can be seen that lineal elements passing through points on any horizontal line must have the same slope. Since the DE has the form dy/dx = f(y), the slope depends only on y.
Copyright © Jones and Bartlett;滄海書局 Ch2_25
Fig 2.1.9 Direction field for an autonomous DE
Copyright © Jones and Bartlett;滄海書局 Ch2_26
2.2 Separable Variables
Introduction: Consider dy/dx = f(x, y) = g(x). The DEdy/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
A first-order DE of the formdy/dx = g(x)h(y)
is said to be separable or to have separable variables.
Definition 2.2.1 Separable Equations
Copyright © Jones and Bartlett;滄海書局 Ch2_27
Rewrite the above equation as
(2)
where p(y) = 1/h(y). When h(y) = 1, (2) reduces to (1).
)()( xgdxdy
yp
Copyright © Jones and Bartlett;滄海書局 Ch2_28
If y = (x) is a solution of (2), we must have
and
(3)
But dy = (x) dx, (3) is the same as
(4)
dxxgdxxxP )()('))((
)()('))(( xgxxP
cxGyHdxxgdyyP )()(or )()(
Copyright © Jones and Bartlett;滄海書局 Ch2_29
Example 1 Solving a Separable DE
Solve (1 + x) dy – y dx = 0.
Solution:Since dy/y = dx/(1 + x), we have
Replacing by c, gives y = c(1 + x).
)1(
1
1lnln
1
1
111 1ln1ln
1
xe
exeeey
cxy
xdx
ydy
c
ccxcx
1ce
Copyright © Jones and Bartlett;滄海書局 Ch2_30
Example 2 Solvong Curve
Solve
Solution:
We also can rewrite the solution asx2 + y2 = c2, where c2 = 2c1
Apply the initial condition, 16 + 9 = 25 = c2
See Fig 2.2.1.
3)4( , yyx
dxdy
1
22
22 and c
xyxdxydy
Copyright © Jones and Bartlett;滄海書局 Ch2_31
Fig 2.2.1 Solution curve for IVP in Ex 2
Copyright © Jones and Bartlett;滄海書局 Ch2_32
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 show up after integration. That is a singular solution.
Copyright © Jones and Bartlett;滄海書局 Ch2_33
Example 3 Losing a Solution
Solve dy/dx = y2 – 4.
Solution:Rewrite this DE as
(5)then
dxdyyy
dxy
dy
22
or 4
41
41
2
22
,422
ln
,241
2ln41
24
2
1
cxeyy
cxyy
cxyy
Copyright © Jones and Bartlett;滄海書局 Ch2_34
Example 3 (2)
Replacing by c and solving for y, we have
(6)
If we rewrite the DE as dy/dx = (y + 2)(y – 2), from the previous discussion, we have y = 2 is a singular solution.
x
x
cece
y 4
4
11
2
2ce
Copyright © Jones and Bartlett;滄海書局 Ch2_35
Example 4 An Initial-Value Problem
Solve
Solution:Rewrite this DE as
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 getey + ye-y + e-y = 4 −2 cos x (8)
0)0( ,2sin)(cos 2 yxedxdy
yex yy
dxxx
dye
yey
y
cos2sin2
Copyright © Jones and Bartlett;滄海書局 Ch2_36
Use of Computers
Let G(x, y) = ey + ye-y + e-y + 2 cos x. Using some computer software, we plot the level curves of G(x, y) = c. The resulting graphs are shown in Fig 2.2.2 and Fig 2.2.3.
Copyright © Jones and Bartlett;滄海書局 Ch2_37
Fig 2.2.2 Level curves G(x, y)=c, where G(x, y) = ey + ye-y + e-y + 2 cos x
Copyright © Jones and Bartlett;滄海書局 Ch2_38
Fig 2.2.3 Level curves c = 2 and c = 4
Copyright © Jones and Bartlett;滄海書局 Ch2_39
If we solve dy/dx = xy½ , y(0) = 0
(9)The resulting graphs are shown in Fig 2.2.4.
Copyright © Jones and Bartlett;滄海書局 Ch2_40
2.3 Linear Equations
Introduction Linear DEs are friendly to be solved. We can find some smooth methods to deal with.
When g(x) = 0, (1) is said to be homogeneous; otherwise it is nonhomogeneous.
A first-order DE of the forma1(x)(dy/dx) + a0(x)y = g(x) (1)
is said to be a linear equation in y.
Definition 2.3.1 Linear Equations
Copyright © Jones and Bartlett;滄海書局 Ch2_41
Standard FormThe standard for of a first-order DE can be written as
dy/dx + P(x)y = f(x)(2)
The PropertyDE (2) has the property that its solution is sum of two solutions, y = yc + yp, where yc is a solution of the homogeneous equation
dy/dx + P(x)y = 0(3)and yp is a particular solution of (2).
Copyright © Jones and Bartlett;滄海書局 Ch2_42
Verification
Now (3) is also separable. Rewrite (3) as
Solving for y gives
)()()(])[(][ xfyxPdx
dyyxP
dx
dyyyxPyy
dxd
Pp
cc
pcoc
0)( dxxPy
dy
)(1
)(xcycey
dxxP
Copyright © Jones and Bartlett;滄海書局 Ch2_43
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. Substituting yp into (2) gives
)()(or )()( 111
111 xf
dxdu
yyxPdxdy
uxfuyxPdxdu
ydxdy
u
Variation of Parameters
Copyright © Jones and Bartlett;滄海書局 Ch2_44
Since dy1/dx + P(x)y1 = 0, so that y1(du/dx) = f(x) Rearrange the above equation,
From the definition of y1(x), we have
(4)
dxxyxf
udxxyxf
du)()(
and )()(
11
dxxfeeceyyydxxPdxxPdxxP
pc
)()()()(
Copyright © Jones and Bartlett;滄海書局 Ch2_45
Solving Procedures
If (4) is multiplied by(5)
then(6)
is differentiated(7)
we get(8)
Dividing (8) by gives (2).
dxxPe
)(
dxxfecyedxxPdxxP )(
)()(
)()()(
xfeyedxd dxxPdxxP
)()()()()(
xfeyexPdxdy
edxxPdxxPdxxP
dxxPe )(
Copyright © Jones and Bartlett;滄海書局 Ch2_46
We call y1(x) = is an integrating factor and we should only memorize this to solve problems.
dxxPe )(
Integrating Factor
(i) Put a linear equation of form (1) into standard form (2) and then determine P(x) and the integrating factor
(ii)Multiply (2) by the integration factor. The left side of the resulting equation is automatically the derivative of the integrating factor and y. Write
and then integrate both sides of this equation.
Guidelines for Solving a Linear First-Order Equation
)(][)()(
xfeyedxd dxxPdxxP
Copyright © Jones and Bartlett;滄海書局 Ch2_47
Example 1 Solving a Linear DE
Solve dy/dx – 3y = 6.
Solution:Since P(x) = – 3, we have the integrating factor is
then
is the same as
So e-3xy = -2e-3x + c, a solution is y = -2 + ce3x, - < x < .
xdxee 3)3(
xxx eyedxdy
e 333 63
xx eyedxd 33 6][
Copyright © Jones and Bartlett;滄海書局 Ch2_48
The DE of example 1 can be written as
so that y = –2 is a critical point.
)2(3 ydxdy
Notes
Copyright © Jones and Bartlett;滄海書局 Ch2_49
Equation (4) is called the general solution on some interval I. Suppose again P and f are continuous on I. Writing (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 one solution of
(9)00 )( ),()( yxyxfyxP
dxdy
General Solutions
Copyright © Jones and Bartlett;滄海書局 Ch2_50
Example 2 General Solution
Solve
Solution:Dividing both sides by x, we have
(10)So, P(x) = –4/x, f(x) = x5ex, P and f are continuous on (0, ).Since x > 0, we write the integrating factor as
xexydxdy
x 64
xexyxdx
dy 54
4lnln4/4 4
xeee xxxdx
Copyright © Jones and Bartlett;滄海書局 Ch2_51
Example 2 (2)
Multiply (10) by x-4,
Using integration by parts, it follows that the general solution on (0, ) is
x-4y = xex – ex + c or y = x5ex – x4ex + cx4
xxy xeyxdxd
xexdxdy
x ][ ,4 454
Copyright © Jones and Bartlett;滄海書局 Ch2_52
Example 3 General Solution
Find the general solution of
Solution:Rewrite as
(11)
So, P(x) = x/(x2 – 9). Though P(x) is continuous on (-, -3), (-3, 3) and (3, ), we shall solve this DE on the first and third intervals. The integrating factor is
092
y
xx
dxdy
929ln21
)9/(221
)9/(222
xeee
xxxdxxxdx
0)9( 2 xydxdy
x
Copyright © Jones and Bartlett;滄海書局 Ch2_53
Example 3 (2)
then multiply (11) by this factor to get
and
Thus, either for x > 3 or x < -3, the general solution is
Notes: x = 3 and x = -3 are singular points of the DE and is discontinuous at these points.
cyx 92
092 yxdxd
9/ 2 xcy
9/ 2 xcy
Copyright © Jones and Bartlett;滄海書局 Ch2_54
Example 4 An Initial-Value Problem
Solve
Solution:We first have P(x) = 1 and f(x) = x, and are continuous on (-, ). The integrating factor is , so
gives exy = xex – ex + c and y = x – 1 + ce-x
Since y(0) = 4, then c = 5. The solution isy = x – 1 + 5e-x, – < x < (1
2)
4)0( , yxydxdy
xdxee
xx xeyedxd ][
Copyright © Jones and Bartlett;滄海書局 Ch2_55
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 Fig 2.3.1.
Copyright © Jones and Bartlett;滄海書局 Ch2_56
Example 5 An Initial-Value Problem
Solve , where
Solution:First we see the graph of f(x) in Fig 2.3.2.
1 ,0
10 ,1)(
x
xxf
0)0( ),( yxfydxdy
Copyright © Jones and Bartlett;滄海書局 Ch2_57
Example 5 (2)
We solve this problem on 0 x 1 and 1 < x < .For 0 x 1,
then y = 1 + c1e-x.Since y(0) = 0, c1 = -1, y = 1 - e-x, 0 x 1. For x > 1,
dy/dx + y = 0 then y = c2e-x
xx eyedxd
ydxdy ][ ,1
Copyright © Jones and Bartlett;滄海書局 Ch2_58
Example 5 (3)
We have
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 Fig 2.3.3, the function
(13)
are continuous on [0, ).
1 ,)1(
10 ,1
xee
xey
x
x
1 ,
10 ,1
2 xec
xey
x
x
Copyright © Jones and Bartlett;滄海書局 Ch2_59
Fig 2.3.3 Graph of function in (13) of Ex 5
Copyright © Jones and Bartlett;滄海書局 Ch2_60
We are interested in the error function and complementary error function
and (14)
Since , we find erf(x) + erfc(x) = 1
dtexx t
0
22)(erf
dtex
x
t
22)(erfc
1)/2(0
2
dte t
Functions Defined by Integrals
Copyright © Jones and Bartlett;滄海書局 Ch2_61
Example 6 The error Function
Solve dy/dx – 2xy = 2, y(0) = 1.
Solution:We find the integrating factor is ,
we get (15)
Applying y(0) = 1, we have c = 1. See Fig 2.3.4.
22
2][ xx eedxd
222
02 xx tx cedteey
2xe
Copyright © Jones and Bartlett;滄海書局 Ch2_62
Fig 2.3.4 Some solution of the DE Ex 6
Copyright © Jones and Bartlett;滄海書局 Ch2_63
2.4 Exact Equations
IntroductionThough ydx + xdy = 0 is separable, we can solve it in an alternative way to get the implicit solution xy = c.
Copyright © Jones and Bartlett;滄海書局 Ch2_64
Differential of a Function of Two Variables
If z = f(x, y), its differential or total differential is
(1)Now if z = f(x, y) = c,
(2)
eg: if x2 – 5xy + y3 = c, then (2) gives (2x – 5y) dx + (-5x + 3y2) dy = 0
(3)
dyyf
dxxf
dz
0
dyyf
dxxf
Copyright © Jones and Bartlett;滄海書局 Ch2_65
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.
Definition 2.4.1 Exact Equation
Copyright © Jones and Bartlett;滄海書局 Ch2_66
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(4)
Theorem 2.4.1 Criterion for an Extra Differential
xN
yM
Copyright © Jones and Bartlett;滄海書局 Ch2_67
Proof of Necessity for Theorem 2.4.1
If M(x, y) dx + N(x, y) dy is exact, there exists some function f such that for all x in R
M(x, y) dx + N(x, y) dy = (f/x) dx + (f/y) dyTherefore
M(x, y) = , N(x, y) = and
The sufficient part consists of showing that there is a function f for which
= M(x, y) and = N(x, y)
xN
yf
xxyf
xf
yyM
2
xf
yf
xf
yf
Copyright © Jones and Bartlett;滄海書局 Ch2_68
Since f/x = M(x, y), we have (5)
Differentiating (5) with respect to y and assume f/y = N(x, y)
Then
and (6)
dxyxMy
yxNxg ) ,() ,()('
) ,()(') ,( yxNygdxyxMyy
f
)() () ,( ygdxyx,Myxf
Method of Solution
Copyright © Jones and Bartlett;滄海書局 Ch2_69
Integrate (6) with respect to y to get g(y), and substitute the result into (5) to obtain the implicit solution f(x, y) = c.
Copyright © Jones and Bartlett;滄海書局 Ch2_70
Example 1 Solving an Exact DE
Solve 2xy dx + (x2 – 1) dy = 0.
Solution:With M(x, y) = 2xy, N(x, y) = x2 – 1, we have
M/y = 2x = N/xThus it is exact. There exists a function f such that
f/x = 2xy, f/y = x2 – 1Then
f(x, y) = x2y + g(y)f/y = x2 + g’(y) = x2 – 1g’(y) = -1, g(y) = -y
Copyright © Jones and Bartlett;滄海書局 Ch2_71
Example 1 (2)
Hence f(x, y) = x2y – y, and the solution isx2y – y = c, y = c/(1 – x2)
The interval of definition is any interval not containing x = 1 or x = -1.
Copyright © Jones and Bartlett;滄海書局 Ch2_72
Example 2 Solving an Exact DE
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/xHence a function f exists, and
f/y = 2xe2y – x cos xy + 2ythat is,
xyyexhxyyexf
xhyxyxe
ydyxydyxdyexyxf
yy
y
y
cos)('cos
)(sin
2cos2) ,(
22
22
2
Copyright © Jones and Bartlett;滄海書局 Ch2_73
Example 2 (2)
Thus h’(x) = 0, h(x) = c. The solution isxe2y – sin xy + y2 + c = 0
Copyright © Jones and Bartlett;滄海書局 Ch2_74
Example 3 An Initial-Value Problem
Solve
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
2)0( ,)1(sincos
2
2
yxy
xxxydxdy
Copyright © Jones and Bartlett;滄海書局 Ch2_75
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
Copyright © Jones and Bartlett;滄海書局 Ch2_76
Fig 2.4.1 Some solution curves in the family (7) of Ex 3
Fig 2.4.1 shows the family curves of the above example and the curve of the specialized VIP is drawn in color.
Copyright © Jones and Bartlett;滄海書局 Ch2_77
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)
Integrating Factors
Copyright © Jones and Bartlett;滄海書局 Ch2_78
Suppose is a function of one variable, say x, then x = d /dx
(9) becomes(10)
If we have (My – Nx) / N depends only on x, then (10) is a first-order ODE and is separable. Similarly, if is a function of y only, then
(11)
In this case, if (Nx – My) / M is a function of y only, then we can solve (11) for .
N
NM
dyd xy
M
MN
dyd yx
Copyright © Jones and Bartlett;滄海書局 Ch2_79
We summarize the results forM(x, y) dx + N(x, y) dy = 0 (12)
If (My – Nx) / N depends only on x, then
(13)
If (Nx – My) / M depends only on y, then
(14)
dxN
NM xy
ex
)(
dyM
MN yx
ey
)(
Copyright © Jones and Bartlett;滄海書局 Ch2_80
Example 4 A Nonexact DE Made Exact
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
depends on both x and y.
depends only on y.The integrating factor is
e 3dy/y = e3lny = y3 = (y)
20323
20324
2222
yxx
yxxx
N
NM xy
yM
MN yx 3
Copyright © Jones and Bartlett;滄海書局 Ch2_81
Example 4 (2)
then the resulting equation isxy4 dx + (2x2y3 + 3y5 – 20y3) dy = 0
It is left to you to verify the solution is½ x2y4 + ½ y6 – 5y4 = c
Copyright © Jones and Bartlett;滄海書局 Ch2_82
2.5 Solutions by Substitutions
IntroductionIf 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 of x, then
Since dy/dx = f(x, y), y = g(x, u),
Solving for du/dx, we have the form du/dx = F(x, u). If we can get u = (x), a solution is y = g(x, (x)).
dxdu
uxguxgdxdy
ux ),() ,(
dxdu
uxguxguxgxf ux ) ,() ,()) ,( ,(
Copyright © Jones and Bartlett;滄海書局 Ch2_83
If a function f has the property f(tx, ty) = tf(x, y), then 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 homogeneous of the same degree, that is, if
M(tx, ty) = tM(x, y), N(tx, ty) = tN(x, y)
Homogeneous Equations
Copyright © Jones and Bartlett;滄海書局 Ch2_84
Note: Here the word “homogeneous” is not the same as in Sec 2.3 and 3.1.
If M and N are homogeneous of degree , M(x, y)=x M(1, u), N(x, y)=xN(1, u), u=y/x (2)M(x, y)=y M(v, 1), N(x, y)=yN(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 = 0where u = y/x or y = ux and dy = udx + xdu,
Copyright © Jones and Bartlett;滄海書局 Ch2_85
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
0) ,1() ,1(
) ,1(
uuNuM
dxuNx
dx
Copyright © Jones and Bartlett;滄海書局 Ch2_86
Example 1 Solving a Homogeneous DE
Solve (x2 + y2) dx + (x2 – xy) dy = 0.
Solution: We have M = x2 + y2, N = x2 – xy are homogeneous of degree 2. Let y = ux, dy = u dx + x du, then
(x2 + u2x2) dx + (x2 - ux2)[u dx + x du] = 0
011
xdx
duuu
01
21
xdx
duu
Copyright © Jones and Bartlett;滄海書局 Ch2_87
Example 1 (2)
Then
Simplify to get
Note: We may also try x = vy.
cxxy
xy
cxuu
lnln1ln2
lnln1ln2
xycxeyxxy
csyx /2
2
)(or )(
ln
Copyright © Jones and Bartlett;滄海書局 Ch2_88
The DE: dy/dx + P(x)y = f(x)yn
(4)where n is any real number, is called Bernoulli’s Equation.
Note for n = 0 and n = 1, (4) is linear, otherwise, letu = y1-n
to reduce (4) to a linear equation.
Bernoulli’s Equation
Copyright © Jones and Bartlett;滄海書局 Ch2_89
Example 2 Solving a Bernoulli DE
Solve x dy/dx + y = x2y2.
Solution:Rewrite the DE as
dy/dx + (1/x)y = xy2
With n = 2, then y = u-1, anddy/dx = -u-2(du/dx)
From the substitution and simplification, du/dx – (1/x)u = -x
The integrating factor on (0, ) is
1lnln/ 1
xeee xxxdx
Copyright © Jones and Bartlett;滄海書局 Ch2_90
Example 2 (2)
Integrating
gives x-1u = -x + c, or u = -x2 + cx.
Since u = y-1, we have y = 1/u and a solution of the DE is y = 1/(−x2 + cx).
1][ 1 uxdxdu
Copyright © Jones and Bartlett;滄海書局 Ch2_91
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 means of substitution u = Ax + By + C.
Copyright © Jones and Bartlett;滄海書局 Ch2_92
Example 3 An Initial-Value Problem
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 – 9This is separable. Using partial fractions,
or
dxuu
du )3)(3(
dxduuu
31
31
61
Copyright © Jones and Bartlett;滄海書局 Ch2_93
Example 3 (2)
then we have
or
Solving the equation for u and the solution is
or (6)
Applying y(0) = 0 gives c = -1.
133
ln61
cxuu
x
x
cece
u 6
6
1)1(3
x
x
ee
xuxy 6
6
1)1(3
22
xcx ceeuu 666 1
33
Copyright © Jones and Bartlett;滄海書局 Ch2_94
Example 3 (3)
The graph of the particular solution
is shown in Fig 2.5.1.
x
x
ee
xuxy 6
6
1)1(3
22
Copyright © Jones and Bartlett;滄海書局 Ch2_95
Fig 2.5.1 Some solution of the DE in Ex 3
Copyright © Jones and Bartlett;滄海書局 Ch2_96
Using the Tangent LineLet us assume
y’ = f(x, y), y(x0) = y0
(1)possess a solution. For example, the resulting graph is shown in Fig 2.6.1.
2.6 A Numerical Method
4)2( ,4.01.0' 2 yxyy
Copyright © Jones and Bartlett;滄海書局 Ch2_97
Fig 2.6.1 Magnification of a neighborhood about the point (2, 4)
Copyright © Jones and Bartlett;滄海書局 Ch2_98
Using the linearization of the unknown solution y(x) of (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.6.2.
Euler’s Method
Copyright © Jones and Bartlett;滄海書局 Ch2_99
Fig 2.6.2 Approximating y(x1) using a tangent line
Copyright © Jones and Bartlett;滄海書局 Ch2_100
Example 1 Euler’s Method
Consider Use Euler’s method to obtain y(2.5) using h = 0.1 and then h = 0.05.
Solution:Let the results step by step are shown in Table 2.1 and table 2.2.
.4)2( ,4.01.0' 2 yxyy
24.01.0) ,( xyyxf
Copyright © Jones and Bartlett;滄海書局 Ch2_101
Copyright © Jones and Bartlett;滄海書局 Ch2_102
Example 2 Comparing of Approximate and Exact Values
Consider y’ = 0.2xy, y(1) = 1. Use Euler’s method to obtain 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 shown in Table 2.6.3 and Table 2.6.4.
Copyright © Jones and Bartlett;滄海書局 Ch2_103
Copyright © Jones and Bartlett;滄海書局 Ch2_104
Copyright © Jones and Bartlett;滄海書局 Ch2_105
Numerical Solver
See Fig 2.6.3 to know the comparisons of numerical methods.
Copyright © Jones and Bartlett;滄海書局 Ch2_106
When the result is not helpful by numerical solvers, as in Fig 2.6.4, we may decrease the step size, use another method, or use another solver.
Using a Numerical Solver
Copyright © Jones and Bartlett;滄海書局 Ch2_107
2.7 Linear Models
Growth and Decay
(1)00)( , xtxkx
dtdx
Copyright © Jones and Bartlett;滄海書局 Ch2_108
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 h.See Fig 2.7.1.
Copyright © Jones and Bartlett;滄海書局 Ch2_109
Fig 2.7.1 Time in which initial population triples in Ex 1
Copyright © Jones and Bartlett;滄海書局 Ch2_110
Fig 2.7.2 Growth (k>0) and decay (k<0)
k > 0 is called a growth constant, and k > 0 is called a decay constant. See Fig 2.7.2.
Copyright © Jones and Bartlett;滄海書局 Ch2_111
Example 2 Half-Life of Plutonium
A reactor converts U-238 into the isotope plutonium-239. 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 time t. The DE is as
(2)
The solution is A(t) = A0ekt. If 0.043% of A0 has disintegrated, then 99.957% remains.
0)0( , AAkAdtdA
Copyright © Jones and Bartlett;滄海書局 Ch2_112
Example 2 (2)
Then, 0.99957A0 = A(15) = A0e15k, thenk = (ln 0.99957) / 15 =-0.00002867
Let A(t) = A0e-0.00002867t = ½ A0
Thenyears. 24180
00002867.02ln T
Copyright © Jones and Bartlett;滄海書局 Ch2_113
Example 3 Age of a Fossil
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
years. 558000.00012378
1000ln T
Copyright © Jones and Bartlett;滄海書局 Ch2_114
(3)
where Tm is the temperature of the medium around the object.
)( mTTkdxdT
Newton’s Law of Cooling/Warming
Copyright © Jones and Bartlett;滄海書局 Ch2_115
Example 4 Cooling of a Cake
A cake’s temperature is 300F. Three minutes later its temperature is 200F. How long will it for this cake to cool off to a room temperature of 70F?
Solution:We identify Tm = 70, then
(4)and T(3) = 200. From (4), we have
300)0( ),70( TTkdxdT
ktectT
cktTkdtT
dT
2
1
70)(
70ln ,70
Copyright © Jones and Bartlett;滄海書局 Ch2_116
Example 4 (2)
Using T(0) = 300 then c2 = 230Using T(3) = 200 then e3k = 13/23, k = -0.19018Thus
T(t) = 70 + 230e-0.19018t (5)From (5), only t = , T(t) = 70. It means we need a reasonably long time to get T = 70. See Fig 2.7.3.
Copyright © Jones and Bartlett;滄海書局 Ch2_117
Fig 2.7.3 Temperature of coolingcake in Ex 4
Copyright © Jones and Bartlett;滄海書局 Ch2_118
Mixtures
(6)outin RR
dtdx
Copyright © Jones and Bartlett;滄海書局 Ch2_119
Example 5 Mixture of Two Salt Solutions
Recall from example 5 of Sec 1.3, we have
How much salt is in the tank after along time?
Solution:Since
Using x(0) = 50, we have x(t) = 600 - 550e-t/100 (7)
When t is large enough, x(t) = 600.
50)0( ,6100
1 xxdtdx
100/100/100/ 600)( ,6][ ttt cetxexedtd
Copyright © Jones and Bartlett;滄海書局 Ch2_120
Fig 2.7.4 Pounds of salt in tank as a function of time in Ex 5
Copyright © Jones and Bartlett;滄海書局 Ch2_121
Series Circuits
See Fig 2.7.5. (8)
See Fig 2.7.6.
(9)
(10)
)(tERidtdi
L
)(1
tEqC
Ri
)(1
tEqCdt
dqR
Copyright © Jones and Bartlett;滄海書局 Ch2_122
Copyright © Jones and Bartlett;滄海書局 Ch2_123
Example 6 Series Circuit
Refer to Fig 2.7.6, where E(t) = 12 Volt, L = ½ HenryR = 10 Ohms. Determine i(t) where i(0) = 0.
Solution:From (8),
Then
Using i(0) = 0, c = -6/5, then .
0)0( ,121021 ii
dtdi
t
tt
ceti
eiedtd
20
2020
56
)(
24][
teti 20
56
56
)(
Copyright © Jones and Bartlett;滄海書局 Ch2_124
Example 6 (2)
A general solution of (8) is
(11)
When E(t) = E0 is a constant, (11) becomes
(12)
where the first term is called a steady-state part, and the second term is a transient term.
tLRtLRtLR
cedttEeL
eti )/()/(
)/(
)()(
tLRceR
Eti )/(0)(
Copyright © Jones and Bartlett;滄海書局 Ch2_125
Note:
Referring to example 1, P(t) is a continuous function. However, it should be discrete. Keeping in mind, a mathematical model is not reality. See Fig 2.7.7.
Copyright © Jones and Bartlett;滄海書局 Ch2_126
Fig 2.7.7 Population growth is a discrete process
Copyright © Jones and Bartlett;滄海書局 Ch2_127
2.8 Nonlinear Models
Population DynamicsIf P(t) denotes the size of population at t, the relative (or specific), growth rate is defined by
(1)
When a population growth rate depends on the present number , the DE is
(2)
which is called density-dependent hypothesis.
PdtdP /
)(or )(/
PPfdtdP
PfP
dtdP
Copyright © Jones and Bartlett;滄海書局 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.8.1 shows three functions that satisfy these two conditions.
Copyright © Jones and Bartlett;滄海書局 Ch2_129
Fig 2.8.1 Simplest assumption for f(P) us a straight line
Copyright © Jones and Bartlett;滄海書局 Ch2_130
Suppose f (P) = c1P + c2. Using the conditions, we have c2 = r, c1 = −r/K. Then (2) becomes
(3)
Relabel (3), then
(4)
which is known as a logistic equation, its solution is called the logistic function and its graph is called a logistic curve.
P
Kr
rPdtdP
)( bPaPdtdP
Copyright © Jones and Bartlett;滄海書局 Ch2_131
Solution of the Logistic Equation
From
After simplification, we have
dtbPaP
dP )(
acatbPa
P
ctbPaa
Pa
dtdPbPaab
Pa
ln
ln1
ln1
//1
atat
at
ebcac
ebceac
tP
1
1
1
1
1)(
Copyright © Jones and Bartlett;滄海書局 Ch2_132
If P(0) = P0 a/b, then c1 = P0/(a – bP0)
(5) atebPabP
aPtP
)(
)(00
0
Copyright © Jones and Bartlett;滄海書局 Ch2_133
Graph of P(t)
Form (5), we have the graph as in Fig 2.8.2. When 0 < P0 < a/2b, see Fig 2.8.2(a).When a/2b < P0 < a/b, see Fig 2.8.2(b).
Fig 2.8.2 Logistic curves for different initial conditions
Copyright © Jones and Bartlett;滄海書局 Ch2_134
Example 1 Logistic Growth
Form the previous discussion, assume an isolated campus of 1000 students, then we have the DE
Determine x(6).
Solution:Identify a = 1000k, b = k, from (5)
1)0( ,)1000( xxkxdtdx
ktetx 10009991
1000)(
Copyright © Jones and Bartlett;滄海書局 Ch2_135
Example 1 (2)
Since x(4) = 50, then -1000k = -0.9906, Thusx(t) = 1000/(1 + 999e-0.9906t)
See Fig 2.8.3.
students 27699911000
)6( 9436.5
ex
tetx 9906.09991
1000)(
Copyright © Jones and Bartlett;滄海書局 Ch2_136
Fig 2.8.3 Number of infected students in Ex 1
Copyright © Jones and Bartlett;滄海書局 Ch2_137
Modification of the Logistic Equation
or
(6)
or
(7)
which is known as the Gompertz DE.
hbPaPdtdP )(
hbPaPdtdP )(
)ln( PbaPdtdP
Copyright © Jones and Bartlett;滄海書局 Ch2_138
Chemical Reactions
(8)
or
(9)
X
NMN
bXNM
Ma
dtdX
))(( XXkdtdX
Copyright © Jones and Bartlett;滄海書局 Ch2_139
Example 2 Second-Order chemical Reaction
The chemical reaction is described as
Then
By separation of variables and partial fractions,
(10)
Using X(10) = 30, 210k = 0.1258, finally (11)
See Fig 2.8.4.
X
XdtdX
54
325
50
)40)(250( XXkdtdX
ktecXX
cktXX 210
21 40250
or 21040
250ln
t
t
ee
tX 1258.0
1258.0
4251
1000)(
Copyright © Jones and Bartlett;滄海書局 Ch2_140
Fig 2.8.4 Amount of compound C in Ex 2
Copyright © Jones and Bartlett;滄海書局 Ch2_141
2.9 Modeling with Systems of First-Order DEs
Systems
(1)
where g1 and g2 are linear in x and y.
Radioactive Decay Series
(2)
) , ,(1 yxtgdtdx ) , ,(2 yxtg
dtdy
ydtdz
yxdtdy
xdtdx
2
21
1
Copyright © Jones and Bartlett;滄海書局 Ch2_142
From Fig 2.9.1, we have
(3) 212
211
252
252
501
252
xxdt
dx
xxdtdx
Mixtures
Copyright © Jones and Bartlett;滄海書局 Ch2_143
Fig 2.9.1 Connected mixing tanks
Copyright © Jones and Bartlett;滄海書局 Ch2_144
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)
A Predator-Prey Model
Copyright © Jones and Bartlett;滄海書局 Ch2_145
Then
(8)
which is known as the Lotka-Volterra predator-prey model.
)(
)(
cxdycxydydtdy
byaxbxyaxdtdx
Copyright © Jones and Bartlett;滄海書局 Ch2_146
Example 1
Suppose
Figure 2.9.2 shows the graph of the solution.
4)0( ,4)0( ,9.05.4
08.016.0
yxxyydtdy
xyxdtdx
Copyright © Jones and Bartlett;滄海書局 Ch2_147
Fig 2.9.2 Population of predators (red) and prey (blue) appear to be periodic in Ex 1
Copyright © Jones and Bartlett;滄海書局 Ch2_148
Competition Models
dx/dt = ax and dy/dt = cy (9)Two species compete, then
dx/dt = ax – bydy/dt = cy – dx (10)
or dx/dt = ax – bxydy/dt = cy – dxy (11)
or dx/dt = a1x – b1x2
dy/dt = a2y – b2y2 (12)or
dx/dt = a1x – b1x2 – c1xydy/dt = a2y – b2y2 – c2xy (13)
Copyright © Jones and Bartlett;滄海書局 Ch2_149
Network
Referring to Fig 2.9.3, we havei1(t) = i2(t) + i3(t) (14)
(15)
(16)
Using (14) to eliminate i1, then
(17)
dtdi
LRitE
Ridtdi
LRitE
3211
222
111
)(
)(
)(
)()(
31213
2
332212
1
tEiRiRdt
diL
tEiRiRRdtdi
L
Copyright © Jones and Bartlett;滄海書局 Ch2_150
Fig 2.9.3 Network whose model is given in (17)
Copyright © Jones and Bartlett;滄海書局 Ch2_151
Referring to Fig 2.9.4, please verify
(18) 0
)(
122
21
iidtdi
RC
tERidtdi
L
Copyright © Jones and Bartlett;滄海書局 152