0% ont trouvé ce document utile (0 vote)
3 vues86 pages

CH 01

Le document traite des équations différentielles ordinaires (ODE) et des concepts fondamentaux de calcul, y compris la différentiation et l'intégration. Il présente des règles de dérivation, des intégrales indéfinies, ainsi que des méthodes comme l'intégration par parties. Les notions de dérivées totales et de fonctions hyperboliques sont également abordées.

Transféré par

w7wbwnwg2s
Copyright
© All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd
0% ont trouvé ce document utile (0 vote)
3 vues86 pages

CH 01

Le document traite des équations différentielles ordinaires (ODE) et des concepts fondamentaux de calcul, y compris la différentiation et l'intégration. Il présente des règles de dérivation, des intégrales indéfinies, ainsi que des méthodes comme l'intégration par parties. Les notions de dérivées totales et de fonctions hyperboliques sont également abordées.

Transféré par

w7wbwnwg2s
Copyright
© All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd

PART

A
Ordinary Differential
Equations (ODEs)

Section 1.1 p1 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
CHAPTER 0
Basic Review of Calculus

Section 1.1 p2 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
微分名詞 differential: 𝑑𝑥, 𝑑𝑦.
取微分動詞 differentiate 對應於名詞 differentiation。
導函數(derivative)與導數是「微分商」(differential quotient)
′ 𝑑𝑦 Δ𝑦
𝑦 = = lim
𝑑𝑥 Δ𝑥→0 Δ𝑥
Antiderivatives and indefinite integrals (反導數和不定積分)
Differential equations includes the derivative terms, for
example, 𝑦 ′ = 𝑦 ′ 𝑥 = 2𝑥.
By integration with respect to x, we have
න𝑦 ′ 𝑑𝑥 = න2𝑥 𝑑𝑥 + 𝑐
Then, we find the solution 𝑦 = 𝑥 2 + 𝑐.

Note that this is an indefinite integral (不定積分) with a


constant 𝑐 of integration (integration constant, 積分常數)
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.1 p3
Differentiation (微分) (Take the Derivative 取微分)
𝑑
 𝑓′ 𝑥 = 𝑓 𝑥
𝑑𝑥
𝑑 𝑛 𝑛−1
 𝑥 = 𝑛𝑥
𝑑𝑥
𝑑 𝑑
 sin 𝑎𝑥 = 𝑎 cos 𝑎𝑥, cos 𝑎𝑥 = −𝑎 sin 𝑎𝑥
𝑑𝑥 𝑑𝑥
𝑑 𝑑
 csc 𝑎𝑥 = − 𝑎 csc 𝑎𝑥 cot 𝑎𝑥 , sec 𝑎𝑥 = 𝑎 sec 𝑎𝑥 tan 𝑎𝑥
𝑑𝑥 𝑑𝑥
𝑑 𝑑
 tan 𝑎𝑥 = 𝑎 sec 2 𝑎𝑥 , cot 𝑎𝑥 = −𝑎 csc 2 𝑎𝑥
𝑑𝑥 𝑑𝑥
𝑑 𝑑 sin 𝑎𝑥 𝑑 sin 𝑎𝑥
 𝑡𝑎𝑛 𝑎𝑥 = =𝑎 = 𝑎 sec 2 𝑎𝑥
𝑑𝑥 𝑑𝑥 cos 𝑎𝑥 𝑑 𝑎𝑥 cos 𝑎𝑥
(sec: secant, csc: cosecant)
Treat this as the derivative of division (除法的微分)
𝑑 −1 𝑎
 𝑡𝑎𝑛 𝑎𝑥 = (arctan(𝑎𝑥))
𝑑𝑥 1+𝑎2 𝑥 2
Let 𝑦 = tan−1 𝑎𝑥 . Then, we have to find 𝑑𝑦/𝑑𝑥.
sin 𝑦
𝑎𝑥 = tan 𝑦 =
cos 𝑦
𝑑𝑦
By differentiation, 𝑎𝑑𝑥 = sec 2 𝑦 𝑑𝑦 and then = 𝑎 cos 2 𝑦.
𝑑𝑥
Since tan 𝑦 = 𝑎𝑥 and cos 𝑦 = 1/ (1 + 𝑎 2 𝑥 2 ),we have
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
𝑑𝑦 2
Copyright 𝑎 John Wiley & Sons. All rights reserved.
2011 by
Section 1.1 p4 = 𝑎 cos 𝑦 =
𝑑𝑥 1+𝑎2 𝑥 2
Differentiation (微分) (Take the Derivative 取微分)
𝑑 𝑎𝑥 𝑎𝑥
 𝑒 = 𝑎𝑒
𝑑𝑥
𝑑 1 1
 ln 𝑎𝑥 = 𝑎 ∙ =
𝑑𝑥 𝑎𝑥 𝑥
𝑙𝑜𝑔𝑏 𝑥 𝑙𝑛 𝑥
 𝑙𝑜𝑔 𝑥 = = (Change of base formula, 換底公式)
𝑎 𝑙𝑜𝑔𝑏 𝑎 𝑙𝑛 𝑎
(It is more easy to use the natural exponential and natural logarithm functions (自
然指數、對數), which use the base of Euler number 𝑒.)

𝑑𝑓(𝑢) 𝑑𝑓(𝑢) 𝑑𝑢
 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𝑥

Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.1 p5
Differentiation (微分) (Take the Derivative 取微分)

 𝑓±𝑔 =𝑓 ±𝑔
′ ′

Product and Quotient Rules (乘法和除法微分法則):


′ ′
 𝑓𝑔 = 𝑓 𝑔 + 𝑓𝑔

𝑓 ′
 = 𝑓𝑔−1 ′
= 𝑓 ′ ⋅ 𝑔−1 + 𝑓 ⋅ 𝑔−1 ′
= 𝑓 ′ 𝑔−1 − 𝑓𝑔−2 𝑔′ =
𝑔
𝑓 ′ 𝑔−𝑓𝑔′
𝑔2
𝑑 𝑔−1 𝑑 𝑔−1 𝑑𝑔
We use the chain rule for = = −𝑔−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 𝑎𝑥 𝑑𝑥 = − +𝑐
𝑎
 ∫ 𝑓 ± 𝑔 𝑑𝑥 = ∫ 𝑓𝑑𝑥 ± ∫ 𝑔𝑑𝑥

Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.1 p7
Integration (積分) (Take the Integral 求積分)
 Integral by parts (分部積分法):
∫ 𝑓 𝑥 𝑔′ 𝑥 𝑑𝑥 = 𝑓 𝑥 𝑔 𝑥 − ∫ 𝑓 ′ (𝑥)𝑔(𝑥)𝑑𝑥
[Proof] 𝑓𝑔 ′ = 𝑓𝑔′ + 𝑓 ′ 𝑔 (乘法法則)
𝑓𝑔 = ∫ 𝑓𝑔′ 𝑑𝑥 + ∫ 𝑓 ′ 𝑔𝑑𝑥
∫ 𝑓𝑔′ 𝑑𝑥 = 𝑓𝑔 − ∫ 𝑓 ′ 𝑔𝑑𝑥

 Example: ∫ 𝑥 𝑐𝑜𝑠 𝑥 𝑑𝑥 =?
𝑥 𝑠𝑖𝑛 𝑥 ′ = 𝑠𝑖𝑛 𝑥 + 𝑥 𝑐𝑜𝑠 𝑥
𝑥 𝑠𝑖𝑛 𝑥 = ∫ 𝑠𝑖𝑛 𝑥 𝑑𝑥 + ∫𝑥 𝑐𝑜𝑠 𝑥 𝑑𝑥
∫𝑥 𝑐𝑜𝑠 𝑥 𝑑𝑥 = 𝑥 𝑠𝑖𝑛 𝑥 − ∫ 𝑠𝑖𝑛 𝑥 𝑑𝑥
= 𝑥 𝑠𝑖𝑛 𝑥 + 𝑐𝑜𝑠 𝑥 + 𝑐

Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.1 p8
𝑑𝑓(𝑥) 𝑑𝑓
 一般微分: 𝑓 ′ (𝑥) = , 𝑑𝑓 = 𝑓 ′ 𝑑𝑥 = 𝑑𝑥 (增加𝑑𝑥後,函數
𝑑𝑥 𝑑𝑥
𝑓 𝑥 值增加𝑑𝑓。變化𝑑𝑥 ,函數變化量𝑑𝑓)
𝜕𝑓 𝑥,𝑦 𝜕𝑓 𝑥,𝑦
 Total differential (全微分): 𝑑 𝑓 𝑥, 𝑦 = 𝑑𝑥 + 𝑑𝑦
𝜕𝑥 𝜕𝑦
第一項為增加𝑑𝑥導致函數𝑓 𝑥, 𝑦 的增加量。
第二項為增加𝑑𝑦導致函數𝑓 𝑥, 𝑦 的增加量。
𝜕𝑓 𝑓 𝑥+Δ𝑥,𝑦 −𝑓 𝑥,𝑦
 𝑓𝑥 𝑥, 𝑦 = = 𝑙𝑖𝑚 dy
𝜕𝑥 𝛥𝑥→0 Δ𝑥
𝜕𝑓 𝑓 𝑥,𝑦+Δ𝑦 −𝑓 𝑥,𝑦
dx
 𝑓𝑦 𝑥, 𝑦 = = 𝑙𝑖𝑚
𝜕𝑦 𝛥𝑦→0 Δ𝑦 以切平面近似原曲面
 𝑓 𝑥 + Δ𝑥, 𝑦 + Δ𝑦 = 𝑓 𝑥, 𝑦 + 𝑓𝑥 𝑥, 𝑦 Δ𝑥 + 𝑓𝑦 𝑥, 𝑦 Δ𝑦
 Δ𝑓 = 𝑓 𝑥 + Δ𝑥, 𝑦 + Δ𝑦 − 𝑓 𝑥, 𝑦 = 𝑓𝑥 𝑥, 𝑦 Δ𝑥 + 𝑓𝑦 𝑥, 𝑦 Δ𝑦
 Total differential:
𝑑𝑓 = 𝑙𝑖𝑚 Δ𝑓 = 𝑙𝑖𝑚 𝑓 𝑥 + Δ𝑥, 𝑦 + Δ𝑦 − 𝑓 𝑥, 𝑦
Δ𝑥→0,Δ𝑦→0 Δ𝑥→0,Δ𝑦→0
= 𝑙𝑖𝑚 𝑓𝑥 𝑥, 𝑦 Δ𝑥 + 𝑙𝑖𝑚 𝑓𝑦 𝑥, 𝑦 Δ𝑦
Δ𝑥→0,Δ𝑦→0 Δ𝑥→0,Δ𝑦→0
𝜕𝑓 𝜕𝑓
= 𝑑𝑥 + 𝑑𝑦
𝜕𝑥 𝜕𝑦 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.1 p9
CHAPTER 1
First-Order ODEs

Section 1.1 p10 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
1.1 Basic Concepts. Modeling

Section 1.1 p11 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Modeling
(數學模型化、數學模式化,此為數學分析的主要精神)
The process of setting up a model, solving it mathematically,
and interpreting the result in physical or other terms is
called mathematical modeling or, briefly, modeling.
(將工程、物理問題,以數學式描述,數學式即為數學模型。
此過程叫做建立數學模型、數學模式化。)

Many physical concepts, such as velocity and acceleration,


are derivatives (導函數).
A model is very often an equation containing derivatives of
an unknown function.
Such a model is called a differential equation (微分方程式、
微分方程).

Section 1.1 p12 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Ordinary Differential Equation (ODE) (常微分方程式、通常)
An ordinary differential equation (ODE) is an equation that
contains one or several derivatives of an unknown function
y(x) (or sometimes y(t) if the parameter is time t).
The equation may also contain y itself, known functions of x
(or t), and constants, for example,
𝑑 2 𝑦(𝑥) ′′ = 𝑦 − 9𝑥
= 𝑦 and 𝑑𝑦 𝑥 = 𝑑𝑦 = 5𝑑𝑥.
𝑑𝑥 2
We define that 𝑥 is an independent variable (獨立變數、自變數).
Besides, 𝑦 𝑥 is the dependent variable depending on 𝑥. (非獨立變
數、因變數)
However, for 𝑑𝑥 = 𝑑𝑥 𝑦 = 0.2𝑑𝑦 (the same ODE as above), we
can define that 𝑦 is the independent variable, and 𝑥 𝑦 is the
dependent variable depending on 𝑦.
A partial differential equation (PDE, 偏微分方程式) is an
equation containing partial derivative (偏導函數):
𝜕 2 𝑓(𝑥, 𝑦) Advanced
𝜕 2 𝑓(𝑥,Engineering
𝑦) Mathematics, 10/e by Erwin Kreyszig
+ Copyright =
2011 0
by John Wiley & Sons. All rights reserved.
𝜕𝑥 2 𝜕𝑦 2 Section 1.1 p13
nth-order Ordinary Differential Equation (ODE) (n階常微分方程式)
An ODE is said to be of order n if the nth derivative 𝑦 (𝑛) of the
unknown function y is the highest derivative of y in the
equation. (方程式中最高階導函數是n階導函數, n=1 (𝑦 ′ ,first-
order), n=2 (𝑦 ′′ , second-order),…, n (𝑦 (𝑛) , n-order))

In this chapter we shall consider first-order ODEs, which


contain only the first derivative y’ and may contain y and any
given functions of x.
We can write the ODE in implicit form (隱形式)
(4) F(x, y, y’) = 0 (for example, 𝑦’ − 2𝑥 = 0)
or often in the explicit form (顯形式) The same ODE

y’ = f (x, y) (e.g., 𝑦’ = 2𝑥).


In explicit form, the unknown function is explicitly 𝑦(𝑥).
Section 1.1 p14 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Solution of ODE and Solution Curve (常微分方程式的解、解曲線)
A function
y = h(x)
is called a solution of the ODE F(x, y, y’) = 0 in (4) in some
open interval a < x < b if h(x) is defined and differentiable
throughout the interval, and is such that the equation
becomes an identity (恆等式) if y and y’ are replaced with h
and h’, respectively. (解在區間中有定義、可微分。將解代入
ODE後, 方程式成為恆等式)
Example: The ODE 𝑦 ′ = 2𝑥 have the solutions as
𝑦 = 𝑥 2 + 𝑐 explicit form , 𝑦 − 𝑥 2 + 𝑐 = 0 implicit form , 𝑥 =
± 𝑦 − 𝑐 explicit form
Since there is an integration constant 𝑐, the solution is not
unique. (解並不唯一)
The curve (the graph) of solution h(x) for a given 𝑐 is called a
solution curve (解曲線,為解的圖形). Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights Section 1.1 p15
reserved.
1.1 Basic Concepts. Modeling
EXAMPLE 2
Solution by Calculus. Solution Curves
The ODE y’ = dy/dx = cos x can be solved directly by integration on both
sides. Using calculus, we obtain the solution y = ∫ cos x dx = sin x + c,
where c is an arbitrary constant. (所以會有無限多解) This is a family of
solutions (族解,解的家族). Each value of c, for instance, 2.75 or 0 or −8,
gives one of these curves. Figure 3 shows some of them, for c = −3, −2, −1,
0, 1, 2, 3, 4.
一個 𝑐 值得到一條解曲線。

圖中針對不同 𝑐 值,
畫出許多解曲線。

Section 1.1 p16 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
極常見的Model,描述著生活中的現象 1.1 Basic Concepts. Modeling

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. (馬爾薩斯定理)

Section 1.1 p17 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
1.1 Basic Concepts. Modeling

EXAMPLE 4A (continued)
(A) Exponential Growth.

Section 1.1 p18 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
1.1 Basic Concepts. Modeling
EXAMPLE 4B
(B) Exponential Decay (指數衰減)
Similarly, y’ = −0.2y (with a minus on the right) has the
solution y = ce−0.2t, (Fig. 4B) modeling exponential decay, as,
for instance, of a radioactive substance (放射性物質的衰變)
(see Example 5).

Section 1.1 p19 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Three Kinds of Solutions: General (通解), Particular (特
殊解), and Singular solution (奇異解)
不管如何得到,只要代入 ODE 後,等號成立者,就是解。
Example: The ODE (𝑦 ′ )2 − 𝑥𝑦 ′ + 𝑦 = 0 has the solutions.
2
 General solution (通解): 𝑦 = 𝑐𝑥 − 𝑐 (包含任意常數)
The general solution of the ODE contains an arbitrary
constant c. (所以是通用的解)
 Particular solution (特殊解): 𝑦 = 𝑥 − 1 (沒有任意常數)
If a particular condition 𝑐=1 is given, we can obtain a unique
particular solution that does not contain any arbitrary
constant. (給定了特定條件下,唯一的特殊解)
 Singular solution (奇異解): 𝑦 = 𝑥 2 /4
This solution can not be obtained from the general solution.
The differential equations may not have singular solution. (不
論設定任何常數 c ,都無法得到的解。不一定有,不強求。)
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.1 p20
Initial Value Problem (初值問題。給定特定條件,才能得到特殊解)
The initial value problem is of the form
(5) y’ = f (x, y), initial condition (初始條件) y(x0) = y0.
The initial condition y(x0) = y0 with given values x0 and y0 can
be used to determine a value of the arbitrary constant c and
obtain a particular solution. (多了此條件,才能決定常數c的值)
Geometrically, the general solution is a family of infinitely
many solution curves. The particular solution means that the
solution curve pass through the specific point (x0, y0) in the xy-
plane. (特殊解代表一條通過指定位置(x0, y0)的解曲線)
Example: 𝑦′ = cos 𝑥, initial condition 𝑦(0) = 0
General solution 𝑦 = sin 𝑥 + 𝑐
(a family of solution curves 許多解曲線)
The solution curve passes through
𝑥, 𝑦 = 0,0 . Thus, 0 = 0 + 𝑐, 𝑐 = 0.
Particular solution: 𝑦 = sin 𝑥 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
(通過(0,0)的那條解曲線)
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.1 p21
1.1 Basic Concepts. Modeling

放射性物質分解、衰變、衰減
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.

[Hint] Decomposition amount (Δ𝑦) in a time unit (Δ𝑡) is


proportional to the present amount 𝑦.
[Hint] Decay factor 𝑘 (衰變因子、衰變速率量化,比值,實驗得知),
if k= 10%, 100g→90g→ 81g …
Section 1.1 p22 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
EXAMPLE 5 (continued)
Step 1. Setting up a mathematical model (建立數學模型)
of the physical process.
Let y(t) be the amount of substance still present at any time t.
The time rate of change (the change in a time unit) Δ𝑦(𝑡)/Δ𝑡 is
proportional to y(t), that is,
Δ𝑦 𝑡
= −𝑘𝑦.
Δ𝑡
This gives the first-order ODE
𝑑𝑦 𝑡 Δ𝑦 𝑡
(6) 𝑦′ 𝑡 = = lim = − 𝑘𝑦.
𝑑𝑡 Δ𝑡→0 Δ𝑡
where the constant k is positive. Besides, because of the
minus, we do get decay .
The value of decay factor k is known from experiments for
various radioactive substances (e.g., k = 1.4 ·10−11 sec−1,
approximately, for radium 88Ra226).
Section 1.1 p23 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
1.1 Basic Concepts. Modeling
EXAMPLE 5 (continued)
Step 1. (continued) Setting up a mathematical model
of the physical process.
Now the given initial amount is 0.5 g, and we can call the
corresponding instant t = 0.
Then we have the initial condition y(0) = 0.5.
Hence, the initial value problem is expressed as
(7) 𝑑𝑦 𝑡
𝑦′ 𝑡 = = −𝑘𝑦, 𝑦 0 = 0.5.
𝑑𝑡

Section 1.1 p24 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.

𝑑𝑦 𝑡
EXAMPLE 5 (continued) 𝑦 𝑡 =
𝑑𝑡
= −𝑘𝑦

Step 2. Mathematical solution. (數學求解)


1 1
𝑑𝑦 = −𝑘𝑑𝑡 . By integration, න 𝑑𝑦 = −𝑘 න𝑑𝑡 .
𝑦 𝑦
1
න 𝑑𝑦 = ln 𝑦 = log 𝑒 |𝑦| = −𝑘 න𝑑𝑡 = −𝑘𝑡 + 𝑐1 .
𝑦
𝑦 = 𝑒 −𝑘𝑡+𝑐1 = 𝑒 𝑐1 𝑒 −𝑘𝑡 = 𝑐𝑒 −𝑘𝑡
Thus the general solution is
(8) y(t) = ce−kt.
We now determine c by using the initial condition.
Since y(0) = ce−k 0 = c = 0.5, the particular solution is (cf. Fig. 5)
(9) y(t) = 0.5e−kt (k > 0).
Always check your result—Verify by differentiation (chain
rule!) that your solution (9) satisfies (7) as well as y(0) = 0.5:
dy/dt = −0.5ke−kt = −k ·0.5e−kt = −ky, y(0) = 0.5e0 = 0.5.
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.1 p25
1.1 Basic Concepts. Modeling
EXAMPLE 5 (continued)

Step 3. Interpretation of result. (詮釋解答)


Formula (9) gives the amount of radioactive substance at
time t. It starts from the correct initial amount and
decreases with time because k is positive. The limit of y as t
→ ∞ is zero. (越來越少,最後為零)
(詮釋解答,深入了解現象後,
y(t) = 0.5e−kt 可進一步依據需求,找到最好
assuming k=1.5 參數設計。
例如,希望2年後還有0.2g,
請問一開始要準備多少的量。)

Section 1.1 p26 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
1.2
Geometric Meaning of
y’ = f(x, y).
Direction Fields, Euler’s Method
(方向場、尤拉法)
Numerical Methods to Find Solution
(以數值方法找解)

如果微分方程太難解要怎麼辦? 有沒有一些數值方法可以找解
(類似微積分中的牛頓法、辛普森數值積分方法)?

Section 1.2 p27 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Geometric Meaning of y’ = f(x, y). Direction Fields (方向場)
Geometric Meaning of 𝒚′ 𝒙 = 𝒇(𝒙, 𝒚):
Clearly, 𝑦 ′ 𝑥0 = 𝑓 𝑥0 , 𝑦0 is the slope (斜率) of 𝑦(𝑥) at 𝑥0 , 𝑦0
because ′
Δ𝑦
𝑦 𝑥0 = 𝑙𝑖𝑚 ቚ = 𝑓 𝑥0 , 𝑦0 .
𝛥𝑥→0 Δ𝑥 𝑥=𝑥0

Direction Fields (as in Fig. 7) Solution curves :


We can show directions of solution curves of 𝑦(𝑥) = 𝑐𝑒 𝑥 − 𝑥 − 1
an ODE (1) by drawing short straight-line
segments (lineal elements) in the xy-plane.
This gives a direction field (方向場、有箭頭)
(or slope field 斜率場). Then, we can fit
(approximate) solution curves. (格子點上畫線
段顯示斜率。然後連接線段,擬合出近似解曲線)
Figure 7 shows a direction field for the ODE
(2) y’ = y + x
obtained by a CAS (computer algebra system)
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
and some approximate fitted solution
Copyright 2011curves.
by John Wiley & Sons. All rights reserved.
Section 1.2 p28
Direction Fields, Slop Fields (有箭頭方向場、無箭頭斜率場) ODE y’= f(x, y)
If you have no CAS, we
(1) first draw a few level curves (等值線、等高線) y’= f(x, y) = K
= const of f(x, y) (自行選擇斜率值 K,畫出藍色等斜率線) ,
(2) and then draw parallel lineal elements with the specified
slope y’= K along each such curve (which is also called an
isocline (等斜線、等傾線), meaning a curve of equal
inclination (斜角)) (藍色線上所有點都有相同斜率皆為 y’= K,
簡稱為等斜線。在等斜線上畫出黑色平行線段。)
(3) and finally draw approximation curves fit to the lineal
elements. (連接黑色線段,擬合出紅色的近似解曲線)
ODE 𝑦′ = 𝑥𝑦
Isoclines (blue)
Slope field (black),
Some solution curves (red) [wiki]
Section 1.2 p29

Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Numeric Method by Euler Slope y’ = f(x, y)
Given an ODE (1) y’ = f(x, y) and an initial value y(x0) = y0, we can
yield approximate solution values at equidistant x-values 𝑥0, 𝑥1 =
𝑥0 + ℎ, … , 𝑥𝑛 = 𝑥0 + 𝑛ℎ, …. (選擇等間距的𝑥座標)
We determine the values of 𝑦𝑛 by (計算相對應的 𝑦 座標值)
𝑦1 = 𝑦0 + ℎ𝑓(𝑥0, 𝑦0) (Fig. 8)
𝑦2 = 𝑦1 + ℎ𝑓(𝑥1, 𝑦1), etc.
Then, 𝑦𝑛 = 𝑦𝑛−1 + ℎ𝑓(𝑥𝑛−1 , 𝑦𝑛−1 )
where the step equals, e.g., h = 0.1 or 0.2 or a smaller value h for
greater accuracy.
solution curve (𝑥3 , 𝑦3 )

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.
(可分離微分方程式)

之前都在說明一些基本觀念,
之後我們開始討論一些重要的方法

Section 1.3 p31 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Inspection Method (觀察法,非常有效但是個可遇不可求的方法)
Example: Solve the ODE 𝑥 2 − 3𝑦 2 + 2𝑥𝑦 𝑑𝑦 = 0. 通常不喜歡
𝑑𝑦
𝑑𝑥 𝑦 ′ 或 型式
𝑑𝑥
Sol: 單一變數,可直接積分
𝑥, 𝑦兩變數混雜,不可直接積分
𝑥 2 𝑑𝑥 − 3𝑦 2 𝑑𝑥 + 2𝑥𝑦𝑑𝑦 = 0
𝜕𝑢 𝜕𝑢
Recall the total differential (全微分) 𝑑𝑢 𝑥, 𝑦 = 𝑑𝑥 + 𝑑𝑦 .
𝜕𝑥 𝜕𝑦
Thus, we anticipate that the last two terms are derived from
有𝑥, 𝑦,又有乘冪,
𝑑 𝑥 𝑎 𝑦 𝑏 = 𝑎𝑥 𝑎−1 𝑦 𝑏 𝑑𝑥 + 𝑏𝑥 𝑎 𝑦 𝑏−1 𝑑𝑦. 所以猜測有此形式
By comparing the coefficients, we try 𝑎 = −3, 𝑏 = 2 and
𝑑(𝑥 −3 𝑦 2 ) = −3𝑥 −4 𝑦 2 𝑑𝑥 + 2𝑥 −3 𝑦𝑑𝑦. 原則:選擇一個函數對𝑥偏微分
後,會得到−3𝑦 2 ,合理的猜
There is a difference of factor 𝑥 −4 . 測是 𝑥 −3 𝑦 2 。此函數對𝑦偏微
Multiplying the ODE by 𝑥 −4 gives 分,也有2𝑦項。Good choice.

𝑥 −2 𝑑𝑥 −3𝑥 −4 𝑦 2 𝑑𝑥 + 2𝑥 −3 𝑦𝑑𝑦 = 0 and 𝑥 −2 𝑑𝑥 + 𝑑(𝑥 −3 𝑦 2 ) = 0.


By integration, we have the general solution
∫ 𝑥 −2 𝑑𝑥 + ∫ 𝑑 𝑥 −3 𝑦 2 = 𝑐 , −𝑥 −1 + 𝑥 −3 𝑦 2 = 𝑐 (implicit solution), and
𝑦 = ± 𝑥 2 + 𝑐𝑥 3 (explicit solution)
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.3 p32
Method of Separating Variables (變數分離法,變數混雜不能直接積分)
Many practically useful ODEs can be reduced to the form
𝑑𝑦
(1) 𝑔 𝑦 𝑦’ = 𝑔 𝑦 =𝑓 𝑥 . (Separable ODE 可分離)
𝑑𝑥
We can separate the variables and write
𝑔 𝑦 𝑑𝑦 = 𝑓 𝑥 𝑑𝑥. (變數被分離至兩側)
Then, we can integrate on both sides with respect to x, obtaining
(3) ∫ 𝑔(𝑦)𝑑𝑦 = ∫ ƒ(𝑥)𝑑𝑥 + 𝑐.
If f and g are continuous functions, the integrals in (3) exist, and
by evaluating them we obtain a general solution of (1).

This method of solving ODEs is called the method of separating


variables, and (1) is called a separable equation, because in (3)
the variables are now separated: x appears only on the right and
y only on the left.

Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Section 1.3 p33 Copyright 2011 by John Wiley & Sons. All rights reserved.
1.3 Separable ODEs. Modeling
EXAMPLE
Solve the ODE 𝑥𝑦 4 𝑑𝑥 + 𝑦 2 + 2 𝑒 −3𝑥 𝑑𝑦 = 0.
Solution:
Q: Separable?
Multiplying the ODE by 𝑦 −4 𝑒 3𝑥 gives
𝑥𝑒 3𝑥 𝑑𝑥 + 𝑦 2 + 2 𝑦 −4 𝑑𝑦 = 0. (Separated)
By integration,
∫ 𝑥𝑒 3𝑥 𝑑𝑥 + ∫ 𝑦 2 + 2 𝑦 −4 𝑑𝑦 = 𝑐
By integral by parts,
1 3𝑥 1 3𝑥
𝑥𝑒 − ∫ 𝑒 𝑑𝑥 + ∫ 𝑦 −2 + 2𝑦 −4 𝑑𝑦 = 𝑐
3 3
Then, we find the general solution
1 3𝑥 1 3𝑥 1 2
𝑥𝑒 − 𝑒 − − 3 = 𝑐
3 9 𝑦 3𝑦
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Section 1.3 p34 Copyright 2011 by John Wiley & Sons. All rights reserved.
EXAMPLE 4: Radiocarbon Dating (放射性碳定年法)
[Physical Information] 放射性 146𝐶 會衰變到穩定的 126𝐶,原子序(質
子數,電子數=質子數):6, 原子量(質量數=質子數+中子數):12。 兩
者質子數相同,中子數目不同,為同位素。 146𝐶有8個中子。因外太
空的「宇宙射線」中的中子束不斷地照射而產生的。

In the atmosphere and in living organisms, the ratio of radioactive


carbon 146𝐶 to ordinary carbon 126𝐶 is constant. The radioactive carbon is
made by cosmic rays. (活生物能吸收 146𝐶,內部比例也為常數)
When an organism dies, its absorption of 146𝐶 by breathing and eating
terminates. (化石內部的 146𝐶會衰變,所以越來越少)

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.

Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Section 1.3 p37 Copyright 2011 by John Wiley & Sons. All rights reserved.
𝑑𝑦 Δ𝑦
EXAMPLE 5 直接寫ODE不容易。Idea: 𝑦 ′ → → → Δ𝑦 𝑖𝑛 Δ𝑡
𝑑𝑡 Δ𝑡
Solution.
Step 1. Setting up a model.
Let y(t) denote the amount of salt in the tank at time t.
The concentration (濃度) of brine in the tank is 𝑦(𝑡)/1000.
The change Δ𝑦 of amount in the time interval Δ𝑡 is
Δ𝑦 in Δ𝑡
= salt inflow (流入) in Δ𝑡  salt outflow (流出) in Δ𝑡
= amount of inflow brine  concentration (濃度 5 lb/gallon)
 amount of outflow brine  concentration
𝑦
= 10Δt ⋅ 5 − 10Δt ⋅ = −0.01 𝑦 − 5000 Δt.
1000

Then we obtain an ODE


𝑑𝑦 Δ𝑦
(4) 𝑦′ = = lim = −0.01 𝑦 − 5000
𝑑𝑡 Δ𝑡→0 Δ𝑡
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Section 1.3 p38 Copyright 2011 by John Wiley & Sons. All rights reserved.
EXAMPLE 5 (continued)
Step 2. Solution of the model.
The ODE (4) is separable. Separating, integrating, and taking
exponents on both sides gives
𝑑𝑦 𝑑(𝑦 − 5000) 𝑑𝑧
= = = −0.01 𝑑𝑡
𝑦 − 5000 𝑦 − 5000 𝑧
ln |𝑧| = ln 𝑦 − 5000 = −0.01𝑡 + 𝑐 ∗

𝑦 − 5000 = 𝑒 −0.01𝑡+𝑐 = 𝑐𝑒 −0.01𝑡
The general solution is 𝑦 = 5000 + 𝑐𝑒 −0.01𝑡 .
Initially the tank contains 100 lb of salt.
The initial condition y(0) = 100 will give a unique solution.
Substituting y = 100 and t = 0 in the general solution gives
100 = 5000 + ce0 = 5000 + c.
Hence c = −4900 and the amount of salt in the tank at time t is
(5) y(t) = 5000 − 4900e−0.01t (particular solution).
This function shows an exponential approach to the limit 5000 lb; see
Fig. 11. Can you explain that y(t) should increase with time? That its
limit is 5000 lb? Can you see theAdvanced
limit Engineering Mathematics, 10/e by Erwin Kreyszig
directly
Copyright 2011 by Johnfrom theAllODE?
Wiley & Sons. rights reserved.
Section 1.3 p39
EXAMPLE 6: Newton’s Law of Cooling (牛頓冷卻定律)
Experiments show that the time rate of change (Δ𝑇/Δ𝑡, 時間變化率)
of the temperature 𝑇 of a body is proportional to the difference
between 𝑇 and the temperature 𝑇𝐴 of the surrounding medium. That
is, Δ𝑇 Δ𝑇
∝ 𝑇 − 𝑇𝐴 , = 𝑘(𝑇 − 𝑇𝐴 )
Δ𝑡 Δ𝑡
where k is thermal conductance factor (熱傳導因子).

Heating an Office Building


Suppose that in winter the daytime temperature in a certain office
building is maintained at 𝑇 = 70°F.
The heating is shut off at 10 P.M. and turned on again at 6 A.M.
On a certain day the temperature inside the building at 2 A.M.
was found to be 𝑇 = 65°F.
The outside temperature was 50°F at 10 P.M. and had dropped to
40°F by 6 A.M. (Golden rule: If you cannot solve your problem, try to
solve a simpler one. 簡化問題為 The average temperature was 45°F.)
What was the temperature 𝑇 inside the building when the heat was
turned on at 6 A.M.? Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.3 p40
EXAMPLE 6 (continued) 𝑑𝑇 𝑑 𝑇 − 𝑇𝐴 𝑑𝑧
= =
𝑇 − 𝑇𝐴 𝑇 − 𝑇𝐴 𝑧
Solution:
Let 𝑇 𝑡 be the temperature inside the building and 𝑇𝐴 the outside
temperature. By the Newton’s cooling law,
𝑑𝑇 𝑑𝑇 𝑑 𝑇 − 𝑇𝐴
= 𝑘 𝑇 − 𝑇𝐴 , = = 𝑘𝑑𝑡, ln |𝑇 − 45| = 𝑘𝑡 + 𝑐 ∗ .
𝑑𝑡 𝑇 − 𝑇𝐴 𝑇 − 𝑇𝐴
The general solution is 𝑇 𝑡 = 𝑇𝐴 + 𝑐𝑒 𝑘𝑡 .
(1) Assume the average outside temperature 𝑇𝐴 = (50 + 40)/2 =
45°F.
(2) We choose 10 P.M. to be 𝑡 = 0. We have the initial conditions
𝑇(0) = 70°F at 10 P.M. and 𝑇(4) = 65°F at 2 P.M. to determine c, k.
Since 𝑇(0) = 70°F, we have 𝑇 0 = 45 + 𝑐𝑒 0 = 70, 𝑐 = 25.
Since 𝑇(4) = 65°F, we have 𝑇 4 = 45 + 25𝑒 4𝑘 = 65, 𝑘 = −0.056.
Thus, the particular solution is 𝑇𝑃 𝑡 = 45 + 25𝑒 −0.056𝑡 .

6 A.M. is 𝑡 = 8. Thus, at 6 A.M., the temperature


inside the building is
𝑇𝑃 8 = 45 + 25𝑒 −0.056⋅8 =Advanced
61°F. Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.3 p41
Reduction to Separable Form by Change of Variables (變數轉換)
Certain nonseparable ODEs can be made separable by
transformations (轉換) that introduce a new unknown function
for y.
𝑦 𝑥 𝑦
For example, 𝑦 ′ = + , 𝑢 = , 𝑦 ′ = 𝑥 + 𝑦 𝑥 + 𝑦 − 3 , 𝑢 = (𝑥 + 𝑦).
𝑥 𝑦 𝑥
consider a nonseparable ODE (𝑥, 𝑦無法分離)
𝑑𝑦 𝑦
(8) ′
𝑦 = =𝑓
𝑑𝑥 𝑥
Here, f is a (differentiable) function of y/x, e.g., sin(y/x), (y/x)4.
The form of such an ODE suggests that we set y/x = u; thus,
(9) y = ux and dy = udx + xdu (product differentiation).
Substitution into y’ = f(y/x) gives
𝑑𝑦
𝑦′ = =𝑓 𝑢 , 𝑑𝑦 = 𝑢𝑑𝑥 + 𝑥𝑑𝑢 = 𝑓 𝑢 𝑑𝑥, 𝑥𝑑𝑢 = 𝑓 𝑢 − 𝑢 𝑑𝑥.
𝑑𝑥
If f(u) − u ≠ 0, this can be separated:
𝑑𝑢 1
(10) = 𝑑𝑥 (separable ODE)
𝑓 𝑢 − 𝑢 𝑥 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Section 1.3
Copyright 2011 by John Wiley & Sons. All rights reserved. p42
Change of variables (變數轉換)
Example: Solve 𝑦’ = 𝑥 + 𝑦 𝑥 + 𝑦 − 2 − 1.
Solution:
𝑑𝑦 = 𝑥 + 𝑦 𝑥 + 𝑦 − 2 𝑑𝑥 − 𝑑𝑥
Let 𝑢 = 𝑥 + 𝑦 and 𝑑𝑢 = 𝑑𝑥 + 𝑑𝑦. Substitution gives
𝑑𝑦 = 𝑑𝑢 − 𝑑𝑥 = 𝑢 𝑢 − 2 𝑑𝑥 − 𝑑𝑥, 𝑑𝑢 = 𝑢 𝑢 − 2 𝑑𝑥.

(1) If 𝑢 𝑢 − 2 ≠ 0, by partial fraction decomposition (部分分式分解)


1 1 1 1 1 1
𝑑𝑢 = 𝑑𝑥, − 𝑑𝑢 = 𝑑𝑥, ∫ − 𝑑𝑢 = ∫ 2 𝑑𝑥 + 𝑐 ∗
𝑢(𝑢−2) 2 𝑢−2 𝑢 𝑢−2 𝑢
𝑢−2 ∗ 𝑢−2 2𝑥+𝑐 ∗
ln |𝑢 − 2| − ln 𝑢 = ln = 2𝑥 + 𝑐 , =𝑒 = 𝑐𝑒 2𝑥
𝑢 𝑢
2 2
𝑢 =𝑥+𝑦= , 𝑦 = −𝑥 + (general solution)
1−𝑐𝑒 2𝑥 1−𝑐𝑒 2𝑥

(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),雖然較為繁雜,
但有固定的步驟。

Section 1.4 p47 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
 Idea: Observe the ODE and the total differential (全微分)
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0,
𝜕𝑢 𝜕𝑢
𝑑𝑢 𝑥, 𝑦 = 𝑑𝑥 + 𝑑𝑦.
𝜕𝑥 𝜕𝑦
The left side of ODE is similar to the total differential.
If we can find a function 𝑢 𝑥, 𝑦 such that the ODE can be
rewritten as
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 𝑑𝑢(𝑥, 𝑦) = 0,
then the solution is 𝑢 𝑥, 𝑦 = ∫ 𝑑𝑢 = 𝑐 = const.
(若ODE中 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 的部分,正好符合全微分形式,
可以合併成 𝑢 𝑥, 𝑦 ,此ODE稱為正合微分方程式)

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. (隱形式通解)

Actually, it is burdensome to find the function 𝑢(𝑥, 𝑦).


Thus, there are two important tasks for the exact ODE, i.e.,
(Q1) Checking whether the ODE is exact or not, and
(Q2) Finding 𝑢(𝑥, 𝑦).
(先確定是正合,能寫成 𝑑𝑢(𝑥,Advanced 𝑦) =Engineering
0。然後才真的去找𝑢(𝑥,
Mathematics, 10/e by Erwin Kreyszig𝑦))
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p49
Test for Exactness (Exactness Condition正合條件)
(1) 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0
Let M and N be continuous and have continuous first partial
derivatives in a region in the xy-plane whose boundary is a
closed curve without self-intersections.
If the ODE (1) is exact, there is a function 𝑢(𝑥, 𝑦) such that
𝜕𝑢 𝜕𝑢 假設為正合,進行下列步
(4) 𝑀 𝑥, 𝑦 = and 𝑁 𝑥, 𝑦 = . 驟。最後有判斷式(5),
𝜕𝑥 𝜕𝑦
判斷正合的假設是否正確。
By partial differentiation of (4), we have
𝜕 𝜕 𝜕𝑢 𝜕2 𝑢
𝑀 𝑥, 𝑦 = = , and 微積分中證明對一個函數
𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦𝜕𝑥
𝜕 𝜕 𝜕𝑢 𝜕2 𝑢 改變偏微分順序,結果仍
𝑁 𝑥, 𝑦 = = 會相等。
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑥𝜕𝑦
By the assumption of continuity, these two second partial
derivatives are equal, that is, 若判斷式等號成立,表示
𝜕 𝜕 𝜕2 𝑢 一開始正合的假設正確。
(5) 𝑀 𝑥, 𝑦 = 𝑁 𝑥, 𝑦 = 若等號不成立,則表示正
𝜕𝑦 𝜕𝑥 𝜕𝑥𝜕𝑦
合的假設有誤
This is the necessary and sufficient condition for (1) to be an
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
exact differential equation. (充要條件、即充分且必要的條件)
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p50
Example 1: Find the function 𝑢(𝑥, 𝑦)
If (1) is exact, the function u(x, y) can be found by inspection
or by the following systematic way. (以此例說明系統化方法)
Example: Solve
𝑐𝑜𝑠 𝑥 + 𝑦 𝑑𝑥 + 3𝑦 2 + 2𝑦 + 𝑐𝑜𝑠 𝑥 + 𝑦 𝑑𝑦 = 0.
Solution. Step 1. Test for exactness 請注意順序,
𝑀對應到𝑑𝑥、𝑁對應到𝑑𝑦
Assume that
𝜕𝑢
𝑀 𝑥, 𝑦 = = 𝑐𝑜𝑠 𝑥 + 𝑦
𝜕𝑥
𝜕𝑢
𝑁 𝑥, 𝑦 = = 3𝑦 2 + 2𝑦 + 𝑐𝑜𝑠 𝑥 + 𝑦
𝜕𝑦
Then,
𝜕 𝜕2 𝑢
𝑀 𝑥, 𝑦 = = −𝑠𝑖𝑛 𝑥 + 𝑦 , and
𝜕𝑦 𝜕𝑦𝜕𝑥

𝜕 𝜕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.

Since 𝑁 𝑥, 𝑦 = 𝜕𝑢/𝜕𝑦, we have 𝑢(𝑥, 𝑦) by integration w.r.t. y


(“partial“ integral for 𝑑𝑢 = 𝑁𝑑𝑦)
∫ 𝑑𝑢 = ∫ 𝑁𝑑𝑦 + 𝑔 𝑥
𝑢 = ∫ 3𝑦 2 + 2𝑦 + 𝑐𝑜𝑠 𝑥 + 𝑦 𝑑𝑦 + 𝑔 𝑥
= 𝑦 3 + 𝑦 2 + sin 𝑥 + 𝑦 + 𝑔 𝑥 .
Here, x is regarded as a constant, and g(x) is a “constant” of
integration. Copyright 2011 by John Wiley𝑦)不同,怎麼辦?)
(Q:不同方法所得到的𝑢(𝑥,
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
& Sons. All rights reserved.
Section 1.4 p52
Example 1: Find the function 𝑢(𝑥, 𝑦)
Step 2. Find 𝑢(𝑥, 𝑦)
We obtain two versions of 𝑢(𝑥, 𝑦) as
𝑢(𝑥, 𝑦) = sin 𝑥 + 𝑦 + 𝑓(𝑦)
𝑢(𝑥, 𝑦) = 𝑦 3 + 𝑦 2 + sin 𝑥 + 𝑦 + 𝑔 𝑥 .
Comparing these two equations, we select 𝑓 𝑦 = 𝑦 3 + 𝑦 2
and 𝑔 𝑥 = 0 such that the two versions are the same as
𝑢(𝑥, 𝑦) = 𝑦 3 + 𝑦 2 + sin 𝑥 + 𝑦 .
(單純地在湊答案! 𝑓 𝑦 = 𝑦 3 + 𝑦 2 + 2 and 𝑔 𝑥 = 2? Also OK.)

Step 3. Check and find the general solution


By the total differentiation, we check that the original ODE
𝑐𝑜𝑠 𝑥 + 𝑦 𝑑𝑥 + 3𝑦 2 + 2𝑦 + 𝑐𝑜𝑠 𝑥 + 𝑦 𝑑𝑦 = 0 and the new
ODE 𝑑𝑢(𝑥, 𝑦) = 𝑑 𝑦 3 + 𝑦 2 + sin 𝑥 + 𝑦 = 0 are the same.
By integration, we have the general solution
𝑢 𝑥, 𝑦 = 𝑦 3 + 𝑦 2 + sin 𝑥 + 𝑦 = 𝑐.
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p53
Example 此例中,決定𝑢(𝑥, 𝑦)的方法和之前不同
−2𝑥𝑦 3 −2 選擇一個函數對 𝑦 偏微分後,
Solve 𝑦′ = 會得到3𝑥 2 𝑦 2 ,猜測是 𝑥 2 𝑦 3 。
3𝑥 2 𝑦 2 +𝑒 𝑦
此函數對𝑥偏微分,也有
Solution 1: By inspection method. 2𝑥𝑦 3 項。Good choice.
3𝑥 2 𝑦 2 + 𝑒 𝑦 𝑑𝑦 + 2𝑥𝑦 3 + 2 𝑑𝑥 = 0
(3𝑥 2 𝑦 2 𝑑𝑦 + 2𝑥𝑦 3 𝑑𝑥) + 𝑒 𝑦 𝑑𝑦 + 2𝑑𝑥 = 0
𝑑 𝑥 2 𝑦 3 + 𝑒 𝑦 𝑑𝑦 + 2𝑑𝑥 = 0
The general solution is 𝑥 2 𝑦 3 + 𝑒 𝑦 + 2𝑥 = 𝑐. (方法快速)

Solution 2: By Exact ODE. (繁瑣,但完成機率高)


2𝑥𝑦 3 + 2 𝑑𝑥 + 3𝑥 2 𝑦 2 + 𝑒 𝑦 𝑑𝑦 = 0 (注意順序)
𝜕𝑢
Assume that 𝑀 𝑥, 𝑦 = = 2𝑥𝑦 3 + 2
𝜕𝑥
𝜕𝑢
𝑁 𝑥, 𝑦 = = 3𝑥 2 𝑦 2 + 𝑒 𝑦
𝜕𝑦
Then, we check whether this is an exact ODE.
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p54
𝜕𝑢 𝜕𝑢
Example 𝑀 𝑥, 𝑦 =
𝜕𝑥
= 2𝑥𝑦 3 + 2 and 𝑁 𝑥, 𝑦 =
𝜕𝑦
= 3𝑥 2 𝑦 2 + 𝑒 𝑦

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 𝑅∗ (𝑦) = − .
𝑃 𝜕𝑥 𝜕𝑦

For simplicity, we here look for the integrating factor being


a function of one variable, that is, 𝐹(𝑥) or 𝐹 ∗ (𝑦).
(先討論單變數的積分因子。暫不考慮困難的多變數𝐹(𝑥, 𝑦))

Note that the terms 𝜕𝑃/𝜕𝑦 and 𝜕𝑄/𝜕𝑥 in 𝑅(𝑥) and 𝑅∗ (𝑥)
have been calculated when we check the exactness of ODE.
(𝜕𝑃/𝜕𝑦 和 𝜕𝑄/𝜕𝑥在測試是否正合時, 已經計算過)

Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Section 1.4 p57 Copyright 2011 by John Wiley & Sons. All rights reserved.
𝜕𝑢 𝜕𝑢
Theorem 1 [Proof] 𝑑𝑢 𝑥, 𝑦 =
𝜕𝑥
𝑑𝑥 +
𝜕𝑦
𝑑𝑦 = 0

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

Solve (𝑒 𝑥+𝑦 + 𝑦𝑒 𝑦 )𝑑𝑥 + (𝑥𝑒 𝑦 – 1)𝑑𝑦 = 0, 𝑦(0) = – 1.


Solution:
Step 1: Test for exactness
Let 𝑃 𝑥, 𝑦 = (𝑒 𝑥+𝑦 + 𝑦𝑒 𝑦 ) and 𝑄 𝑥, 𝑦 = (𝑥𝑒 𝑦 – 1).
The exactness check fails, because
𝜕𝑃 𝜕𝑄
= 𝑒 𝑥+𝑦 + 𝑒 𝑦 + 𝑦𝑒 𝑦 , but = 𝑒𝑦. (not equal)
𝜕𝑦 𝜕𝑥

Step 2: Integrating factor


Assume 𝐹 = 𝐹(𝑥). The assumption fails, since we have
1 𝜕𝑃 𝜕𝑄 1
𝑅= − = 𝑦 𝑒 𝑥+𝑦 + 𝑒 𝑦 + 𝑦𝑒 𝑦 − 𝑒 𝑦 = 𝑅(𝑥, 𝑦)
𝑄 𝜕𝑦 𝜕𝑥 𝑥𝑒 – 1
which depending on 𝑥 and 𝑦.
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p60
𝜕𝑃 𝜕𝑄
Example 5 (continued) 𝜕𝑦
= 𝑒 𝑥+𝑦 + 𝑒 𝑦 + 𝑦𝑒 𝑦 ,
𝜕𝑥
= 𝑒𝑦

Solve (𝑒 𝑥+𝑦 + 𝑦𝑒 𝑦 )𝑑𝑥 + (𝑥𝑒 𝑦 – 1)𝑑𝑦 = 0, 𝑦(0) = – 1.


Step 2: Integrating factor
Assume 𝐹 = 𝐹(𝑦). The assumption is true. We have
1 𝜕𝑄 𝜕𝑃 1 𝑦 𝑥+𝑦 𝑦 𝑦
𝑅 𝑦 = − = 𝑥+𝑦 𝑒 − 𝑒 + 𝑒 + 𝑦𝑒 = −1.
𝑃 𝜕𝑥 𝜕𝑦 𝑒 + 𝑦𝑒 𝑦
The integrating factor is
𝐹 𝑦 = 𝑒 ∫ 𝑅 𝑦 𝑑𝑦 = 𝑒 ∫ −1𝑑𝑦 = 𝑒 −𝑦 .
Multiplying the original ODE gives an exact ODE
𝑒 −𝑦 𝑒 𝑥+𝑦 + 𝑦𝑒 𝑦 𝑑𝑥 + 𝑒 −𝑦 𝑥𝑒 𝑦 – 1 𝑑𝑦 = 0,
𝑒 𝑥 + 𝑦 𝑑𝑥 + 𝑥 – 𝑒 −𝑦 𝑑𝑦 = 𝑑(𝑒 𝑥 + 𝑥𝑦 + 𝑒 −𝑦 ) = 0.
By the method for solving the exact ODE, we get the general
solution 𝑢 𝑥, 𝑦 = 𝑒 𝑥 + 𝑥𝑦 + 𝑒 −𝑦 = 𝑐.
小心代入
The initial condition 𝑦 0 = −1 gives 𝑢 0, −1 = 𝑒 0 + 0 + 𝑒1 =
1 + 𝑒 = 𝑐. The particular solution
Advancedis 𝑒 𝑥 +Mathematics,
Engineering 𝑥𝑦 + 𝑒 −𝑦by=
10/e 1 Kreyszig
Erwin + 𝑒.
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p61
Example 積分因子的形式較複雜,仍可用基本概念處理
𝑑𝑦
+ 𝑦 = 𝑦 4 . The integrating factor is 𝐹 = 𝑒 𝑎𝑥 𝑦 𝑏 . Find 𝑎 and 𝑏,
𝑑𝑥
and solve the ODE.
Solution: By multiplying the ODE by 𝐹, we get an exact ODE
𝑒 𝑎𝑥 𝑦 𝑏+1 − 𝑒 𝑎𝑥 𝑦 𝑏+4 𝑑𝑥 + 𝑒 𝑎𝑥 𝑦 𝑏 𝑑𝑦 = 0.
Let 𝑀 = 𝜕𝑢/𝜕𝑥 = (𝑒 𝑎𝑥 𝑦 𝑏+1 − 𝑒 𝑎𝑥 𝑦 𝑏+4 ) and 𝑁 = 𝜕𝑢/𝜕𝑦 =
(𝑒 𝑎𝑥 𝑦 𝑏 𝑑𝑦). Since this ODE is exact, we have
𝜕2𝑢 𝜕 𝑎𝑥 𝑏+1 𝑎𝑥 𝑏+4
𝜕 𝑎𝑥 𝑏
= (𝑒 𝑦 −𝑒 𝑦 )= (𝑒 𝑦 )
𝜕𝑥𝜕𝑦 𝜕𝑦 𝜕𝑥
(𝑏 + 1)𝑒 𝑎𝑥 𝑦 𝑏 − (𝑏 + 4)𝑒 𝑎𝑥 𝑦 𝑏+3 = 𝑎𝑒 𝑎𝑥 𝑦 𝑏
By comparing the coefficients, we have 𝑏 + 1 = 𝑎, 𝑏 + 4 = 0
and 𝑎 = −3, 𝑏 = −4. The integrating factor is 𝐹 = 𝑒 −3𝑥 𝑦 −4 .
Then, the exact ODE becomes
1 1
𝑒 −3𝑥 𝑦 −3 − 𝑒 −3𝑥 𝑑𝑥 + 𝑒 −3𝑥 𝑦 −4 𝑑𝑦 = 𝑑(− 𝑒 −3𝑥 𝑦 −3 + 𝑒 −3𝑥 ) = 0.
3 3
1
−3𝑥 Mathematics,
−3 + 10/e 1
−3𝑥
The general solution is 𝑢 𝑥, 𝑦 Advanced
= − 𝑒
Engineering 𝑦 𝑒 by Erwin=Kreyszig
𝑐.
3 3
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.4 p62
1.5 Linear ODEs. (線性常微分方程式)
Bernoulli Equation.
Riccati Equation.
Population Dynamics. (族群動態學)
線性ODEs是正合ODEs的特例(子集合),較為簡單。
十分重要,廣泛使用在許多控制系統、電路學。
Bernoulli equation and Riccati equation 則可簡化成線性ODEs。
回想線性代數,線性方程式通式為 𝑎1 𝑥1 + 𝑎2 𝑥2 + 𝑎3 𝑥3 + ⋯ = 𝑏
(1) 線性方程式為變數𝑥1 , 𝑥2 , 𝑥3 , … 的線性組合。
(2) 變數不可以相乘或開根號,不能被包含在三角、指數或對數函數裡面。
(3) 變數只能為一次方。

數學家族: 家族中多人有極大貢獻。舉例如下
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.

The first-order linear ODEs are of the form


(1) y’ + p(x)y = r(x) (standard form).
The nonlinear ODEs are the ODEs that cannot be written
in this form.
Note that in the standard form, the coefficient of the first
term 𝑦 ′ should be one. (𝑦 ′ 項的係數必須是一,使用公式時才不
會錯)
The linear ODEs contain only the linear combinations of
unknown functions 𝑦 and 𝑦 ′ , without the nonlinear terms
such as 𝑦 ′ 𝑎 , 𝑦 𝑏 , 𝑦 ′ 𝑎 𝑦 𝑏 ,…, and so on.
The functions 𝑝(𝑥) and 𝑟(𝑥) of independent variable 𝑥 are
simply treated as just the coefficients (當作是係數).
If in an application the independent variable is time, we
write 𝑡 instead of 𝑥. Advanced Engineering Mathematics, 10/e by Erwin
Section
Kreyszig
1.5 p64
Copyright 2011 by John Wiley & Sons. All rights reserved.
1.5 Linear ODEs. Bernoulli Equation. Population Dynamics.

Note that the following ODEs are linear


𝑦 ′ 𝑐𝑜𝑠 𝑥 + 𝑦𝑠𝑖𝑛 𝑥 = 𝑥  𝑦 ′ + 𝑦 𝑡𝑎𝑛 𝑥 = 𝑥 𝑠𝑒𝑐 𝑥
𝑥 2 𝑒 𝑥 𝑦 2 𝑦 ′ + 𝑥 3 𝑦 3 = (𝑥 4 +𝑥)𝑦 2  𝑦 ′ + 𝑥𝑒 −𝑥 𝑦 = 𝑒 −𝑥 (𝑥 2 + 𝑥 −1 ).

Consider an ODE y’ + p(t)y = r(t) for an electrical circuit.


The function 𝑟(𝑡) may be an input current or voltage, and
the solution 𝑦(𝑡) an output electrical current or voltage.
Generally, 𝑟(𝑡) is called the input, and 𝑦(𝑡) is called the
output (or the response to the input and that to the initial
condition).
電路學常用到線性ODE。
列出ODE後,輸入電壓源或電流源會以 𝑟(𝑡)表示,所得到的
解 𝑦(𝑡) 便是輸出(響應response)。
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.5 p65
Homogeneous Linear ODE: 𝑦 ′ + 𝑝(𝑥)𝑦 = 𝑟(𝑥), 𝑟(𝑥) ≡ 0.
We begin with the simpler special case that r(x) is zero for
all x on some interval a < x < b, called it the interval J. (This
is sometimes written r(x) ≡ 0; read “ 𝑟(𝑥) is identically zero”.)
Then the ODE (1) becomes (恆等於、恆等號)

(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.

Nonhomogeneous Linear ODE: 𝑦 ′ + 𝑝(𝑥)𝑦 = 𝑟 𝑥 , 𝑟 𝑥 ≠ 0.


Multiplied by the integrating factor, the ODE becomes
𝑒 ∫ 𝑝𝑑𝑥 𝑑𝑦 + 𝑒 ∫ 𝑝𝑑𝑥 𝑝𝑦𝑑𝑥 = 𝑒 ∫ 𝑝𝑑𝑥 𝑟 𝑥 𝑑𝑥 (Exact ODE)
𝑑 𝑒 ∫ 𝑝𝑑𝑥 𝑦 = 𝑒 ∫ 𝑝𝑑𝑥 𝑟 𝑥 𝑑𝑥. 可直接積分,通常單獨一項

By integration, we obtain the general solution


𝑒 ∫ 𝑝𝑑𝑥 𝑦 = න𝑒 ∫ 𝑝𝑑𝑥 𝑟 𝑥 𝑑𝑥 + 𝑐, 𝑦 𝑥 = 𝑒 −∫ 𝑝𝑑𝑥 න𝑒 ∫ 𝑝𝑑𝑥 𝑟 𝑥 𝑑𝑥 + 𝑐
Let ℎ = ∫ 𝑝 𝑥 𝑑𝑥. We have
(4) 𝑦 𝑥 = 𝑒 −ℎ න𝑒 ℎ 𝑟 𝑥 𝑑𝑥 + 𝑐 = 𝑒 −ℎ න𝑒 ℎ 𝑟 𝑥 𝑑𝑥 + 𝑐𝑒 −ℎ .

This general solution has the form


(5) Total Output = Response to the input r + Response to the
initial data (where 𝑐 is determined by the initial condition).
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights Section 1.5 p68
reserved.
EXAMPLE 1 (直接使用公式。1. 寫成標準式,2. 極易出錯,要帶回原ODE確認)
First-Order ODE, General Solution, Initial Value Problem
Solve the initial value problem
y’ + y tan x = sin 2x, y(0) = 1. 𝑦 𝑥 = 𝑒 −ℎ න𝑒 ℎ 𝑟 𝑥 𝑑𝑥 + 𝑐

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)

= ∫(-1/z)d(z) = - ln|z|= ln|cos x|-1 = ln|sec x|. (letting z = cos x)


From this we see that in (4),
eh = sec x, e−h = cos x, ehr = (sec x)(2 sin x cos x) = 2 sin x,
and the general solution of our equation is
y(x) = cos x (2 ∫sin x dx + c) = c cos x − 2 cos2x.
From this and the initial condition, 1 = c · 1 − 2 · 12, thus c = 3 and
the solution of our initial value problem is y = 3 cos x - 2 cos2 x.
Here 3 cos x is the response to the initial data, and −2 cos2 x is the
response to the input sin 2x. Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rightsSection 1.5 p69
reserved.
EXAMPLE 1 (公式實在是太難,又容易記錯。忘了怎麼辦?!)
Solve y’ + y tan x = sin 2x.
[Case I] We can treat this ODE just as a regular ODE, and find an
integrating factor to transform it as an exact ODE.
[Case II] We remember the integrating factor 𝐹 𝑥 = 𝑒 ∫ 𝑝 𝑥 𝑑𝑥 , and
∫ 𝑝 𝑥 𝑑𝑥 = ∫ tan 𝑥 𝑑𝑥 + 𝑐 = ⋯ = ln|sec x| (let c = 0).
Then, with 𝐹 𝑥 = 𝑒 ln|sec x| = sec 𝑥, we obtain an exact ODE
sec 𝑥 𝑑𝑦 + (𝑦 sec 𝑥 tan 𝑥 − 2 sec 𝑥 sin 𝑥 cos 𝑥) 𝑑𝑥 = 0,
sec 𝑥 𝑑𝑦 + (𝑦 sec 𝑥 tan 𝑥 − 2 sin 𝑥) 𝑑𝑥 = 0.
Since 𝑀 = 𝜕𝑢/𝜕𝑥 = (𝑦 sec 𝑥 tan 𝑥 − 2 sin 𝑥), we have
𝑢 𝑥, 𝑦 = ∫ 𝑀𝑑𝑥 + 𝑓(𝑦) = 𝑦 sec 𝑥 + 2 cos 𝑥 + 𝑓(𝑦). (此積分中要變
數轉換z = cos x,方法類似tan 𝑥的積分)
Since 𝑁 = 𝜕𝑢/𝜕𝑦 = sec 𝑥, we have
𝜕𝑢/𝜕𝑦 = sec 𝑥 + 𝑓 ′ (𝑦) = 𝑁 = sec 𝑥 and 𝑓 ′ 𝑦 = 0, 𝑓 𝑦 = 𝑐 ∗ .
Hence, the ODE becomes 𝑑𝑢(𝑥, 𝑦) = 0, and the general solution is
𝑢 = 𝑦 sec 𝑥 + 2 cos 𝑥 + 𝑐 ∗ = 𝑐1 , thus 𝑦 sec 𝑥 + 2 cos 𝑥 = 𝑐
Advanced Engineering Mathematics, 10/e by Erwin Kreyszig
𝑦 = 𝑐 cos 𝑥 − 2 cos 2 𝑥 Copyright 2011 by John Wiley & Sons. All rights 1.5
Section reserved.
p70
EXAMPLES
Solve 𝑦 ′ − 𝑦 = 𝑒 2𝑥 .
Solution.
With the integrating factor 𝐹 𝑥 = 𝑒 ∫ 𝑝 𝑥 𝑑𝑥 = 𝑒 ∫ −1 𝑑𝑥 = 𝑒 −𝑥 ,
we have an exact ODE Linear ODE 中,通常
1. 左式可寫成全微分型式
𝑒 −𝑥 𝑑𝑦 − 𝑒 −𝑥 𝑦𝑑𝑥 = 𝑒 𝑥 𝑑𝑥. 2. 右式可直接積分,單獨一項
Thus, 左式中,由第一項猜測是 𝑒 −𝑥 𝑦。
𝑑(𝑒 −𝑥 𝑦) = 𝑒 𝑥 𝑑𝑥. 函數對 𝑥 微分,可得到 −𝑒 −𝑥 𝑦。
符合左式第二項。Good!
By integration, we get the general solution
𝑒 −𝑥 𝑦 = 𝑒 𝑥 + 𝑐, 𝑦 = 𝑒 2𝑥 + 𝑐𝑒 𝑥 .

By the Kirchhoff‘s voltage law (KVL, 克希荷夫電壓定律),


the RL circuit can be modeled by an linear ODE.

𝑅 𝐸 𝑡
𝐿𝐼 ′ + 𝑅𝐼 = 𝐸 𝑡 , 𝐼′ + 𝐼=
𝐿 𝐿
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,
所得到,所以是零點)

Example: The logistic equation 𝑦 ′ = 𝑓 𝑦 = 𝐴𝑦 − 𝐵𝑦2 = (𝐴 − 𝐵𝑦)𝑦


has there solutions 𝑦(𝑡) = 0, 𝑦(𝑡) = 𝐴Τ𝐵 , 𝑦(𝑡) = 1Τ 𝑐𝑒 −𝐴𝑡 + 𝐵 Τ𝐴 .
There are two equilibrium solutions 𝑦(𝑡) = 0, 𝑦(𝑡) = 𝐴Τ𝐵.

Because of their importance, these zeros are also known as critical


points of (13). (由於重要性,特別又稱為臨界點、關鍵點。需要特
別注意平衡點(平衡解、臨界點)是否穩定(stable)。)

Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.5 p76
Equilibrium solutions, Equilibrium points, Critical Points
There are two equilibrium solutions 𝑦(𝑡) = 0, 𝑦(𝑡) = 𝐴Τ𝐵.
An equilibrium solution is called stable if solutions close to it for
some t remain close to it for all further t. (穩定平衡解。例如,𝑦(𝑡)
= 𝐴Τ𝐵,電路的輸出能穩定在此解附近)
It is called unstable if solutions initially close to it do not remain
close to it as t increases. (不穩定平衡解。例如,𝑦(𝑡) =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 𝑦(𝑥) 𝑥 = 𝑡 表示時間。

畫出方向場,可大略看出解曲線。
不同參數𝑐,不同輸出𝑦(𝑡)。

Unstable 若系統一開始運作在1 的附近,最後


𝑦2 = 2 可以穩定到 𝑦 𝑡 = 1 。

但系統無法穩定運作在𝑦 𝑡 = 2 附近。
Stable
若初始條件使得一開始 𝑦 𝑡 > 2。隨
𝑦1 = 1 時間增加,輸出𝑦(𝑡)會不斷增加。直
到崩潰。

Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.5 p78
Riccati Equation. (差一項,就是Bernoulli ODE)
Reduction to Bernoulli Form 𝑦 ′ + 𝑝 𝑥 𝑦 = 𝑔 𝑥 𝑦 𝑎
The Riccati equation is of the form
𝑦′ = 𝑅 𝑥 + 𝑄 𝑥 𝑦 + 𝑃 𝑥 𝑦2. (Note the term 𝑦 2 )
If 𝑅 𝑥 = 0, it is a Bernoulli equation.
Solution steps include
1. By inspection, find a solution 𝑦𝑝 so that 𝑦𝑝′ = 𝑅 + 𝑄𝑦𝑝 + 𝑃𝑦𝑝2 .
2. Usually, 𝑦𝑝 = 𝑎𝑥 𝑏 , 𝑎𝑒 𝑏𝑥 . (Substitute 𝑦𝑝 into ODE to find 𝑎, 𝑏)
3. Assume the general solution 𝑦 = 𝑦𝑝 (𝑥) + 𝑣(𝑥).
4. To find 𝑣(𝑥), we substitute 𝑦 into the ODE, obtaining
2
𝑦𝑝′ + 𝑣′ = 𝑅 + 𝑄(𝑦𝑝 + 𝑣) + 𝑃 𝑦𝑝 + 𝑣
𝑦𝑝′ − (𝑅 + 𝑄𝑦𝑝 + 𝑃𝑦𝑝2 ) + 𝑣 ′ = 𝑄𝑣 + 𝑃(2𝑣𝑦𝑝 + 𝑣 2 )
Thus, we obtain a Bernoulli ODE (𝑅 𝑥 被移除)
𝑣 ′ − 𝑄 + 2𝑃𝑦 𝑝 𝑣
Advanced
= 𝑃𝑣 2.
Engineering Mathematics, 10/e by Erwin Kreyszig
Copyright 2011 by John Wiley & Sons. All rights reserved.
Section 1.5 p79
Example
Solve 𝑦 ′ = 𝑦 2 − 𝑥𝑦 + 1
Solution: (Riccati ODE? Note the terms 𝑦 2 , 1)
We find a particular solution 𝑦 = 𝑥.
Assume the general solution 𝑦 = 𝑥 + 𝑣.
By substituting 𝑦 into the ODE, we obtain a Bernoulli ODE
1 + 𝑣 ′ = 𝑥 + 𝑣 2 − 𝑥 𝑥 + 𝑣 + 1, 𝑣 ′ = 𝑣 2 + 𝑥𝑣,
𝑣 ′ −𝑥𝑣 = 𝑣 2 (Bernoulli ODE)
Multiplying this ODE by 𝑣 −2 gives 𝑣 −2 𝑑𝑣 − 𝑥𝑣 −1 𝑑𝑥 = 𝑑𝑥.
By letting 𝑢 = 𝑣 −1 , 𝑑𝑢 = −𝑣 −2 𝑑𝑣, we have a linear ODE
−𝑑𝑢 − 𝑥𝑢𝑑𝑥 = 𝑑𝑥, 𝑑𝑢 + 𝑥𝑢 + 1 𝑑𝑥 = 0, 𝑢′ + 𝑥𝑢 = −1.
2
Since 𝑝 𝑥 = 𝑥, the integrating factor is 𝐹 = 𝑒 ∫ 𝑝 𝑑𝑥 = 𝑒 (1/2)𝑥 .
2 2 2
Then, we have 𝑒 (1/2)𝑥 𝑑𝑢 + 𝑒 (1/2)𝑥 𝑥𝑢𝑑𝑥 = −𝑒 (1/2)𝑥 𝑑𝑥
(1/2)𝑥 2
(左式必為全微分型式,觀察第一項猜測是 𝑢𝑒 ,也符合第二項)
1 2
1/2 𝑥 2 𝑢 𝑥
𝑑 𝑒 = −𝑒 𝑑𝑥
Advanced2Engineering Mathematics, 10/e by Erwin Kreyszig
Section 1.5 p80
Copyright 2011 by John Wiley & Sons. All rights reserved.
Example (continued)
Solve 𝑦 ′ = 𝑦 2 − 𝑥𝑦 + 1
Solution:
1 2
1/2 𝑥 2 2 𝑥 𝑑𝑥
𝑑 𝑒 𝑢 = −𝑒
1 2 1 2
𝑒 2 𝑥 𝑢 = න −𝑒 2 𝑥 𝑑𝑥 +𝑐
1 1 2
− 2 𝑥2 𝑥
 𝑢 = 𝑣 −1 = 𝑒 (න −𝑒 2 𝑑𝑥 + 𝑐)
−1
1 1 2 1
− 2 𝑥2 − 2 𝑥2
 𝑣 = 𝑢−1 = 𝑒 න −𝑒 2 𝑥 𝑑𝑥 + 𝑐𝑒

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)?

Section 1.7 p83 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

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.

Section 1.7 p84 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

Theorem 1 (continued)

Section 1.7 p85 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

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|< α.

Section 1.7 p86 Advanced Engineering Mathematics, 10/e by Erwin Kreyszig


Copyright 2011 by John Wiley & Sons. All rights reserved.

Vous aimerez peut-être aussi