Symbolic Integration via External Software - Symbolic Calculus

Skip to content
Back to top
View this page
Edit this page

# Symbolic Integration via External Software

sage.symbolic.integration.external.fricas_integrator(expression, v, a=None, b=None, noPole=True)

  Integration using FriCAS.

  EXAMPLES:

  Sage

      sage: # optional - fricas
      sage: from sage.symbolic.integration.external import fricas_integrator
      sage: fricas_integrator(sin(x), x)
      -cos(x)
      sage: fricas_integrator(cos(x), x)
      sin(x)
      sage: fricas_integrator(1/(x^2-2), x, 0, 1)
      -1/8*sqrt(2)*(log(2) - log(-24*sqrt(2) + 34))
      sage: fricas_integrator(1/(x^2+6), x, -oo, oo)
      1/6*sqrt(6)*pi

  Python

      >>> from sage.all import *
      >>> # optional - fricas
      >>> from sage.symbolic.integration.external import fricas_integrator
      >>> fricas_integrator(sin(x), x)
      -cos(x)
      >>> fricas_integrator(cos(x), x)
      sin(x)
      >>> fricas_integrator(Integer(1)/(x**Integer(2)-Integer(2)), x, Integer(0), Integer(1))
      -1/8*sqrt(2)*(log(2) - log(-24*sqrt(2) + 34))
      >>> fricas_integrator(Integer(1)/(x**Integer(2)+Integer(6)), x, -oo, oo)
      1/6*sqrt(6)*pi

sage.symbolic.integration.external.libgiac_integrator(expression, v, a=None, b=None)

  Integration using libgiac.

  EXAMPLES:

  Sage

      sage: # needs sage.libs.giac
      sage: import sage.libs.giac
      ...
      sage: from sage.symbolic.integration.external import libgiac_integrator
      sage: libgiac_integrator(sin(x), x)
      -cos(x)
      sage: libgiac_integrator(1/(x^2+6), x, -oo, oo)
      1/6*sqrt(6)*pi

  Python

      >>> from sage.all import *
      >>> # needs sage.libs.giac
      >>> import sage.libs.giac
      ...
      >>> from sage.symbolic.integration.external import libgiac_integrator
      >>> libgiac_integrator(sin(x), x)
      -cos(x)
      >>> libgiac_integrator(Integer(1)/(x**Integer(2)+Integer(6)), x, -oo, oo)
      1/6*sqrt(6)*pi

sage.symbolic.integration.external.maxima_integrator(expression, v, a=None, b=None)

  Integration using Maxima.

  EXAMPLES:

  Sage

      sage: from sage.symbolic.integration.external import maxima_integrator
      sage: maxima_integrator(sin(x), x)
      -cos(x)
      sage: maxima_integrator(cos(x), x)
      sin(x)
      sage: f(x) = function('f')(x)
      sage: maxima_integrator(f(x), x)
      integrate(f(x), x)

  Python

      >>> from sage.all import *
      >>> from sage.symbolic.integration.external import maxima_integrator
      >>> maxima_integrator(sin(x), x)
      -cos(x)
      >>> maxima_integrator(cos(x), x)
      sin(x)
      >>> __tmp__=var("x"); f = symbolic_expression(function('f')(x)).function(x)
      >>> maxima_integrator(f(x), x)
      integrate(f(x), x)

sage.symbolic.integration.external.mma_free_integrator(expression, v, a=None, b=None)

  Integration using Mathematica’s online integrator.

  EXAMPLES:

  Sage

      sage: from sage.symbolic.integration.external import mma_free_integrator
      sage: mma_free_integrator(sin(x), x) # optional - internet
      -cos(x)

  Python

      >>> from sage.all import *
      >>> from sage.symbolic.integration.external import mma_free_integrator
      >>> mma_free_integrator(sin(x), x) # optional - internet
      -cos(x)

  A definite integral:

  Sage

      sage: mma_free_integrator(e^(-x), x, a=0, b=oo) # optional - internet
      1

  [Python]

      >>> from sage.all import *
      >>> mma_free_integrator(e**(-x), x, a=Integer(0), b=oo) # optional - internet
      1

sage.symbolic.integration.external.sympy_integrator(expression, v, a=None, b=None)

  Integration using SymPy.

  EXAMPLES:

  Sage

      sage: from sage.symbolic.integration.external import sympy_integrator
      sage: sympy_integrator(sin(x), x)                                               # needs sympy
      -cos(x)
      sage: sympy_integrator(cos(x), x)                                               # needs sympy
      sin(x)

  Python

      >>> from sage.all import *
      >>> from sage.symbolic.integration.external import sympy_integrator
      >>> sympy_integrator(sin(x), x)                                               # needs sympy
      -cos(x)
      >>> sympy_integrator(cos(x), x)                                               # needs sympy
      sin(x)