For a scalar field $f(r)=\cos(x) + 3\sin(y)+4\cos(z)$ is the gradient just $-\sin(x) +3\cos(y)-4\sin(z)$?
or is it $(-\sin(x),3\cos(y),-4\sin(z))$?
In terms the directional vector of f in the direction of â does the directional vector need to be <= sqr(26)?
The gradient of a scalar field is a vector field, whose magnitude is the rate of change and which points in the direction of the greatest rate of increase of the scalar field. Thus for the three dimensional scalar field $\phi(x,y,z)=\cos(x) + 3\sin(y)+4\cos(z)$, we have $$\text{grad}\phi(x,y,z)=\nabla\phi(x,y,z)$$ $$=\big(\frac{\partial}{\partial x},\frac{\partial}{\partial y},\frac{\partial}{\partial z}\big)\phi(x,y,z)$$ $$=(-\sin(x),3\cos(y),-4\sin(z)).$$