See http://trac.sagemath.org/sage_trac/ticket/6515 for some reasons why this isn't quite as easy to implement, unfortunately. That doesn't mean it's hard, but to make it work in full generality requires some trickery I haven't had time to think about. Also, the reason for this is because Maxima explicitly does not use assumptions for its solve - perhaps because when one solves, the variable is considered to be a dummy variable?
- kcrisman On Jan 10, 8:11 am, rickhg12hs <[email protected]> wrote: > It would be convenient to filter "solve" output based on "assume". Is > there an easy, generally applicable way to do this? > > E.g., > > sage: var('a b t x y') > (a, b, t, x, y) > sage: assume(a>0,b>0,t>0) > sage: assumptions() > [a > 0, b > 0, t > 0] > sage: solve([y==(x^2-1)/2,x==a*t,y==b*t],x,y,t) > [[x == (b + sqrt(a^2 + b^2))/a, y == (b^2 + sqrt(a^2 + b^2)*b)/a^2, t > == (b + sqrt(a^2 + b^2))/a^2], [x == (b - sqrt(a^2 + b^2))/a, y == > (b^2 - sqrt(a^2 + b^2)*b)/a^2, t == (b - sqrt(a^2 + b^2))/a^2]] > sage: bool((b - sqrt(a^2 + b^2))/a^2 > 0) # This shows the 2nd value > for t is not > 0 > False > sage: > > The second solution is not valid based on the assumptions. How best > to filter it? ... and in the general case? > > Cheers, > Richard
-- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
