Opened 8 years ago
Closed 5 years ago
#13049 closed defect (fixed)
solve(A*x+C*y^B, y) returns maxima error without explanation
Reported by: | gutow | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | symbolics | Keywords: | solve, maxima, exponents |
Cc: | kcrisman, benjaminfjones, burcin, eviatarbach | Merged in: | |
Authors: | Reviewers: | Jeroen Demeyer | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Possibly related ticket #8659
Example of problem
sage: var ('x y z A B C') sage: f = A*x + C*y^B sage: solve(f==0, y)
returns
Traceback (click to the left of this block for traceback) ... TypeError: ECL says: Maxima asks: Is B an integer?
At the very least this should return a message more like those in sage/symbolic/integration/integration.py. Something along the lines of: "Solve failed because Maxima requested contraints; using the 'assume' command before 'solve' may help (e.g. 'assume( B, 'integer')'). See 'assume?' for more info." The Maxima error should also be passed on.
However, I would prefer to see the general symbolic solution unless numeric values are assigned to the variables in the expression. Note that 'assume(B, 'integer') gives what I consider the correct general symbolic expression:
sage: var ('x y z A B C') sage: f = A*x + C*y^B sage: assume(B, 'integer') sage: solve(f==0, y) [y == (-A*x/C)^(1/B)]
For a little discussion of this see sage-devel: https://groups.google.com/forum/#!topic/sage-devel/AQUV9hHUqXI
Change History (10)
comment:1 Changed 8 years ago by
comment:2 Changed 7 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:3 Changed 6 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:4 Changed 6 years ago by
- Cc eviatarbach added
comment:5 Changed 6 years ago by
desolve
also does this (gives unfriendly errors when requesting assumptions).
comment:6 Changed 6 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:7 Changed 6 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:8 Changed 6 years ago by
- Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
- Reviewers set to Jeroen Demeyer
- Status changed from new to needs_review
The error message is now much better:
TypeError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(B>0)', see `assume?` for more details) Is B an integer?
So I guess this is fixed.
comment:9 Changed 6 years ago by
- Status changed from needs_review to positive_review
comment:10 Changed 5 years ago by
- Resolution set to fixed
- Status changed from positive_review to closed
I'm hoping somebody with experience with the symbolics package can work on this. That said, I find this very annoying and may try to work on it later this summer. At which point I'm likely to do something that would break symbolics....;)