Skip to content

Commit ce92e87

Browse files
Merge pull request #134 from ArnoStrouwen/lt
[skip ci] LanguageTool
2 parents c1b5180 + 5abecbb commit ce92e87

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

docs/src/basics/IntegralProblem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ depends on whether batching is used.
2121
| **vector valued `f`** | `u` is a vector, `y` is a matrix | `u` is a matrix, `y` is a matrix |
2222

2323
The last dimension is always used as the batching dimension,
24-
e.g. if `u` is a matrix, then `u[:,i]` is the `i`th point where the integrand will be evaluated.
24+
e.g., if `u` is a matrix, then `u[:,i]` is the `i`th point where the integrand will be evaluated.

docs/src/basics/solve.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ solve(prob::IntegralProblem, alg::SciMLBase.AbstractIntegralAlgorithm)
55
```
66

77
Additionally, the extra keyword arguments are splatted to the library calls, so
8-
see the documentation of the integrator library for all of the extra details.
8+
see the documentation of the integrator library for all the extra details.
99
These extra keyword arguments are not guaranteed to act uniformly.

docs/src/tutorials/numerical_integrals.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Numerically Solving Integrals
22

3-
For basic multidimensional quadrature we can construct and solve a `IntegralProblem`.
3+
For basic multidimensional quadrature, we can construct and solve a `IntegralProblem`.
44
The integral we want to evaluate is:
55
```math
66
\int_1^3\int_1^3\int_1^3 \sum_1^3 \sin(u_i) du_1du_2du_3.
@@ -15,7 +15,7 @@ sol.u
1515
```
1616
where the first argument of `IntegralProblem` is the integrand,
1717
the second argument is the lower bound, and the third argument is the upper bound.
18-
`p` are the parameters of the integrand. In this case there are no parameters,
18+
`p` are the parameters of the integrand. In this case, there are no parameters,
1919
but still `f` must be defined as `f(x,p)` and **not** `f(x)`.
2020
For an example with parameters, see the next tutorial.
2121
The first argument of `solve` is the problem we are solving,
@@ -25,8 +25,8 @@ in this case tolerances how precise the numerical approximation should be.
2525

2626
We can also evaluate multiple integrals at once.
2727
We could create two `IntegralProblem`s for this,
28-
but that is wasteful if the integrands share alot of computation.
29-
We also want to evaluate:
28+
but that is wasteful if the integrands share a lot of computation.
29+
For example, we also want to evaluate:
3030
```math
3131
\int_1^3\int_1^3\int_1^3 \sum_1^3 \cos(u_i) du_1du_2du_3.
3232
```
@@ -40,10 +40,10 @@ sol.u
4040
The keyword `nout` now has to be specified equal to the number of integrals ware are calculating, 2.
4141
Another way to think about this is that the integrand is now a vector valued function.
4242
The default value for the keyword `nout` is 1,
43-
thus is does not need to be specified for scalar valued functions.
44-
In the above example the integrand was defined out-of-position.
43+
and thus it does not need to be specified for scalar valued functions.
44+
In the above example, the integrand was defined out-of-position.
4545
This means that a new output vector is created every time the function `f` is called.
46-
If we do not want these allocations we can also define `f` in-position.
46+
If we do not want these allocations, we can also define `f` in-position.
4747
``` @example integrate3
4848
using Integrals, IntegralsCubature
4949
function f(y,u,p)
@@ -79,7 +79,7 @@ Both `u` and `y` changed from vectors to matrices,
7979
where each column is respectively a point the integrand is evaluated at or
8080
the evaluation of the integrand at the corresponding point.
8181
Try to create yourself an out-of-position version of the above problem.
82-
For the full details of the batching interface, see the [problem page](@ref prob)
82+
For the full details of the batching interface, see the [problem page](@ref prob).
8383

8484
If we would like to compare the results against Cuba.jl's `Cuhre` method, then
8585
the change is a one-argument change:
@@ -93,12 +93,12 @@ sol = solve(prob,CubaCuhre();reltol=1e-3,abstol=1e-3)
9393
sol.u
9494
```
9595
However, `Cuhre` does not support vector valued integrands.
96-
The [solvers page](@ref solvers) gives an overview which arguments each algorithm can handle.
96+
The [solvers page](@ref solvers) gives an overview of which arguments each algorithm can handle.
9797

9898
## One-dimensional integrals
9999

100100
Integrals.jl also has specific solvers for integrals in a single dimension, such as `QuadGKLJ`.
101-
For example we can create our own sine function by integrating the cosine function from 0 to x.
101+
For example, we can create our own sine function by integrating the cosine function from 0 to x.
102102

103103
``` @example integrate6
104104
using Integrals
@@ -116,13 +116,13 @@ and the integral is thus transformed to:
116116
\int_a^\infty f(u)du = \int_0^1 f\left(a+\frac{t}{1-t}\right)\frac{1}{(1-t)^2}dt
117117
```
118118
Integrals with an infinite lower bound are handled in the same way.
119-
If both upper and lower bound are infinite $u$ is substituted with $\frac{t}{1-t^2}$,
119+
If both upper and lower bound are infinite, $u$ is substituted with $\frac{t}{1-t^2}$,
120120
```math
121121
\int_{-\infty}^\infty f(u)du = \int_{-1}^1 f\left(\frac{t}{1-t^2}\right)\frac{1+t^2}{(1-t^2)^2}dt
122122
```
123123
For multidimensional integrals, each variable with infinite bounds is substituted the same way.
124124
The details of the math behind these transforms can be found
125-
[here.](https://en.wikipedia.org/wiki/Integration_by_substitution#Substitution_for_multiple_variables).
125+
[here](https://en.wikipedia.org/wiki/Integration_by_substitution#Substitution_for_multiple_variables).
126126

127127
As an example, let us integrate the standard bivariate normal probability distribution
128128
over the area above the horizontal axis, which should be equal to $0.5$.

0 commit comments

Comments
 (0)