Opened 10 years ago
Last modified 7 weeks ago
#13718 new defect
Another incorrect Maxima integral
Reported by: | kcrisman | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | calculus | Keywords: | integral |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Reported upstream. No feedback yet. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This is already reported upstream at this bug tracker ticket.
The original report from a summer PREP user:
integral((2/3)*x^(5/2)*(x+1)^.5, x,0,1) I got the answer -0.888888889*sqrt(2) integral((2/3)*x^(5/2)*(x+1)^(1/2), x,0,1) And the answer is -5/192*I*pi + 61/288*sqrt(2) + 5/192*log(-sqrt(2) + 1) - 5/192*log(sqrt(2) + 1)
Change History (11)
comment:1 Changed 10 years ago by
comment:2 Changed 9 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:3 Changed 8 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:4 Changed 8 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:5 Changed 8 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:6 Changed 5 years ago by
This prompts me to see what happens with alternative integration interfaces.
Try with SymPy?:
sage: sage: integral((2/3)*x^(5/2)*(x+1)^.5, x,0,1, algorithm='sympy') # no output at all after ~10mins
Try with giac:
sage: giac('integrate((2/3)*x^(5/2)*sqrt(x+1), x,0,1)') # correct and almost instantaneous 1/288*(sqrt(2)*61+15*ln(sqrt(2)-1)) sage: (1/288*(sqrt(2)*61+15*ln(sqrt(2)-1))).n() 0.253633414928700 sage: (-5/192*I*pi + 61/288*sqrt(2) + 5/192*log(-sqrt(2) + 1) - ....: 5/192*log(sqrt(2) + 1)).n() # compare with formula given by OP 0.253633414928700
comment:7 Changed 5 years ago by
fixed at Sage v8.0.beta3:
sage: integrate((2/3)*x^(5/2)*sqrt(x+1), x,0,1, algorithm='maxima') -5/192*I*pi + 61/288*sqrt(2) - 5/192*log(sqrt(2) + 1) + 5/192*log(-sqrt(2) + 1) sage: _.n() 0.253633414928700
comment:8 Changed 5 years ago by
not really.. the problem is with the 0.5
:
sage: integral((2/3)*x^(5/2)*(x+1)^.5, x,0,1, algorithm='maxima') # wrong -0.8888888888888888*sqrt(2) sage: integral((2/3)*x^(5/2)*(x+1)^.5, x,0,1, algorithm='giac') # ok 0.253633414929 sage: integral((2/3)*x^(5/2)*(x+1)^.5, x,0,1, algorithm='sympy') # timeout
comment:9 Changed 5 years ago by
That is user error. No one can expect to get correct integrals from expressions containing floating point numbers. It is not supported and maybe Sage should throw an exception in these cases anyway. If you agree, Karl-Dieter, I'll open a ticket for just this.
comment:10 Changed 5 years ago by
Together with #22894 and ex._convert(QQ)
one could even provide a default option that automatically converts 0.5
to 1/2
before integration.
comment:11 Changed 7 weeks ago by
- Keywords integral added
#11493 may be related.