5.94 How to find directional derivative of scalar function?

Given \(f(x,y,z)=x^2 z+y^3 z^2-xyz\) we want to find its directional derivative along the vector \(n\).

One way

n:=<-1,0,3>; 
g:=VectorCalculus[Gradient](x^2*z+y^3*z^2-x*y*z, [x,y,z]); 
Student[VectorCalculus][DotProduct](g,n/LinearAlgebra[Norm](n,2))
 

Gives

\[ -{\frac { \left ( 2\,xz-yz \right ) \sqrt {10}}{10}}+{\frac { \left ( 6\,{y}^{3}z+3\,{x}^{2}-3\,xy \right ) \sqrt {10}}{10}} \]

Another is

Student[MultivariateCalculus][DirectionalDerivative](x^2*z+y^3*z^2-x*y*z, [x,y,z], [-1,0,3]);
 

Gives the same result.