Advanced

方向导数计算器

求函数 f(x, y) 在某点沿指定方向移动时的变化速率。

Function f(x, y)

Component along x
Component along y
Directional derivative Dᵤf
4.4000

Rate of change of f along the chosen unit direction.

∂f/∂x
2
∂f/∂y
4
Unit direction
(0.6, 0.8)
Gradient magnitude
4.4721
∇fûGradient ∇f and unit direction û — Dᵤf = ∇f · û
Step by step
  1. 1

    Direction magnitude |u|

    √(3² + 4²) = 5
  2. 2

    Unit direction û = u ÷ |u|

    (3 ÷ 5, 4 ÷ 5) = (0.6, 0.8)
  3. 3

    ∂f/∂x (central-difference estimate)

    2
    [f(x+h, y) − f(x−h, y)] ÷ (2h), h = 1×10⁻⁵.
  4. 4

    ∂f/∂y (central-difference estimate)

    4
  5. 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 及偏导数结果。

公式
D_u f = ∇f · û = fx·(u1/|u|) + fy·(u2/|u|)
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 的方向给出零。

也称为

方向导数
方向导数计算
梯度方向导数
方向向量导数
求方向导数
directional derivative calculator
direction vector derivative
d_u f

APA

TG we-Calculate Editorial Team. (2026). 方向导数计算器 [Online calculator]. TG we-Calculate. https://we-calculate.com/zh/calculator/directional-derivative-calculator

Chicago

TG we-Calculate Editorial Team. "方向导数计算器." TG we-Calculate. 2026. https://we-calculate.com/zh/calculator/directional-derivative-calculator.

IEEE

TG we-Calculate Editorial Team, "方向导数计算器," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/zh/calculator/directional-derivative-calculator

BibTeX

@misc{wecalculate_directional_derivative_calculator, title = {方向导数计算器}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/zh/calculator/directional-derivative-calculator}}, year = {2026}, note = {TG we-Calculate} }

这个计算器对您有帮助吗?