View on GitHub

memo

Adaptive Quadrature

Adaptive Quadrature

Theory

Algorithm

$\mathrm{integrate}(f, a, b, \tau)$ method.

\[\epsilon = \abs{ Q - \int_{a}^{b} f(x) \ dx } .\] \[\begin{eqnarray} m & = & (a + b) / 2, Q & = & \mathrm{integrate}(f, a, m \tau/2) + \mathrm{integrate}(f, m, b \tau/2) . \end{eqnarray}\]

Adaptive simpson

There are many termination criteria. Let

Conventional termination criteria

\[\begin{eqnarray} \abs{ I_{1} - I_{2} } & < & \mathrm{tol} \abs{I_{1}} \label{equation_criteria_01} . \end{eqnarray}\]

Another criterion which terminate the algorithm if $I_{1}$ or $I_{2}$ is negligible compareted to the whole integral.

\[\begin{eqnarray} \abs{I_{1}} & < & \eta \label{equation_criteria_02} . \end{eqnarray}\]

We can combine both criteria.

\[\begin{eqnarray} & & \abs{I_{1} - I_{2}} < \mathrm{tol} \abs{I_{1}} \text{ or } \abs{ I_{1} } < \eta \abs{ \int_{a}^{b} f(x) \ dx } \nonumber \end{eqnarray}\]

For instance, if we choose $\eta$ and $\mathrm{tol}$ properly, the above can be written

\[\begin{eqnarray} \abs{I_{1} - I_{2}} < (0.1)^{4} \abs{I_{1}} \text{ or } \abs{ I_{1}} < (0.1)^{4} \nonumber \end{eqnarray}\]

Improved criteria to eliminate $\eta$ and $\mathrm{tol}$.

Criteria \(\eqref{equation_criteria_02}\) would be

Q + I1 == Q.

Criteria \(\eqref{equation_criteria_01}\) would be

Q + (I1 - I2) == Q.

Other Criteria One introduced by [1] is

\[\begin{eqnarray} m & = & (a + b) /2, \nonumber \\ \abs{ S(a, m) + S(m, b) - S(a, b) } < 15 \epsilon, \end{eqnarray}\]

Algortihm

Reference