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)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to