Let f : A → ℝ with A ⊆ ℝᵖ, and let c ∈ A. If every second partial derivative Dᵢⱼ f(c) exists, the second derivative of f at c is the function on ℝᵖ × ℝᵖ given by D²f(c)(y, z) = Σᵢ Σⱼ Dᵢⱼ f(c)yᵢzⱼ, both indices running from 1 to p. If every n-th order partial derivative of f at c exists, put Dⁿf(c)(w)ⁿ = Σ D_{i₁⋯iₙ} f(c)w_{i₁}w_{i₂}⋯w_{iₙ} for w ∈ ℝᵖ, the sum taken over all pⁿ choices of i₁, …, iₙ ∈ {1, …, p}; for n = 1 this is Σᵢ Dᵢ f(c)wᵢ, and D⁰f(c)(w)⁰ means f(c).
D²f(c)(y, z) 吃兩個向量、吐一個數,對每個變數都是線性的;把兩個變數都換成同一個 w,得到 w 的二次式 D²f(c)(w)² = D²f(c)(w, w)。p = 2、w = (h, k) 時,它是 D₁₁ f(c)h² + [D₁₂ f(c) + D₂₁ f(c)]hk + D₂₂ f(c)k²;若二階偏導數在 c 附近存在且連續,由 40.8 兩個混合偏導數相等,就成了 D₁₁ f h² + 2D₁₂ f hk + D₂₂ f k²。Dⁿf(c)(w)ⁿ 是 w 的 n 次齊次式:w 換成 tw,值乘上 tⁿ。n = 1 時 D¹f(c)(w)¹ 就是 39.7 的加權和,f 可微時等於 Df(c)(w)。這裡的 D²f(c) 只是記號上的組合,不是對 Df 再套一次 39.2。
Taylor 定理的證法與 40.4 一樣:沿著線段把 f 攤平成單變數函數 F(t) = f(a + tu),再用單變數的定理。為此要知道 F 的高階導數是什麼——答案正是剛定義的 Dᵏf。
LEMMA · HIGHER DERIVATIVES ALONG A SEGMENT
Let Ω ⊆ ℝᵖ be open, n ∈ ℕ, and f : Ω → ℝ such that f and all its partial derivatives of order at most n exist and are continuous on Ω. Let a ∈ Ω and u ∈ ℝᵖ with a + tu ∈ Ω for every t ∈ [0, 1], and set F(t) = f(a + tu) for t ∈ [0, 1]. Then for k = 0, 1, …, n the derivative F⁽ᵏ⁾ exists on all of [0, 1], is continuous there, and F⁽ᵏ⁾(t) = Dᵏf(a + tu)(u)ᵏ.
每對 t 求一次導,就多一個偏導數的指標,同時多乘一個 u 的座標:F′(t) = Σᵢ Dᵢ f(a + tu)uᵢ,F″(t) = Σᵢ Σⱼ Dᵢⱼ f(a + tu)uᵢuⱼ,依此類推。前提「n 階以內的偏導數都在 Ω 上連續」讓每一步都能用 39.9 保證可微;Ω open 則保證線段上每一點周圍都有一個小球,偏導數在上面有定義。[0, 1] 端點上的導數是單側的(§28-7 的高階導數,定義域取 [0, 1])。
把 k 個指標寫成一串 I = (i₁, …, iₖ),記 D_I f = D_{i₁⋯iₖ} f、u_I = u_{i₁}⋯u_{iₖ};於是 Dᵏf(x)(u)ᵏ = Σ_I D_I f(x)u_I,對所有 pᵏ 串求和。k = 0 時只有空串,D_I f = f、u_I = 1。
證明計畫 · 由所求想起 所求是 F 的每一階導數的公式與連續性。 第一步:k = 0 的情形就是 F 本身。 第二步:從 k 推到 k + 1:F⁽ᵏ⁾ 是有限多項 D_I f(a + tu)u_I 之和,每一項沿線段求導,多出一個指標。 第三步:連續性來自偏導數連續與合成。
Proof. We argue by induction on k. For k = 0 the formula reads F(t) = f(a + tu), which is the definition. Now let 0 ≤ k < n and assume F⁽ᵏ⁾(t) = Σ_I D_I f(a + tu)u_I on [0, 1].
這一步的所求:歸納的起點與假設。k = 0 時公式右邊是 D⁰f(a + tu)(u)⁰ = f(a + tu),照約定就是 F(t)。歸納只走到 k = n − 1 為止,推出 k + 1 ≤ n;再往上就超出前提保證的偏導數了。
Fix a string I of length k and let g = D_I f. Its first partial derivatives Dⱼ g = D_{Ij} f have order k + 1 ≤ n, so they exist and are continuous on Ω. Because Ω is open, 39.9 shows that g is differentiable at every point of Ω. By the lemma on differentiating along a segment and by 39.7, (d/dt) g(a + tu) = Dg(a + tu)(u) = Σⱼ D_{Ij} f(a + tu)uⱼ for every t ∈ [0, 1].
Since F⁽ᵏ⁾ is a finite sum of the functions t ↦ u_I·D_I f(a + tu), the sum rule gives, at every t ∈ [0, 1], F⁽ᵏ⁺¹⁾(t) = Σ_I Σⱼ D_{Ij} f(a + tu)u_I uⱼ = Dᵏ⁺¹f(a + tu)(u)ᵏ⁺¹.
這一步的所求:把各項的導數加回去,認出 k + 1 階的公式。u_I 是常數,§28-1 的和與常數倍的求導規則讓我們逐項求導。雙重和跑遍所有長度 k 的串 I 與所有 j,也就是所有長度 k + 1 的串 (I, j),每一項是 D_{Ij} f 乘上 u 的 k + 1 個對應座標——正是 Dᵏ⁺¹f(a + tu)(u)ᵏ⁺¹ 的定義。拿 p = 2、k = 1 看:F′ = D₁ f u₁ + D₂ f u₂,求導得 D₁₁ f u₁² + D₁₂ f u₁u₂ + D₂₁ f u₂u₁ + D₂₂ f u₂²,四項對應四個長度 2 的串。
Finally, for k ≤ n each D_I f is continuous on Ω and t ↦ a + tu is continuous, so each t ↦ D_I f(a + tu) is continuous on [0, 1], and so is the finite combination F⁽ᵏ⁾.
這一步的所求:每一階導數都連續(28.6 需要它)。t ↦ a + tu 的每個座標是一次式,連續;§20-5 的 20.8(連續函數的合成仍連續)讓 D_I f(a + tu) 連續,20.6(和與常數倍保持連續)讓有限和連續。k = 0 這一格用到前提裡的「f 本身連續」。
每對 t 求一次導,偏導數就多一個指標、u 就多一個座標;偏導數連續讓每一步都可微,也讓每一階導數都連續。∎
40.9 TAYLOR'S THEOREM
Let Ω ⊆ ℝᵖ be open, n ∈ ℕ, and f : Ω → ℝ such that f and all its partial derivatives of order at most n exist and are continuous on Ω. Let a, b ∈ Ω with b = a + u, and suppose the whole segment joining a to b lies in Ω. Then some point c = a + t₀u with 0 < t₀ < 1 satisfies f(b) = Σₖ (1/k!)Dᵏf(a)(u)ᵏ + (1/n!)Dⁿf(c)(u)ⁿ, the sum running over k = 0, 1, …, n − 1.
展開來寫是 f(b) = f(a) + Df(a)(u) + (1/2!)D²f(a)(u)² + ⋯ + (1/(n − 1)!)Dⁿ⁻¹f(a)(u)ⁿ⁻¹ + (1/n!)Dⁿf(c)(u)ⁿ。前 n 項全在 a 取值,是 u 的多項式;最後一項是餘項,在線段上某一點 c 取值。n = 1 時它就是 40.4(f(b) = f(a) + Df(c)(u))。n = 2 時是「affine 近似加上一個二次的修正」,修正量由 c 點的二階偏導數決定。
證明計畫 · 由所求想起 所求是 f(b) 的展開式。 第一步:上面的引理給出 F 的 n 階以內導數與它們的連續性,正是 28.6 的前提。 第二步:對 F 用 28.6,再把 F⁽ᵏ⁾ 換回 Dᵏf。
Proof. By the lemma, F, F′, …, F⁽ⁿ⁾ exist and are continuous on [0, 1], with F⁽ᵏ⁾(t) = Dᵏf(a + tu)(u)ᵏ. Applying 28.6 with α = 0, β = 1, there is t₀ ∈ (0, 1) with F(1) = Σₖ F⁽ᵏ⁾(0)/k! + F⁽ⁿ⁾(t₀)/n!, k = 0, …, n − 1. Substituting F⁽ᵏ⁾(0) = Dᵏf(a)(u)ᵏ and F⁽ⁿ⁾(t₀) = Dⁿf(c)(u)ⁿ with c = a + t₀u gives the result.
這一步的所求:把多變數的展開整個交給單變數的 Taylor 定理。28.6 要求 F 與它的前 n − 1 階導數在閉區間上連續、F⁽ⁿ⁾ 在內部存在;引理給的更多(F⁽ⁿ⁾ 在整個閉區間上都存在),所以前提滿足。β − α = 1,於是每一項的 (β − α)ᵏ 都是 1。單變數的 F⁽ᵏ⁾(0) 恰好是多變數的 Dᵏf(a)(u)ᵏ,單變數的中途點 t₀ 恰好對應線段上的 c。u = 0 時 a = b,除了 k = 0 那一項外全是零,結論自明,證明也照樣成立。
沿線段攤平,ℝᵖ 上的 Taylor 定理就是單變數的 Taylor 定理;引理把 F 的每一階導數翻譯成 f 的高階導數。∎