You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,20 @@ the documentation, which contains the unreleased features.
27
27
28
28
## Examples
29
29
30
-
For basic multidimensional quadrature we can construct and solve a `IntegralProblem`:
30
+
To perform one-dimensional quadrature, we can simply construct an `IntegralProblem`. The code below evaluates $\int_{-2}^5 \sin(xp)~\mathrm{d}x$ with $p = 1.7$. This argument $p$ is passed
31
+
into the problem as the fourth argument of `IntegralProblem`.
32
+
33
+
```julia
34
+
using Integrals
35
+
f(x, p) =sin(x*p)
36
+
p =1.7
37
+
prob =IntegralProblem(f, -2, 5, p)
38
+
sol =solve(prob, QuadGKJL())
39
+
```
40
+
41
+
For basic multidimensional quadrature we can construct and solve a `IntegralProblem`. Since we are using no arguments `p` in this example, we omit the fourth argument of `IntegralProblem`
42
+
from above. The lower and upper bounds are now passed as vectors, with the `i`th elements of
43
+
the bounds giving the interval of integration for `x[i]`.
0 commit comments