API Reference
Main Functions
SymbolicIntegration.integrate
— Functionintegrate(f, x, method::AbstractIntegrationMethod=RischMethod(); kwargs...)
Compute the symbolic integral of expression f
with respect to variable x
using the specified integration method.
Arguments
f
: Symbolic expression to integrate (Symbolics.Num)x
: Integration variable (Symbolics.Num)method
: Integration method to use (AbstractIntegrationMethod, default: RischMethod())
Keyword Arguments
- Method-specific keyword arguments are passed to the method implementation
Returns
- Symbolic expression representing the antiderivative (Symbolics.Num)
Examples
using SymbolicIntegration, Symbolics
@variables x
# Using default Risch method
integrate(x^2, x) # (1//3)*(x^3)
# Explicit method with options
integrate(1/(x^2 + 1), x, RischMethod(use_algebraic_closure=true)) # atan(x)
# Method configuration
risch = RischMethod(use_algebraic_closure=false, catch_errors=true)
integrate(exp(x), x, risch) # exp(x)
Integration Methods
Available Methods
SymbolicIntegration.RischMethod
— TypeRischMethod <: AbstractIntegrationMethod
Risch algorithm for symbolic integration of elementary functions.
Fields
use_algebraic_closure::Bool
: Whether to use algebraic closure for complex roots (default: true)catch_errors::Bool
: Whether to catch and handle algorithm errors gracefully (default: true)
Method Traits
SymbolicIntegration.method_supports_rational
— Functionmethod_supports_rational(method::RischMethod)
Check if the integration method supports rational function integration. Returns true
for RischMethod.
SymbolicIntegration.method_supports_transcendental
— Functionmethod_supports_transcendental(method::RischMethod)
Check if the integration method supports transcendental function integration. Returns true
for RischMethod.
Algorithm Overview
SymbolicIntegration.jl implements the complete symbolic integration algorithms from Manuel Bronstein's book "Symbolic Integration I: Transcendental Functions".
Supported Function Classes
- Polynomial functions: ∫xⁿ dx
- Rational functions: ∫P(x)/Q(x) dx using Rothstein-Trager method
- Exponential functions: ∫exp(f(x)) dx using Risch algorithm
- Logarithmic functions: ∫log(f(x)) dx using integration by parts
- Trigonometric functions: Transformed to exponential form
Algorithm Components
The package includes implementations of:
- Hermite reduction for rational functions
- Rothstein-Trager method for logarithmic parts
- Risch algorithm for transcendental functions
- Differential field tower construction
- Complex root finding for arctangent terms
Internal Structure
The package is organized into several algorithm modules:
rational_functions.jl
: Rational function integration algorithmstranscendental_functions.jl
: Risch algorithm implementationdifferential_fields.jl
: Differential field operationscomplex_fields.jl
: Complex number field handlingfrontend.jl
: User interface and expression conversion
Error Handling
The package defines custom exception types:
NotImplementedError
: For unsupported function typesAlgorithmFailedError
: When no elementary antiderivative existsAlgebraicNumbersInvolved
: When algebraic numbers complicate the result