11# SymbolicIntegration.jl
2- This package provides Julia implementations of symbolic integration algorithms.
32
4- The front-end (i.e., the user interface) requires [ Symbolics.jl] ( https://docs.sciml.ai/Symbolics/stable/ ) .
5- The actual integration algorithms are implemented in a generic way using [ AbstractAlgebra.jl] ( https://nemocas.github.io/AbstractAlgebra.jl/dev/ ) .
6- Some algorithms require [ Nemo.jl] ( https://nemocas.github.io/Nemo.jl/dev/ ) for calculations with algebraic numbers.
3+ * A unified interface for symbolic integration methods in Julia*
74
8- ` SymbolicIntegration.jl ` is based on the algorithms from the book
5+ SymbolicIntegration.jl provides a flexible, extensible framework for symbolic integration with multiple algorithm choices. The package uses method dispatch to allow users to select the most appropriate integration algorithm for their specific needs.
96
10- > Manuel Bronstein, [ Symbolic Integration I: Transcentental Functions ] ( https://link.springer.com/book/10.1007/b138171 ) , 2nd ed, Springer 2005,
7+ ## Key Features
118
12- for which a pretty complete set of reference implementations is provided.
13- Currently, ` SymbolicIntegration.jl ` can integrate rational functions and integrands involving transcendental elementary
14- functions like ` exp ` , ` log ` , ` sin ` , etc.
15- As in the book, integrands involving algebraic functions like ` sqrt ` and non-integer powers are not treated.
9+ - 🎯 ** Multiple Integration Methods** : Extensible method dispatch system
10+ - ⚡ ** Exact Symbolic Results** : Guaranteed correct symbolic integration
11+ - 🔢 ** Complex Root Handling** : Produces exact arctangent terms
12+ - ⚙️ ** Configurable Algorithms** : Method-specific options and behavior
13+ - 🏗️ ** Professional Interface** : SciML-style method selection
1614
17- Note that ` SymbolicIntegration.jl ` is still in an early stage of development and should not be expected to run stably in all situations.
18- It comes with absolutely no warranty whatsoever.
15+ ## Integration Methods
16+
17+ ### RischMethod (Default)
18+ Complete symbolic integration using the Risch algorithm from Manuel Bronstein's "Symbolic Integration I: Transcendental Functions".
19+
20+ ** Capabilities:**
21+ - ✅ ** Rational functions** : Complete integration with Rothstein-Trager method
22+ - ✅ ** Transcendental functions** : Exponential, logarithmic using differential field towers
23+ - ✅ ** Complex roots** : Exact arctangent terms for complex polynomial roots
24+ - ✅ ** Integration by parts** : Logarithmic function integration
25+ - ✅ ** Trigonometric functions** : Via transformation to exponential form
26+
27+ ** Function Classes:**
28+ - Polynomial functions: ` ∫x^n dx ` , ` ∫(ax^2 + bx + c) dx `
29+ - Rational functions: ` ∫P(x)/Q(x) dx ` → logarithmic and arctangent terms
30+ - Exponential functions: ` ∫exp(f(x)) dx ` , ` ∫x*exp(x) dx `
31+ - Logarithmic functions: ` ∫log(x) dx ` , ` ∫1/(x*log(x)) dx `
32+ - Trigonometric functions: ` ∫sin(x) dx ` , ` ∫cos(x) dx ` , ` ∫tan(x) dx `
33+
34+ The framework is designed to support additional integration methods as they are developed.
1935
2036
2137
@@ -25,34 +41,82 @@ julia> using Pkg; Pkg.add("SymbolicIntegration")
2541```
2642
2743## Usage
44+
45+ ### Basic Integration
46+
2847``` julia
29- julia> using SymbolicIntegration, Symbolics
48+ using SymbolicIntegration, Symbolics
49+ @variables x
50+
51+ # Default method (RischMethod) - most cases
52+ integrate (x^ 2 , x) # (1//3)*(x^3)
53+ integrate (1 / x, x) # log(x)
54+ integrate (exp (x), x) # exp(x)
55+ integrate (1 / (x^ 2 + 1 ), x) # atan(x)
56+ ```
3057
31- julia> @variables x
32- (x,)
58+ ### Method Selection
3359
34- julia> f = (x^ 3 + x^ 2 + x + 2 )/ (x^ 4 + 3 * x^ 2 + 2 )
35- (2 + x + x^ 2 + x^ 3 ) / (2 + x^ 4 + 3 (x^ 2 ))
60+ ``` julia
61+ # Explicit method choice
62+ integrate (f, x, RischMethod ())
63+
64+ # Method with configuration
65+ risch = RischMethod (use_algebraic_closure= true , catch_errors= false )
66+ integrate (f, x, risch)
67+ ```
3668
37- julia> integrate (f, x)
38- (1 // 2 )* log (2 + x^ 2 ) + atan (x)
69+ ### Complex Examples
3970
40- julia> f = 1 / (x* log (x))
41- 1 / (x* log (x))
71+ ``` julia
72+ # Rational function with complex roots
73+ f = (x^ 3 + x^ 2 + x + 2 )/ (x^ 4 + 3 * x^ 2 + 2 )
74+ integrate (f, x) # (1//2)*log(2 + x^2) + atan(x)
4275
43- julia > integrate (f, x)
44- log (log (x))
76+ # Integration by parts
77+ integrate (log (x), x) # -x + x*log(x )
4578
46- julia > integrate ( 1 / (x ^ 2 + 1 ), x) # Complex root integration
47- atan (x )
79+ # Nested transcendental functions
80+ integrate ( 1 / (x * log (x)), x) # log(log(x) )
4881```
4982
50- ## Tests
51- Some test problems taken from the
52- [ Rubi Integration Test-suites] ( https://rulebasedintegration.org/testProblems.html )
53- are provided by [ test_integrate_rational.jl] ( https://github.com/HaraldHofstaetter/SymbolicIntegration.jl/blob/main/test/test_integrate_rational.jl ) and
54- [ test_stewart.jl] ( https://github.com/HaraldHofstaetter/SymbolicIntegration.jl/blob/main/test/test_stewart.jl ) ,
55- which produce the output
56- [ test_integrate_rational.out] ( https://github.com/HaraldHofstaetter/SymbolicIntegration.jl/blob/main/test/test_integrate_rational.out ) and
57- [ test_stewart.out] ( https://github.com/HaraldHofstaetter/SymbolicIntegration.jl/blob/main/test/test_stewart.out ) , respectively.
83+ ## Method Framework
84+
85+ SymbolicIntegration.jl uses a modern method dispatch system similar to other SciML packages:
86+
87+ ### Current Methods
88+ - ** RischMethod** : Complete symbolic integration (default)
89+
90+ ### Method Configuration
91+ ``` julia
92+ # Research configuration (strict, complete)
93+ RischMethod (use_algebraic_closure= true , catch_errors= false )
94+
95+ # Production configuration (robust, graceful)
96+ RischMethod (use_algebraic_closure= true , catch_errors= true )
97+
98+ # Performance configuration (faster, simpler)
99+ RischMethod (use_algebraic_closure= false , catch_errors= true )
100+ ```
101+
102+ ### Extensibility
103+ The framework is designed for easy extension with additional integration methods. The abstract type ` AbstractIntegrationMethod ` provides the foundation for implementing new algorithms.
104+
105+ ## Documentation
106+
107+ Complete documentation with method selection guidance, algorithm details, and examples is available at:
108+ ** [ https://symbolicintegration.juliasymbolics.org ] ( https://symbolicintegration.juliasymbolics.org ) **
109+
110+ ## Citation
111+
112+ If you use SymbolicIntegration.jl in your research, please cite:
113+
114+ ``` bibtex
115+ @software{SymbolicIntegration.jl,
116+ author = {Harald Hofstätter and contributors},
117+ title = {SymbolicIntegration.jl: Symbolic Integration for Julia},
118+ url = {https://github.com/JuliaSymbolics/SymbolicIntegration.jl},
119+ year = {2023-2025}
120+ }
121+ ```
58122
0 commit comments