Explanation:
Find the directional derivative for the function:
\(\displaystyle f(x,y)=ln(xy)+ye^x\)
in the direction of the vector
\(\displaystyle \vec{u}=2\hat{i}+\hat{j}\)
Find the gradient of
\(\displaystyle f(x,y)\)
The gradient by definition is the vector:
\(\displaystyle \vec{\bigtriangledown} f(x,y)=\frac{\partial}{\partial x}f(x,y)\hat{i}+\frac{\partial}{\partial y}f(x,y)\hat{j}\) (1)
______________________________________________________________
Differentiate with respect to
\(\displaystyle x\) while holding
\(\displaystyle y\) constant:
\(\displaystyle \frac{\partial}{\partial x}f(x,y)=\frac{\partial}{\partial x}\left[\ln(xy)+ye^x\right ]=\frac{y}{xy}+ye^x\)
\(\displaystyle \frac{\partial}{\partial x}f(x,y)=\frac{1}{x}+ye^x\)
______________________________________________________________
Differentiate with respect to
\(\displaystyle y\) while holding
\(\displaystyle x\) constant:
\(\displaystyle \frac{\partial}{\partial y}f(x,y)=\frac{\partial}{\partial y}\left[\ln(xy)+ye^x\right ]=\frac{x}{xy}+e^x\)
\(\displaystyle \frac{\partial}{\partial y}f(x, y)=\frac{1}{y}+e^x\)
______________________________________________________________
Enter the components of the gradient, writing in the form of Equation (1)
\(\displaystyle \vec{\bigtriangledown}f(x,y)=\left(\frac{1}{x}+ye^x\right)\hat{i}+ \left(\frac{1}{y}+e^x\right)\hat{j}\)
_______________________________________________________________
Find the unit vector in the direction of
\(\displaystyle \vec{u}\)
\(\displaystyle \vec{u}=2\hat{i}+\hat{j}\)
Divide the vector by its' magnitude
\(\displaystyle \left \| \vec{u}\right \|\) to obtain the unit vector
\(\displaystyle \hat{u}\),
\(\displaystyle \hat{u}=\frac{\vec{u}}{\left \| \vec{u}\right \|} =\frac{\vec{u}}{\sqrt{2^2+1^2}}=\frac{2\hat{i}+\hat{j}}{\sqrt{5}}\)
\(\displaystyle \hat{u}=\frac{\sqrt{5}}{5}(2\hat{i}+\hat{j})\)
You can check the magnitude of the unit vector and see that it is equal to 1 as required. It also has the same direction as the original vector
\(\displaystyle \vec{u}\).
_______________________________________________________________
The directional derivative of
\(\displaystyle f(x,y)\) in the direction of the vector
\(\displaystyle \hat{u}\) is the dot product of the gradient
\(\displaystyle \vec{\bigtriangledown} f(x,y)\) and
\(\displaystyle \hat{u}\). Dot products are also referred to as "projections," since the give the component of some vector in the direction of another.
\(\displaystyle D_uf(x,y)= \vec{\bigtriangledown} f(x,y)\cdot \hat{u}\)
\(\displaystyle D_uf(x,y)= \left[ \left(\frac{1}{x}+ye^x\right)\hat{i}+ \left(\frac{1}{y}+e^x\right)\hat{j}\right]\cdot\left[\frac{2\sqrt{5}}{5}\hat{i}+\frac{\sqrt{5}}{5}\hat{j}\right]\)
\(\displaystyle D_uf(x,y) =\frac{\sqrt{5}}{5}\left[\left(\frac{2}{x}+2ye^x\right)+ \left(\frac{1}{y}+e^x\right) \right ]\)
\(\displaystyle D_uf(x,y) =\frac{\sqrt{5}}{5}\left[ e^x(2y+1)+\frac{1}{y}+\frac{2}{x} \right]\)
\(\displaystyle D_uf(x,y) =\frac{\sqrt{5}}{5}\left[ \frac{xye^x(2y+1)+x+2y}{xy}\right]\)