0:00 / 0:00

Directional Derivative & Gradient Vector

Directional derivatives allow us to represent a rate of change as both x and y vary. It is the rate of change of f(x, y) in the direction of the unit vector u1= <a, b> \vec{u_1}=~<a,~b>~:
f(x, y)=Duf(x, y)=fx(x, y)a + fy(x, y)b\color{blue}\nabla f(x,~y)= D_{\vec{u}}f(x,~y)=f_x(x,~y)a~+~f_y(x,~y)b
Or, if it is in 3D, then u2= <a, b, c> \vec{u_2}=~<a,~b,~c>~and:
f(x, y, z)=Duf(x, y, z)=fx(x, y, z)a + fy(x, y, z)b+fz(x, y, z)c\color{blue}\nabla f(x,~y,~z)= D_{\vec{u}}f(x,~y,~z)=f_x(x,~y,~z)a~+~f_y(x,~y,~z)b+f_z(x,~y,~z)c

Wize Tip
If the direction of the change is an angle, then the unit vector becomes  u= <cosθ, sinθ>~\vec{u}=~<cos\theta,~sin\theta>

We can also represent the directional derivative as:
f(x,y,z)= <fx, fy, fz><a, b, c>\color{blue}\nabla f(x,y,z)=~<f_x,~f_y,~f_z>\cdot <a,~b,~c>
where <fx, fy, fz> <f_x,~f_y,~f_z>~is called the gradient vector. The gradient vector, denoted f= <fx, fy, fz>, \nabla{f}=~<f_x,~f_y,~f_z>,~is the maximum value of the direction derivative of a function, f, and hence, the maximum rate of change of the function, which is given by:
f\color{blue}|\nabla{f}|
and it occurs when the unit vector u\vec u is in the direction of the gradient vector. This is because:
Duf(x,y,z)=f(x,y,z)u=fucosθ=fcosθ\color{blue}D_u f(x,y,z)=\nabla f(x,y,z)\cdot\vec u=|\nabla f||\vec u|\cos\theta=|\nabla f|\cos\theta
Since the maximum value of cosθ \cos\theta~is 1, the maximum value of the directional derivative is f|\nabla f|.Also, when θ=0\theta=0, then the vector u \vec{u}~has the same direction as f.|\nabla{f}|.


Wize Concept
f(x0, y0, z0) \nabla{f}(x_0,~y_0,~z_0)~is orthogonal to the level curve f(x, y, k)=0 f(x,~y,~k)=0~at some point (x0, y0, z0).(x_0,~y_0,~z_0).

0:00 / 0:00

Example

Calculate the directional derivative of f(x,y)=x2y3+xyf\left(x,y\right)=x^2y^3+\sqrt{xy} in the direction of a vector which makes an angle θ=π3\theta=\frac{\pi}{3} with the positive xx-axis.

u^=(12,32)f=(fx,fy)=(2xy3+12xyy,3x2y2+12xyx)\hat{u}=\displaystyle(\frac{1}{2},\frac{\sqrt{3}}{2})\newline{}\newline{} \overrightarrow{\nabla}f=(f_x,f_y)=\left(2xy^3+\frac{1}{2\sqrt{xy}}y,3x^2y^2+\frac{1}{2\sqrt{xy}}x\right)



Duf=fu^=12[2xy3+y2xy]+32[3x2y2+x2xy]D_uf=\overrightarrow{\nabla}f\cdot\hat{u}=\frac{1}{2}[2xy^3+\frac{y}{2\sqrt{xy}}]+\frac{\sqrt{3}}{2}[3x^2y^2+\frac{x}{2\sqrt{xy}}]
0:00 / 0:00

Example

What is the f(1, 0) \nabla{f(1,~0)}~where f(x, y)=2x2ey+xy f(x,~y)=2x^2e^y+xy~and u \vec{u}~is the unit vector in the direction of θ=5π6.\theta=\frac{5\pi}{6}.

First, let's find the unit vector:
u= <cos5π6, sin5π6>=<32, 12>\vec{u}=~<cos{\frac{5\pi}{6}},~sin{\frac{5\pi}{6}}>\newline{}\newline{} =<-\frac{\sqrt{3}}{2},~\frac{1}{2}>
Second, we need to find fx & fy:f_x~\&~f_y:
fx(x, y)=4xey+y          fx(1, 0)=4fy(x, y)=2x2ey+x          fy(1, 0)=3f_x(x,~y)=4xe^y+y~~~~~{\color{red}\rightarrow}~~~~~f_x(1,~0)=4\newline f_y(x,~y)=2x^2e^y+x~~~~~{\color{red}\rightarrow}~~~~~f_y(1,~0)=3
Then, we can substitute our values into:
f(x, y)=Duf(x, y)=fx(x, y)a+fy(x, y)bf(1,0)=Duf(1, 0)=fx(1,0)a+fy(1, 0)b=4(32)+3(12)=23 + 32\nabla{f(x,~y)}=D_{\vec{u}}f(x,~y)=f_x(x,~y)a+f_y(x,~y)b\newline{}\newline{} \nabla{f(1,0)}=D_{\vec{u}}f(1,~0)=f_x(1,0)a+f_y(1,~0)b\newline{}\newline{}=4\Big(-\frac{\sqrt{3}}{2}\Big)+3\Big(\frac{1}{2}\Big)\newline{}\newline{} =-2\sqrt{3}~+~\frac{3}{2}

Practice

Let a= <1, 2>\vec{a}=~<1,~2> and b= <5, 3>\vec{b}=~<5,~-3> and let ff be a differentiable function of (x, y).

Suppose at a point P(x0, y0, z0) P(x_0,~y_0,~z_0)~the directional derivative is in the direction of a \vec{a}~is 5 \sqrt{5}~and the directional derivative of b \vec{b}~is 34. \sqrt{34}.~

What is fx f_x~and fy f_y~at (x0, y0)?(x_0,~y_0)?

Practice

Calculate Dvf(x, y, z) D_{\vec{v}}f(x,~y,~z)~where f(x, y, z)=9x13z12+y1010 f(x,~y,~z)=9x^{\frac{1}{3}}z^{\frac{1}{2}}+\frac{y^{10}}{\sqrt{10}}~in the direction of v= <1, 0, 1>.\vec{v}=~<-1,~0,~1>.