Directional Derivatives and the Gradient | 方向导数与梯度的关系

📚 Directional Derivatives and the Gradient | 方向导数与梯度的关系

The directional derivative measures how rapidly a multivariable function changes as we move along a specified direction. The gradient vector, meanwhile, packages all first-order partial derivatives into a single vector that points in the direction of steepest ascent. This article explores the crucial relationship between these two ideas — a concept that appears regularly in IB Analysis and Approaches HL Calculus and in first-year university mathematics.

方向导数量度多元函数沿某一给定方向的变化快慢;梯度向量则将函数的所有一阶偏导数整合为一个指向最快上升方向的向量。本文将深入探讨这两个概念之间的核心联系——这一内容在IB分析与方法HL微积分以及大学一年级数学中经常出现。

1. Notation and Prerequisites | 记号与预备知识

Suppose f(x, y) is a differentiable function of two variables. The partial derivatives fₓ and fᵧ are the rates of change along the positive x-axis and positive y-axis respectively. For a unit vector u, we write u = (u₁, u₂) with the condition u₁² + u₂² = 1. A unit vector can always be formed from any nonzero vector v by dividing by its magnitude: u = v / |v|.

设 f(x, y) 是二元可微函数。偏导数 fₓ 与 fᵧ 分别表示沿 x 轴正方向和 y 轴正方向的变化率。对于单位向量 u,我们记 u = (u₁, u₂),并且满足 u₁² + u₂² = 1。任何非零向量 v 都可以通过除以它的模长得到单位向量:u = v / |v|。

We also use the notation P = (x₀, y₀) for a fixed point, and θ for the angle between two vectors. The dot product of two vectors a = (a₁, a₂) and b = (b₁, b₂) is defined by a · b = a₁b₁ + a₂b₂ = |a||b| cos θ.

我们还用 P = (x₀, y₀) 表示固定点,用 θ 表示两个向量之间的夹角。两个向量 a = (a₁, a₂) 与 b = (b₁, b₂) 的点积定义为 a · b = a₁b₁ + a₂b₂ = |a||b| cos θ。


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

The directional derivative of f at a point P in the direction of a unit vector u is defined as the limit:

D_u f(P) = lim_{h→0} [f(P + h u) − f(P)] / h

Intuitively, we move a small distance h from P along the direction u and compare the new value of f with the original value. The quotient measures the average rate of change; the limit gives the instantaneous rate of change in that direction.

函数 f 在点 P 处沿单位向量 u 方向的方向导数定义为极限:

D_u f(P) = lim_{h→0} [f(P + h u) − f(P)] / h

直观上,我们从 P 出发沿方向 u 移动微小距离 h,再比较 f 的新值与旧值。该商表示平均变化率;取极限后即为沿该方向的瞬时变化率。

If f is differentiable, the directional derivative can be computed without limits:

D_u f(P) = fₓ(P) u₁ + fᵧ(P) u₂

This formula is valid for any unit vector u = (u₁, u₂). For a three-variable function f(x, y, z), the analogous expression is D_u f(P) = fₓ u₁ + fᵧ u₂ + f_z u₃.

若 f 可微,则方向导数可以不通过极限直接计算:

D_u f(P) = fₓ(P) u₁ + fᵧ(P) u₂

该公式对任意单位向量 u = (u₁, u₂) 都成立。对于三元函数 f(x, y, z),相应的表达式为 D_u f(P) = fₓ u₁ + fᵧ u₂ + f_z u₃。


3. Definition of the Gradient Vector | 梯度向量的定义

For a differentiable function f(x, y), the gradient of f, denoted ∇f or grad f, is the vector of all first-order partial derivatives:

∇f(x, y) = (fₓ(x, y), fᵧ(x, y))

For a three-variable function f(x, y, z), the gradient is the three-component vector:

∇f(x, y, z) = (fₓ, fᵧ, f_z)

Each component of the gradient is itself a function of the independent variables. When we evaluate ∇f at a specific point P, we obtain a concrete vector whose direction and magnitude carry geometric meaning.

对于可微函数 f(x, y),f 的梯度记为 ∇f 或 grad f,它是由所有一阶偏导数构成的向量:

∇f(x, y) = (fₓ(x, y), fᵧ(x, y))

对于三元函数 f(x, y, z),梯度是一个三分量向量:

∇f(x, y, z) = (fₓ, fᵧ, f_z)

梯度的每个分量本身是自变量的函数。当我们把 ∇f 在具体点 P 处取值时,就得到一个有确定方向和长度的向量,这个向量具有重要的几何含义。


4. The Fundamental Relationship | 基本关系式

The key identity connecting directional derivatives and the gradient is:

D_u f(P) = ∇f(P) · u = |∇f(P)| cos θ

where θ is the angle between the gradient vector ∇f(P) and the unit direction vector u. This single formula contains three equivalent viewpoints: the algebraic dot product, the component sum, and the geometric projection of ∇f onto the direction u.

联系方向导数与梯度的核心恒等式是:

D_u f(P) = ∇f(P) · u = |∇f(P)| cos θ

其中 θ 是梯度向量 ∇f(P) 与单位方向向量 u 之间的夹角。这一个公式包含了三个等价视角:代数点积、分量求和,以及 ∇f 在方向 u 上的几何投影。

Because |u| = 1, the dot product simplifies exactly to the projection length. The maximum possible value of D_u f(P) is therefore |∇f(P)|, achieved when cos θ = 1, i.e. when u points in the same direction as ∇f(P).

因为 |u| = 1,点积恰好化简为投影长度。因此 D_u f(P) 的最大可能值为 |∇f(P)|,在 cos θ = 1 时达到,即 u 与 ∇f(P) 同向时。


5. Why the Dot Product Works | 为什么点积成立

The identity follows from the chain rule. Define a single-variable function g(t) = f(P + t u), where P is fixed and u is a unit vector. Then g'(0) is precisely the directional derivative D_u f(P), because t measures distance along the direction u.

这一恒等式可由链式法则推出。定义一元函数 g(t) = f(P + t u),其中 P 固定,u 是单位向量。那么 g'(0) 恰好就是方向导数 D_u f(P),因为 t 度量的是沿方向 u 的距离。

Writing P + t u = (x₀ + t u₁, y₀ + t u₂), the chain rule gives:

g'(t) = fₓ x'(t) + fᵧ y'(t) = fₓ u₁ + fᵧ u₂ = ∇f(P + t u) · u

Setting t = 0 yields g'(0) = ∇f(P) · u, which is exactly the directional derivative.

记 P + t u = (x₀ + t u₁, y₀ + t u₂),由链式法则得:

g'(t) = fₓ x'(t) + fᵧ y'(t) = fₓ u₁ + fᵧ u₂ = ∇f(P + t u) · u

令 t = 0,得到 g'(0) = ∇f(P) · u,这正是方向导数。

Geometrically, ∇f(P) · u is the length of the projection of ∇f(P) onto the line spanned by u. Thus the directional derivative answers the question: “If the steepest slope vector is ∇f, how much of that steepness points in my chosen direction?”

从几何上看,∇f(P) · u 是 ∇f(P) 在 u 张成的直线上投影的长度。因此方向导数回答的问题是:“如果最陡坡度向量是 ∇f,那么该陡度在所选方向上有多少分量?”


6. Direction of Maximum Increase | 最大增加方向

Because D_u f(P) = |∇f(P)| cos θ, we can deduce three important facts:

由于 D_u f(P) = |∇f(P)| cos θ,我们可以得出三个重要结论:

  • The directional derivative is maximised when u is parallel to ∇f(P); the maximum rate of increase is |∇f(P)|.

    当 u 与 ∇f(P) 平行时,方向导数最大;最大增长率为 |∇f(P)|。

  • The directional derivative is minimised when u is opposite to ∇f(P); the minimum value is −|∇f(P)|.

    当 u 与 ∇f(P) 方向相反时,方向导数最小;最小值为 −|∇f(P)|。

  • The directional derivative is zero when u is perpendicular to ∇f(P); this occurs when u is tangent to a level curve of f.

    当 u 与 ∇f(P) 垂直时,方向导数为零;此时 u 与 f 的等高线相切。

This explains why the gradient is often called the “steepest ascent” vector. If you stand at a point on a hillside described by z = f(x, y), the direction in which the ground rises fastest is exactly ∇f.

这就解释了为什么梯度常被称为“最陡上升”向量。如果你站在由 z = f(x, y) 描述的山坡上某点,地面上升最快的方向正是 ∇f 的方向。


7. Gradient and Level Curves | 梯度与等高线

A level curve of f is a set of points satisfying f(x, y) = c for a constant c. Along such a curve, the value of f never changes, so the directional derivative in the tangent direction T must be zero: ∇f(P) · T = 0.

f 的等高线是满足 f(x, y) = c(c 为常数)的点集。沿等高线,f 的值不变,因此沿切线方向 T 的方向导数必为零:∇f(P) · T = 0。

Since the dot product is zero and T is nonzero, ∇f(P) must be perpendicular to T. Therefore the gradient vector at P is normal to the level curve through P.

因为点积为零且 T 非零,所以 ∇f(P) 必与 T 垂直。因此,P 点处的梯度向量垂直于过 P 的等高线。

This property is extremely useful for finding tangent lines and normal lines. For a curve given implicitly by f(x, y) = c, the tangent line at P has equation ∇f(P) · (x − x₀, y − y₀) = 0, i.e. fₓ(P)(x − x₀) + fᵧ(P)(y − y₀) = 0.

这一性质在求切线和法线时极其有用。对于由 f(x, y) = c 隐式给出的曲线,在 P 点的切线方程为 ∇f(P) · (x − x₀, y − y₀) = 0,即 fₓ(P)(x − x₀) + fᵧ(P)(y − y₀) = 0。

The same idea extends to three dimensions: the gradient ∇f(P) is normal to the level surface f(x, y, z) = c at P. This is why the equation of the tangent plane can be written as fₓ(P)(x − x₀) + fᵧ(P)(y − y₀) + f_z(P)(z − z₀) = 0.

同样的思想可以推广到三维:∇f(P) 垂直于过 P 的等值面 f(x, y, z) = c。这也是为什么切平面方程可以写成 fₓ(P)(x − x₀) + fᵧ(P)(y − y₀) + f_z(P)(z − z₀) = 0。


8. Worked Examples | 实例分析

Example 1. Let f(x, y) = x² + y², and let P = (1, 2). Find the directional derivative of f at P in the direction of the unit vector u = (3/5, 4/5).

例 1. 设 f(x, y) = x² + y²,P = (1, 2)。求 f 在 P 处沿单位向量 u = (3/5, 4/5) 方向的方向导数。

The gradient is ∇f = (2x, 2y), so at P we have ∇f(1, 2) = (2, 4). Then:

D_u f(P) = (2, 4) · (3/5, 4/5) = 2 × 3/5 + 4 × 4/5 = 6/5 + 16/5 = 22/5

Thus the function increases at a rate of 22/5 per unit distance in that direction.

梯度为 ∇f = (2x, 2y),所以 ∇f(1, 2) = (2, 4)。于是:

D_u f(P) = (2, 4) · (3/5, 4/5) = 2 × 3/5 + 4 × 4/5 = 6/5 + 16/5 = 22/5

因此函数沿该方向每单位距离增加 22/5。

Example 2. Let f(x, y) = x eʸ, and let P = (2, 0). Find the directional derivative in the direction making a 60° angle with the positive x-axis.

例 2. 设 f(x, y) = x eʸ,P = (2, 0)。求沿与 x 轴正方向成 60° 角方向的方向导数。

The unit vector is u = (cos 60°, sin 60°) = (1/2, √3/2). The gradient is ∇f = (eʸ, x eʸ), so ∇f(2, 0) = (1, 2). Thus:

D_u f(P) = (1, 2) · (1/2, √3/2) = 1/2 + √3

This is the instantaneous rate of change of f as we move away from P at 60° from the x-axis.

单位向量为 u = (cos 60°, sin 60°) = (1/2, √3/2)。梯度为 ∇f = (eʸ, x eʸ),所以 ∇f(2, 0) = (1, 2)。因此:

D_u f(P) = (1, 2) · (1/2, √3/2) = 1/2 + √3

这就是 f 从 P 出发沿与 x 轴成 60° 方向运动时的瞬时变化率。

Example 3. For f(x, y) = sin x + x y at P = (0, 1), find the direction of steepest ascent and the maximum rate of increase.

例 3. 对于 f(x, y) = sin x + x y 在 P = (0, 1) 处,求最陡上升方向及最大增长率。

Compute ∇f = (cos x + y, x). At P, ∇f(0, 1) = (1 + 1, 0) = (2, 0). The direction of steepest ascent is therefore the unit vector (1, 0), and the maximum rate is |∇f| = 2.

计算 ∇f = (cos x + y, x)。在 P 处,∇f(0, 1) = (1 + 1, 0) = (2, 0)。因此最陡上升方向是单位向量 (1, 0),最大增长率为 |∇f| = 2。


9. Common Pitfalls in IB Exams | IB考试常见误区

Students often lose marks on directional-derivative questions for predictable reasons. The table below summarises the most frequent errors and how to avoid them.

学生在方向导数题目中常因一些可预见的原因失分。下表总结了最常见的错误及避免方法。

Common mistake | 常见错误 Correct approach | 正确做法
Using a non-unit direction vector without normalising Always divide the given direction vector by its magnitude first
使用未归一化的方向向量 先将给定方向向量除以它的模长
Swapping the order of partial derivatives in ∇f Remember ∇f = (∂f/∂x, ∂f/∂y); check the first component is the x-derivative
在 ∇f 中调换偏导数顺序 记住 ∇f = (∂f/∂x, ∂f/∂y);确认第一个分量是 x 偏导
Confusing |∇f| with ∇f itself Use |∇f| only when giving the maximum rate, not the direction
混淆 |∇f| 与 ∇f 本身 只有在给出最大变化率时才用 |∇f|,指明方向时用 ∇f
Forgetting the minus sign in the minimal directional derivative The steepest descent direction is −∇f; the rate is −|∇f|
忘记最小方向导数中的负号 最陡下降方向是 −∇f;变化率为 −|∇f|

10. Summary | 总结

The relationship between directional derivatives and the gradient is one of the most elegant results in multivariable calculus. Here is a compact review:

方向导数与梯度的关系是多元微积分中最优美的结果之一。以下是简明总结:

  • D_u f(P) = ∇f(P) · u for every unit vector u.

    对任意单位向量 u,D_u f(P) = ∇f(P) · u。

  • ∇f(P) points in the direction of greatest increase, and |∇f(P)| is the maximum rate of increase.

    ∇f(P) 指向最大增加方向,|∇f(P)| 是最大增长率。

  • ∇f(P) is perpendicular to the level curve (or level surface) passing through P.

    ∇f(P) 垂直于过 P 的等高线(或等值面)。

  • The directional derivative in the direction of a unit vector u is the projection of ∇f(P) onto u.

    沿单位向量 u 的方向导数是 ∇f(P) 在 u 上的投影。

Mastering these facts will help you solve IB HL calculus problems quickly and confidently. Always normalise direction vectors, compute the gradient correctly, and interpret the dot product geometrically.

掌握这些事实将帮助你在IB HL微积分问题中快速而自信地解题。务必归一化方向向量、正确计算梯度,并从几何角度理解点积。

Published by TutorHao | Mathematics Revision Series | aleveler.com

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

Comments

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

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