I don't think there is, at least not without some work (basically, creating a custom Derivative subclass and a custom Function subclass and setting the derivative to it).
Really, Derivative ought to know that diff(f(x), x) is real if f(x) is real. Or rather I suppose diff(f(x), x).is_imaginary should be False (the derivative could still be infinite or undefined, which would technically not be real). Aaron Meurer On Wed, Aug 12, 2015 at 8:20 PM, chaowen guo <[email protected]> wrote: > Thank you very much > > Is there a way, like f.is_real, to tell sympy that f(x).diff(x) is real, > so that print((f(x).diff(x)).is_real) will be true? Right now the output of > print((f(x).diff(x)).is_real) is none. > > -- > 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/b2ba84bc-81ff-4de2-97e7-e72fa91ad4ab%40googlegroups.com > <https://groups.google.com/d/msgid/sympy/b2ba84bc-81ff-4de2-97e7-e72fa91ad4ab%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CAKgW%3D6Jrp-b8hd0PAOXGC8igpMieXDWmUjL%3DyVY4cxS3B-5JwQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
