p.s. just remembering that you will always just get a single solution
for dy/dx so you can return the answer rather than a list. It can all
be encapsulated as:
def implicit_diff(eq, dep, ind):
"""Return d_dep/d_ind given eq(y) = 0
>>> import sympy as s
>>> s.var('x y')
(x, y)
>>> eq=s.sympify('x^2+y^2 - 36')
>>> implicit_diff(eq, y, x)
>>> -x/y
"""
f=sympy.Function('f', dummy=True)
eq=eq.subs(dep, f(ind))
return sympy.solve(eq.diff(ind), f(ind).diff(ind))[0].subs(f(ind),
dep)