0% found this document useful (0 votes)
143 views100 pages

DE Write1

The document outlines a course on Differential Equations taught by 丁建均 at NTU, including class schedule, grading criteria, and required textbook. It provides details on course structure, office hours, and important policies regarding attendance and assignments. Additionally, it covers the syllabus, exam content, and introductory concepts related to differential equations.

Uploaded by

casperchen0523
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views100 pages

DE Write1

The document outlines a course on Differential Equations taught by 丁建均 at NTU, including class schedule, grading criteria, and required textbook. It provides details on course structure, office hours, and important policies regarding attendance and assignments. Additionally, it covers the syllabus, exam content, and introductory concepts related to differential equations.

Uploaded by

casperchen0523
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 100

1

工程數學--微分方程
Differential Equations (DE)
授課者:丁建均
教學網頁:http://djj.ee.ntu.edu.tw/DE.htm
(請上課前來這個網站將講義印好)

歡迎大家來修課!
2
課程資訊

上課時間: 星期三 第 3, 4 節 (AM 10:20~12:10)


上課地點: 明達205
(課程將錄影,放在 NTUCool)

課本: "Differential Equations-with Boundary-Value Problem,"


Dennis G. Zill and Michael R. Cullen, 9th edition, 2017.
(metric version, international version)

評分方式:四次作業 15%, 期中考 42.5%, 期末考 42.5%


3
授課者:丁建均
Office: 明達館723室, TEL: 33669652
Office hour: 週一,二,四,五的下午皆可來找我
老師 E-mail: jjding@ntu.edu.tw

教學網頁:http://djj.ee.ntu.edu.tw/DE.htm

個人網頁:http://disp.ee.ntu.edu.tw/

共同教學網頁: http://cc.ee.ntu.edu.tw/~tomme/DE/DE.html

大助教: 洪聲仰

大助教聯絡方式: shengyang@ntu.edu.tw
4
注意事項:
(1) 本課程採行雙軌制,同學們可以來現場上課,或是可觀看
NTUCool 的影片

(2)請上課前,來這個網頁,將上課資料印好。

http://djj.ee.ntu.edu.tw/DE.htm

(3) 請各位同學踴躍出席 。

(4) 作業不可以抄襲。作業若寫錯但有用心寫仍可以有
40%~90% 的分數,但抄襲或借人抄襲不給分。

(5) 每次作業有11題
上課日期 5
Week Number Date (Wednesday) Remark
1. 9/4
2. 9/11
3. 9/18
4. 9/25: HW1
5. 10/2
6. 10/9
7. 10/16: HW2
8. 10/23: Midterms 範圍: (Sections 2-2 ~ 4-5)
9. 10/30
10. 11/6
11. 11/13
12. 11/20: HW3
13. 11/27
14. 12/4
15. 12/11: HW4
16. 12/18: Finals 範圍: (Sections 4-6 ~ 12-4)
課程大綱 6

Introduction (Chap. 1)
解法 (Chap. 2)
First Order DE 應用 (Chap. 3)
矩陣解 (Chap. 8,範圍外)
解法 (Chap. 4)
Higher Order DE 應用 (Chap. 5,範圍外)
非線性 (Sections 4-10, 5-3, 工數特論)
多項式解法 (Chap. 6)
解法 (Sections 12-1, 12-4)
Partial DE
直角座標 (Chapter 12,工數特論)
圓座標 (Chapter 13,工數特論)

Laplace Transform (Chap. 7 ,範圍外)


Transforms Fourier Series (Chap. 11)
Fourier Transform (Chap. 14,工數特論)
7
授課範圍

期中考範圍 Sections 1-1, 1-2, 1-3


Sections 2-1, 2-2, 2-3, 2-4, 2-5, 2-6
Sections 3-1, 3-2
Sections 4-1, 4-2, 4-3, 4-4, 4-5

期末考範圍 Sections 4-6, 4-7


Sections 6-1, 6-2, 6-3, 6-4
Sections 11-1, 11-2, 11-3
Sections 12-1, 12-4

blue colors: 要考的章節


8
Chapter 1 Introduction to Differential Equations
1.1 Definitions and Terminology (術語)
(1)Differential Equation (DE): any equation containing derivation
(text page 3, definition 1.1)

(2)
dy ( x) x: independent variable 自變數
1
dx y(x): dependent variable 應變數

x d 3 f ( x)
0 sin(t ) f ( x  t )dt  dx3  cos  x 
9

• Note: In the text book, f(x) is often simplified as f

• notations of differentiation
df d2 f d3 f d4 f
dx , dx 2 , dx 3 , dx 4 , ………. Leibniz notation
f , f  , f  , f ( 4) , ………. prime notation
f , 
f , 
f , 
f , ………. dot notation
fx , f xx , f xxx , f xxxx , ………. subscript notation
10
(3) Ordinary Differential Equation (ODE):
differentiation with respect to one independent variable

d 3u d 2u du dx dy dz
3
 2  cos(6 x )u  0    2 xy  z
dx dx dx dt dt dt

(4) Partial Differential Equation (PDE):


differentiation with respect to two or more independent variables
 2u  2u x y
 2 0 
x 2
y  t 
11

(5) Order of a Differentiation Equation: the order of the highest


derivative in the equation
d 7u d 6u d 5u d 4u 7th order
7
2 6 2 5 4 4 0
dx dx dx dx

d2y dy 2nd order


 4  5 y  e x

dx 2 dx
12
(6) Linear Differentiation Equation:
dny d n1 y dy
an  x  n  an1  x  n1    a1  x   a0  x  y  g  x 
dx dx dx
dy d n1 y d n y
(i) For y, only the terms y, dx ,  , n1 , n appear.
dx dx
(ii) All of the coefficient terms am(x) m = 1, 2, …, n are independent of y.
Property of linear differentiation equations:
d n y1 d n1 y1 dy1
If an  x  n  an1  x  n1    a1  x   a0  x  y1  g1  x 
dx dx dx
d n y2 d n1 y2 dy
an  x  n  an1  x  n1    a1  x  2  a0  x  y2  g 2  x 
dx dx dx
and y3 = by1 + cy2, then
d n y3 d n1 y3 dy
an  x  n  an1  x  n1    a1  x  3  a0  x  y3  bg1  x   cg 2  x 
dx dx dx
(if y(x) is treated as the input and g(x) is the output)
13
(7) Non-Linear Differentiation Equation

d 2 y dy
( y  3) 2   2 y  x
dx dx
d 2 y dy
  y 2
 e x

dx 2 dx

d 2 y dy
  e y
 e x

dx 2 dx
[Example 1.1.2] Linear and Nonlinear ODEs
(a) The equations

d3y dy
( y  x ) dx  4 xd y  0, y "  2 y  y  0, x 3
 x 3
 5 y  ex
dx dx

are, in turn, linear first-, second-, and third-order ordinary


differential equations. We have just demonstrated that the first
equation is linear in the variable y by writing it in the alternative
form 4xy’ + y = x.
(b) The equations
nonlinear term: nonlinear term: nonlinear term:
coefficient depends on y nonlinear function of y power not 1
d2y d4y
(1  y ) y ' 2 y  e ,
x
2
 si n y  0, an d 4
 y 2
0
dx dx
are examples of nonlinear first-, second-, and fourth-order ordinary
differential equations, respectively.
15
(8) Explicit Solution (text page 8)
The solution is expressed as y = (x)
(9) Implicit Solution (text page 8)

dy 2
Example:  x ,
dx

Solution: 1 x2  y2  c (implicit solution)


2

y  c  x2 / 2
or (explicit solution)
y   c  x2 / 2
16

1.2 Initial Value Problem (IVP)


A differentiation equation always has more than one solution.
dy
for 1 ,
dx
y = x, y = x+1 , y = x+2 … are all the solutions of the above
differentiation equation.
General form of the solution: y = x+ c, where c is any constant.

The initial value (未必在 x = 0) is helpful for obtain the unique solution.
dy
 1 and y(0) = 2 y = x+2
dx
dy
 1 and y(2) =3.5 y = x+1.5
dx
17

The kth order linear differential equation usually requires k independent


initial conditions (or k independent boundary conditions) to obtain the
unique solution.
d2y
2
1
dx solution: y = x2/2 + bx + c,
b and c can be any constant
y(1) = 2 and y(2) = 3 (boundary conditions,在不同點)
y(0) = 1 and y'(0) =5 (initial conditions ,在相同點)
y(0) = 1 and y'(3) =2 (boundary conditions,在不同點)

For the kth order differential equation, the initial conditions can be 0th ~
(k–1)th derivatives at some points.
18
1.3 Differential Equations as Mathematical
Model
Physical meaning of differentiation:
the variation at certain time or certain place

dx  t  dv  t  d 2 x  t 
[Example 1]: v t   , a t   
dt dt dt 2

F   v  ma dx(t ) d 2 x(t )
F  m
dt dt 2

x(t): location, v(t): velocity, a(t): acceleration


F: force, β: coefficient of friction, m: mass
19
[Example 2]: 人口隨著時間而增加的模型

dA  t  A: population
 kA  t 
dt 人口增加量和人口呈正比
20
[Example 3]: 開水溫度隨著時間會變冷的模型
dT T: 熱開水溫度,
 k (T  Tm )
dt
Tm: 環境溫度
t: 時間
21
大一微積分所學的:

例如:  1 dt  ln t  c
 f  t  dt 的解
t
dA  t 
 f  t   A  t    f  t  dt  c
dt
dA  t  1
Example:  A  t   ln t  c
dt t
dA  t  1 1
 2  At    2 dt  c  ?
dt t 4 t 4
Problems
(1) 若等號兩邊都出現 dependent variable (如 pages 19, 20 的例子)

(2) 若 order of DE 大於 1 (如 page 18 的例子)

該如何解?
22

Review
• dependent variable and independent variable
• DE
• PDE and ODE
• Order of DE
• linear DE and nonlinear DE
• explicit solution and implicit solution
• initial value; boundary value
• IVP
23

Chapter 2 First Order Differential Equation

2-1 Solution Curves without a Solution


Instead of using analytic methods, the DE can be solved by graphs (圖解)

dy
slopes and the field directions:  f  x, y 
dx
y-axis
the slope is f(x0, y0)
(x0, y0)

x-axis
24
Example 1 dy/dx = 0.2xy
if y(0) = 2

if y(0) = -1
From: Fig. 2-1-3(a) in “Differential Equations-with Boundary-Value
Problem”, 9th ed., Dennis G. Zill and Michael R. Cullen.
25
Example 2 dy/dx = sin(y), y(0) = –3/2

From: Fig. 2-1-4 in “Differential Equations-with Boundary-Value Problem”,


9th ed., Dennis G. Zill and Michael R. Cullen.

With initial conditions, one curve can be obtained


26
Advantage:
It can solve some 1st order DEs that cannot be solved by
mathematics.

Disadvantage:
It can only be used for the case of the 1st order DE.
It requires a lot of time
27
Section 2-6 A Numerical Method

• Another way to solve the DE without analytic methods

sampling(取樣)
• independent variable x x0, x1, x2, …………

dy ( x)
• Find the solution of  f  x, y 
dx
Since dy  x   f  x, y  approximation y  xn1   y  xn 
 f  xn , y ( xn ) 
dx xn1  xn

y  xn1   y  xn   f  xn , y ( xn )  xn1  xn 

前一點的值 取樣間格
dy  x  28
 f  x, y  y  xn1   y  xn   f  xn , y ( xn )  xn1  xn 
dx

If 𝑦 𝑥 is known
y  x1   y  x0   f  x0 , y ( x0 )  x1  x0 

y  x2   y  x1   f  x1 , y ( x1 )  x2  x1 

y  x3   y  x2   f  x2 , y ( x2 )   x3  x2 

:
:
:
:
dy  x  29
 f  x, y  y  xn1   y  xn   f  xn , y ( xn )  xn1  xn 
dx

Example:

• dy(x)/dx = 0.2xy y(xn+1) = y(xn) + 0.2xn y(xn )*(xn+1 –xn).

• dy/dx = sin(x) y(xn+1) = y(xn) + sin(xn)*(xn+1 –xn).

後頁為 dy/dx = sin(x), y(0) = –1,


(a) xn+1 –xn = 0.01, (b) xn+1 –xn = 0.1,
(c) xn+1 –xn = 1, (d) xn+1 –xn = 0.1, dy/dx = 10sin(10x) 的例子

Constraint for obtaining accurate results:


(1) small sampling interval (2) small variation of f(x, y)
Blue line: analytic solution; pink line: numerical solution 30
(a) 1 (b) 1
0.5 0.5

0 0

-0.5 -0.5

-1 -1

-1.5 -1.5
0 5 10 0 5 10

(c) (d)
1 1

0.5 0.5

0 0

-0.5 -0.5

-1 -1

-1.5 -1.5
0 5 10 0 5 10
31

Advantages
-- It can solve some 1st order DEs that cannot be solved by mathematics.
-- can be used for solving a complicated DE (not constrained for the 1st
order case)
-- suitable for computer simulation

Disadvantages
-- numerical error (數值方法的課程對此有詳細探討)
附錄一 Table of Integration 32

1/x ln|x| + c
cos(x) sin(x) + c
sin(x) –cos(x) + c
tan(x) –ln|cos(x)| + c
cot(x) ln|sin(x)| + c
ax ax/ln(a) + c
1 1 1 x
x2  a2 tan c
a a

1/ a  x2 2 sin 1 ( x / a )  c

1 / a  x 2 2 cos 1 ( x / a )  c
e ax  1
x eax  x  c
a  a
e ax  2 2 x 2 
x2 eax x   2 c
a  a a 
33

Exercises for Practicing


(not homework, but are encouraged to practice)
1-1: 1, 13, 19, 23, 37
1-2: 3, 13, 21, 33
1-3: 2, 7, 28
2-1: 1, 13, 25, 33
2-6: 1, 3
34
附錄二 Methods of Solving the First Order Differential Equation

graphic method
direct integral
numerical method
separable variable
analytic methods
method for linear equation
method for exact equation
homogeneous equation method
Bernoulli’s equation method
series solution method for Ax + By + c

matrix solution
Laplace transform
transform methods Fourier series
Fourier transform
35
Direct Integral

It is the simplest method for solving the 1st order DE:

dy(x)/dx = f(x)

y  x    f ( x) dx
 F ( x)  c where dF ( x)  f ( x)
dx
36
Something about Calculating the Integral
x
(1) Integration 的定義: x f (t ) dt
0

x
例:x cos(t ) dt  sin x  c
0

(2) 算完 integration 之後不要忘了加 constant c


x
(3) If  f (t )dt  g  x   c
x0

d g  x  f  x
then dx
x
1 g  ax   c
x0 f ( at ) dt 
a 1

c1 is also some constant


d g  ax   a f  ax 
dx
37
2-2 Separable Variables
2-2-1 方法的限制條件

1st order DE 的一般型態: dy(x)/dx = f(x, y)

[Definition 2.2.1] (text page 47)


If dy(x)/dx = f(x, y) and f(x, y) can be separate as

f(x, y) = g(x)h(y)

i.e., dy(x)/dx = g(x)h(y)


then the 1st order DE is separable (or have separable variable).
38
條件: dy(x)/dx = g(x)h(y)

dy
 cos( x)e x  2 y
dx
dy
 x y
dx
2-2-2 解法 39
dy
If  g ( x ) h( y ) , then
dx
dy
Step 1 h( y )  g ( x)dx 分離變數

p ( y )dy  g ( x)dx where p(y) = 1/h(y)

Step 2  p( y)dy   g ( x)dx 個別積分

P( y )  c1  G ( x)  c2 dP( y ) dG ( x)
where  p( y )  g ( x)
dy dx
P( y )  G ( x)  c
Extra Step: (a) Initial conditions
(b) Check the singular solution (i.e., the constant solution)
40
Extra Step (b) Check the singular solution (常數解):

Suppose that y is a constant r


dy
 g ( x ) h( y )
dx

0  g ( x ) h( r )

h( r )  0

solution for r

See whether the solution is a special case of the general solution.


41
2-2-3 Examples
[Example 1] (text page 48)
(1 + x) dy – y dx = 0 Extra Step (b)
dy y check the singular

dy dx dx 1  x solution
Step 1 
y 1 x set y = r ,
0 = r/(1+x)
Step 2 ln y  ln 1  x  c1
r = 0,
y  eln 1 x ec1 y  ec1 1  x y=0
(a special case of the
y  ec1 1  x  ec1 (1  x) general solution)

y  c(1  x) c  ec1
42
Example 練習小技巧
遮住解答和筆記,自行重新算一次
(任何和解題有關的提示皆遮住)

Practice more and Learn better.


(多訓練手感)
43
[Example 2] (with initial condition and implicit solution, text page 49)
dy x, y(4) = –3

dx y
Extra Step (b)
ydy   xdx check the singular solution
Step 1

Step 2 y 2
/ 2   x 2
/2c
Extra Step (a)
4.5  8  c, c  12.5
x 2  y 2  25 (implicit solution)

y  25  x 2 invalid

y   25  x 2 valid
(explicit solution)
[Example 3] (with singular solution, text page 49) 44
dy
 y2  4 Extra Step (b)
dx
check the singular solution
dy dy
Step 1  dx  y2  4
y 4
2
dx
set y = r ,
1 dy 1 dy
  dx
4 y2 4 y2 0 = r2 – 4
Step 2
r = 2,
1 1
ln y  2  ln y  2  x  c1
4 4 y = 2

y2
ln  4 x  4c1
y2

y2 1  ce 4 x
  e 4 x  4 c1  ce 4 x y2 or y = 2
y2 1  ce 4 x
c   e 4c1
[Example 4] (text page 50) 45
dy
 e2 y  y  cos x dx
 e y sin 2 x y 0  0
Extra Step (b)
Step 1 e y
 ye  y  dy  sin 2 x dx  2sin xdx
cos x
set y = r

Note: sin 2 x  2sin x cos x 0  e r sin 2 x

y
no solution for r
Step 2 e  ( y  1)e
y
 2cos x  c
Note: d (ay  b)e  y   ye  y
Extra Step (a) dy
from y  0   0 ( ay  a  b)e  y   ye  y
a  b 1
2  2  c

e y  ye  y  e  y  4  2cos x (implicit solution)


46
Example in the top of text page 51
dy
 xy1/2, y(0) = 0
dx
Extra Step (b)
Step 1
Check the singular solution

Step 2

Extra Step (a)

y  1 x4
Solution: 16 or y  0
47
補充:其實, 這一題還有更多的解
dy
 xy1/2 , y(0) = 0
dx

solutions: (1) y  1 x 4 (2) y  0


16
 1  x 2  b 2 2 for x  b
 16 b0a
(3) y  0 for b  x  a
1 2
 16   for x  a
2 2
x  a
48
2-2-4 IVP 是否有唯一解?
dy
 f  x, y  y  x0   y0
dx
這個問題有唯一解的條件:(Theorem 1.2.1, text page 17)

如果 f(x, y),  f  x, y  在 x = x0, y = y0 的地方為 continuous


y
則必定存在一個 h,使得 IVP 在 x0−h < x < x0 +h 的區間當中
有唯一解

證明可參考
J. Ratzkin, Existence and Uniqueness of Solutions to First Order
Ordinary Differential Equations, 2007.
The Existence and Uniqueness Theorem for First-Order Differential
Equations, www.math.uiuc.edu/~tyson/existence.pdf
49
2-2-5 Solutions Defined by Integral
(1) d x
 g  t  dt  g  x 
dx x0

(2) If
dy/dx = g(x) and y(x0) = y0
then
x
y  x   y0   g  t  dt
x0

難以計算積分 (integral, antiderivative) 的 function,


被稱作是 nonelementary function
 x2
如 e , sin x 2
x
此時,solution 就可以寫成 y  x   y0  x g  t  dt 的型態
0
50
[Example 5] (text page 51)

dy
e  x2
y  3  5
dx
x
Solution y  x   5  3 e dt
t 2

或者可以表示成 complementary error function

y  x   5    erfc  3  erfc  x  
2
51

 error function (useful in probability)


2 x t 2
erf  x    e dt
 0

 complementary error function


2 
erfc  x   e dt  1  erf  x 

t 2
x

用 t 取代 x 以做區別

See text page 60 in Section 2.3


52
2-2-6 本節要注意的地方

(1) 複習並背熟幾個重要公式的積分
(2) 別忘了加 c
並且熟悉什麼情況下 c 可以合併和簡化
(3) 若時間允許,可以算一算 singular solution
(4) 多練習,加快運算速度
附錄三 微分方程查詢 53

http://integrals.wolfram.com/index.jsp
輸入數學式,就可以查到積分的結果

範例:
(a) 先到integrals.wolfram.com/index.jsp 這個網站
(b) 在右方的空格中輸入數學式,例如

數學式
(c) 接著按 “Compute Online with Mathematica” 54

就可以算出積分的結果

結果
(d) 有時,對於一些較複雜的數學式,下方還有連結,點進去就可55
以看到相關的解說

連結
其他有用的網站 56

http://mathworld.wolfram.com/
對微分方程的定理和名詞作介紹的百科網站
http://www.sosmath.com/tables/tables.html
眾多數學式的 mathematical table (不限於微分方程)

http://www.seminaire-sherbrooke.qc.ca/math/Pierre/Tables.pdf
眾多數學式的 mathematical table,包括 convolution, Fourier
transform, Laplace transform, Z transform

軟體當中, Maple, Mathematica, Matlab, Python 皆有微積分結果


查詢有功能
57
Python 微積分查詢

from sympy import *


x = symbols('x')
1
integrate(1/(4+x**2), x) # Find the integral of
4  x2

diff(cos(x**3), x) # Find the differentiation of cos(x3)

2
1 dx
integrate(1/(x**2), (x, 1,2)) # Find 1 x2
58
2-3 Linear Equations
“friendly” form of DEs

2-3-1 方法的適用條件

[Definition 2.3.1] The first-order DE is a linear equation if it has


the following form:
dy
a1  x   a0  x  y  g  x 
dx

g(x) = 0: homogeneous
g(x)  0: nonhomogeneous
59
dy
Standard form:  P  x y  f  x
dx

dy dy a0  x  g  x
a1  x   a0  x  y  g  x   y
dx dx a1  x  a1  x 

許多自然界的現象,皆可以表示成 linear first order DE


60
2-3-2 解法的推導
dy
 P  x y  f  x
dx

子問題 1 子問題 2
dyc dy p ( x)
 P  x  yc  0  P  x  y p ( x)  f  x 
dx dx
Find the general solution yc(x) Find any solution yp(x)
(homogeneous solution) (particular solution)

Solution of the DE
y  x   yc  x   y p ( x )
61
 yc + yp is a solution of the linear first order DE, since
d ( yc  y p )
 P  x  ( yc  y p )
dx
 dyc   dy p 
  P  x  yc     P  x yp 
 dx   dx 
 0  f  x  f  x

 All solutions of the linear first order DE should have the form yc + yp .
Its proof is as follows. If y is a solution of the DE, then
dy  dy 
 P  x y   p  P  x yp   f  x  f  x  0
dx  dx 
d ( y  yp )
 P  x( y  yp )  0
dx
dyc
Thus, y − yp should be the solution of  P  x  yc  0
dx
y should have the form of y = yc + yp
62
Solving the homogeneous solution yc(x) (子問題一)

dyc
 P  x  yc  0
dx
separable variable
dyc
  P  x  dx
yc

ln yc    P  x  dx  c1

yc  ce 
 P ( x ) dx

y1  e 
 P ( x ) dx
Set , then yc  cy1
63
Solving the particular solution yp(x) (子問題二)
dy p ( x)
 P  x  y p ( x)  f  x 
dx

Set yp(x) = u(x) y1(x) (猜測 particular solution 和 homogeneous


solution 有類似的關係)
dy1 ( x) du ( x)
u ( x)  y1 ( x)  P  x  u ( x) y1 ( x)  f  x 
dx dx

du ( x)  dy ( x) 
y1 ( x)  u ( x)  1  P  x  y1 ( x)   f  x 
dx  dx 
equal to zero
du ( x)
y1 ( x)  f  x
dx
ignore ‘+c’
du ( x) f  x  f  x  f  x
 u ( x)   dx y p ( x)  y1 ( x)  dx
dx y1 ( x) y1 ( x) y1 ( x)
64

yp  x  e   P ( x ) dx f ( x)]dx
 P ( x ) dx
yc  ce  
 P ( x ) dx
[ e

solution of the linear 1st order DE:

y  x  c e  e   P ( x ) dx f ( x)]dx
 P ( x ) dx  P ( x ) dx
 [ e

where c is any constant

e  P ( x ) dx : integrating factor

e  P ( x ) dx
y  x   c   [e  P ( x ) dx
f ( x)]dx

d   P ( x ) dx   P ( x ) dx
e y e f  x

dx  

2-3-3 解法 65

(Step 1) Obtain the standard form and find P(x)


(Step 2) Calculate e  P ( x ) dx

(Step 3a) The standard form of the linear 1st order DE can be rewritten as:
d   P ( x ) dx   P ( x ) dx
e y e f  x

dx  
 remember it
(Step 3b) Integrate both sides of the above equation
e y   e f  x  dx  c,
P ( x ) dx P ( x ) dx

ye  
 P ( x ) dx   P ( x ) dx
f  x  dx  ce
P ( x ) dx
e
or remember it, skip Step 3a
(Extra Step) (a) Initial value
(c) Check the Singular Point
66
dy dy
a1  x   a0  x  y  g  x   P  x y  f  x
dx dx

Singular points: the locations where a1(x) = 0


i.e., P(x)  
More generally, even if a1(x)  0 but P(x)   or f(x)  , then
the location is also treated as a singular point.
(a) Sometimes, the solution may not be defined on the interval
including the singular points. (such as Example 4)

(b) Sometimes the solution can be defined at the singular points,


such as Example 3
67
More generally, even if a1(x)  0 but P(x)   or f(x)  , then the
location is also treated as a singular point.

Exercise 33

dy
( x  1)  y  ln x
dx
68
2-3-4 例子
[Example 2] (text page 57)
dy
 3y  6
dx

Step 1 P ( x)  3 Extra Step (c)


check the singular point
Step 2 e  P ( x ) dx  e 3 x
為何在此時可以將
–3x+c 簡化成 –3x?
d 3 x
Step 3 e y   6e 3 x
dx
或著,跳過 Step 3,直接代公式
Step 4 e 3 x y  2e 3 x  c
ye  
 P ( x ) dx   P ( x ) dx
f  x  dx  ce
P ( x ) dx
e
y  2  ce3 x
[Example 3] (text page 58) 69
dy
x  4 y  x 6e x
dx
Extra Step (c)
dy y 4 check the singular point
Step 1  4  x 5e x , P  x   
dx x x x=0

e
P ( x ) dx
Step 2  e 4ln x  x
4

若只考慮 x > 0 的情形, e  P ( x ) dx  x 4 思考: x < 0 的情形

d 4
Step 3  x y   xe x
dx

Step 4 x 4 y  ( x  1)e x  c
y  ( x 5  x 4 )e x  cx 4
x 的範圍: (0, )
[Example 4] (text page 58) 70
dy
 x 2
 9  dx  xy  0
Extra Step (c)
check the singular point
dy x
 2 y0
dx x  9
x
P  x  2
x 9
x 1
 dx ln x 2 9
e x 2 9
e 2
 | x2  9 |

d
dx
 | x2  9 |  y  0 
| x2  9 |  y  c
c defined for x  (–, –3), (–3, 3), or (3, )
y
| x2  9 | not includes the points of x = –3, 3
[Example 6] (text, page 59) 71
dy 1, 0  x 1
 y  f  x y 0  0 f  x  
dx 0, x 1
e  P ( x ) dx
 ex
d x check the singular point
(e y )  e x f  x 
dx
0x1 x>1
d x d x
(e y )  e x (e y )  0
dx dx

e x y  e x  c1 e x y  c2

y  1  c1e  x y  c2e  x
要求 y(x) 在 x = 1 的地方
from initial condition 為 continuous
y  1  e x y  (e  1)e  x
72
2-3-5 名詞和定義
(1) transient term, stable term
x
Example 5 (text page 59) 的解為 y  x  1  5e
5e  x : transient term 當 x 很大時會消失
x 1: stable term
10

2
y

0
x1

-2
0 2 4 6 8 10
x-axis
73
(2) piecewise continuous
A function g(x) is piecewise continuous in the region of [x1, x2] if
g(x) exists for any x  [x1, x2].

In Example 6, f(x) is piecewise continuous in the region of [0, 1)


or (1, )

(3) Integral (積分) 有時又被稱作 antiderivative

(4) error function


2 x
erf  x  

t 2
e dt
0

complementary error function


2 
erfc  x   e dt  1  erf  x 

t 2
x
74
(5) sine integral function
x sin(t )
Si  x    dt
0 t
Fresnel integral function
S  x    sin  t 2 / 2  dt
x

(6) dy  P  x  y  f  x 
dx

f(x) 常被稱作 input 或 driving function

Solution y(x) 常被稱作 output 或 response


75
2-3-6 小技巧
dy
When is not easy to calculate:
dx
dx
Try to calculate
dy

dy 1
Example:  (not linear, not separable)
dx x  y 2

dx
 x  y2 (linear)
dy

x   y 2  2 y  2  ce y (implicit solution)
76
2-3-7 本節要注意的地方

(1) 要先將 linear 1st order DE 變成 standard form


(2) 別忘了 singular point
注意:singular point 和 Section 2-2 提到的 singular solution 不同

(3) 記熟公式
d   P ( x ) dx   P ( x ) dx
e y e f  x

dx  


ye  
 P ( x ) dx   P ( x ) dx
f  x  dx  ce
P ( x ) dx
e
(4) 計算時, e  P ( x ) dx 的常數項可以忽略
77

太多公式和算法,怎麼辦?

最上策: realize + remember it


上策: realize it
中策: remember it
下策: read it without realization and remembrance
最下策: rest z…..z..…z……
78
Chapter 3 Modeling with First-Order
Differential Equations
應用題

(1) Convert a question into a 1st order DE.


將問題翻譯成數學式
(2) Many of the DEs can be solved by
Separable variable method or
Linear equation method
(with integration table remembrance)
79
3-1 Linear Models
Growth and Decay (Examples 1~3)
Change the Temperature (Example 4)
Mixtures (Example 5)
Series Circuit (Example 6)

可以用 Section 2-3 的方法來解


[Example 1] (an example of growth and decay, text page 85) 80

Initial: A culture (培養皿) initially has P0 number of bacteria.

翻譯  A(0) = P0
The other initial condition: At t = 1 h, the number of bacteria is
measured to be 3P0/2.
翻譯  A(1) = 3P0/2
關鍵句: If the rate of growth is proportional to the number of
bacteria A(t) presented at time t,
dA
翻譯   kA k is a constant
dt
Question: determine the time necessary for the number of bacteria to
triple
翻譯  find t such that A(t) = 3P0
這裡將課本的 P(t) 改成 A(t)
dA
 kA
81
A(0) = P0, A(1) = 3P0/2 可以用 什麼方法解?
dt
Extra Step (b)
dA check singular solution
Step 1  kdt
A

Step 2 ln A  kt  c1

A  e kt c1

A  ce kt c  ec1
Extra (1) P0  c 1 c = P0
Step (a)
(2) 3P0 / 2  ce k k = ln(3/2) = 0.4055

A  P0 e0.4055t
針對這一題的問題
3P0  P0e0.4055t t  ln(3) / 0.4055  2.71h
82

課本用 linear (Section 2.3) 的方法來解 Example 1

思考:為什麼此時需要兩個 initial values 才可以算出唯一解?


83
[Example 4] (an example of temperature change, text page 88)
Initial: When a cake is removed from an oven, its temperature is measured at
149 C.
翻譯  T(0) = 149
The other initial condition: Three minutes later its temperature is 85  C.
翻譯  T(3) = 85

question: Suppose that the room temperature is 21 C. How long will it take
for the cake to cool off to 22 C? (註:這裡將課本的問題做一些修改)

翻譯  find t such that T(t) = 22.

另外,根據題意,了解這是一個物體溫度和周圍環境的溫度交互作用的
問題,所以 T(t) 所對應的 DE 可以寫成

dT  k T  21 k is a constant
dt
84
dT  k T  21 Constraints: T(0) = 149 T(3) = 85
dt
課本用 separable variable 的方法解
如何用 linear 的方法來解?
85
[Example 5] (an example for mixture, text page 88)

Concentration:
0.25 kg/L

1000 L (liters)
10 L/min 10 L/min

A: the amount of salt in the tank A  0   25

dA
 (input rate of salt)  (output rate of salt)
dt
10
 10  0.25  A
1000
86
87

LR series circuit

From Kirchhoff’s second law


di
L  Ri  E  t 
dt
88

RC series circuit
q
 Ri  E  t  q: 電荷
C
q dq
 R  E t 
C dt
89

How about an LRC series circuit?

q dq d 2q
 R  L 2  E t 
C dt dt
90
[Example 7] (text page 90) LR series circuit
 E(t): 12 volt,  inductance: 1/2 henry,
 resistance: 10 ohms,  initial current: 0
1 di di
e
P ( t ) dt
 10i  12  20i  24 P (t )  20  e 20t c1
2 dt dt
這裡 + c1 可省略

6 6 d 20t
i (t )   ce 20t e i  e 20t  c
20 t
e i  24e 20t
5 5 dt
i (0)  0
6
0 c
5
6 6
i (t )   e 20t
5 5
91
Circuit problem for t is small and t 

For the LR circuit: L R


transient stable

For the RC circuit: R C


transient stable
92
3-2 Nonlinear Models
可以用 separable variable 或其他的方法來解

3-2-1 Logistic Equation


used for describing the growth of population
dP a
 P (a  bP)  bP(  P)
dt b
The solution of a logistic equation is called the logistic function.
a
Two stable conditions: P  0 and P  .
b
93

Logistic curves for differential initial conditions


94
Solving the logistic equation
dP
 P (a  bP)
dt

dP separable
 dt variable
P (a  bP )
 1/ a b / a 
   dP  dt
 P a  bP 
b dP ( a  bP )
d
1 1
ln P  ln a  bP  t  c 註:  dP   dP  ln a  bP  c0
a a a  bP a  bP

P
ln  at  ac
a  bP (with initial condition P(0) = P0)
P ac1 aP0
 c1e at P t   P t  
a  bP bc1  e  at bP0  (a  bP0 )e  at
c1  e ac logistic function
[Example 1] (text page 99) There are 1000 students. 95

 Suppose a student carrying a flu virus returns to an isolate college


campus of 1000 students.
翻譯  x(0) = 1
 If it is assumed that the rate at which the virus spreads is proportional
not only to the number x of infected students but also to the number of
students not infected,
dx  t 
翻譯   kx 1000  x  k is a constant
dt

 determine the number of infected students after 6 days


翻譯  find x(6)
 if it is further observed that after 4 days x(4) = 50
整個問題翻譯成 96

dx  t 
 kx 1000  x  Constraints: x(0) = 1, x(4) = 50
dt
find x(6)
可以用separable variable 的方法
(The solution is on the next page)
dx  t  97
 kx 1000  x  (c2 e1000 kt  1) x  c21000e1000 kt
dt
1000 (c  c21 )
dx  t  x
 kdt 1  ce 1000 kt
x 1000  x 
x 0  1
1000
1  dx dx  1
    kdt 1 c
1000  x 1000  x 
c  999
dx dx
  1000kdt
x x  1000 x
1000 x  4   50
1  999e 1000 kt
ln x  ln x  1000  1000kt  c1
1000
50 
1  999e 4000 k
x
 e1000 kt  c1
x  1000 1000k  0.9906
x 1000
 c2 e1000 kt (c   e c1 ) x x  6   276
x  1000 2
1  999e 0.9906t
98
Logistic equation 的變形

dP
(1)  P(a  bP )  h 人口有遷移的情形
dt

(2) dP  P(a  bP)  cP 遷出的人口和人口量呈正比


dt
dP
(3)  P(a  bP)  ce  kP 人口越多,遷入的人口越少
dt
dP
(4)  P (a  b ln P ) Gompertz DE
dt
 bP (a / b  ln P ) 飽合人口為 e a /b

飽合人口
人口增加量,和 ln
P
呈正比
99
3-2-2 化學反應的速度
A+B C

• Use compounds A and B to for compound C


• x(t): the amount of C
• To form a unit of C requires s1 units of A and s2 units of B
• a: the original amount of A
• b: the original amount of B
• The rate of generating C is proportional to the product of the
amount of A and the amount of B
dx  t 
 k  a  s1 x  b  s2 x 
dt
See Example 2
100
練習題
(not homework, but are encouraged to practice)
Section 2-2: 4, 6, 8, 10, 12, 14, 16, 21, 25, 28, 30, 36, 46, 48, 50, 54(a)
Section 2-3: 7, 9, 14, 18, 21, 29, 30, 33, 36, 40, 45, 47, 48, 58
Section 3-1: 5, 6, 10, 15, 20, 29, 32
Section 3-2: 2, 5, 14, 15
Review 3: 3, 4, 13, 14

You might also like