vc_double_integrate: Integrate over a Cartesian region with nested fixed...

View source: R/double_integrate.R

vc_double_integrateR Documentation

Integrate over a Cartesian region with nested fixed quadrature

Description

Integrate over a Cartesian region with nested fixed quadrature

Usage

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
)

Arguments

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.

Details

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.

Value

List with estimate, error_estimate, tolerance_met, full outer and cached inner vc_integrate results, sections, order, interval and status.

Examples

(function(v)v[1]+2*v[2]) |>
  vc_double_integrate(c(0,1),function(x)0,function(x)x)

vectorialcalculus documentation built on Nov. 17, 2026, 1:09 a.m.