Skip to content

Commit

Permalink
src/sage/symbolic/integration/integral.py: add "needs" for libgiac in…
Browse files Browse the repository at this point in the history
…tegration

A few examples in this file integrate with algorithm='giac', which can
fail if sage.libs.giac is not available to perform the integration.
  • Loading branch information
orlitzky committed Sep 20, 2024
1 parent 0f9f385 commit f12c887
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sage/symbolic/integration/integral.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def __init__(self):
Check for :issue:`28913`::
sage: # needs sage.libs.giac
sage: Ex = (1-2*x^(1/3))^(3/4)/x
sage: integrate(Ex, x, algorithm='giac') # long time
4*(-2*x^(1/3) + 1)^(3/4) + 6*arctan((-2*x^(1/3) + 1)^(1/4)) - 3*log((-2*x^(1/3) + 1)^(1/4) + 1) + 3*log(abs((-2*x^(1/3) + 1)^(1/4) - 1))
Expand Down Expand Up @@ -200,6 +201,7 @@ def __init__(self):
Check for :issue:`32354`::
sage: # needs sage.libs.giac
sage: ex = 1/max_symbolic(x, 1)**2
sage: integral(ex, x, 0, 2, algorithm='giac')
3/2
Expand Down Expand Up @@ -690,6 +692,7 @@ def integrate(expression, v=None, a=None, b=None, algorithm=None, hold=False):
Using Giac to integrate the absolute value of a trigonometric expression::
sage: # needs sage.libs.giac
sage: integrate(abs(cos(x)), x, 0, 2*pi, algorithm='giac')
4
sage: result = integrate(abs(cos(x)), x, 0, 2*pi)
Expand Down

0 comments on commit f12c887

Please sign in to comment.