On Thursday, July 26, 2012 6:37:56 AM UTC-4, Nasser M. Abbasi wrote:
I do not know much of anything about sage. But I was using desolve on http://www.sagenb.org to compare an answer,
Tata! You clearly know *something* about it, or you wouldn't have done as well as you have finding stuff out.
When I ask sage to solve an ode using desolve, it seems to use `c` for constant of integration in the result, like this:
Yes, we get this directly from Maxima, except (I believe) as %c.
reset()
x= var('x')
y = function('y', x)
desolve(diff(y,x)+y, y,ivar=x)
which gives
I wish it generated at least uppercase `C` or such. But any way. Now the confusing part.
Actually, it's worse than that.
c
Traceback (click to the left of this block for traceback)
...
NameError: name 'c' is not defined
So as you can see, this "c" from Maxima is not really "there" in the same sense. Interestingly, Sage still knows it's there and a symbolic expression (the "c", I mean), but it's purely local in some sense that I don't quite get.
If I use `c` myself in the ode, then the result will contains 2 c's. The constant of integration `c` that sage uses, and my own `c` which I have in the ode itself. So how is a user to know which is which when they look at the result??
Right, this is a problem.
Is there a way to tell sage to use at least upper case letter for constant of integration?
I don't think that would make any difference. Then people who like defining upper-case variables would get upset. The real problem is that some conflict should be detected and this variable replaced by something - but what? I could imagine someone already having defined c, c1, c2, c3, C, C1, C2, C3, c_1, C_1, etc. - now what should Sage pick? It's not obvious.