Maxima Function
derivdegree (expr, y, x)
Returns the highest degree of the derivative of the dependent variable y with respect to the independent variable x occuring in expr.
Example:
(%i1) 'diff (y, x, 2) + 'diff (y, z, 3) + 'diff (y, x) * x^2; 3 2 d y d y 2 dy (%o1) --- + --- + x -- 3 2 dx dz dx (%i2) derivdegree (%, y, x); (%o2) 2