Problem with solve and complex numbers: incorrect answer

9 views
Skip to first unread message

Kunonin

unread,
Mar 29, 2011, 5:39:45 AM3/29/11
to sage-support
Hello, i was working with real functions in real coefficients. I was
doing some test to be sure it was all always real (without imaginary
part), and i ask Sage to solve this:

var('x',domain=RR);
solve([imag(x)==0,imag(sqrt(-x^2-1))==0],x);

and it answered me:

[[x == -I], [x == I]]

I would understand if he can solve it (find a real solution is
difficult), but i expected an error more than an incorrect answer.

Thanks

achrzesz

unread,
Mar 29, 2011, 6:19:17 AM3/29/11
to sage-support
sage: maxima('solve([imagpart(x)=0,imagpart(sqrt(-x^2-1))=0],
[x])').sage()
[]

kcrisman

unread,
Mar 29, 2011, 8:51:27 AM3/29/11
to sage-support


On Mar 29, 5:39 am, Kunonin <congruentambkmodul7pertotkr...@gmail.com>
wrote:
Maxima's solve explicitly does not take assumptions into account, nor
do I think it would take this domain thing into account. I think they
see that as a feature, because their variables are to be considered
dummy variables in something like this.

- kcrisman

ancienthart

unread,
Mar 31, 2011, 5:00:20 AM3/31/11
to sage-s...@googlegroups.com
Would it be possible to add a post-maxima check to ensure the answers are in the same domain as the inputs?

Joal Heagney
Reply all
Reply to author
Forward
0 new messages