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 expression above does not have any sense. What i am
doing wrongly?
What do you mean by not making any sense?
It does make sense according to sage, it is just a complex number
instead of a real number:
----------------------------------------------------------------------
| Sage Version 4.6.1, Release Date: 2011-01-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
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:
The values before and after the simplification are equal, at least in
this example.
/ johan
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org