(f, x)
return f.new(f.numer.diff(x)*f.denom - f.numer*f.denom.diff(x), f.denom**2)
Computes partial derivative in ``x``.

        Examples
        --------
        >>> from sympy.polys.fields import field
        >>> from sympy.polys.domains import ZZ

        >>> _, x, y, z = field("x,y,z", ZZ)
        >>> ((x**2 + y)/(z + 1)).diff(x)
        2*x/(z + 1)
Computes partial derivative in ``x``.
Computes partial derivative in x .
def diff(f, x):
        """Computes partial derivative in ``x``.

        Examples
        --------
        >>> from sympy.polys.fields import field
        >>> from sympy.polys.domains import ZZ

        >>> _, x, y, z = field("x,y,z", ZZ)
        >>> ((x**2 + y)/(z + 1)).diff(x)
        2*x/(z + 1)

        """
        x = x.to_poly()
        return f.new(f.numer.diff(x)*f.denom - f.numer*f.denom.diff(x), f.denom**2)
def diff ( f , x ) : x = x . to_poly ( ) return f . new ( f . numer . diff ( x ) * f . denom - f . numer * f . denom . diff ( x ) , f . denom ** 2 )