Document

Report
CHAPTER 2
First-Order Differential
Equations
Contents
2.1 Solution By Direct Integration
2.2 Separable Variables
2.3 Linear Equations
2.4 Exact Equations
2.5 Solutions by Substitutions
CH2_2
2.1 Solution By Direct Integration
Consider dy/dx = f(x, y) = g(x). The DE
dy/dx = g(x)
(1)
can be solved by direct integration.
Integrating both sides: y =  g(x) dx +c= G(x) + c.
eg: dy/dx = 1 + e2x, then
y =  (1 + e2x) dx +c= x + ½ e2x + c
CH2_3
2.2 Separable Variables
Introduction:
DEFINITION 2.1
Separable Equations
A first-order DE of the form
dy/dx = g(x)h(y)
is said to be separable.
CH2_4
Rewrite the above equation as
p( y)
dy
dx
 g ( x)
(2)
where p(y) = 1/h(y).
CH2_5

P ( ( x ))  ' ( x )  g ( x )
(4)
 P ( ( x ))  ' ( x ) dx
Integrating both sides, we have
 P ( y ) dy   g ( x )dx  c
or
H ( y)  G ( x)  c
CH2_6
Example 2
Solve
Solution:
dy
dx
 ydy

 x
, y (4)  3
y
   xdx
and
y
2

x
2
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. Thus,
y   (25  x )
2 1/ 2
because y(4)=-3.
CH2_7
Fig2.18
CH2_8
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 is not
included in the general solution. That is a singular
solution.
CH2_9
2.3 Linear Equations
Introduction:
Linear DEs are friendly to be solved. We can find
some 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)
is said to be a linear equation in y.
(1)
CH2_10
Standard Form
Standard form of a first-order DE can be written as
dy/dx + P(x)y = f(x)
(2)
CH2_11
Solving Procedures
If (2) is multiplied by
P ( x ) dx

e
then
e
P ( x ) dx
dy
 e
P ( x ) dx
dx
P ( x) y 
(5)
e
P ( x ) dx
f ( x )dx
(6)
or
P ( x ) dx
d   P ( x ) dx 

e
y e
f ( x)

dx 
(7)
Integrating both sides, we get
P ( x ) dx
e
y 

P ( x ) dx
e
f ( x ) dx  c
(8)
Dividing (8) by e  P ( x ) dx gives the solution.
CH2_12
Integrating Factor
We call e  P ( x ) dx as an integrating factor and we
should only memorize this to solve problems.
CH2_13
Example 1
Solve dy/dx – 3y = 6.
Solution:
Since P(x) = – 3, we have the integrating factor is
then
(  3 ) dx
3 x

e
e
 3 x dy
3 x
3 x
e
 3e
y  6e
dx
is the same as
d
[e
3 x
y ]  6e
3 x
dx
So e-3xy = -2e-3x + c, a solution is y = -2 + ce3x, - <
x < .
CH2_14
Notes
The DE of example 1 can be written as
dy
 3( y  2 )
dx
y = –2 is included in the general solution. The
general solution of linear first order DE include all
the solutions.
CH2_15
Application to Circuits
See Fig 2.39.
L
di
 Ri  E (t )
(8)
dt
CH2_16
Fig 2.39
CH2_17
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:
1 di
From (8),
 10 i  12 , i ( 0 )  0
Then
2 dt
d
[ e i ]  24 e
20
20 t
dt
i (t ) 
6
 ce
 20 t
5
Using i(0) = 0, c = -6/5, then i(t) = (6/5) – (6/5)e-20t.
CH2_18
Example 6 (2)
A general solution of (8) is
i (t ) 
e
( R / L )t
L
e
( R / L )t
E ( t ) dt  ce
( R / L )t
(11)
When E(t) = E0 is a constant, (11) becomes
i (t ) 
Eo
 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_19
2.4 Exact Equations
Introduction:
CH2_20
Differential of a Function of Two Variables
If z = f(x, y), its differential or total differential is
dz 
f
x
dx 
f
y
dy
(1)
Now if z = f(x, y) = c,

 f 
 f 
 dy  0

 dx  
 x  3  y 
eg: if x2 – 5xy + y = c, then (2) gives
(2x – 5y) dx + (-5x + 3y2) dy = 0
Q: What is the implicit solution of (3)?
(2)
(3)
CH2_21
DEFINITION 2.3
Exact Equation
M(x, y) dx + N(x, y) dy is an exact differential
in a region R of the xy-plane, if it corresponds 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_22
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_23
Proof of Necessity for Theorem 2.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) dy
Therefore
f
f
M(x, y) =
, N(x, y) =
x
y
and
2
M
  f   f
   f   N (why?)
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_24
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

y

M ( x , y ) dx  g ' ( y ) 

y
 and
g ' ( y )  N ( x, y ) 
N ( x, y )

M ( x , y ) dx

y
(6)
Which holds if (4) is satisfied.
CH2_25
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.
CH2_26
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+c
CH2_27
Example 1 (2)
Hence f(x, y) = x2y – y+c, and the solution is
x2y – y +c= c’, y = c”/(1 – x2)
The interval of definition is any interval not
containing x = 1 and x = -1.
CH2_28
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
 xe
f
x
e
2y
2y
2y
dy  x  cos xydy  2  ydy
 sin xy  y  h ( x )
2
 y cos xy  h ' ( x )  e
2y
 y cos xy
CH2_29
Example 2 (2)
Thus h’(x) = 0, h(x) = c. The solution is
xe2y – sin xy + y2 + c = 0
CH2_30
Example 3
dy
xy  cos x sin x
2

, y (0)  2
Solve
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_31
Example 3 (2)
We have
h(x) = cos x sin x
h(x) = -½ cos2 x+c
Thus
½y2(1 – x2) – ½ cos2 x +c= c1
or
y2(1 – x2) – cos2 x = c’
(7)
where c’ = 2(c1 -c). Now y(0) = 2, so c’ = 3.
The solution is
y2(1 – x2) – cos2 x = 3
Q: What is the explicit solution?
CH2_32
Fig 2.28
Fig 2.28 shows the family curves of the above
example and the curve of the specialized IVP is
drawn in color.
CH2_33
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_34
Suppose  is a function of one variable, say x, then
x = d /dx
(9) becomes
M  N
d


(10)
y
dx
x
N
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
Nx  M y
d
(11)


dy
M
In this case, if (Nx – My) / M is a function of y only,
then we can solve (11) for .
CH2_35
We summarize the results for
M(x, y) dx + N(x, y) dy = 0
If (My – Nx) / N depends only on x, then
 ( x)  e

M y Nx
dx
N
(12)
(13)
If (Nx – My) / M depends only on y, then
 ( y)  e

N x M y
M
dy
(14)
CH2_36
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
N

x  4x
2 x  3 y  20
2
2

 3x
2 x  3 y  20
2
2
depends on both x and y.
Nx  M
M
y

3
y
depends only on y.
The integrating factor is
e  3dy/y = e3lny = y3 = (y)
CH2_37
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_38
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
of x, then
dy
dx
 g x ( x, u )  gu ( x, u )
du
dx
Since dy/dx = f(x, y), y = g(x, u),
f ( x , g ( x , u ))  g x ( x , u )  g u ( x , u )
du
dx
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)).
CH2_39
Bernoulli’s Equation
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, let
u = y1-n
to transform (4) into a linear equation.
CH2_40
Example 2
Solve x dy/dx + y = x2y2.
Solution:
Rewrite the DE as a Bernoulli’s equation with n=2:
dy/dx + (1/x)y = xy2
For 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
e
  dx / x
e
 ln x
e
ln x
1
 x
1
CH2_41
Example 2 (2)
Integrating
x
1
du
dx
x
1
1
1
u  x x
x
gives x-1u = -x + c, or u = -x2 + cx.
Since u = y-1, we have y = 1/u and the general
solution of the DE is y = 1/(−x2 + cx).
CH2_42
Transformation to Separable DE
A DE of the form
dy/dx = f(Ax + By + C)
(5)
can always be transformed into a separable equation
by means of substitution u = Ax + By + C.
CH2_43
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
( u  3 )( u  3 )
 dx
or
1 1
1 

du  dx
6  u  3 u  3 
CH2_44
Example 3 (2)
then we have
1
6
ln
u3
u3
 x  c1
Solving the equation for u and the solution is
or
u 
3 (1  ce
1  ce
6x
)
6x
y  2x  u  2x 
3 (1  ce
1  ce
6x
)
(6)
6x
Applying y(0) = 0 gives c = -1.
CH2_45
Example 3 (3)
The graph of the particular solution
y  2x  u  2x 
3 (1  e
1 e
6x
)
6x
is shown in Fig 2.30 in solid color.
CH2_46
Fig 2.30
CH2_47

similar documents