On Sep 3, 2:28 pm, William Stein <wst...@gmail.com> wrote:
> Hi Sage-Devel,
>
> What do you think of this:
>
> sage: var('x, i')
> sage: solve(x^2 + i == 0, x)
> [x == -sqrt(-I), x == sqrt(-I)]
>
> Basically, I make a purely symbolic variable which I happen to call
> "i", and it gets treated somewhere (presumably in Maxima) as if it
> were sqrt(-1).
>
> Here is another instance of this:
>
> sage: var('i')
> i
> sage: a = i^2
> sage: a
> i^2
> sage: a.simplify_full()
> -1
>
> So Ginac treats things fine, but our use of Maxima messes it up.
>
> This came up for me just now when doing some symbolic calculation with
> a quaternion algebra where the generators are called "i,j,k", and this
> i has nothing to do with sqrt(-1).
>
> Thoughts?
>
> William
>

I see your point.  I guess to me it's another instance of the "should
x be predefined" question - on the whole, it's better to make this
available.  It is also annoying when doing [f(i) for i in indexset],
but unless we can come up with another way to represent this, it will
be hard to do things with complexes very easily.  Luckily for me, I
don't usually need that, but others may very often.  Does this happen
with 'e' as well, or is that defined as a constant rather than a
variable?  It seems like both are "symbolic.expression.Expression.

What do the other major systems do with this - do they insist on sqrt
(-1) or CC(i) or something like that?  If everyone expects this coming
in, it is an argument for it - not decisive, but a significant
argument.

- kcrisman
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to