Calculus – Functions of several variables – Directional derivatives and the gradient vector
Definition: If \(f\) is a function of two variables, then
\[D_{\mathbf{u}}f(a,b)=\lim\limits_{h\to0}\frac{f(a+hu_1,b+hu_2)-f(a,b)}{h}\]is called the directional derivative of \(f\) at the point \((a,b)\) in the direction of the unit vector \(\mathbf{u}=\langle u_1,u_2\rangle\).
Remark: The partial derivatives \(f_x\) and \(f_y\) are special cases:
\[f_x(a,b)=\lim\limits_{h\to0}\frac{f(a+h,b)-f(a,b)}{h}=D_{\mathbf{i}}(a,b)\quad\text{and}\quad f_y(a,b)=\lim\limits_{h\to0}\frac{f(a,b+h)-f(a,b)}{h}=D_{\mathbf{j}}(a,b).\]Theorem: If \(f\) is a differentiable function of \(x\) and \(y\), then \(f\) has a directional derivative in the direction of any unit vector \(\mathbf{u}=\langle u_1,u_2\rangle\) and
\[D_{\mathbf{u}}f(a,b)=f_x(a,b)u_1+f_y(a,b)u_2.\]Proof: If we define a function \(g\) of the single variable \(h\) by
\[g(h)=f(a+hu_1,b+hu_2),\]then we have, by definition, that
\[g'(0)=\lim\limits_{h\to0}\frac{g(h)-g(0)}{h}=\lim\limits_{h\to0}\frac{f(a+hu_1,b+hu_2)-f(a,b)}{h}=D_{\mathbf{u}}f(a,b).\]On the other hand we may write \(g(h)=f(x,y)\) with \(x=a+hu_1\) and \(y=b+hu_2\), which implies, by using the chain rule, that
\[g'(h)=\frac{\partial f}{\partial x}\cdot\frac{dx}{dh}+\frac{\partial f}{\partial y}\cdot\frac{dy}{dh}=f_x(x,y)u_1+f_y(x,y)u_2.\]If we now put \(h=0\), then \(x=a\) and \(y=b\), which implies that
\[g'(0)=f_x(a,b)u_1+f_y(a,b)u_2.\]This proves that \(D_{\mathbf{u}}f(a,b)=f_x(a,b)u_1+f_y(a,b)u_2\).
The gradient vector
Definition: If \(f\) is a function of two variables \(x\) and \(y\), then the gradient of \(f\) is the vector \(\nabla f\) defined by
\[\nabla f(x,y)=\langle f_x(x,y),f_y(x,y)\rangle=\frac{\partial f}{\partial x}\,\mathbf{i}+\frac{\partial f}{\partial y}\,\mathbf{j}.\]Using this notation, we now have:
\[D_{\mathbf{u}}f(x,y)=\nabla f(x,y)\cdot\mathbf{u}.\]Functions of three variables
Definition: If \(f\) is a function of three variables, then
\[D_{\mathbf{u}}f(a,b,c)=\lim\limits_{h\to0}\frac{f(a+hu_1,b+hu_2,c+hu_3)-f(a,b,c)}{h}\]is called the directional derivative of \(f\) at the point \((a,b,c)\) in the direction of the unit vector \(\mathbf{u}=\langle u_1,u_2,u_3\rangle\).
For a function \(f\) of three variables, the gradient vector is \(\nabla f(x,y,z)=\langle f_x(x,y,z),f_y(x,y,z)f_z(x,y,z)\rangle\).
Similarly, we then have: \(D_{\mathbf{u}}f(x,y,z)=\nabla f(x,y,z)\cdot\mathbf{u}\).
Functions of several variables
More general, using vector notation, we have
\[D_{\mathbf{u}}f(\mathbf{x})=\lim\limits_{h\to0}\frac{f(\mathbf{x}+h\mathbf{u})-h(\mathbf{x})}{h}.\]This is the directional derivative of \(f\) at the point \(\mathbf{x}\) in the direction of the unit vector \(\mathbf{u}\).
Maximizing the directional derivative
Theorem: If \(f\) is a differentiable function of two or three variables, then the maximum value of the directional derivative \(D_{\mathbf{u}}f(\mathbf{x})\) is \(|\nabla f(\mathbf{x})|\) and it occurs when \(\mathbf{u}\) has the same direction as the gradient vector \(\nabla f(\mathbf{x})\).
Note: The minimum value \(-\nabla f\) occurs when \(\mathbf{u}\) has the opposite direction of the gradient vector \(\nabla f\).
Proof: Note that
\[D_{\mathbf{u}}f=\nabla f\cdot\mathbf{u}=|\nabla f|\,|\mathbf{u}|\,\cos(\theta)=|\nabla f|\cos(\theta),\]where \(\theta\) is the angle between \(\nabla f\) and \(\mathbf{u}\). The maximum value of \(\cos(\theta)\) is \(1\) and this occurs when \(\theta=0\). Therefore the maximum value of \(D_{\mathbf{u}}f\) is \(|\nabla f|\) and it occurs when \(\theta=0\), that is, when \(\mathbf{u}\) has the same direction as \(\nabla f\).
The minimum value of \(\cos(\theta)\) is \(-1\) and this occurs when \(\theta=\pi\), so when \(\mathbf{u}\) has the opposite direction as \(\nabla f\).
Tangent planes to level surfaces
Suppose that \(S\) is a surface with equation \(F(x,y,z)=k\) and let \(P=(a,b,c)\) be a point on \(S\).
The gradient vector at \(P\), \(\nabla F(a,b,c)\), is perpendicular to the tangent plane to the level surface \(F(x,y,z)=k\) at \(P=(a,b,c)\).
This implies that this tangent plane is given by
\[F_x(a,b,c)(x-a)+F_y(a,b,c)(y-b)+F_z(a,b,c)(z-c)=0.\]Last modified on September 20, 2021