Skip to content

Commit 03acb6b

Browse files
Merge pull request #119 from Amin-El-Sayed/lib/symbolic-integration-maxima
Add SymbolicIntegrationMaxima subpackage
2 parents 5a32d39 + 50520a1 commit 03acb6b

7 files changed

Lines changed: 905 additions & 10 deletions

File tree

.github/workflows/maxima.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: SymbolicIntegrationMaxima
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- main
8+
paths:
9+
- 'lib/SymbolicIntegrationMaxima/**'
10+
- 'src/**'
11+
- 'Project.toml'
12+
- 'test/test_files/**'
13+
- '.github/workflows/maxima.yml'
14+
push:
15+
branches:
16+
- master
17+
- main
18+
paths:
19+
- 'lib/SymbolicIntegrationMaxima/**'
20+
- 'src/**'
21+
- 'Project.toml'
22+
- 'test/test_files/**'
23+
- '.github/workflows/maxima.yml'
24+
25+
jobs:
26+
test:
27+
name: Julia ${{ matrix.version }} - ${{ matrix.group }} - ubuntu-latest
28+
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
version:
33+
- '1.10'
34+
- '1'
35+
group:
36+
- basic
37+
- difficult
38+
steps:
39+
- uses: actions/checkout@v6
40+
- uses: julia-actions/setup-julia@v3
41+
with:
42+
version: ${{ matrix.version }}
43+
- name: Install Maxima
44+
run: sudo apt-get update && sudo apt-get install -y maxima
45+
- uses: julia-actions/cache@v3
46+
- name: Run SymbolicIntegrationMaxima tests
47+
env:
48+
TEST_GROUP: ${{ matrix.group }}
49+
MAXIMA_DIFFICULT_LIMIT: '25'
50+
run: julia --project=lib/SymbolicIntegrationMaxima -e 'using Pkg; Pkg.test()'

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,22 @@ More info about them in the [methods documentation](https://docs.sciml.ai/Symbol
6464
6565
### Optional external methods
6666
67-
Additional integration methods can be provided by external packages. For example,
68-
[SymbolicIntegrationMaxima.jl](https://github.com/Amin-El-Sayed/SymbolicIntegrationMaxima.jl)
67+
Additional integration methods can be provided by optional packages. For example,
68+
the [`SymbolicIntegrationMaxima.jl`](https://github.com/JuliaSymbolics/SymbolicIntegration.jl/tree/main/lib/SymbolicIntegrationMaxima) subpackage
6969
adds a `MaximaMethod` backend that delegates to a local Maxima installation:
7070
7171
```julia
7272
using SymbolicIntegration, Symbolics, SymbolicIntegrationMaxima
7373

74-
@variables x
74+
@variables x a n
7575
integrate(exp(-x^2), x, MaximaMethod())
76+
integrate(exp(-a * x), x, 0, Inf, MaximaMethod(); assumptions=(a > 0,))
77+
integrate(x^n * log(a * x), x, MaximaMethod();
78+
assumptions=(a > 0, maxima_notequal(n, -1)))
7679
```
7780
78-
The Maxima backend is optional and is not loaded by SymbolicIntegration.jl itself.
81+
The Maxima backend is optional, requires a local Maxima installation, and is not
82+
loaded by SymbolicIntegration.jl itself.
7983
8084
### Risch Method
8185
Complete symbolic integration using the Risch algorithm from Manuel Bronstein's "Symbolic Integration I: Transcendental Functions".
@@ -103,4 +107,3 @@ If you use SymbolicIntegration.jl in your research, please cite:
103107
year = {2023-2025}
104108
}
105109
```
106-

docs/src/index.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,22 @@ multiple symbols | ❌ | ✅
6262

6363
### Optional external methods
6464

65-
External packages can provide additional integration methods. For example,
66-
[SymbolicIntegrationMaxima.jl](https://github.com/Amin-El-Sayed/SymbolicIntegrationMaxima.jl)
65+
Optional packages can provide additional integration methods. For example,
66+
the [`SymbolicIntegrationMaxima.jl`](https://github.com/JuliaSymbolics/SymbolicIntegration.jl/tree/main/lib/SymbolicIntegrationMaxima) subpackage
6767
adds a `MaximaMethod` backend that delegates integration to a local Maxima installation.
6868

6969
```julia
7070
using SymbolicIntegration, Symbolics, SymbolicIntegrationMaxima
7171

72-
@variables x
72+
@variables x a n
7373
integrate(exp(-x^2), x, MaximaMethod())
74+
integrate(exp(-a * x), x, 0, Inf, MaximaMethod(); assumptions=(a > 0,))
75+
integrate(x^n * log(a * x), x, MaximaMethod();
76+
assumptions=(a > 0, maxima_notequal(n, -1)))
7477
```
7578

76-
The Maxima backend is optional and is not loaded by SymbolicIntegration.jl itself.
79+
The Maxima backend is optional, requires a local Maxima installation, and is not
80+
loaded by SymbolicIntegration.jl itself.
7781

7882
### RuleBased
7983
This method uses a large number of integration rules that specify how to integrate various mathematical expressions.

docs/src/methods/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@ This method uses a large number of integration rules that specify how to integra
1717
## Optional external methods
1818

1919
Additional packages can extend SymbolicIntegration.jl with their own integration methods.
20-
[SymbolicIntegrationMaxima.jl](https://github.com/Amin-El-Sayed/SymbolicIntegrationMaxima.jl)
20+
The [`SymbolicIntegrationMaxima.jl`](https://github.com/JuliaSymbolics/SymbolicIntegration.jl/tree/main/lib/SymbolicIntegrationMaxima) subpackage
2121
provides a `MaximaMethod` backend for users who want to delegate integrals to a local Maxima installation.
22+
It supports indefinite and definite integrals, plus Maxima assumptions such as
23+
`assumptions=(a > 0, maxima_notequal(n, -1))` for parameter-dependent integrals.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name = "SymbolicIntegrationMaxima"
2+
uuid = "6f8f0c92-4498-4b29-a8cc-7d11f58db8c9"
3+
authors = ["Amin Elsayed and contributors"]
4+
version = "0.1.1"
5+
license = "MIT"
6+
description = "Optional Maxima backend for SymbolicIntegration.jl"
7+
8+
[deps]
9+
SymbolicIntegration = "315ce56f-eed0-411d-ab8a-2fbdf9327b51"
10+
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
11+
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
12+
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
13+
14+
[sources]
15+
SymbolicIntegration = {path = "../.."}
16+
17+
[compat]
18+
Elliptic = "1.0.1"
19+
HypergeometricFunctions = "0.3.28"
20+
PolyLog = "2.6.0"
21+
SpecialFunctions = "2"
22+
SymbolicIntegration = "3"
23+
SymbolicUtils = "4"
24+
Symbolics = "7"
25+
julia = "1.10"
26+
27+
[extras]
28+
Elliptic = "b305315f-e792-5b7a-8f41-49f472929428"
29+
HypergeometricFunctions = "34004b35-14d8-5ef3-9330-4cdb6864b03a"
30+
PolyLog = "85e3b03c-9856-11eb-0374-4dc1f8670e7f"
31+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
32+
33+
[targets]
34+
test = ["Elliptic", "HypergeometricFunctions", "PolyLog", "Test"]

0 commit comments

Comments
 (0)