You are on page 1of 11

Chap.

1 First-Order Ordinary Differential


Equation
Differential Equation
(1) Definition:
An equation that contains derivatives is called a differential equation (D.E.).
dy
Ex: = 2x .. D.E, to solve this to fond y (x) .
dx
(2) Solution
A function y ( x) = g ( x) is called a solution for D.E., if one replaces y (x) by g( x)
and the equation is satisfied.
dy
Ex: for the D.E = 2x , we can find y(x) = 2x 2 through anti-derivative operator
dx
to satisfy the equation. Thus, y(x) = 2x 2 is a solution.
Here, x is called independent variable.
y is called dependent variable or function of x depend on x.
(3) Classification of D.E:
1.(ordinary differential equation)
D.E ,, O.D.E.
2.(Partial differential equation)
D.E ,, P.D.E.
(4) Terminology
1.(order): D.E , D.E
2.(degree): D.E ,
D.E
3.(linear): D.E
(i)
(ii)
(iii)
D.E ,,
Example:
(a) x1 y ' + y 2 y ' = 1
O.D.E
(b) xy ' + ( y '' ) 2 = xy 2
O.D.E
(c) (sinx)y '' + (cosx)y' + (tanx)y = e x + xlnx O.D.E

1 Edited by Prof. Yung-Jung Hsu


First-Order Differential Equation
(1) (Separable Equation):
1.
2.
(1-1)
Type I: y' = g(x)h(y)
dy
= g ( x)dx
h( y )
dy

h( y )
= g ( x)dx + C

y
Example: y ' =
1+ x
dy y
=
dx 1 + x
dy dx
y = 1+ x
ln y = ln (1 + x) + C , C=constant

y = eC (1 + x) general solution
Type II: M 1 ( x) M 2 ( y )dx + N1 ( x) N 2 ( y )dy = 0
M ( x) N ( y)
1 dx + 2 =0
N1 ( x) M 2 ( y)
M 1 ( x) N ( y)
dx + 2 =C
N1 ( x) M 2 ( y)
dy xy + 3x y 3
Example: =
dx xy 2 x + 4 y 8
( xy + 3x y 3)dx = ( xy 2 x + 4 y 8)dy
( x 1)( y + 3)dx = ( x + 4)( y 2)dy
x 1 y 2
dx = dy
x+4 y +3
5 5
1 dx = 1 dy
x+4 y + 3
5 5
1 x + 4 dx = 1 y + 3 dy
x 5 ln x + 4 = y 5 ln y + 3 + C

2 Edited by Prof. Yung-Jung Hsu


(1-2) :
1.
Definition:
(I) O.D.E y' = f(x, y) , f(x, y) , O.D.E
O.D.E.
:
y x
(i) f(x, y) f( ) f( )
x y
y
(ii) = u , y = xu , dy = xdu + udx
x
dy xdu + udx
(iii) O.D.E = = f (u )
dx dx
du du dx
x + u = f (u ) = + C = ln x + C
dx f (u ) u x
y
Example: y ' = +1
x
y
u = y = xu, dy = xdu + udx
x
xdu + udx
= u +1
dx
du
x + u = u +1
dx
1
du = x dx
u = ln x + C

y
= ln x + C
x
(II) O.D.E M ( x, y )dx + N ( x, y )dy = 0 , M ( x, y ) N ( x, y )
m , O.D.E O.D.E.
:
y y
(i) M ( )dx + N ( )dy = 0
x x
y
(ii) = u , dy = udx + xdu
x
(iii) O.D.E M (u )dx + N (u )(udx + xdu ) = 0
dx N (u )
+ du = C
x uN (u ) + M (u )

3 Edited by Prof. Yung-Jung Hsu


x y
Example: y ' =
x+ y
( x y )dx = ( x + y )dy
y y
(1 )dx = (1 + )dy
x x
y
u = y = xu, dy = xdu + udx
x
(1 u )dx = (1 + u )( xdu + udx)
1 2u u 2 du
=x
1+ u dx
1 1+ u
x dx = u 2
+ 2u 1
du

1
ln x + C1 = ln u 2 + 2u 1
2
x 2 (u 2 + 2u 1) = C , where C = e 2u
y2 2 y
x ( 2+
2
1) = C
x x
y 2 + 2 xy x 2 = C

2. (a1 x + b1 y + c1 )dx + (a2 x + b2 y + c2 )dy = 0


a b
Type I: 1 1
a2 b2
:
(i) a1 x + b1 y + c1 = 0 a 2 x + b2 y + c2 = 0 ( , )
(ii) x = u + dx = du
y = v + dy = dv
O.D.E, O.D.E
(a1u + b1v)du + (a2u + b2v)dv = 0
(iii) O.D.E
a b c
Type II: 1 = 1 = m 1
a2 b2 c2
:
dt a2 dx
(i) a 2 x + b2 y = t , a1 x + b1 y = mt , dy =
b2
(ii) O.D.E,
dt a2 dx
(mt + c1 )dx + (t + c2 ) =0
b2

4 Edited by Prof. Yung-Jung Hsu


t + c2
dt = dx
a2t + a2c2 b2 mt b2c1
3. y ' = f (ax + by + c)
:
dt adx
(i) t = ax + by + c , dy =
b
dt adx
( )
dy b
(ii) O.D.E, = = f (t )
dx dx
dt

bf (t ) + a
= dx + c = x + c

Example: y ' = tan 2 ( x + y )


u = x + y, du = dx + dy
du
= 1 + tan 2 u = sec 2 u
dx
(cos 2 u )du = dx
1 + cos 2u
2
du = dx

u 1
+ sin 2u = x + C
2 4
x+ y 1
+ sin 2( x + y ) = X + C
2 4
(2) (Exact)
(2-1) Type I: Exact equation
(i) Definition:
1st-order O.D.E M ( x, y )dx + N ( x, y )dy = 0
( x, y ) , M ( x, y )dx + N ( x, y )dy = d = 0
M ( x, y )dx + N ( x, y )dy = 0 O.D.E
(ii) How to tell an O.D.E is exact or not?
O.D.E M ( x, y )dx + N ( x, y )dy = 0 equation
, ( x, y )


= M ( x, y ) , = N ( x, y )
x y y x

Q = ( x, y ) ,

2 M 2 N M N
= , = , =
xy y xy x y x x y

5 Edited by Prof. Yung-Jung Hsu


, O.D.E M ( x, y )dx + N ( x, y )dy = 0

M ( x, y ) N ( x, y )
= ,
y x x y

(iii)
O.D.E M ( x, y )dx + N ( x, y )dy = 0
O.D.E

d = dx + dy = M ( x, y )dx + N ( x, y )dy = 0
x y

O.D.E ( x, y ) = c d = dx + dy = 0
x y
( x, y ) = c O.D.E
x
= M ( x, y ) ( x, y ) = M ( x, y )dx + g ( y )
x

= N ( x, y ) ( x, y ) = N ( x, y )dx + h( x)
y

y
g ( y ) h(x)
( x, y )

Example: (sin y y sin x)dx + (cos x + x cos y y )dy = 0


M = sin y y sin x , N = cos x + x cos y y
M N
= cos y sin x , = sin x + cos y
y x
O.D.E , ( x, y ) = C * , ( x, y )

= M = sin y y sin x & = N = cos x + x cos y y
x y

( x, y ) = x sin y + y cos x + g ( y )
y2
& ( x, y ) = y cos x + x sin y + h( x )
2
,,
y2
( x, y ) = x sin y + y cos x + C1
2
( x, y ) = C , O.D.E
*

y2
x sin y + y cos x = C , C = (C* - C1 )
2

(2-2) Type II: Modified exact equation

6 Edited by Prof. Yung-Jung Hsu


(2-2-1) (i) Definition:
O.D.E M ( x, y )dx + N ( x, y )dy = 0
I ( x, y ) O.D.E
I ( x, y ) M ( x, y )dx + I ( x, y ) N ( x, y )dy = d ( x, y ) = 0
I ( x, y ) O.D.E (integrating factor)
(ii)How to tell an O.D.E is exact or not?
I ( x, y ) M ( x, y )dx + I ( x, y ) N ( x, y )dy = d ( x, y ) = 0

[I ( x, y) M ( x, y)] = [I ( x, y) N ( x, y)]
y x
I I M N
N ( x, y ) M ( x, y ) = I ( )
x y y x
If I = I ( x. y ) ,,(trivial)
But if I = I (x) only or I = I ( y ) only,
dI M N
I = I (x) N = I -----
1
dx y x
or
dI M N
I = I ( y) M = I --
2
dy y x

M N
I
N M y x
= = O.D.E
dx dy dI
, I
M N

dI y x dx = f ( x)dx
If I = I ( x) ,
1 =
I N

I ( x) = exp( f ( x)dx)

M N

dI y x dy = f ( y )dx
If I = I ( y ) ,
2 =
I M

I ( y ) = exp( f ( y )dy )

(iii)
Step1: O.D.E M ( x, y )dx + N ( x, y )dy = 0

7 Edited by Prof. Yung-Jung Hsu


M N

If

y
N
x
(
= f (x) only I ( x) = exp f ( x)dx
)


M N

If y
M
x
(
= f ( y ) only I ( y ) = exp f ( y )dy
)


Step2: I O.D.E
I ( x, y ) M ( x, y )dx + I ( x, y ) N ( x, y )dy = d ( x, y ) = 0
O.D.E ( x. y ) = C , ( x. y )


x
= I ( x, y ) M ( x, y ) ( x, y ) = I ( x, y ) M ( x, y )dx + g ( y )
x

= I ( x, y ) N ( x, y ) ( x, y ) = I ( x, y ) N ( x, y )dx + h( x)
y

( x. y )

Example: 6 xydx + (4 y + 9 x 2 )dy = 0


M = 6 xy , N = 4 y + 9 x 2
M N
= 6x , = 18 x
y x
O.D.E , I
M N

y x = 12 x = 2 = f ( y )only
M 6 xy y

I ( y ) = exp( f ( y )dy ) = y 2

O.D.E
6 xy 3 dx + (4 y 3 + 9 x 2 y 2 )dy = 0 O.D.E
( x, y ) = C * , ( x, y )

= 6xy 3 & = N = 4 y3 + 9x2 y2
x y

( x, y ) = 3 x 2 y 3 + g ( y )
& ( x, y ) = y 4 + 3 x 2 y 3 + h ( x )

8 Edited by Prof. Yung-Jung Hsu


,,
( x, y ) = 3 x 2 y 3 + y 4 + C1
( x, y ) = C * , O.D.E
3x 2 y 3 + y 4 = C , C = (C* - C1 )
(2-2-2) (Linear Differential Equation)
1. Difinition:
A 1st-order linear O.D.E: y ' ( x) + P( x) y ( x) = Q( x)
(i) When Q( x) = 0 , it is called homogeneous.
(ii) When Q( x) 0 , it is called nonhomogeneous.
2. How to solve?
A 1st-order linear O.D.E: y ' ( x) + P( x) y ( x) = Q( x)
dy + [P( x) y Q( x)]dy = 0
M ( x, y ) = P ( x ) y Q ( x ) , N ( x , y ) = 1
M N
= P(x) , =0 non-exact
y x
, then check if an integration factor exists
M N

y x
We observe = P (x) , x only
N

I ( x) = exp P ( x)dx ( )
O.D.E I ( x) y ' ( x) + I ( x) P( x) y ( x) = I ( x)Q( x) ,

( Iy ) ' = IQ Iy = IQdx + C general solution

Example: y ' + y tan x = sin 2 x, y (0) = 1


P ( x) = tan x , Q( x) = sin 2 x 1st-order linear O.D.E

I = exp tan xdx = [ ] 1


cos x
sin 2 x
Iy = IQdx + C = dx = 2 cos x + C
cos x
y = 2 cos 2 x + C cos x general solution
y (0) = 1 , C = 3
O.D.E y = 2 cos 2 x + 3 cos x particular solution

(2-2-3) Bernoullis Equation:


1. Difinition:
y ' + P( x) y = Q( x) y n 1st-order non-linear O.D.E
*()

9 Edited by Prof. Yung-Jung Hsu


2. How to solve?
y ' + P ( x) y = Q ( x) y n
y n y ' + P( x) y1n = Q( x)
du
, u = y1n , = (1 n) y n y '
dx
du
O.D.E + (1 n) P( x)u = (1 n)Q( x)
dx

I ( x) = exp (1 n) P ( x)dx ( )
Iu = I (1 n)Q( x)dx + C

Example: xy ' + 2 y = xy 3
2
y' + y = y3
x
2 2
y 3 y ' + y =1
x
u = y 2 , u ' = 2 y 3 y '
u' 2 4
O.D.E + u = 1 u ' u = 2
2 x x
4
P( x) = , Q( x) = 2
x
4 1
I ( x) = exp dx = 4
x x
1 2
Iu = 4
(2)dx = 3 + C
x 3x
2
u = x + Cx 4 = y 2 general solution
3

1st-order O.D.E
dM
*Age Dating, e.g.: 14
C M (t ) , = kM
dt
dt
*Newtons Law of Cooling, e.g.: = k (T Tm )
dt
dx
*Mixing of salts, e.g.: = input rate- output rate
dt
dY
= kY (t )
dt
,

10 Edited by Prof. Yung-Jung Hsu


If k < 0 , decay constant
If k > 0 , growing constant

Example1: Radioactive decay

dM
= kM M (t ) = C * e kt
dt
Initial condition 1 = C * e 0 = C , M (t ) = e kt
1
t=3.3hr, M=0.5g 0.5 = e3.3k , k = ln(0.5)
3.3
1
0.1 = e kt , t = ln(0.1) 10.96(hr )
k

11 Edited by Prof. Yung-Jung Hsu