I do not know much of anything about sage. But I was using desolve on
http://www.sagenb.org to compare an answer,
and I am confused on the type-setting of of constant of integration in
solution of an ode.
Googled around but nothing specific I could find.
When I ask sage to solve an ode using desolve, it seems to use `c` for
constant of integration in the result, like this:
reset()
x= var('x')
y = function('y', x)
desolve(diff(y,x)+y, y,ivar=x)
which gives
c*e^(-x)
I wish it generated at least uppercase `C` or such. But any way. Now the
confusing part.
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??
reset()
x,c= var('x c')
y = function('y', x)
desolve(diff(y,x)+c*y, y,ivar=x)
which gives
c*e^(-c*x)
Is there a way to tell sage to use at least upper case letter for constant of
integration?
This is how Mathematica does it:
In[67]:= DSolve[y'[x]+c*y[x]==0,y[x],x]
Out[67]= {{y[x]->E^(-c x) C[1]}}
You can see it is easy to see which is the constant of integration in the
result. If there are
more than one constant of integrations, they become C[1], C[2], etc....
same with Maple
dsolve(diff(y(x),x)+c*y(x)=0);
y(x) = _C1 exp(-c x)
see, it uses _C1
How can one make sage change this behavior so it is easier to read the results?
lower case
letters for constant of integrations is not really a good way to do this.
thanks,
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org