This is a beta course, so its structure, chapters, and examples may continue to change.
Directional Derivatives and Gradients
Directional Derivatives
定义
定义是对概念、术语或对象含义的精确描述。理解定义是学习任何知识领域的基础,每个概念都有其明确的定义。
Let z = f ( x , y ) z = f(x, y) z = f ( x , y ) be defined on a neighborhood of P 0 ( x 0 , y 0 ) P_0(x_0, y_0) P 0 ( x 0 , y 0 ) , and let l ⃗ = ( cos α , cos β ) \vec{l} = (\cos\alpha, \cos\beta) l = ( cos α , cos β ) be a unit direction vector. If the limit
lim t → 0 + f ( x 0 + t cos α , y 0 + t cos β ) − f ( x 0 , y 0 ) t \lim_{t \to 0^+} \frac{f(x_0 + t\cos\alpha, y_0 + t\cos\beta) - f(x_0, y_0)}{t} lim t → 0 + t f ( x 0 + t c o s α , y 0 + t c o s β ) − f ( x 0 , y 0 )
exists, it is called the directional derivative of f f f at P 0 P_0 P 0 in the direction l ⃗ \vec{l} l , written ∂ f ∂ l ∣ P 0 \frac{\partial f}{\partial l}\big|_{P_0} ∂ l ∂ f P 0 .
The directional derivative measures the rate of change in a specified direction: ∂ f ∂ l > 0 \frac{\partial f}{\partial l} > 0 ∂ l ∂ f > 0 means f f f increases along l ⃗ \vec{l} l , and < 0 < 0 < 0 means it decreases. Note it is a one-sided limit (t → 0 + t \to 0^+ t → 0 + ), whereas partial derivatives are two-sided.
For u = f ( x , y , z ) u = f(x, y, z) u = f ( x , y , z ) along l ⃗ = ( cos α , cos β , cos γ ) \vec{l} = (\cos\alpha, \cos\beta, \cos\gamma) l = ( cos α , cos β , cos γ ) :
∂ f ∂ l = lim t → 0 + f ( x 0 + t cos α , y 0 + t cos β , z 0 + t cos γ ) − f ( x 0 , y 0 , z 0 ) t \frac{\partial f}{\partial l} = \lim_{t \to 0^+} \frac{f(x_0 + t\cos\alpha, y_0 + t\cos\beta, z_0 + t\cos\gamma) - f(x_0, y_0, z_0)}{t} ∂ l ∂ f = lim t → 0 + t f ( x 0 + t c o s α , y 0 + t c o s β , z 0 + t c o s γ ) − f ( x 0 , y 0 , z 0 )
数学定理
定理是数学中经过严格证明的命题,是数学推理的基础。定理通常包含条件和结论,是数学知识体系的重要组成部分。
定理 1
If z = f ( x , y ) z = f(x, y) z = f ( x , y ) is differentiable at P 0 P_0 P 0 , then the directional derivative in every direction l ⃗ = ( cos α , cos β ) \vec{l} = (\cos\alpha, \cos\beta) l = ( cos α , cos β ) exists, and
∂ f ∂ l = f x ( x 0 , y 0 ) cos α + f y ( x 0 , y 0 ) cos β \frac{\partial f}{\partial l} = f_x(x_0, y_0)\cos\alpha + f_y(x_0, y_0)\cos\beta ∂ l ∂ f = f x ( x 0 , y 0 ) cos α + f y ( x 0 , y 0 ) cos β
For three variables: ∂ f ∂ l = f x cos α + f y cos β + f z cos γ \frac{\partial f}{\partial l} = f_x\cos\alpha + f_y\cos\beta + f_z\cos\gamma ∂ l ∂ f = f x cos α + f y cos β + f z cos γ .
Key relation : differentiable ⇒ \Rightarrow ⇒ directional derivatives exist in every direction. But directional derivatives existing in every direction does not imply differentiability, nor even that partial derivatives exist. A classic example is f ( x , y ) = ∣ x y ∣ f(x,y)=\sqrt{|xy|} f ( x , y ) = ∣ x y ∣ , which has directional derivatives in every direction at the origin but is not differentiable there.
Relation to Partial Derivatives
Along the positive x x x -axis, ∂ f ∂ l = f x \frac{\partial f}{\partial l} = f_x ∂ l ∂ f = f x ; along the positive y y y -axis, ∂ f ∂ l = f y \frac{\partial f}{\partial l} = f_y ∂ l ∂ f = f y . Along the negative directions, the directional derivative is the negative of the corresponding partial derivative.
Gradient
定义
定义是对概念、术语或对象含义的精确描述。理解定义是学习任何知识领域的基础,每个概念都有其明确的定义。
Let z = f ( x , y ) z = f(x, y) z = f ( x , y ) have first partial derivatives at ( x , y ) (x, y) ( x , y ) . The vector
∇ f ( x , y ) = ( ∂ f ∂ x , ∂ f ∂ y ) = f x i ⃗ + f y j ⃗ \nabla f(x, y) = \left( \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y} \right) = f_x \vec{i} + f_y \vec{j} ∇ f ( x , y ) = ( ∂ x ∂ f , ∂ y ∂ f ) = f x i + f y j
is called the gradient of f f f at ( x , y ) (x, y) ( x , y ) , written ∇ f \nabla f ∇ f or grad f \text{grad}\, f grad f .
Here ∇ = ( ∂ ∂ x , ∂ ∂ y ) \nabla = \left( \frac{\partial}{\partial x}, \frac{\partial}{\partial y} \right) ∇ = ( ∂ x ∂ , ∂ y ∂ ) is the Nabla (Hamilton) operator .
For u = f ( x , y , z ) u = f(x, y, z) u = f ( x , y , z ) :
∇ f = ( ∂ f ∂ x , ∂ f ∂ y , ∂ f ∂ z ) \nabla f = \left( \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z} \right) ∇ f = ( ∂ x ∂ f , ∂ y ∂ f , ∂ z ∂ f )
The magnitude of the gradient is
∣ ∇ f ∣ = f x 2 + f y 2 (two variables) , ∣ ∇ f ∣ = f x 2 + f y 2 + f z 2 (three variables) |\nabla f| = \sqrt{f_x^2 + f_y^2} \quad \text{(two variables)}, \qquad |\nabla f| = \sqrt{f_x^2 + f_y^2 + f_z^2} \quad \text{(three variables)} ∣∇ f ∣ = f x 2 + f y 2 (two variables) , ∣∇ f ∣ = f x 2 + f y 2 + f z 2 (three variables)
Gradient and Directional Derivative
数学定理
定理是数学中经过严格证明的命题,是数学推理的基础。定理通常包含条件和结论,是数学知识体系的重要组成部分。
定理 2
If f f f is differentiable at P P P and l ⃗ \vec{l} l is any unit direction vector, then
∂ f ∂ l = ∇ f ⋅ l ⃗ = ∣ ∇ f ∣ cos θ \frac{\partial f}{\partial l} = \nabla f \cdot \vec{l} = |\nabla f| \cos\theta ∂ l ∂ f = ∇ f ⋅ l = ∣∇ f ∣ cos θ
where θ \theta θ is the angle between the gradient ∇ f \nabla f ∇ f and the direction l ⃗ \vec{l} l .
Core properties of the gradient :
The gradient points in the direction of steepest increase of f f f ; − ∇ f -\nabla f − ∇ f points in the direction of steepest decrease.
The maximum rate of increase is ∣ ∇ f ∣ |\nabla f| ∣∇ f ∣ , attained when l ⃗ \vec{l} l is parallel to ∇ f \nabla f ∇ f .
The gradient of f f f at a point is perpendicular to the level curve/surface passing through that point.
Geometric Applications: Tangent Plane and Normal Line
Tangent Plane to a Surface z = f ( x , y ) z = f(x, y) z = f ( x , y )
Tangent Plane to a Level Surface F ( x , y , z ) = 0 F(x,y,z)=0 F ( x , y , z ) = 0
Worked Examples
Example 1: Directional Derivative
Find the directional derivative of z = x 2 + y 2 z = x^2 + y^2 z = x 2 + y 2 at ( 1 , 2 ) (1, 2) ( 1 , 2 ) in the direction l ⃗ = ( 1 , 1 ) \vec{l} = (1, 1) l = ( 1 , 1 ) .
Answer and Explanation (2 个标签)
directional derivative unit vector
Detailed steps :
Normalize: l ⃗ 0 = ( 1 2 , 1 2 ) \vec{l}^0 = (\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}) l 0 = ( 2 1 , 2 1 )
f x = 2 x , f y = 2 y f_x = 2x, f_y = 2y f x = 2 x , f y = 2 y ; at ( 1 , 2 ) (1,2) ( 1 , 2 ) , f x = 2 , f y = 4 f_x=2, f_y=4 f x = 2 , f y = 4
∂ f ∂ l = 2 ⋅ 1 2 + 4 ⋅ 1 2 = 3 2 \frac{\partial f}{\partial l} = 2\cdot\frac{1}{\sqrt{2}} + 4\cdot\frac{1}{\sqrt{2}} = 3\sqrt{2} ∂ l ∂ f = 2 ⋅ 2 1 + 4 ⋅ 2 1 = 3 2
Answer : 3 2 3\sqrt{2} 3 2 .
Example 2: Three-Variable Directional Derivative
Find the directional derivative of u = x y z u = xyz u = x y z at ( 1 , 1 , 1 ) (1,1,1) ( 1 , 1 , 1 ) in the direction l ⃗ = ( 2 , − 1 , 2 ) \vec{l} = (2,-1,2) l = ( 2 , − 1 , 2 ) .
Answer and Explanation (2 个标签)
directional derivative three variables
Detailed steps :
Normalize: ∣ l ⃗ ∣ = 3 |\vec{l}|=3 ∣ l ∣ = 3 , so l ⃗ 0 = ( 2 3 , − 1 3 , 2 3 ) \vec{l}^0 = (\frac{2}{3}, -\frac{1}{3}, \frac{2}{3}) l 0 = ( 3 2 , − 3 1 , 3 2 )
u x = y z , u y = x z , u z = x y u_x=yz, u_y=xz, u_z=xy u x = y z , u y = x z , u z = x y ; each equals 1 at ( 1 , 1 , 1 ) (1,1,1) ( 1 , 1 , 1 )
∂ u ∂ l = 2 3 − 1 3 + 2 3 = 1 \frac{\partial u}{\partial l} = \frac{2}{3} - \frac{1}{3} + \frac{2}{3} = 1 ∂ l ∂ u = 3 2 − 3 1 + 3 2 = 1
Answer : 1 1 1 .
Example 3: Gradient and Steepest Ascent
Find the direction and magnitude of steepest ascent of f ( x , y ) = x 2 + y 2 f(x, y) = x^2 + y^2 f ( x , y ) = x 2 + y 2 at ( 1 , 1 ) (1, 1) ( 1 , 1 ) .
Answer and Explanation (2 个标签)
gradient steepest ascent
Detailed steps :
∇ f = ( 2 x , 2 y ) \nabla f = (2x, 2y) ∇ f = ( 2 x , 2 y ) , so ∇ f ( 1 , 1 ) = ( 2 , 2 ) \nabla f(1,1) = (2, 2) ∇ f ( 1 , 1 ) = ( 2 , 2 )
The direction of steepest increase is ( 1 , 1 ) (1,1) ( 1 , 1 ) (normalized ( 1 2 , 1 2 ) (\frac{1}{\sqrt2},\frac{1}{\sqrt2}) ( 2 1 , 2 1 ) )
The maximum rate of increase is ∣ ∇ f ( 1 , 1 ) ∣ = 4 + 4 = 2 2 |\nabla f(1,1)| = \sqrt{4+4} = 2\sqrt{2} ∣∇ f ( 1 , 1 ) ∣ = 4 + 4 = 2 2
Answer : direction ( 1 , 1 ) (1,1) ( 1 , 1 ) , maximum rate 2 2 2\sqrt{2} 2 2 .
Summary
Symbols Used in This Article
Symbol Type Reading/Explanation Meaning in This Article l ⃗ \vec{l} l vector l The direction vector cos α , cos β \cos\alpha, \cos\beta cos α , cos β numbers cosine alpha, cosine beta Direction cosines of l ⃗ \vec{l} l ∂ f ∂ l \frac{\partial f}{\partial l} ∂ l ∂ f directional derivative partial f partial l The rate of change in direction l ⃗ \vec{l} l ∇ f \nabla f ∇ f vector nabla f The gradient of f f f θ \theta θ Greek letter theta The angle between ∇ f \nabla f ∇ f and l ⃗ \vec{l} l
English–Chinese Glossary
English term Chinese term Phonetic Explanation directional derivative 方向导数 /dɪˌrekʃənl dɪˈrɪvətɪv/ Rate of change in a specified direction gradient 梯度 /ˈɡreɪdiənt/ The vector of all first partial derivatives Nabla operator 哈密顿算子 /ˈnɑːblə ˈɒpəreɪtə/ The vector differential operator ∇ \nabla ∇ steepest ascent 最速上升 /ˈstiːpɪst əˈsent/ The direction of fastest increase tangent plane 切平面 /ˈtændʒənt pleɪn/ The plane best approximating a surface at a point normal line 法线 /ˈnɔːml laɪn/ The line perpendicular to a surface/tangent plane level surface 等值面 /ˈlɛvəl ˈsɜːrfɪs/ A surface of constant function value