Residual integrals in RUBI rules#

Most RUBI rules do not produce a closed form: they rewrite an integral into an expression that contains further integrals, which the rewriting continues on. OSR v1 encodes such a residual integral as int(λx. H)(x) (the FMP form of the OpenMath calculus1#int symbol) and states the rule for every choice of antiderivatives of the residual integrands: whatever antiderivatives a consumer finds later, the result is an antiderivative of the original integrand (Specification V1-R-005c).

In the current Integration rule set, the rules with residual integrals have the following statuses:

StatusRules with residual integrals
generalized4
proved246
refuted489
refuted, corrected928
strengthened743
strengthened, unproved185
unproved154
total2749

Source: Integration@605cbc5 (2026-11-29).

A proved rule with residual integrals#

integration.sin_add_square proved — sin(c + u) = sin c cos u + cos c sin u under the integral

∫ sin(c + d (e + f x)^2) dx → λx. sin(c) ∫ cos(d (e + f x)^2) dx + cos(c) ∫ sin(d (e + f x)^2) dx

Verification
ℝ: certified; ℂ: certified
Lean theorems
OSR.IntegrationRec.sinAddSq_real, OSR.IntegrationRec.sinAddSq_complex
Finding
residual integrals: the result contains Int[…], exported as int(λx. H)(x) (the calculus1#int FMP form); the statement holds for every choice of antiderivatives of the residual integrands. The reference rewriter does not apply this rule.
Finding
matching: the optional wildcards d., e. and f. of the v0.1 pattern are ordinary metavariables; the v1 rule does not match the instances with RUBI's default values.
RUBI source
4 Trig functions/4.1 Sine/4.1.12 (e x)^m (a+b sin(c+d x^n))^p.m#3 (RUBI 4.16.1)
Provenance
Integration@605cbc5 (2026-11-29) v1/integration.osr.json, Lean source digest 91657130…

A refuted rule with a residual integral#

Here the original integrand is defined, but a residual integrand is not:

integration.log_power_log refuted — Integration by parts of log(c log(d x^n)^p)

∫ ln(c ln(d x^n)^p) dx → λx. x ln(c ln(d x^n)^p) + -1 n p ∫ 1 ln(d x^n)^(-1) dx

Verification
ℝ: refuted; ℂ: refuted
Lean theorems
OSR.IntegrationRec.logPowLog_counterexample_real, OSR.IntegrationRec.logPowLog_counterexample_complex
Finding
counterexample: at c = d = 1 and n = p = 0 the integrand log(c log(d x^n)^p) = log 1 is defined everywhere, but the residual integrand 1/log(d x^n) = 1/log 1 is not (Lean theorems logPowLog_counterexample_real and logPowLog_counterexample_complex). Its coefficient -n p vanishes there, but the residual integral is still undefined. The rule needs log(d x^n) ≠ 0 wherever the integrand is defined, which p ≠ 0 ensures; this migration does not add it.
Finding
residual integrals: the result contains Int[…], exported as int(λx. H)(x) (the calculus1#int FMP form); the statement holds for every choice of antiderivatives of the residual integrands. The reference rewriter does not apply this rule.
Finding
matching: the optional wildcards c., d., n. and p. of the v0.1 pattern are ordinary metavariables; the v1 rule does not match the instances with RUBI's default values.
RUBI source
3 Logarithms/3.5 Miscellaneous logarithms.m#1 (RUBI 4.16.1)
Provenance
Integration@605cbc5 (2026-11-29) v1/integration.osr.json, Lean source digest 91657130…

Consequence for engines#

An engine must not apply a rule with residual integrals unless it can continue rewriting inside them; the reference rewriters do not apply them. The statement composes, which is what a rewriter that continues inside residual integrals needs.