[sage-support] Re: is there assumptions in solve()?

2011-02-19 Thread Johan Grönqvist
2011-02-18 21:11, Dmitry Shkirmanov skrev: I tried it and received wrong answer. Let's consider for example the code: # reset() forget() var("a,b,c,d,f") assume(a-b<0) expr=(a^2-b^2)*f expr2=sqrt(expr) print(expr2.full_simplify()) # It gives sqrt(a - b)*sqrt(a + b)*sqrt(f) But a-b<0, so expressi

[sage-support] Re: is there assumptions in solve()?

2011-02-19 Thread Dmitry Shkirmanov
> sage: a=2; b=3; f=5 > sage: assert(a-b<0) > sage: sqrt(a-b)*sqrt(a+b)*sqrt(f) > 5*I > sage: sqrt((a^2-b^2)*f) > 5*I > sage: Of course, you are right. But # sage: var("a,b,c,d,f") (a, b, c, d, f) sage: expr=sqrt((a-b)*(c+d)) sage: assume(a-b<0) sage: expr.full_simplify() sqrt(-c - d)*sqrt(-a + b)

[sage-support] Re: is there assumptions in solve()?

2011-02-19 Thread Dmitry Shkirmanov
> sage: expr2 = sqrt(a^2-b^2) > sage: expr2.full_simplify() > sqrt(a - b)*sqrt(a + b) I am sorry, there is a mistake. wrong answer gives # var("a,b,c,d,f") assume(a-b<0) expr=sqrt((a^2-b^2)*f) expr2=expr.full_simplify() show(expr2) # -- To post to this group, send email to sage-support@googlegro