I would like to find the derivatives of a function U[x,y,t]
occurring in an expression X
. I use
DeleteDuplicates[Cases[X, Derivative[__][U][__], Infinity]].
An output would be something like this:
{Derivative[1, 0, 0][U][x, y, t],
Derivative[0, 1, 0][U][x, y, t],
Derivative[0, 2, 0][U][x, y, t],
Derivative[1, 1, 0][U][x, y, t],
Derivative[2, 0, 0][U][x, y, t],
Derivative[0, 1, 1][U][x, y, t],
Derivative[1, 0, 1][U][x, y, t],
Derivative[0, 0, 1][U][x, y, t],
Derivative[1, 1, 1][U][x, y, t],
Derivative[0, 2, 1][U][x, y, t]}
However, if I want to find a particular nth derivative of U
, say 3rd derivative, in the expression to get the following:
{Derivative[1, 1, 1][U][x, y, t],
Derivative[0, 2, 1][U][x, y, t]}
how would I achieve that?
X
$\endgroup$