On Tuesday, February 24, 2015 at 3:56:25 PM UTC-7, Ondřej Čertík wrote: > > On Tue, Feb 24, 2015 at 3:51 PM, John Peterson <[email protected] > <javascript:>> wrote: > > > > > > Try this: > > In [1]: class f(Function): > ...: is_real=True > ...: > > In [2]: class g(Function): > ...: is_real=True > ...: > > In [3]: X = Symbol('X', real=True) > > In [4]: diff(abs(f(X)-g(X)), X) > Out[4]: > ⎛d d ⎞ > ⎜──(f(X)) - ──(g(X))⎟⋅sign(f(X) - g(X)) > ⎝dX dX ⎠
Thanks, this works and IMO is cleaner than my previous subs workaround. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/824f063a-2182-43c6-b04c-265aac9f94c2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
