Updates:
Labels: Assumptions
Comment #16 on issue 3148 by [email protected]: Too many constants from
dsolve()
http://code.google.com/p/sympy/issues/detail?id=3148
If I understand you correctly, you are saying constants should not absorb
symbolic constants. Why?
Also, if I understand you correctly (please correct me if I don't), you are
saying that constantsimp in its current form could still be useful to some
things, and so should be kept around even after we fix this issue. Again
(if I am right here), can you be more specific?
I feel like you and I may be on different pages on what needs to be done
here (or else one of us is just not understanding the other). These are the
things I think need to be done in constantsimp:
- Constants should still "absorb" other constants, as they do now. That
was the whole point of constantsimp in the first place. I don't see any
reason to not absorb symbolic constants. Otherwise, it just makes SymPy
look less powerful for no good reason ("special cases work, but the general
case does not").
- If the same constant appears more than once, it should be simplified in
such a way so that the new constant is equal everywhere. Currently if you
have 2*C1 in one place and C1 + 1 in another, they will both be simplified
to just C1, but the two will no longer be equal (and hence, checkodesol
will not report that the solution is correct, because, well, it isn't).
- constant_renumber will no longer be used. Constants absorbed into C1
should be called C1. Each solver should return a solution with exactly as
many constants as the order of the ODE. constant_renumber will still be
used in the tests because C1*cos(x) + C2*sin(x) and C1*sin(x) + C2*cos(x)
will still both be valid solutions to the same ODE.
Actually, the other reason I wrote constant_renumber was to put the
constants in order as they "appear" in the expression (by some kind of
printing order). I'm not even sure if this works. If it does, we can keep
it (but be sure to permute all constants so that they remain mathematically
the same). I guess it works, because
In [3]: dsolve(f(x).diff(x, x, x) - 2*f(x).diff(x, x) + f(x).diff(x))
Out[3]:
x
f(x) = C₁ + (C₂ + C₃⋅x)⋅ℯ
- Absorbed constants should inherit the assumptions of the object they came
from. I don't know how easy this is to do with the old assumptions, so it
may have to wait for the new ones.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.