#2095 closed defect (invalid)
Simplification sometimes is wrong in Sage
Reported by: | moretti | Owned by: | gfurnish |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | calculus | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
sage: plot(arcsin(sin(x)))
plots a straight line.
sage: x/x 1
sage: assume(x<0) sage: sqrt(x)^2 x
Change History (6)
comment:1 Changed 8 years ago by was
comment:2 Changed 8 years ago by moretti
These are examples pointed out by Peter Jipsen... the second one I think is okay. The first one could be problematic, but Robert pointed out that it works fine if you use fast_eval. For the third, I think we are screwed. There is the command
domain:real; real domain:complex; complex
in maxima, however the *only* effect that this seems to have on Maxima is if domain is real, sqrt(x^{2) returns abs(x). }
Perhaps this should be changed to an enhancement. Assume() is currently only there as a workaround to Maxima's interactive behavior; it would be nice if Sage were smarter about assumptions on symbolic variables.
comment:3 Changed 8 years ago by mabshoff
- Milestone set to sage-2.10.2
comment:4 Changed 7 years ago by gfurnish
- Owner changed from was to gfurnish
- Status changed from new to assigned
comment:5 Changed 7 years ago by was
- Resolution set to invalid
- Status changed from assigned to closed
We're being stupid. Clearly sqrt(x)^2 should equal x NO MATTER what x is. Period. No matter what you assume about x it has to be the case the "sqrt(x)" is
something that when squared gives x. That's the definition of "square root".
comment:6 Changed 7 years ago by mabshoff
- Milestone changed from sage-2.11 to sage-duplicate/invalid
Which is "sometimes wrong"? The first two examples look fine to me. For the third, we're totally screwed -- or -- we just don't understand Maxima, since it's just the
native behavior of Maxima: