View source: R/double_integrate.R
| vc_double_integrate | R Documentation |
Integrate over a Cartesian region with nested fixed quadrature
vc_double_integrate(
f,
interval,
lower,
upper,
order = c("yx", "xy"),
method = c("simpson", "trapezoid"),
n_outer = 16L,
n_inner = 16L,
abs_tol = 1e-08,
rel_tol = 1e-08
)
f |
Scalar field taking one numeric vector in x,y order. |
interval |
Finite outer bounds, possibly reversed or equal. |
lower, upper |
Functions giving finite ordered inner bounds. |
order |
Inner then outer coordinate: yx (type I) or xy (type II). |
method |
Simpson or trapezoid rule. |
n_outer, n_inner |
Initial cell counts, refined at both levels. |
abs_tol, rel_tol |
Nonnegative diagnostic tolerances, one positive. |
Reuses vc_integrate unchanged. Adds its outer error indicator to the sum of absolute finest outer weights times inner error indicators. This is heuristic, never a certified bound. All inner flags are retained. Finite sampling does not prove integrability, Fubini hypotheses or boundary ordering between samples. Split known singularities and complex regions. Outer reversal changes sign; sampled inner reversal is rejected. Equal bounds contribute zero without field evaluations. Signed integrals are not geometric volumes. Polar and adaptive nested quadrature are not included.
List with estimate, error_estimate, tolerance_met, full outer and cached inner vc_integrate results, sections, order, interval and status.
(function(v)v[1]+2*v[2]) |>
vc_double_integrate(c(0,1),function(x)0,function(x)x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.