CH 01
CH 01
A
Ordinary Differential
Equations (ODEs)
𝑑𝑓(𝑢) 𝑑𝑓(𝑢) 𝑑𝑢
Chain rule: =
𝑑𝑥 𝑑𝑢 𝑑𝑥
𝑑 𝑠𝑖𝑛 𝑥 2 2
𝑑 𝑠𝑖𝑛 𝑥 𝑑𝑥 2
= = 2𝑥 𝑐𝑜𝑠 𝑥 2
𝑑𝑥 𝑑𝑥 2 𝑑𝑥
𝑑 𝑥 𝑑 (ln 2x ) 𝑑 (ln 2)𝑥 𝑑e(ln 2)𝑥 𝑑(ln 2)𝑥
2 = e = e =
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑(ln 2)𝑥 𝑑𝑥
= 𝑒 (ln 2)𝑥 ⋅ (ln 2) = (ln 2) 2𝑥
超越「代數函數」的函數,稱為「超越函數」。例如,三角
函數、對數與指數函數、雙曲函數。
雙曲函數 Hyperbolic function
sinh x (hyperbolic sin of 𝑥) cosh x (hyperbolic cosine of 𝑥)
𝑒 𝑥 −𝑒 −𝑥 𝑒 𝑥 +𝑒 −𝑥
𝑠𝑖𝑛ℎ 𝑥 = 𝑐𝑜𝑠ℎ 𝑥 =
2 2
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.1 p6
Integration (積分) (Take the Integral 求積分)
𝐹 𝑥 = ∫ 𝑑𝐹 𝑥 = ∫ 𝑓 𝑥 𝑑𝑥 ,
𝑑𝐹 𝑥
in which 𝑓 𝑥 𝑑𝑥 = 𝑑𝐹 𝑥 , = 𝑓(𝑥)
𝑑𝑥
𝑛 𝑥 𝑛+1
∫ 𝑥 𝑑𝑥 = +𝑐
𝑛+1
1
∫ 𝑑𝑥 = 𝑙𝑛 𝑥 + 𝑐 (加上絕對值。ln 𝑥 = log 𝑒 𝑥 的底是𝑒 (Natural
𝑥
number, Euler’s number), 𝑒 為正)
1
∫ 𝑒 𝑎𝑥 𝑑𝑥 = 𝑒 𝑎𝑥 + 𝑐
𝑎
sin 𝑎𝑥
∫ cos 𝑎𝑥 𝑑𝑥 = +𝑐
𝑎
cos 𝑎𝑥
∫ sin 𝑎𝑥 𝑑𝑥 = − +𝑐
𝑎
∫ 𝑓 ± 𝑔 𝑑𝑥 = ∫ 𝑓𝑑𝑥 ± ∫ 𝑔𝑑𝑥
Example: ∫ 𝑥 𝑐𝑜𝑠 𝑥 𝑑𝑥 =?
𝑥 𝑠𝑖𝑛 𝑥 ′ = 𝑠𝑖𝑛 𝑥 + 𝑥 𝑐𝑜𝑠 𝑥
𝑥 𝑠𝑖𝑛 𝑥 = ∫ 𝑠𝑖𝑛 𝑥 𝑑𝑥 + ∫𝑥 𝑐𝑜𝑠 𝑥 𝑑𝑥
∫𝑥 𝑐𝑜𝑠 𝑥 𝑑𝑥 = 𝑥 𝑠𝑖𝑛 𝑥 − ∫ 𝑠𝑖𝑛 𝑥 𝑑𝑥
= 𝑥 𝑠𝑖𝑛 𝑥 + 𝑐𝑜𝑠 𝑥 + 𝑐
圖中針對不同 𝑐 值,
畫出許多解曲線。
EXAMPLE 3A 物體變化率𝑑𝑦/𝑑𝑡(定義為極
(A)Exponential Growth. (指數增長) 小時間𝑑𝑡與變化量𝑑𝑦的比值)
與物體目前的數量𝑦成比例
From calculus we know that y = ce0.2t has the derivative
𝑑𝑦
𝑦′ = = 0.2𝑒 0.2𝑡 = 0.2𝑦
𝑑𝑡
Hence y is a solution of y’ = 0.2y (Fig. 4A). This ODE is of
the form y’ = ky.
With positive-constant k, it can model exponential growth,
for instance, of colonies of bacteria (細菌的菌落) or
populations of animals (動物的族群). It also applies to
humans for small populations in a large country (e.g., the
United States in early times) and is then known as
Malthus’s law. (馬爾薩斯定理)
EXAMPLE 4A (continued)
(A) Exponential Growth.
放射性物質分解、衰變、衰減
EXAMPLE 5
Radioactivity (放射性). Exponential Decay
Given an amount of a radioactive substance (放射性物質),
say, 0.5 g (gram), find the amount present at any later time.
Physical Information. Experiments show that at each instant a
radioactive substance decomposes (分解) —and is thus
decaying in time—proportional to the amount of substance
present.
如果微分方程太難解要怎麼辦? 有沒有一些數值方法可以找解
(類似微積分中的牛頓法、辛普森數值積分方法)?
approximate
(𝑥2 , 𝑦2 ) solution curve
(𝑥1 , 𝑦1 )
slope: 𝑓(𝑥1 , 𝑦1 )
(𝑥0 , 𝑦0 )
slope: 𝑓(𝑥0 , 𝑦0 ) ℎ𝑓(𝑥0, 𝑦0)
slope: 𝑓(𝑥0 , 𝑦0 )
(𝑥0 , 𝑦0 ) distant ℎ
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Equidistant h Copyright 2011 by 𝑥John
0 𝑥1Sons. All rights
Wiley & 𝑥2 reserved.
𝑥3
= 𝑥0 + ℎ = 𝑥0 + 2ℎ = 𝑥0 + 3ℎ
Section 1.2 p30
1.3Separable ODEs.
(可分離微分方程式)
之前都在說明一些基本觀念,
之後我們開始討論一些重要的方法
Hence one can estimate the age of a fossil (化石) by comparing the
radioactive carbon ratio in the fossil with that in the atmosphere. To do
this, one needs to know that the half-life (半衰期) of 146𝐶 is 5715 years.
Q: When did the mummy approximately live and die if the ratio of
carbon 146𝐶 to carbon 126𝐶 in this mummy is 52.5% of that of a living
organism? Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.3 p35
EXAMPLE 4: Radiocarbon Dating (放射性碳定年法)
Solution:
Let 𝑦(𝑡) be the amount of 146𝐶 at current time 𝑡. Then, we have
𝑑𝑦 𝑡 Δ𝑦 𝑡
𝑦′ 𝑡 = = lim = 𝑘𝑦
𝑑𝑡 Δ𝑡→0 Δ𝑡
𝑑𝑦
= 𝑘𝑑𝑡, 𝑙𝑛 𝑦 = 𝑘𝑡 + 𝑐 ′ , 𝑦 = 𝑐𝑒 𝑘𝑡 .
𝑦
We have two conditions for determining 𝑐, 𝑘.
Let 𝑦0 be the initial amount of 146𝐶 at 𝑡 = 0.
Thus, 𝑦 0 = 𝑐 = 𝑦0 and 𝑦 = 𝑦0 𝑒 𝑘𝑡 .
Since the half-life 𝐻 = 5715 years, 𝑦 𝐻 = 0.5 𝑦0 = 𝑦0 𝑒 𝑘𝐻 . Then,
𝑙𝑛 0.5 0.693
0.5 = 𝑒 𝑘𝐻 , 𝑘= =− = −0.0001213.
𝐻 5717
Now, we use the ratio 52.5% to determining the time 𝑡 the mummy
died. That is,
𝑙𝑛 0.525
𝑦 𝑡 = 0.525𝑦0 = 𝑦0 𝑒 𝑘𝑡 , 𝑡= = 5312
𝑘
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Answer: About 5300 years ago. Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.3 p36
1.3 Separable ODEs. Modeling
EXAMPLE 5
Mixing Problem
Mixing problems occur quite frequently in chemical industry.
We consider a single tank containing 1000 gal of water, in which
initially 100 lb of salt is dissolved.
Brine (鹽滷) runs in at a rate of 10 gal/min, and each gallon
contains 5 lb of dissolved salt.
The mixture in the tank is kept uniform by stirring.
Brine runs out at 10 gal/min.
Find the amount of salt in the tank at any time t.
(2) If 𝑢 𝑢 − 2 = 0, we have 𝑢 − 2 = 𝑥 + 𝑦 − 2 = 0 or 𝑢 = 𝑥 + 𝑦 = 0.
𝑦 = −𝑥 + 2 (paticular solution with 𝑐 = 0) or
𝑦 = −𝑥 (singular solution)
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Section 1.3 p43
Copyright 2011 by John Wiley & Sons. All rights reserved.
Example
Solve 2𝑥𝑦𝑦’ = 𝑦 2 − 𝑥 2 .
Solution: 𝑦2 − 𝑥2 𝑦 𝑥
𝑑𝑦 = 𝑑𝑥 = 𝑑𝑥 − 𝑑𝑥
2𝑥𝑦 2𝑥 2𝑦
Let 𝑦/𝑥 = 𝑢 and 𝑑𝑦 = 𝑑(𝑢𝑥) = 𝑢𝑑𝑥 + 𝑥𝑑𝑢. Substitution gives
𝑢 1 𝑢 1 −𝑢2 −1
𝑑𝑦 = 𝑢𝑑𝑥 + 𝑥𝑑𝑢 = 𝑑𝑥 − 𝑑𝑥, 𝑥𝑑𝑢 = − − 𝑑𝑥 = 𝑑𝑥
2 2𝑢 2 2𝑢 2𝑢
2𝑢 1
𝑑𝑢 = − 𝑑𝑥.
1+𝑢2 𝑥
𝑑𝑧 𝑑𝑥
Method 1: 𝑧 = 1 + 𝑢2 , 𝑑𝑧 = 𝑑 1 + 𝑢2 = 2𝑢𝑑𝑢, thus =−
𝑧 𝑥
1 2 1 2 ) = − 1 𝑑𝑥
Method 2: 𝑑𝑢 = 𝑑(1 + 𝑢
1+𝑢2 1+𝑢2 𝑥
𝑐
By integration, ln |𝑧| = ln |1 + 𝑢2 | = − ln |𝑥| + 𝑐 ∗ = ln .
𝑥
Then, we have
𝑦2 𝑐 𝑐
1+ 𝑢2 =1+ = , > 0, 𝑥 2 + 𝑦 2 = 𝑐𝑥, or
𝑥2 𝑥 𝑥
𝑐 2 2 𝑐2
𝑥 − +𝑦 = . (general solution)
2 4
A family of circles with center (c/2,0) and radius
Advanced Engineering c/210/e
Mathematics, passing
by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
through the origin as in Fig. 12. Section 1.3 p44
Example
Solve 2𝑥 + 1 𝑦’ + 𝑦 = 2𝑥 + 1 3/2.
Solution: 2𝑥 + 1 𝑑𝑦 + 𝑦𝑑𝑥 = 2𝑥 + 1 3/2 𝑑𝑥
Let 𝑢 = 2𝑥 + 1 and 𝑑𝑢 = 2𝑑𝑥. Substitution gives
3/2 𝑑𝑢 3/2 𝑑𝑢
𝑢𝑑𝑦 + 𝑦𝑑𝑥 = 𝑢 𝑑𝑥, 𝑢𝑑𝑦 + 𝑦 = 𝑢
2 2
2𝑢𝑑𝑦 + 𝑦𝑑𝑢 = 𝑢3/2 𝑑𝑢.
By the inspection method, we try (觀察法觀察係數,嘗試 𝑑(𝑦 2 𝑢) )
𝑑 𝑦 2 𝑢 = 2𝑦𝑢𝑑𝑦 + 𝑦 2 𝑑𝑢 = 𝑦(2𝑢𝑑𝑦 + 𝑦𝑑𝑢).
Thus, multiplying the equation by 𝑦 gives
3 𝑑 𝑦2𝑢 𝑑 𝑦2𝑢
𝑦 2𝑢𝑑𝑦 + 𝑦𝑑𝑢 = 𝑑 𝑦2𝑢 = 𝑦𝑢 𝑑𝑢,
2 = 𝑢3/2 𝑑𝑢, = 𝑢𝑑𝑢
𝑦 (𝑦 2 𝑢)1/2
𝑑𝑧
let 𝑧 = 𝑦 2 𝑢, 𝑑𝑧 = 𝑑(𝑦 2 𝑢), = 𝑢𝑑𝑢
𝑧 1/2
By integration, we have the general solution
2 1/2 1 2 ∗ 1 3/2 𝑐 ∗ −1/2
2(𝑦 𝑢) = 𝑢 + 𝑐 , 𝑦 = 𝑢 + 𝑢
2 4 2
1
𝑦= (2𝑥 + 1)3/2 +𝑐(2𝑥 + 1)−1/2 (general solution)
4
2𝑥+1 2 /4+𝑐 4𝑥 2 +4𝑥+1 /4+𝑐Advanced
𝑥 2 +𝑥+𝑐′
Engineering Mathematics, 10/e by Erwin Kreyszig
𝑦= = =Copyright (其他表示法) Section 1.3 p45
2𝑥+1 1/2 2𝑥+1 1/2 2𝑥+12011
1/2by John Wiley & Sons. All rights reserved.
Example
Solve 𝑥 + 2𝑦 𝑦′ + 𝑦 𝑥 + 𝑦 + 1 = 0.
Solution: Try the inspection method.
𝑥𝑑𝑦 + 2𝑦𝑑𝑦 + 𝑥𝑦𝑑𝑥 + 𝑦 2 𝑑𝑥 + 𝑦𝑑𝑥 = 0.
𝑑 𝑥𝑦 + 𝑑(𝑦 2 ) + 𝑥𝑦 + 𝑦 2 𝑑𝑥 = 0
𝑑 𝑥𝑦 + 𝑦 2 + 𝑥𝑦 + 𝑦 2 𝑑𝑥 = 0
(1) If (𝑥𝑦 + 𝑦 2 ) ≠ 0, we have
𝑑 𝑥𝑦 + 𝑦 2 2 +𝑥 =𝑐
+ 𝑑𝑥 = 0, ln 𝑥𝑦 + 𝑦
𝑥𝑦 + 𝑦 2
ln 𝑥𝑦 + 𝑦 2 + ln 𝑒 𝑥 = ln 𝑒 𝑥 (𝑥𝑦 + 𝑦 2 ) = 𝑐1 ,
1
𝑥𝑦 + 𝑦2 = 𝑐𝑒 −𝑥 or 𝑦 = (−𝑥 ± 𝑥 2 + 4𝑐𝑒 −𝑥 (General Solution)
2
(2) If 𝑥𝑦 + 𝑦 2 = 𝑦 𝑥 + 𝑦 = 0, we have the particular solutions with
𝑐 = 0 (代入通解中,有正負,得到下列兩個特殊解)
𝑦 = 0 or 𝑦 = −𝑥.
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p46
𝑥 2 𝑑𝑥 − 3𝑦 2 𝑑𝑥 + 2𝑥𝑦𝑑𝑦 = 0
𝑑 𝑥 −3 𝑦 2 = −3𝑥 −4 𝑦 2 𝑑𝑥 + 2𝑥 −3 𝑦𝑑𝑦
𝑑 𝑥 −3 𝑦 2 2 𝑑𝑥 + 2𝑥𝑦𝑑𝑦
= −3𝑦
𝑥 −4
1.4
Exact ODEs.
Integrating Factors
(正合常微分方程式、積分因子)
觀察法非常有效率、快速,但有點運氣、十分依靠經驗,有
可能會觀察不出來。有沒有其他方法?
以下介紹系統化的方法 (systematic method),雖然較為繁雜,
但有固定的步驟。
Example:
(1 + 2𝑥𝑦 3 )𝑑𝑥 + 3𝑥 2 𝑦 2 𝑑𝑦 = 0
By inspection, we rewrite the ODE as
(1 + 2𝑥𝑦 3 )𝑑𝑥 + 3𝑥 2 𝑦 2 𝑑𝑦 = 𝑑𝑢(𝑥, 𝑦) = 𝑑(𝑥 + 𝑥 2 𝑦 3 ) = 0
𝑢(𝑥,
Then, the general solution is Advanced 𝑦) = 𝑥
Engineering + 𝑥 2 𝑦 310/e
Mathematics, = by𝑐.Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p48
Exact ODE: (正合常微分方程式)
A first-order ODE 請注意順序,
(1) 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 𝑀對應到𝑑𝑥、𝑁對應到𝑑𝑦
is called an exact differential equation, if this ODE can be
rewritten in the form
𝜕𝑢 𝜕𝑢
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 𝑑𝑥 + 𝑑𝑦 = 𝑑𝑢 𝑥, 𝑦 = 0
𝜕𝑥 𝜕𝑦
𝜕𝑢 𝜕𝑢
where 𝑀 𝑥, 𝑦 = and 𝑁 𝑥, 𝑦 = . Then, by integration we
𝜕𝑥 𝜕𝑦
immediately obtain the general solution in the implicit form
(3) 𝑢 𝑥, 𝑦 = 𝑐 = const. (隱形式通解)
𝜕 𝜕2 𝑢
𝑁 𝑥, 𝑦 = = −𝑠𝑖𝑛 𝑥 + 𝑦 .
𝜕𝑥 𝜕𝑥𝜕𝑦
Since two partial derivativesAdvanced
are equal, the ODE
Engineering Mathematics, 10/e (7) isKreyszig
by Erwin exact.
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p51
Example 1: Find the function 𝑢(𝑥, 𝑦)
Step 2. Find 𝑢(𝑥, 𝑦)
Since 𝑀 𝑥, 𝑦 = 𝜕𝑢/𝜕𝑥, we can have 𝑢(𝑥, 𝑦) by integration
with respect to (w.r.t.) x (“partial“ integral for 𝑑𝑢 = 𝑀𝑑𝑥)
∫ 𝑑𝑢 = ∫ 𝑀𝑑𝑥 + 𝑓 𝑦
𝑢 = ∫ 𝑐𝑜𝑠 𝑥 + 𝑦 𝑑𝑥 + 𝑓 𝑦 = sin 𝑥 + 𝑦 + 𝑓(𝑦).
In this integration, y is to be regarded as a constant, and f(y)
plays the role of a “constant” of integration.
By partial differentiation,
𝜕 𝜕2 𝑢
𝑀 𝑥, 𝑦 = = 6𝑥𝑦 2 , and
𝜕𝑦 𝜕𝑦𝜕𝑥
𝜕 𝜕2 𝑢
𝑁 𝑥, 𝑦 = = 6𝑥𝑦 2 .
𝜕𝑥 𝜕𝑥𝜕𝑦
Since two partial derivatives are equal, the ODE is exact.
Since 𝑀 𝑥, 𝑦 = 𝜕𝑢/𝜕𝑥, we can have 𝑢(𝑥, 𝑦) as
𝑢 𝑥, 𝑦 = ∫ 𝑑𝑢 = ∫ 𝑀𝑑𝑥 + 𝑓 𝑦 = 𝑥 2 𝑦 3 + 2𝑥 + 𝑓 𝑦 .
Since 𝑁 𝑥, 𝑦 = 𝜕𝑢/𝜕𝑦, we differentiate the above formula with
respect to 𝑦, obtaining
𝜕𝑢 𝑑𝑓(𝑦)
= 3𝑥 2 𝑦 2 + = 𝑁 = 3𝑥 2 𝑦 2 + 𝑒 𝑦
𝜕𝑦 𝑑𝑦
Then, 𝑑𝑓 𝑦
= 𝑒𝑦, and 𝑓 𝑦 = ∫ 𝑒 𝑦 𝑑𝑦 + 𝑐 ∗ = 𝑒 𝑦 + 𝑐 ∗ .
𝑑𝑦
By inserting 𝑓(𝑦) into 𝑢(𝑥, 𝑦), we can rewrite the original ODE as
𝑑𝑢(𝑥, 𝑦) = 𝑑(𝑥 2 𝑦 3 + 2𝑥 + 𝑒 𝑦 + 𝑐 ∗ ) = 0.
The general solution is 𝑢 𝑥, 𝑦 = 𝑥 2 𝑦 3 + 2𝑥 + 𝑒 𝑦 + 𝑐 ∗ = 𝑐1 ,
𝑢 𝑥, 𝑦 = 𝑥 2 𝑦 3 + 2𝑥 + 𝑒 𝑦 = 𝑐. Advanced
(Thus,Engineering
we can directly
Mathematics, 10/eselect 𝑐 ∗ = 0)
by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p55
有些ODE在乘上積分因子後,
Integrating Factor (積分因子) 可以變成正合ODE
Consider a nonexact ODE
(12) P(x, y) dx + Q(x, y) dy = 0.
We may multiply the nonexact ODE (12) by a function F(x, y)
to obtain an ODE
(13) FP dx + FQ dy = 0.
If the ODE (13) is exact, then the function F(x, y) is called an
integrating factor of (12).
Example: Consider an ODE – 𝑦𝑑𝑥 + 𝑥𝑑𝑦 = 0. The integrating
1 1 1 1
factor is not unique and can be 2 , 2 , , 2 2 . 積分因子不唯一
𝑥 𝑦 𝑥𝑦 𝑥 +𝑦
If we multiply the ODE by 1/𝑥 2 , we get an exact equation
𝑦 1 𝑦
– 2 𝑑𝑥
+ =𝑑 𝑑𝑦 = 0.
𝑥 𝑥 𝑥
The general solution is 𝑦/𝑥 = 𝑐Advanced
= const.
Engineering Mathematics, 10/e by Erwin Kreyszig
Q:如何求積分因子
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p56
How to Find Integrating Factors
Theorem 1
For a nonexact equation 𝑃(𝑥, 𝑦)𝑑𝑥 + 𝑄(𝑥, 𝑦)𝑑𝑦 = 0 in (12),
the integrating factor can be of the form
1 𝜕𝑃 𝜕𝑄
𝐹 𝑥 = 𝑒𝑥𝑝 ∫ 𝑅 𝑥 𝑑𝑥 = 𝑒 ∫ 𝑅 𝑥 𝑑𝑥 , where 𝑅 𝑥 = − , or
𝑄 𝜕𝑦 𝜕𝑥
∗ 1 𝜕𝑄 𝜕𝑃
𝐹 ∗ 𝑦 = 𝑒𝑥𝑝 ∫ 𝑅∗ 𝑦 𝑑𝑦 = 𝑒 ∫ 𝑅 𝑦 𝑑𝑦 , where 𝑅∗ (𝑦) = − .
𝑃 𝜕𝑥 𝜕𝑦
Note that the terms 𝜕𝑃/𝜕𝑦 and 𝜕𝑄/𝜕𝑥 in 𝑅(𝑥) and 𝑅∗ (𝑥)
have been calculated when we check the exactness of ODE.
(𝜕𝑃/𝜕𝑦 和 𝜕𝑄/𝜕𝑥在測試是否正合時, 已經計算過)
For the ODE 𝐹𝑃(𝑥, 𝑦)𝑑𝑥 + 𝐹𝑄(𝑥, 𝑦)𝑑𝑦 = 0 in (13), the exactness
condition (正合的條件) is
𝜕(𝐹𝑃) 𝜕(𝐹𝑄) 𝜕2𝑢
= = .
𝜕𝑦 𝜕𝑥 𝜕𝑥𝜕𝑦
By the product rule, we have
𝜕𝐹 𝜕𝑃 𝜕𝐹 𝜕𝑄
𝑃+𝐹 = 𝑄+𝐹 .
𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑥
[Case I]
Assume the integrating factor 𝐹 = 𝐹 𝑥 . Then, 𝜕𝐹/𝜕𝑦 = 0 and
𝜕𝑃 𝑑𝐹 𝜕𝑄 1 𝜕𝑃 𝜕𝑄 1
𝐹 = 𝑄+𝐹 , − 𝑑𝑥 = 𝑑𝐹 Separable
𝜕𝑦 𝑑𝑥 𝜕𝑥 𝑄 𝜕𝑦 𝜕𝑥 𝐹
1 𝜕𝑃 𝜕𝑄
ln 𝐹 = න − 𝑑𝑥 + 𝑐, 𝐹(𝑥) = 𝑒 ∫ 𝑅(𝑥)𝑑𝑥 Letting 𝑐 = 0 .
𝑄 𝜕𝑦 𝜕𝑥
1 𝜕𝑃 𝜕𝑄
However, if 𝑅 = − = 𝑅(𝑥, 𝑦) and 𝐹(𝑥, 𝑦) are functions
𝑄 𝜕𝑦 𝜕𝑥
of 𝑥 and 𝑦, the assumption fails. Engineering𝑦),則𝐹
(若𝑅(𝑥,
Advanced =by Erwin
Mathematics, 10/e 𝑦 。與
𝐹 𝑥,Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
𝐹 = 𝐹 𝑥 的假設不合,假設失敗) Section 1.4 p58
Theorem 1 [Proof]
The exactness condition is
𝜕𝐹 𝜕𝑃 𝜕𝐹 𝜕𝑄
𝑃+𝐹 = 𝑄+𝐹 .
𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑥
[Case II]
Assume the integrating factor 𝐹 = 𝐹 𝑦 . Then, 𝜕𝐹/𝜕𝑥 = 0 and
𝑑𝐹 𝜕𝑃 𝜕𝑄 1 1 𝜕𝑄 𝜕𝑃
𝑃+𝐹 =𝐹 , 𝑑𝐹 = − 𝑑𝑦 Separable
𝑑𝑦 𝜕𝑦 𝜕𝑥 𝐹 𝑃 𝜕𝑥 𝜕𝑦
1 𝜕𝑄 𝜕𝑃 ∗
ln 𝐹 = න − 𝑑𝑦 + 𝑐, 𝐹 𝑦 = 𝑒∫ 𝑅 𝑦 𝑑𝑦
Letting 𝑐 = 0 .
𝑃 𝜕𝑥 𝜕𝑦
1 𝜕𝑄 𝜕𝑃
However, if 𝑅∗ = − = 𝑅(𝑥, 𝑦) and 𝐹(𝑥, 𝑦) are
𝑃 𝜕𝑥 𝜕𝑦
functions of 𝑥 and 𝑦, the assumption fails. (若𝑅(𝑥, 𝑦),則𝐹 =
𝐹 𝑥, 𝑦 。與𝐹 = 𝐹 𝑦 的假設不合,假設失敗)
[Case III]
𝐹 = 𝐹 𝑥, 𝑦 . It is hard and is not discussed here.
Advanced Engineering Mathematics, 10/e by ErwinSection
Kreyszig
1.4 p59
Copyright 2011 by John Wiley & Sons. All rights reserved.
𝜕𝑢 𝜕𝑢
Example 5 𝑑𝑢 𝑥, 𝑦 =
𝜕𝑥
𝑑𝑥 +
𝜕𝑦
𝑑𝑦 = 0
數學家族: 家族中多人有極大貢獻。舉例如下
Bernoulli Equation、機率 Bernoulli trials為Jacob Bernoulli (兄)。
L‘Hôpital’s rule實際上是由Johann Bernoulli (弟)所發現。(洛必達聘其為私人
數學老師,被准許發表白努利所有的研究) Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
物理白努力定律為Daniel Bernoulli (Johann之子) Section 1.5 p63
1.5 Linear ODEs. Bernoulli Equation. Population Dynamics.
(2) y’ + p(x)y = 0
and is called homogeneous. (齊次、均質:不分是否微分,每項
都有未知函數𝑦(𝑡)一次方的項)
Separating variables and integrating gives
𝑑𝑦
= −𝑝 𝑥 𝑑𝑥, thus 𝑙𝑛 𝑦 = −∫ 𝑝 𝑥 𝑑𝑥 + 𝑐 ∗ .
𝑦
Then the general solution of the homogeneous ODE (2) is
−∫ 𝑝 𝑥 𝑑𝑥 𝑐∗
(3) 𝑦 = 𝑐𝑒 (𝑐 = 𝑒 ).
Here we may also choose c = 0 and obtain the trivial
solution (顯明解) y(x) = 0 for all Engineering
Advanced x in that interval.
Mathematics, 10/e by Erwin Kreyszig
Section 1.5 p66
Copyright 2011 by John Wiley & Sons. All rights reserved.
𝑑𝑦 + 𝑝(𝑥)𝑦𝑑𝑥 = 𝑟 𝑥 𝑑𝑥
Nonhomogeneous Linear ODE: 𝑦 ′ + 𝑝(𝑥)𝑦 = 𝑟 𝑥 , 𝑟 𝑥 ≠ 0.
We now solve (1) in the case that r(x) is not everywhere zero
on the interval J. Then the ODE (1) is called nonhomogeneous.
Multiplying the ODE by an integrating factor 𝐹(𝑥) gives
𝐹(𝑥)𝑑𝑦 + 𝐹(𝑥)𝑝(𝑥)𝑦𝑑𝑥 = 𝐹(𝑥)𝑟 𝑥 𝑑𝑥
𝐹 𝑥 𝑝𝑦 − 𝑟 𝑑𝑥 + 𝐹 𝑥 𝑑𝑦 = 0. (Standard form of exact ODE)
Let 𝑀 = 𝜕𝑢/𝜕𝑥 = 𝐹(𝑥)(𝑝(𝑥)𝑦 − 𝑟(𝑥)) and 𝑁 = 𝜕𝑢/𝜕𝑦 = 𝐹 𝑥 .
By the exactness condition, we have
𝜕2𝑢 𝜕𝑀 𝜕𝑁 𝑑𝐹 𝑥
= =𝑝 𝑥 𝐹 𝑥 = = .
𝜕𝑥𝜕𝑦 𝜕𝑦 𝜕𝑥 𝑑𝑥
Separating variables and integrating gives
𝑑𝐹 𝑥
𝑝 𝑥 𝑑𝑥 = , thus ln |𝐹(𝑥)| = ∫ 𝑝 𝑥 𝑑𝑥.
𝐹 𝑥
The integrating factor is
∫ 𝑝 𝑥Engineering
𝐹 𝑥 = 𝑒Advanced 𝑑𝑥 . Mathematics,
Wiley & 𝑝(𝑥).
Note
Copyright 2011 by John
10/e by Erwin Kreyszig
Sons. All rights Section 1.5 p67
reserved.
1.5 Linear ODEs. Bernoulli Equation. Population Dynamics.
Solution. ℎ = ∫ 𝑝 𝑥 𝑑𝑥
Here p = tan x, r = sin 2x = 2 sin x cos x and
h = ∫p dx = ∫tan x dx = ∫(sin x/cos x)dx = ∫(-1/cos x)d(cos x)
𝑅 𝐸 𝑡
𝐿𝐼 ′ + 𝑅𝐼 = 𝐸 𝑡 , 𝐼′ + 𝐼=
𝐿 𝐿
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.5 p71
Bernoulli Equation. (差一項,就是線性ODE)
Reduction to Linear Form 𝑦 ′ + 𝑝(𝑥)𝑦 = 𝑟 𝑥
Numerous applications can be modeled by ODEs that are
nonlinear but can be transformed to linear ODEs. One of the
most useful ones of these is the Bernoulli equation
(9) 𝑦′ + 𝑝 𝑥 𝑦 = 𝑔 𝑥 𝑦𝑎 (a: any real number).
If a = 0 or a = 1, Equation (9) is linear. Otherwise, with the
nonlinear term 𝑦 𝑎 , it is nonlinear.
To eliminate 𝑦 𝑎 , we multiply the ODE by 𝑦 −𝑎 , obtaining
𝑦 −𝑎 𝑦 ′ + 𝑝 𝑥 𝑦1−𝑎 = 𝑔 𝑥 .
𝑑𝑢(𝑥) 𝑑𝑦 1−𝑎 𝑑𝑦 1−𝑎 𝑑𝑦
Let 𝑢 𝑥 = (𝑦(𝑥))1−𝑎 and 𝑢′ = = = =
𝑑𝑥 𝑑𝑥 𝑑𝑦 𝑑𝑥
1 − 𝑎 𝑦 −𝑎 𝑦 ′ .
Then, we obtain a linear ODE (此時變成線性ODE)
𝑢′ (𝑥)
+𝑝 𝑥 𝑢 𝑥 =𝑔 𝑥 , 𝑢′ 𝑥 + 1 − 𝑎 𝑝𝑢 𝑥 = (1 − 𝑎)𝑔.
1−𝑎
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
由後往前,去除不符合線性ODE型式的項,例如 𝑦 𝑎& Sons.
Copyright 2011 by John Wiley 和𝑦All1−𝑎
rights reserved.
Section 1.5 p72
Example
5
Solve 𝑦 ′ − 5𝑦 = − 2 𝑥𝑦 3
Solution: (Bernoulli ODE? Nonlinear term 𝑦 3 )
5
Multiplying the ODE by 𝑦 −3 gives 𝑦 −3 𝑦 ′ − 5𝑦 −2 = − 𝑥.
2
Let 𝑢 = 𝑦 −2 , 𝑢′ = 𝑑𝑢/𝑑𝑥 = −2𝑦 −3 𝑦′. Then, we have
𝑢′ 5
− − 5𝑢 = − 𝑥, thus 𝑢′ + 10𝑢 = 5𝑥 (linear ODE).
2 2
This is a linear ODE with 𝑝(𝑥) = 10.
With the integrating factor is 𝑒 ∫ 𝑝𝑑𝑥 = 𝑒 10𝑥 , we have
𝑒10𝑥 𝑑𝑢 + 10𝑒 10𝑥 𝑢𝑑𝑥 = 5𝑥𝑒 10𝑥 𝑑𝑥 左式為全微分。
右式單獨一項,可分部積分
𝑑 𝑒 10𝑥 𝑢 = 5𝑥𝑒 10𝑥 𝑑𝑥
10𝑥
1 10𝑥 1 10𝑥 1 10𝑥 1 10𝑥
𝑒 𝑢 = 𝑥𝑒 − ∫ 𝑒 𝑑𝑥 + 𝑐 = 𝑥𝑒 − 𝑒 +𝑐
2 2 2 20
−2
1 1
𝑢=𝑦 = 𝑥− + 𝑐𝑒 −10𝑥
2 20
−1/2
1 1
𝑦=± 𝑥− + 𝑐𝑒 −10𝑥 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
2 20 Section 1.5 p73
Copyright 2011 by John Wiley & Sons. All rights reserved.
Example 4: Logistic Equation
Solve the following Bernoulli equation, known as the logistic
equation (or Verhulst equation)
(11) 𝑦 ′ = 𝐴𝑦 − 𝐵𝑦2
Solution. Write (11) in the form (9), that is,
𝑦 ′ − 𝐴𝑦 = − 𝐵𝑦2.
To eliminate 𝑦 2 , we multiply the ODE by 𝑦 −2 , obtaining
𝑦 −2 𝑦’ − 𝐴𝑦 −1 = − 𝐵.
Let 𝑢 = 𝑦 −1 and 𝑢′ = −𝑦 −2 𝑦 ′ .
Then, we obtain a linear ODE and the solution [by (4)]
𝑢′ + 𝐴𝑢 = 𝐵 separable and 𝑢 = 𝑦 −1 = 𝑐𝑒 −𝐴𝑡 + 𝐵/𝐴 .
Since 𝑢 = 𝑦 −1 , we have the general solution of (11),
−1
1
(12) 𝑦 = 𝑢 = −𝐴𝑡 (Fig. 21)
𝑐𝑒 + 𝐵/𝐴
Directly from (11) we see that y = 0 (y(t) = 0 for all t) is also a
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
solution. Section 1.5
Copyright 2011 by John Wiley & Sons. All rights reserved. p74
Autonomous ODE (自治、自主、自律) 的定義、特性
An ODE 𝑦’(𝑡) = 𝑓(𝑡, 𝑦) in which the independent variable t (or x)
does not occur explicitly can be written in the form
(13) 𝑦’ = 𝑓(𝑦) (式中沒有明確顯現變數𝑡或𝑥,
and is called an autonomous ODE. 但其實𝑦(𝑡)或𝑦(𝑥))
For example, the logistic equation 𝑦 ′ = 𝑓(𝑦) = 𝐴𝑦 − 𝐵𝑦2 in (11) is
autonomous.
The autonomous equation has a special property called time-
invariant property (系統特性是非時變). (If 𝑦1 (𝑡) is a solution, 𝑦2 𝑡
= 𝑦1 (𝑡 − 𝑡0 ) is also a solution. 時間平移後的解仍是解,證於下。)
Many laws in physics are expressed as autonomous equation
because it is assumed the laws of nature which hold now are
identical to those for any point in the past or future. (現有的自然法
則,過去、未來也保持。此性質也見於控制、電路、信號、通訊)
[Proof] Let 𝑦1 (𝑡) be a solution of 𝑦 ′ = 𝑓(𝑦). Let 𝑠 = 𝑡 − 𝑡0 , 𝑑𝑠 = 𝑑𝑡.
𝑦2 𝑡 = 𝑦1 (𝑡 − 𝑡0 ) is also a solution since (時間平移後的𝑦2 𝑡 代回
ODE,等號也成立,所以也是解)
𝑑𝑦2 𝑡 𝑑𝑦1 𝑡 − 𝑡0 𝑑𝑦1Advanced
𝑠
𝑦2′ 𝑡 = = = Engineering Mathematics, 10/e by Erwin Kreyszig
= 𝑓(𝑦 1 𝑠by)John
= 𝑓(𝑦 𝑡 − 𝑡All )rights
Wiley1& Sons. 0
= 𝑓(𝑦 2 𝑡 )
𝑑𝑡 𝑑(𝑡 − 𝑡0 ) 𝑑𝑠 Copyright 2011 reserved.
Section 1.5 p75
特性: Equilibrium solutions, Equilibrium points, Critical Points
The autonomous ODE 𝑦 ′ = 𝑓(𝑦) in (13) has constant solutions
𝑦(𝑡) = 𝑐 (常數解), also called equilibrium solutions or
equilibrium points. The constant solutions are determined by the
zeros of 𝑦 ′ = 𝑓 𝑦 = 𝑑𝑓/𝑑𝑡 = 0, at which the solution is obviously
𝑦 = 𝑐 = const. (Autonomous ODE會有不隨時間改變的常數解,所
以這種解又稱為平衡解、平衡點。此解是由 𝑦 ′ = 𝑓 𝑦 = 𝑑𝑦/𝑑𝑡 = 0,
所得到,所以是零點)
假設解 𝑦(𝑡)是電路的輸出。不
Solution curves: 同初始條件導致不同的 𝑐及 𝑦(𝑡)。
𝑦(𝑡) = 1Τ 𝑐𝑒 −𝐴𝑡 + 𝐵Τ𝐴 圖中,即使𝑦(𝑡)一開始靠近 0,
Equilibrium solutions: 但最後都會穩定到 𝑦 𝑡 = 𝐴Τ𝐵 。
𝑦 𝑡 = 0 (unstable)
𝑦 𝑡 = 𝐴Τ𝐵 (stable) 𝑦 𝑡 = 𝐴Τ𝐵是穩定平衡解。
𝑦 𝑡 = 𝐴Τ𝐵 = 4 𝑦 𝑡 = 0 是不穩定平衡解。
可藉由設計電路元件規格 𝐴, 𝐵 ,
使電路能穩定輸出在所要的電
壓例如 𝐴Τ𝐵 = 4 (𝑉) 。
𝑦 𝑡 =0
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Fig. 21. Section 1.5 p77
Example 5
The ODE 𝑦 ′ = 𝑦 − 1 𝑦 − 2 has the stable equilibrium
solution 𝑦1 = 1 and the unstable 𝑦2 = 2 as the direction
field in Fig. 22.
Different 𝑐, 假設這是電路系統的輸出𝑦(𝑡),橫軸
different curve 𝑦(𝑥) 𝑥 = 𝑡 表示時間。
畫出方向場,可大略看出解曲線。
不同參數𝑐,不同輸出𝑦(𝑡)。
但系統無法穩定運作在𝑦 𝑡 = 2 附近。
Stable
若初始條件使得一開始 𝑦 𝑡 > 2。隨
𝑦1 = 1 時間增加,輸出𝑦(𝑡)會不斷增加。直
到崩潰。
General solution:
−1
1 1 2 1
− 2 𝑥2 − 2 𝑥2
𝑦=𝑥+𝑣 =𝑥+ 𝑒 න −𝑒 2 𝑥 𝑑𝑥 + 𝑐𝑒
Singular solution: 𝑦 = 𝑥
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Section 1.5 p81
Copyright 2011 by John Wiley & Sons. All rights reserved.
1.7 Existence and Uniqueness of
Solutions for Initial Value Problems
(1) |𝑦’| + 𝑦 = 0, 𝑦 0 = 1.
No solution. The only possible solution 𝑦 = 0 cannot meet the
initial condition.
(2) 𝑦 ′ = 2𝑥, 𝑦 0 = 1.
One solution: 𝑦 = 𝑥 2 + 𝑐, 𝑐 = 1.
(3) 𝑥𝑦 ′ = 𝑦 − 1, 𝑦 0 = 1.
Infinitely many solutions: 𝑦 = 1 + 𝑐𝑥. (任何 𝑐,都可以)
Section 1.7 p82 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
1.7 Existence and Uniqueness of Solutions for Initial Value Problems
Problem of Existence
Under what conditions does an initial value problem of the form
(1) have at least one solution (hence one or several solutions)?
Problem of Uniqueness
Under what conditions does that problem have at most one
solution (hence excluding the case that it has more than one
solution)?
Theorem 1
Existence Theorem
Let the right side f(x, y) of the ODE in the initial value problem
(1) y’ = f(x, y), y(x0) = y0
be continuous at all points (x, y) in some rectangle
R: |x − x0|< a, | y − y0 | < b (Fig. 26)
and bounded in R; that is, there is a number K such that
(2) | f(x, y)| ≤ K for all (x, y) in R.
Then the initial value problem (1) has at least one solution y(x).
This solution exists at least for all x in the subinterval |x − x0|< α
of the interval |x − x0|< a; here, α is the smaller of the two
numbers a and b/K.
Theorem 1 (continued)
Theorem 2
Uniqueness Theorem
Let f and its partial derivative fy = ∂f/∂y be continuous for all (x, y)
in the rectangle R (Fig. 26) and bounded, say,
(3) (a) |f (x, y)| ≤ K, (b) |f y(x, y)| ≤ M for all (x, y) in R.
Then the initial value problem (1) has at most one solution y(x).
Thus, by Theorem 1, the problem has precisely one solution. This
solution exists at least for all x in that subinterval |x − x0|< α.