On 06/15/2013 01:24 PM, Matthew Rocklin 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] <mailto:[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]
    <mailto:sympy%[email protected]>.
    To post to this group, send email to [email protected]
    <mailto:[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.


Consider -

>>> from sympy import *
>>> (r,th) = symbols('r,th',real=True)
>>> g = r**2*sin(th)**2
>>> sqrt(g)
Abs(r)*Abs(sin(th))
I wish to hint that g > 0 so that sqrt(q) returns r*sin(th)

--
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.


Reply via email to