Open rwst opened 9 years ago
This would yield (doctest):
sage: t = var('t')
sage: y=function('y')(t)
sage: desolve(diff(y,t)-y^2,y)
-1/(_C + t)
sage: desolve(diff(y,t)-y^2+y,y)
-1/(e^(_C + t) - 1)
sage: desolve(diff(y,t)-y^2-1,y)
tan(_C + t)
Do we resolve this in Sage, Maxima, or both?
Upstream: Not yet reported upstream; Will do shortly.
You should report this upstream, but maybe first to the email list, not as a bug. Surely there must be a reason they report the solutions that way ... right? (For instance, maybe this is "more correct" than something with solve that might lose a solution or something. Though it's hard to see how that could happen in your first example!)
Replying to @kcrisman:
You should report this upstream, but maybe first to the email list, not as a bug. Surely there must be a reason they report the solutions that way ... right?
It appears not, see http://sourceforge.net/p/maxima/mailman/message/33364512/
So, the inconsistency is in Sage, which removes 'y==' from the results that have it, perhaps to facilitate further usage of the expression.
if is_SymbolicEquation(soln) and soln.lhs() == dvar:
# Remark: Here we do not check that the right hand side does not depend on dvar.
# This probably will not hapen for soutions obtained via ode2, anyway.
soln = soln.rhs()
We could now either remove the snippet, in order to always get an equation, or always try to solve for dvar
and return an equation only when no solution is found.
At the moment,
desolve
behaves like this even with trivial separable ODEs:They could be solved by substituting a variable for
y(t)
and callingsolve
. Only if there is no solution fromsolve
the integrated equation should be given.Upstream: Not yet reported upstream; Will do shortly.
Component: calculus
Issue created by migration from https://trac.sagemath.org/ticket/17739