API Reference

Main Functions

SymbolicIntegration.integrateFunction
integrate(f, x)

Compute the symbolic integral of expression f with respect to variable x using all available methods.

Arguments

  • f: Symbolic expression to integrate (Symbolics.Num)
  • x: Integration variable (Symbolics.Num)

Examples

julia> using SymbolicIntegration, Symbolics
julia> @variables x
julia> integrate(2x)
x^2
source
integrate(f, method=nothing)

If f contains only one symbolic variable, lets say x, calls integrate(f, x, method)

source
integrate(f, x, method::AbstractIntegrationMethod=RischMethod(); kwargs...)

Compute the symbolic integral of expression f with respect to variable x using Risch integration method.

Arguments

  • f: Symbolic expression to integrate (Symbolics.Num)
  • x: Integration variable (Symbolics.Num)

Keyword Arguments

  • Method-specific keyword arguments are passed to the method implementation

Returns

  • Symbolic expression representing the antiderivative (Symbolics.Num)

Examples

# 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)
source
integrate(f, x, method::AbstractIntegrationMethod=RuleBasedMethod(); kwargs...)

Compute the symbolic integral of expression f with respect to variable x using rule based method.

Arguments

  • f: Symbolic expression to integrate (Symbolics.Num)
  • x: Integration variable (Symbolics.Num)

Returns

  • Symbolic expression representing the antiderivative (Symbolics.Num)

Examples

julia> integrate(1/sqrt(1 + x), x, RuleBasedMethod(verbose=true))
┌-------Applied rule 1_1_2_1_33 (change of variables):
| ∫((a + b * v ^ n) ^ p, x) => if 
|       !(contains_var(a, b, n, p, x)) &&
|       (
|             linear(v, x) &&
|             v !== x
|       )
| (1 / ext_coeff(v, x, 1)) * substitute(∫{(a + b * x ^ n) ^ p}dx, x => v)
└-------with result: ∫1 / (u^(1//2)) du where u = 1 + x
┌-------Applied rule 1_1_1_1_2 on ∫(1 / (x^(1//2)), x)
| ∫(x ^ m, x) => if 
|       !(contains_var(m, x)) &&
|       m !== -1
| x ^ (m + 1) / (m + 1)
└-------with result: (2//1)*(x^(1//2))
(2//1)*sqrt(1 + x)

julia> rbm = RuleBasedMethod(verbose=false)
julia> integrate(1/sqrt(1 + x), x, rbm)

(2//1)*sqrt(1 + x)
source

Integration Methods

Available Methods

SymbolicIntegration.RischMethodType
RischMethod <: 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)
source
SymbolicIntegration.RuleBasedMethodType
RuleBasedMethod <: AbstractIntegrationMethod
  • use_gamma::Bool: Whether to catch and handle algorithm errors gracefully (default: true)
  • verbose::Bool: Whether to print or not integration rules applied (default: false)
source