方向導數計算器
求函數 f(x, y) 在某點沿指定方向移動時的變化速率。
Function f(x, y)
Rate of change of f along the chosen unit direction.
- 1
Direction magnitude |u|
√(3² + 4²) = 5 - 2
Unit direction û = u ÷ |u|
(3 ÷ 5, 4 ÷ 5) = (0.6, 0.8) - 3
∂f/∂x (central-difference estimate)
2[f(x+h, y) − f(x−h, y)] ÷ (2h), h = 1×10⁻⁵. - 4
∂f/∂y (central-difference estimate)
4 - 5
Dᵤf = ∂f/∂x × û₁ + ∂f/∂y × û₂
2 × 0.6 + 4 × 0.8 = 4.4000
此計算機如何運作?
方向導數 D_u f 衡量 f(x, y) 在某點沿指定方向移動時的變化速率。它等於梯度 ∇f = (fx, fy) 與單位方向向量 û 的點積。本工具以中央差分估計梯度,對向量進行正規化,並回報 D_u f 及各偏導數。
公式
How this is calculated
選擇函數 f(x, y) 和一個點 (x, y),然後給定方向向量 (u1, u2)。計算器首先使用步長 h = 1e-5 的對稱(中央)差商估計梯度 ∇f = (fx, fy):fx ≈ [f(x+h, y) − f(x−h, y)] / (2h),fy ≈ [f(x, y+h) − f(x, y−h)] / (2h)。採用中央差分是因為其誤差為 O(h²),比單側差分精確得多。
接著將方向向量正規化為單位向量 û = (u1, u2) / √(u1² + u2²),因為方向導數的定義要求方向為單位長度。結果是點積 D_u f = ∇f · û = fx·û1 + fy·û2,給出 f 在該點沿該方向的瞬時變化率。
單位隨 f 而定:D_u f 的單位為 f 值每單位行進距離的變化量。若方向向量為零向量,其長度為零,結果無定義,計算器不顯示答案。某點的最大可能方向導數等於梯度模 |∇f|,出現在梯度方向上;沿垂直於梯度的方向移動時方向導數為零。
常見問題
方向導數沿單位方向定義。將 (u1, u2) 除以其模長可消除向量大小的影響,使結果僅反映方向,而非向量的長度。
步長 h = 1e-5 的中央差分誤差正比於 h²,因此對平滑函數而言,梯度通常精確到多個有效位數,與精確的解析偏導數高度吻合。
梯度 ∇f 本身的方向,此時 D_u f 等於梯度模 |∇f|。反方向的方向導數最小(最負),垂直於 ∇f 的方向給出零值。
也稱為
TG we-Calculate Editorial Team. (2026). 方向導數計算器 [Online calculator]. TG we-Calculate. https://we-calculate.com/zh-tw/calculator/directional-derivative-calculator
TG we-Calculate Editorial Team. "方向導數計算器." TG we-Calculate. 2026. https://we-calculate.com/zh-tw/calculator/directional-derivative-calculator.
TG we-Calculate Editorial Team, "方向導數計算器," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/zh-tw/calculator/directional-derivative-calculator
@misc{wecalculate_directional_derivative_calculator, title = {方向導數計算器}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/zh-tw/calculator/directional-derivative-calculator}}, year = {2026}, note = {TG we-Calculate} }
這個計算機對您有幫助嗎?
