The power rule, refuted and corrected#

A rule that a computer algebra system applies inside a long rewriting strategy can rely on earlier rules having handled the degenerate cases. A rule published on its own cannot: OSR v1 states each rule as a theorem, for every assignment of its metavariables that satisfies its conditions. Stated this way, two classical forms of the power rule are false.

The derivative power rule#

The Calculus v0.1 rule d/dx xⁿ = n xⁿ⁻¹ had no condition besides independence of n from x. At n = 0 and x = 0, x⁰ is defined around 0 but 0 · x⁻¹ is not defined at 0, so the rule produces an undefined expression from a defined one. Lean establishes the counterexample:

calculus.derivative.power refuted, corrected — Power rule

d/dx (x^n) → λx. n x^(n + -1)

Verification
ℝ: refuted; ℂ: unproved
Lean theorems
OSR.Calculus.derivPow_counterexample
Finding
counterexample: at n = 0 and x = 0, x^0 is defined around 0 but n * x^(n - 1) = 0 * x^(-1) is undefined at 0, so the v0.1 rule, whose only condition is FreeQ, fails there (Lean theorem derivPow_counterexample). The strengthened variant calculus.derivative.power_nonzero, with the condition n ≠ 0, is proved.
Corrected variant
calculus.derivative.power_nonzero
Provenance
Calculus@7081bbc (2026-11-29) v1/calculus.osr.json, Lean source digest 092c7818…

With the condition n ≠ 0, the rule holds over ℝ and over ℂ; the corrected variant is proved, and an engine applies it whenever n is a number other than 0, so d/dx x³ = 3 x² is rewritten while x⁰ and xⁿ are left alone:

calculus.derivative.power_nonzero strengthened — Power rule, n ≠ 0

d/dx (x^n) → λx. n x^(n + -1)

Conditions
n ≠ 0
Added condition
n ≠ 0
Verification
ℝ: certified; ℂ: certified
Lean theorems
OSR.Calculus.derivPowNonzero_real, OSR.Calculus.derivPowNonzero_complex
Finding
strengthened: the condition n ≠ 0 (relation1#neq) is appended to the converted v0.1 conditions. This corrected variant is not the v0.1 rule as stated: it excludes the degenerate case of the counterexample to calculus.derivative.power, which stays refuted.
Corrects
calculus.derivative.power
Provenance
Calculus@7081bbc (2026-11-29) v1/calculus.osr.json, Lean source digest 092c7818…

The antiderivative of a power of a linear function#

RUBI 4.16.1 rule 1.1.1.1 #4 integrates (a + b x)^m under the single condition m ≠ -1. At b = 0 the integrand is a constant, defined everywhere, while the result divides by b (m + 1) = 0. RUBI excludes this case by its rule order or by evaluation; the rule stated on its own is refuted:

integration.linear_power refuted, corrected — Antiderivative of a power of a linear function

∫ (a + b x)^m dx → λx. (a + b x)^(m + 1) (b (m + 1))^(-1)

Conditions
m ≠ -1
Verification
ℝ: refuted; ℂ: refuted
Lean theorems
OSR.Integration.linearPower_counterexample_real, OSR.Integration.linearPower_counterexample_complex
Finding
counterexample: at a = 1 and b = m = 0 the condition m ≠ -1 holds and the integrand (a + b x)^m is defined everywhere, but (b (m + 1))^(-1) is not (Lean theorems linearPower_counterexample_real and linearPower_counterexample_complex). The rule needs b ≠ 0, which this migration does not add.
Finding
conditions: RUBI's NeQ[m, -1] becomes a relation1#neq condition, read semantically (both sides defined, values different); Mathematica's NeQ tests that the difference is not possibly zero. The reference rewriter does not apply conditional rules.
Finding
matching: the optional wildcards a. and b. of the v0.1 pattern are ordinary metavariables; the v1 rule does not match the instances with RUBI's default values.
RUBI source
1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.1 (a+b x)^m.m#4 (RUBI 4.16.1)
Corrected variant
integration.linear_power_nondegenerate
Provenance
Integration@605cbc5 (2026-11-29) v1/integration.osr.json, Lean source digest 91657130…

The strengthened variant appends the missing non-degeneracy condition to the converted RUBI conditions, keeps the same pattern, replacement and legacy_id, and is proved over ℝ and ℂ:

integration.linear_power_nondegenerate strengthened — ∫ (a + b x)^m = (a + b x)^(m+1)/(b (m+1)), when b (m+1) ≠ 0

∫ (a + b x)^m dx → λx. (a + b x)^(m + 1) (b (m + 1))^(-1)

Conditions
m ≠ -1, b (m + 1) ≠ 0
Added condition
b (m + 1) ≠ 0
Verification
ℝ: certified; ℂ: certified
Lean theorems
OSR.IntegrationRec37.linearPowerNondeg_real, OSR.IntegrationRec37.linearPowerNondeg_complex
Finding
strengthened: the condition b (m + 1) ≠ 0 (relation1#neq) is appended to the converted v0.1 conditions. This corrected variant is not RUBI's rule as stated: it excludes the degenerate case of the counterexample to integration.linear_power, which stays refuted.
Finding
conditions: RUBI's NeQ[m, -1] becomes a relation1#neq condition, read semantically (both sides defined, values different); Mathematica's NeQ tests that the difference is not possibly zero. The reference rewriter does not apply conditional rules.
Finding
matching: the optional wildcards a. and b. of the v0.1 pattern are ordinary metavariables; the v1 rule does not match the instances with RUBI's default values.
RUBI source
1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.1 (a+b x)^m.m#4 (RUBI 4.16.1)
Corrects
integration.linear_power
Provenance
Integration@605cbc5 (2026-11-29) v1/integration.osr.json, Lean source digest 91657130…

The plain power rule ∫ x^m dx = x^(m+1)/(m+1) for m ≠ -1 has no such degenerate case and is proved as stated:

integration.power proved — Power rule for antiderivatives

∫ x^m dx → λx. x^(m + 1) (m + 1)^(-1)

Conditions
m ≠ -1
Verification
ℝ: certified; ℂ: certified
Lean theorems
OSR.Integration.power_real, OSR.Integration.power_complex
Finding
exponent: the fragment interprets arith1#power for integer exponents only, so the statement covers the integer values of m; for other values the integrand is undefined.
Finding
conditions: RUBI's NeQ[m, -1] becomes a relation1#neq condition, read semantically (both sides defined, values different); Mathematica's NeQ tests that the difference is not possibly zero. The reference rewriter does not apply conditional rules.
Finding
matching: the optional wildcard m. of the v0.1 pattern is an ordinary metavariable; the v1 rule does not match the instances with RUBI's default value.
RUBI source
1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.1 (a+b x)^m.m#2 (RUBI 4.16.1)
Provenance
Integration@605cbc5 (2026-11-29) v1/integration.osr.json, Lean source digest 91657130…

Why the refuted rule stays#

The refuted rule is not deleted or silently repaired: it remains in the rule set with its counterexample, so a consumer who imports RUBI’s rule as written learns exactly where it fails. The corrected variant is a separate, clearly labelled rule (see strengthened variants).