Skip to content

Commit

Permalink
Trac #32354: Fix integral(1/max_symbolic(x, 1)^2, x, 0, oo, algorithm…
Browse files Browse the repository at this point in the history
…='giac')

Compare
{{{
sage: integral(1/max_symbolic(x,1)**2,x,0,oo,algorithm='maxima')
integrate(max(1, x)^(-2), x, 0, +Infinity)
sage: integral(1/max_symbolic(x,1)**2,x,0,oo,algorithm='sympy')
2
sage: integral(1/max_symbolic(x,1)**2,x,0,oo,algorithm='giac')
+Infinity
}}}
The correct answer is sympy's answer.

Related problem:
{{{
sage: ex=1/max_symbolic(x,1)**2
sage: integral(ex,x,0,2,algorithm='giac')
undef
}}}

URL: https://trac.sagemath.org/32354
Reported by: chapoton
Ticket author(s): Frédéric Chapoton
Reviewer(s): Travis Scrimshaw
  • Loading branch information
Release Manager committed Oct 9, 2022
2 parents ad120da + 39edec7 commit 00ebfa9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/sage/symbolic/integration/integral.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,16 @@ def __init__(self):
sage: from sage.symbolic.integration.integral import definite_integral
sage: definite_integral(sin(x),x,0,pi)
2
TESTS:
Check for :trac:`32354`::
sage: ex = 1/max_symbolic(x, 1)**2
sage: integral(ex, x, 0, 2, algorithm='giac')
3/2
sage: integral(1/max_symbolic(x, 1)**2, x, 0, oo, algorithm='giac')
2
"""
# The automatic evaluation routine will try these integrators
# in the given order. This is an attribute of the class instead of
Expand Down

0 comments on commit 00ebfa9

Please sign in to comment.