Skip to content

Commit ce4a2c4

Browse files
Merge pull request #53 from shahriariravanian/main
documentation edits
2 parents 932be20 + 6430a59 commit ce4a2c4

File tree

3 files changed

+38
-33
lines changed

3 files changed

+38
-33
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SymbolicNumericIntegration"
22
uuid = "78aadeae-fbc0-11eb-17b6-c7ec0477ba9e"
33
authors = ["Shahriar Iravanian <[email protected]>"]
4-
version = "1.2.1"
4+
version = "1.2.3"
55

66
[deps]
77
DataDrivenDiffEq = "2445eb08-9709-466a-b3fc-47e12bd697a2"

docs/src/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ integrate(eq, x; kwargs...)
9898

9999
## Testing
100100

101-
`test/runtests.jl` contains a test suite of 160 easy to moderate test integrals (can be run by calling `test_integrals`). Currently, **SymbolicNumericIntegration.jl** solves more than 90% of its test suite.
101+
`test/runtests.jl` contains a test suite of 170 easy to moderate test integrals (can be run by calling `test_integrals`). Currently, **SymbolicNumericIntegration.jl** solves more than 95% of its test suite.
102102

103-
Additionally, 12 test suites from the *Rule-based Integrator* ([Rubi](https://rulebasedintegration.org/)) are included in the `/test` directory. For example, we can test the first one as below ([Axiom](http://www.axiom-developer.org/) refers to the format of the test files)
103+
Additionally, 12 test suites from the *Rule-based Integrator* ([Rubi](https://rulebasedintegration.org/)) are included in the `/test` directory. For example, we can test the first one as below. *Axiom* refers to the format of the test files)
104104

105105
```julia
106106
using SymbolicNumericIntegration

src/integral.jl

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,32 @@ integrate(x * sin(2x))
1717
((1//4)*sin(2x) - (1//2)*x*cos(2x), 0, 0)
1818
```
1919
20-
kwards:
20+
Arguments:
21+
----------
22+
- `eq`: a univariate expression
23+
- `x`: the independent variable (optional)
24+
25+
Keyword Arguments:
26+
------------------
27+
- `abstol` (default: `1e-6`): the desired tolerance
28+
- `num_steps` (default: `2`): the number of different steps with expanding basis to be tried
29+
- `num_trials` (default: `10`): the number of trials in each step (no changes to the basis)
30+
- `show_basis` (default: `false`): if true, the basis (list of candidate terms) is printed
31+
- `bypass` (default: `false`): if true do not integrate terms separately but consider all at once
32+
- `symbolic` (default: `false`): try symbolic integration first
33+
- `max_basis` (default: `100`): the maximum number of candidate terms to consider
34+
- `verbose` (default: `false`): print a detailed report
35+
- `complex_plane` (default: `true`): generate random test points on the complex plane (if false, the points will be on real axis)
36+
- `radius` (default: `1.0`): the radius of the disk in the complex plane to generate random test points
37+
- `opt` (default: `STLSQ(exp.(-10:1:0))`): the sparse regression optimizer (from DataDrivenSparse)
38+
- `homotopy` (default: `true`): use the homotopy algorithm to generate the basis (*deprecated*, will be removed in a future version)
39+
- `use_optim` (default: `false`): use Optim.jl `minimize` function instead of the STLSQ algorithm (*experimental*)
40+
41+
Output:
2142
-------
22-
abstol: the desired tolerance
23-
num_steps: the number of different steps with expanding basis to be tried
24-
num_trials: the number of trials in each step (no changes to the basis)
25-
radius: the radius of the disk in the complex plane to generate random test points
26-
show_basis: if true, the basis (list of candidate terms) is printed
27-
opt: the sparse regression optimizer (from DataDrivenSparse)
28-
bypass: if true do not integrate terms separately but consider all at once
29-
symbolic: try symbolic integration first
30-
max_basis: the maximum number of candidate terms to consider
31-
verbose: print a detailed report
32-
complex_plane: generate random test points on the complex plane (if false, the points will be on real axis)
33-
homotopy: use the homotopy algorithm to generate the basis (deprecated, will be removed in a future version)
34-
use_optim: use Optim.jl `minimize` function instead of the STLSQ algorithm (**experimental**)
35-
36-
output:
37-
-------
38-
solved: the solved integral
39-
unsolved: the residual unsolved portion of the input
40-
err: the numerical error in reaching the solution
43+
- `solved`: the solved integral
44+
- `unsolved`: the residual unsolved portion of the input
45+
- `err`: the numerical error in reaching the solution
4146
"""
4247
function integrate(eq, x = nothing; abstol = 1e-6, num_steps = 2, num_trials = 10,
4348
radius = 1.0,
@@ -77,11 +82,11 @@ applies the integral summation rule ∫ Σᵢ fᵢ(x) dx = Σᵢ ∫ fᵢ(x) dx
7782
7883
inputs:
7984
------
80-
eq: the integrand
81-
x: the indepedent variable
82-
l: a logger
85+
- eq: the integrand
86+
- x: the indepedent variable
87+
- l: a logger
8388
84-
output is the same as `integrate`
89+
The output is the same as `integrate`
8590
"""
8691
function integrate_sum(eq, x, l; bypass = false, kwargs...)
8792
solved = 0
@@ -139,11 +144,11 @@ which is assume to be a single term.
139144
140145
inputs:
141146
-------
142-
eq: the integrand
143-
x: the indepedent variable
144-
l: a logger
147+
- eq: the integrand
148+
- x: the indepedent variable
149+
- l: a logger
145150
146-
output is the same as `integrate`
151+
The output is the same as `integrate`
147152
"""
148153
function integrate_term(eq, x, l; kwargs...)
149154
args = Dict(kwargs)
@@ -251,8 +256,8 @@ find a linear combination of the basis, whose derivative is equal to eq
251256
252257
output:
253258
-------
254-
solved: the solved integration problem or 0 otherwise
255-
err: the numerical error in reaching the solution
259+
- solved: the solved integration problem or 0 otherwise
260+
- err: the numerical error in reaching the solution
256261
"""
257262
function try_integrate(eq, x, basis, radius; kwargs...)
258263
args = Dict(kwargs)

0 commit comments

Comments
 (0)