D

D[fx]
gives the partial derivative of f with respect to x.
D[fxy, ...]
differentiates successively with respect to x, y, etc.
D[f, {xn}]
gives the multiple derivative of order n.
D[f, {{x1x2, ...}}]
gives the vector derivative of f with respect to x1, x2, etc.

Unknown functions are derived using Derivative:

Chain rule:

Compute the gradient vector of a function:

Hesse matrix: