Directional Derivatives in an Arbitrary Direction | 任意方向的方向导数

📚 Directional Derivatives in an Arbitrary Direction | 任意方向的方向导数

In multivariable calculus, partial derivatives measure the rate of change along coordinate axes. But what if we want to know how a function changes as we move in a direction that is not aligned with any axis? This is exactly what the directional derivative answers. In this article we focus on the directional derivative in an arbitrary direction, which means any unit vector u, not just the standard coordinate directions.

在多变量微积分中,偏导数衡量函数沿坐标轴方向的变化率。但如果我们想知道函数沿某个不与坐标轴对齐的方向变化得有多快呢?这正是方向导数要回答的问题。本文聚焦于任意方向上的方向导数,即任意单位向量 u,而不仅仅是标准坐标方向。


1. Partial Derivatives and Notation | 偏导数与记号

For a function f(x, y), the partial derivatives are ∂f/∂x and ∂f/∂y. They represent the rates of change along the positive x-axis and positive y-axis respectively. For example, ∂f/∂x at a point (x₀, y₀) is obtained by holding y fixed and differentiating with respect to x.

对于二元函数 f(x, y),偏导数 ∂f/∂x 和 ∂f/∂y 分别表示沿 x 轴正方向和 y 轴正方向的变化率。例如,在点 (x₀, y₀) 处,∂f/∂x 是指固定 y 不变、对 x 求导得到的导数。

However, the axes are only two of infinitely many possible directions. To move in an arbitrary direction, we need a unit vector u = (u₁, u₂), where u₁² + u₂² = 1. If a direction is given by a non-unit vector v, we first normalize it: u = v / |v|.

然而,坐标轴只是无穷多个可能方向中的两个。为了沿任意方向移动,我们需要一个单位向量 u = (u₁, u₂),满足 u₁² + u₂² = 1。如果给定了非单位向量 v,我们首先要将其规范化:u = v / |v|。


2. Definition of the Directional Derivative | 方向导数的定义

Let f(x, y) be a function and let u = (u₁, u₂) be a unit vector. The directional derivative of f at a point (x₀, y₀) in the direction u is defined as the limit:

设 f(x, y) 是一个二元函数,u = (u₁, u₂) 是一个单位向量。函数 f 在点 (x₀, y₀) 处沿方向 u 的方向导数定义为极限:

D_u f(x₀, y₀) = lim_{h→0} [f(x₀ + h u₁, y₀ + h u₂) − f(x₀, y₀)] / h

This definition generalizes the partial derivatives: if u = (1, 0), then D_u f = ∂f/∂x; if u = (0, 1), then D_u f = ∂f/∂y.

这个定义推广了偏导数:若 u = (1, 0),则 D_u f = ∂f/∂x;若 u = (0, 1),则 D_u f = ∂f/∂y。

Intuitively, D_u f tells us the instantaneous rate of change of f as we move through (x₀, y₀) with speed 1 along the direction u. Because u is a unit vector, the distance traveled per unit time is 1, so the result is directly a rate per unit length.

直观来看,D_u f 表示我们从 (x₀, y₀) 出发、沿方向 u 以速度 1 移动时 f 的瞬时变化率。由于 u 是单位向量,单位时间走过的距离为 1,因此结果直接就是单位长度上的变化率。


3. Arbitrary Direction: Unit Vector Requirements | 任意方向:单位向量的要求

In an arbitrary direction, the vector v = (a, b) may have any length. The direction is defined by the orientation, not the magnitude. Therefore we always normalize v to obtain a unit vector u:

在任意方向中,向量 v = (a, b) 的长度可以是任意值。方向由指向决定,与大小无关。因此我们总是将 v 规范化得到单位向量 u:

u = v / |v| = (a, b) / √(a² + b²)

For example, the direction v = (3, 4) has length √(9 + 16) = 5, so u = (3/5, 4/5). The components of u are the cosines of the angles that the direction makes with the positive x- and y-axes. In two dimensions, if the direction makes an angle θ with the positive x-axis, then u = (cos θ, sin θ).

例如,方向 v = (3, 4) 的长度为 √(9 + 16) = 5,因此 u = (3/5, 4/5)。u 的分量就是该方向与 x 轴和 y 轴正方向夹角的余弦值。在二维中,若该方向与 x 轴正方向的夹角为 θ,则 u = (cos θ, sin θ)。

When working with an arbitrary direction, always check that |u| = 1 before applying the dot product formula. If the given direction is not a unit vector, forgetting to normalize is a common error.

在处理任意方向时,应用点积公式前务必检查 |u| = 1。如果给定方向不是单位向量,忘记规范化是常见错误。


4. The Gradient and the Directional Derivative | 梯度与方向导数

The gradient of f(x, y) is the vector of partial derivatives:

函数 f(x, y) 的梯度是偏导数构成的向量:

∇f = (∂f/∂x, ∂f/∂y)

For any unit vector u, the directional derivative is the dot product of the gradient and u:

对任意单位向量 u,方向导数等于梯度与 u 的点积:

D_u f = ∇f · u = (∂f/∂x) u₁ + (∂f/∂y) u₂

This is the most important computational formula. It reduces the limit definition to a simple calculation: compute the gradient, then take its dot product with the normalized direction vector.

这是最重要的计算公式。它将极限定义简化为简单计算:先求梯度,再与规范化后的方向向量做点积。

Equivalently, if θ is the angle between ∇f and u, then D_u f = |∇f| cos θ. This form is useful for understanding how the directional derivative depends on the orientation of u relative to the gradient.

等价地,若 θ 是 ∇f 与 u 的夹角,则 D_u f = |∇f| cos θ。这一形式有助于理解方向导数如何依赖于 u 相对于梯度的取向。


5. Step-by-Step Computation | 分步计算方法

To compute D_u f at a point P in an arbitrary direction:

计算 f 在点 P 处沿任意方向的方向导数的步骤如下:

  • Determine the gradient ∇f(x, y) symbolically by computing ∂f/∂x and ∂f/∂y.

    先求出梯度 ∇f(x, y) 的表达式,即计算 ∂f/∂x 和 ∂f/∂y。

  • Evaluate ∇f at the given point P = (x₀, y₀).

    在给定点 P = (x₀, y₀) 处计算 ∇f 的值。

  • If the direction is given by a vector v, normalize it: u = v / |v|.

    如果方向由向量 v 给出,则规范化:u = v / |v|。

  • Compute the dot product: D_u f = ∇f(x₀, y₀) · u.

    计算点积:D_u f = ∇f(x₀, y₀) · u。

Let us apply this to a concrete example step by step.

下面我们逐步应用这一方法到一个具体例子。


6. Worked Example in Two Dimensions | 二维实例

Let f(x, y) = x² y, point P = (1, 2), and direction v = (3, 4).

设 f(x, y) = x² y,点 P = (1, 2),方向 v = (3, 4)。

First compute the partial derivatives:

首先计算偏导数:

∂f/∂x = 2xy, ∂f/∂y = x²

At P = (1, 2): ∇f(1, 2) = (2·1·2, 1²) = (4, 1).

在 P = (1, 2) 处:∇f(1, 2) = (2·1·2, 1²) = (4, 1)。

Normalize v = (3, 4): |v| = 5, so u = (3/5, 4/5).

规范化 v = (3, 4):|v| = 5,因此 u = (3/5, 4/5)。

Now take the dot product:

下面做点积:

D_u f = ∇f · u = 4·(3/5) + 1·(4/5) = 12/5 + 4/5 = 16/5

Thus the rate of change of f at (1, 2) in the direction of (3, 4) is 16/5, or 3.2. This means that moving a small distance in that direction increases f at an initial rate of 3.2 units per unit length.

因此 f 在 (1, 2) 处沿方向 (3, 4) 的变化率为 16/5,即 3.2。这意味着朝该方向移动一小段距离时,f 的初始增加速率为每单位长度 3.2 个单位。


7. Maximum and Minimum Rates of Change | 最大与最小变化率

Since D_u f = |∇f| cos θ, the largest possible value of the directional derivative occurs when cos θ = 1, i.e. when u points in the same direction as ∇f. Therefore:

由于 D_u f = |∇f| cos θ,方向导数的最大值出现在 cos θ = 1 时,即 u 与 ∇f 同向。因此:

Maximum increase rate = |∇f|, in direction ∇f

最大增长率 = |∇f|,方向为 ∇f 的方向

The minimum value is −|∇f|, achieved when u points opposite to ∇f. The directional derivative is zero when u is perpendicular to ∇f, meaning the function is instantaneously constant along that direction; this direction is tangent to a level curve of f.

最小值为 −|∇f|,在 u 指向 ∇f 的反方向时取得。当 u 垂直于 ∇f 时,方向导数为零,说明函数在该方向上瞬时不变;该方向与 f 的等值线相切。

For the example f(x, y) = x² y at (1, 2), ∇f = (4, 1), so |∇f| = √(16 + 1) = √17. Thus the steepest increase rate is √17, and the direction of steepest descent is −(4, 1)/√17.

对于例子 f(x, y) = x² y 在 (1, 2) 处,∇f = (4, 1),所以 |∇f| = √(16 + 1) = √17。因此最大增长率为 √17,最陡下降方向为 −(4, 1)/√17。


8. Directional Derivative in Three Dimensions | 三维方向导数

For a function f(x, y, z), the gradient is ∇f = (∂f/∂x, ∂f/∂y, ∂f/∂z), and for any unit vector u = (u₁, u₂, u₃), the directional derivative is:

对于三元函数 f(x, y, z),梯度为 ∇f = (∂f/∂x, ∂f/∂y, ∂f/∂z),对任意单位向量 u = (u₁, u₂, u₃),方向导数为:

D_u f = ∇f · u = f_x u₁ + f_y u₂ + f_z u₃

Here “arbitrary direction” means any unit vector in three-dimensional space. The same normalization rule applies: if v is any nonzero vector, set u = v / |v|, where |v| = √(v₁² + v₂² + v₃²).

这里的“任意方向”指三维空间中的任意单位向量。同样的规范化规则适用:若 v 是任意非零向量,令 u = v / |v|,其中 |v| = √(v₁² + v₂² + v₃²)。

For example, let f(x, y, z) = x y + y z and let the direction be v = (1, 2, 2). Then |v| = √(1 + 4 + 4) = 3, so u = (1/3, 2/3, 2/3). Compute ∇f = (y, x + z, y). At (1, 2, 3), ∇f = (2, 4, 2). Then D_u f = 2·(1/3) + 4·(2/3) + 2·(2/3) = 2/3 + 8/3 + 4/3 = 14/3.

例如,设 f(x, y, z) = x y + y z,方向为 v = (1, 2, 2)。则 |v| = √(1 + 4 + 4) = 3,所以 u = (1/3, 2/3, 2/3)。计算 ∇f = (y, x + z, y)。在 (1, 2, 3) 处,∇f = (2, 4, 2)。则 D_u f = 2·(1/3) + 4·(2/3) + 2·(2/3) = 2/3 + 8/3 + 4/3 = 14/3。


9. Relation to Level Curves and Surfaces | 与等值线、等值面的关系

The gradient ∇f is always perpendicular to the level curve f = c at a given point. Consequently, any direction u that is tangent to the level curve satisfies D_u f = 0. This is a powerful geometric way to interpret the directional derivative.

梯度 ∇f 在给定点处总是垂直于等值线 f = c。因此,任何与等值线相切的方向 u 都满足 D_u f = 0。这是理解方向导数的一种强大几何方式。

For a function of three variables, the level surface f(x, y, z) = c has a normal vector ∇f at each point. Directions tangent to the level surface have zero directional derivative, while the normal direction gives the maximum absolute rate of change.

对于三元函数,等值面 f(x, y, z) = c 在每一点处都有法向量 ∇f。与等值面相切的方向方向导数为零,而法线方向给出最大绝对变化率。

In IB Mathematics courses, you are often asked to find the direction in which a function increases most rapidly or to verify that two surfaces are perpendicular. These tasks rely on recognizing that ∇f is normal to level sets and that the directional derivative is the projection of ∇f onto u.

在 IB 数学课程中,经常要求找出函数增长最快的方向,或者验证两个曲面互相垂直。这些任务依赖于认识到 ∇f 垂直于等值面集合,并且方向导数是 ∇f 在 u 上的投影。


10. Common Mistakes and Tips | 常见错误与技巧

One common mistake is using a non-unit vector directly in the dot product. If v = (2, 2), many students incorrectly compute D_v f = f_x·2 + f_y·2. This gives the change per two units of distance, not per unit distance. Always normalize first.

一个常见错误是直接将非单位向量代入点积。如果 v = (2, 2),很多学生错误地计算 D_v f = f_x·2 + f_y·2。这得到的是每移动两个单位距离的变化量,而不是每单位距离。务必先规范化。

Another mistake is forgetting that partial derivatives must be evaluated at the specific point. The gradient varies with location, so D_u f must always be evaluated at a designated point.

另一个错误是忘记偏导数必须在具体点处取值。梯度随位置变化,因此 D_u f 必须在指定点处求值。

Useful tips: (1) Write the unit vector as u = (cos θ, sin θ) in 2D to simplify angle-based questions. (2) If the direction is given as a compass direction or a line, choose a vector v along that line, then normalize. (3) For maximum increase direction, the direction is exactly the gradient vector, but as a unit vector: ∇f / |∇f|.

实用技巧:(1) 在二维中把单位向量写成 u = (cos θ, sin θ) 可简化与角度相关的题目。(2) 如果方向以方位或直线形式给出,则取该直线上的一个向量 v,然后规范化。(3) 最大增长方向就是梯度向量方向,但用单位向量表示:∇f / |∇f|。

Finally, remember that the directional derivative is a scalar, not a vector. It represents a rate, and its sign indicates whether f is increasing or decreasing in that direction.

最后,记住方向导数是标量,不是向量。它表示一个速率,其符号表示 f 在该方向上是增加还是减少。


11. Extension to Higher Dimensions | 高维推广

The concept extends directly to functions of n variables. If f: ℝⁿ → ℝ is differentiable at a point, and u is a unit vector in ℝⁿ, then:

该概念可直接推广到 n 元函数。若 f: ℝⁿ → ℝ 在某点可微,u 是 ℝⁿ 中的单位向量,则:

D_u f = ∇f · u = Σ_{i=1}^{n} (∂f/∂xᵢ) uᵢ

In IB, you will most often encounter n = 2 or n = 3, but the vector algebra remains the same. The gradient always points in the direction of fastest increase, and |∇f| gives the corresponding maximal rate.

在 IB 中常见的是 n = 2 或 n = 3,但向量代数完全相同。梯度始终指向增长最快的方向,|∇f| 给出相应的最大变化率。

When solving problems involving “arbitrary direction”, always confirm whether the direction vector has been normalized. If not, normalize it. This single step ensures the directional derivative has the correct physical interpretation of change per unit length.

在解决涉及“任意方向”的问题时,始终确认方向向量是否已规范化。如果没有,则进行规范化。这一步能确保方向导数具有“每单位长度变化率”的正确物理含义。


In summary, the directional derivative in an arbitrary direction is obtained by taking the dot product of the gradient with a unit vector pointing in that direction. The gradient encodes both the maximum rate of change and the direction in which it occurs. With practice, computing directional derivatives becomes a reliable tool for analyzing how multivariable functions behave along any path through space.

总结,任意方向的方向导数等于梯度与指向该方向的单位向量的点积。梯度既包含了最大变化率,也包含了最大变化率发生的方向。多加练习后,计算方向导数将成为分析多元函数沿空间中任意路径行为变化的可靠工具。

Published by TutorHao | IB Math Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version