### 5.52.1 Gradient : derive deriver diff grad

derive (or diff or grad) takes two arguments : an expression F of n real variables and a vector of these variable names.
derive returns the gradient of F, where the gradient is the vector of all partial derivatives, for example in dimension n=3

| ▸
grad
| (F)= [ |
∂ F
∂ x
| , |
∂ F
∂ y
| , |
∂ F
∂ z
| ]

Example
Find the gradient of F(x,y,z)=2x2y−xz3.
Input :

derive(2*x`^`2*y-x*z`^`3,[x,y,z])

or :

diff(2*x`^`2*y-x*z`^`3,[x,y,z])

or :

grad(2*x`^`2*y-x*z`^`3,[x,y,z])

Output :

[2*2*x*y-z`^`3,2*x`^`2,-(x*3*z`^`2)]

Output after simplification with normal(ans()) :

[4*x*y-z`^`3,2*x`^`2,-(3*x*z`^`2)]

To find the critical points of F(x,y,z)=2x2y−xz3, input :

solve(derive(2*x`^`2*y-x*z`^`3,[x,y,z]),[x,y,z])

Output :

[[0,y,0]]