In [5]: f(x, y, z).diff([[x, y, z]])
Out[5]:
⎡∂ ∂ ∂ ⎤
⎢──(f(x, y, z)) ──(f(x, y, z)) ──(f(x, y, z))⎥
⎣∂x ∂y ∂z ⎦
In [6]: f(x, y, z).diff([[x, y, z], 2])
Out[6]:
⎡ 2 2 2 ⎤
⎢ ∂ ∂ ∂ ⎥
⎢ ───(f(x, y, z)) ─────(f(x, y, z)) ─────(f(x, y, z))⎥
⎢ 2 ∂y ∂x ∂z ∂x ⎥
⎢ ∂x ⎥
⎢ ⎥
⎢ 2 2 2 ⎥
⎢ ∂ ∂ ∂ ⎥
⎢─────(f(x, y, z)) ───(f(x, y, z)) ─────(f(x, y, z))⎥
⎢∂y ∂x 2 ∂z ∂y ⎥
⎢ ∂y ⎥
⎢ ⎥
⎢ 2 2 2 ⎥
⎢ ∂ ∂ ∂ ⎥
⎢─────(f(x, y, z)) ─────(f(x, y, z)) ───(f(x, y, z)) ⎥
⎢∂z ∂x ∂z ∂y 2 ⎥
⎣ ∂z ⎦
I think it would be better to explicitly require a Matrix object, although lists could
potentially be useful for easier input.
Assumedly the output would be a Matrix (a list output would be less useful for further SymPy
operations).