Function part(expr,0) is the same as op(expr) .

Here is what is written in the Help:

Returns the main operator of the expression expr ( op )

Returns parts of the displayed form of expr ( part(expr,0) )

inpart(expr,0) return the internal representation of the expression

Executing of

op(diff(x(q),q))

and

inpart(diff(x(q),q))

gives the same result:

derivative

But ANY formal description of Function:derivative(...) is missing in the Help.

I think it is more logical to get diff in the first case, but not derivative

Executing of

derivative(x(q),q)

gives the same result as:

diff(x(q),q)

But again, the Help has no description of the Fucntion:derivative.