>>> from sympy import *
>>> x,y = symbols('x y')
>>> f = x**2 / y + 2 * x - ln(y)
>>> diff(f,x)
2 + 2*x/y
>>> diff(f,y)
-1/y - x**2*y**(-2)
>>> diff(diff(f,x),y)
-2*x*y**(-2)
>>> from sympy import *
>>> Plot(cos(x*3)*cos(y*5)-y)
[0]: -y + cos(3*x)*cos(5*y), 'mode=cartesian'