up previous next
deriv

the derivative of a polynomial or rational function

Syntax
deriv(F: RINGELEM, X: RINGELEM): RINGELEM

Description
This function returns the derivative of F with respect to the indeterminate X.

Example
/**/  Use R ::= QQ[x,y];
/**/  deriv(x*y^2, x);
y^2

/**/  define Jac(f)  --> The Jacobian matrix for a polynomial.
/**/    return matrix([[deriv(f, X) | X in indets(RingOf(f))]]);
/**/  enddefine;

/**/  Jac(x*y^2);
matrix( /*RingDistrMPolyClean(QQ, 2)*/
 [[y^2, 2*x*y]])

/**/  FrF := NewFractionField(R);
/**/  use FrF;
/**/  deriv((x*y^2)/(x-1), x);
(-y^2)/(x^2 -2*x +1)

See Also