And more specifically, to simplify square roots, use refine In [50]: refine(sqrt((x + 1)**2), Q.positive(x + 1)) Out[50]: x + 1
Aaron Meurer On Sat, Jun 15, 2013 at 12:24 PM, Matthew Rocklin <[email protected]> wrote: > This is possible in new assumptions > > In [1]: expr = x**2 > > In [2]: ask(Q.positive(expr + 1), Q.positive(expr)) > Out[2]: True > > > > On Sat, Jun 15, 2013 at 12:21 PM, Alan Bromborsky <[email protected]> > wrote: >> >> In the latest build is there anyway to specify that the sympy >> expression/function (not symbol) you are taking the sqrt of is real and >> positive? >> >> -- >> 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. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > -- > 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. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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. For more options, visit https://groups.google.com/groups/opt_out.
