Skip to content

The derivative of a power of x over a binomial is integrated as an arctangent over one plus a multiple of its square - #1785

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
a-power-of-x-over-a-binomial-under-its-squares-sum-is-an-arctangent
Oct 5, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
a-power-of-x-over-a-binomial-under-its-squares-sum-is-an-arctangent

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

(k - 4 f x^3)/(k^2 + 4 d f x^2 + 4 k f x^3 + 4 f^2 x^6) is w'/(2 f (1 + (d/f) w^2)) for w = x/(x^3 + k/(2 f)), and was declined with the rest of Rubi's 1.3.2:723-742 past a quartic: the partial fractions over a sextic in x, or over a sum of symbolic powers of it, are out of reach, and nothing read the quotient. 2.5.0 declined them too:

integrand 2.5.0 master 2b86349c this
(k - 4 f x^3)/(k^2 + 4 d f x^2 + 4 k f x^3 + 4 f^2 x^6) declined declined 483 characters
x^2 (3 k + 2 f x^2)/(k^2 + 4 k f x^2 + 4 f^2 x^4 + 4 d f x^6) declined declined 503 characters
(k - 2 f (n - 1) x^n)/(k^2 + 4 d f x^2 + 4 k f x^n + 4 f^2 x^(2n)) declined declined 483 characters
x^2 (3 a + b x^2)/(a^2 + 2 a b x^2 + b^2 x^4 + c^2 x^6), 1.3.1 declined declined 569 characters

Each answer is differentiated back and compared with the integrand at six points.

What changes. SolveAsTheArctangentOfAPowerOfXOverABinomial reads a denominator of four terms, each a constant times a power of x: one is d x^(2j), and the other three are a + b x^p + c x^(2p) with b^2 = 4 a c, which is c L^2 for L = x^p + b/(2c). Where the numerator is a constant multiple m of (x^j/L)' L^2 = j x^(j - 1) L - p x^(j + p - 1), the integrand is (m/c) w'/(1 + (d/c) w^2) with w = x^j/L, and the integral is m/c times that of 1/(1 + q u^2) at u = w, q = d/c: an arctangent or a logarithm by the sign of q. The constant is read at x = 1 and put in lowest terms over the symbols, as d/c is; q is named while the integral in u is asked, since a quotient of symbols there is read as a general quadratic's coefficient, with an arm for a double root that 1 + q u^2 never has. The answer is differentiated back at sampled points before it is returned.

Tests: ArctangentOfAPowerOfXOverABinomialIntegralTest, seven rows differentiated back, on both sides of 0 where the powers of x are whole.

Measured first on all of Rubi's 1.3.2 and every problem with a group of four such terms, 1,237 problems, at the corpus's 5-second budget, against master 287c69a7, the branch's base:

master this
solved 1035 1050
wrong 0 0
past the budget 22 21

Measured then on the Rubi corpus against master 287c69a7:

master this
family 0, independent suites (1814) 1772 1772
family 1, 40 a file (1381) 1308 1308
families 2 to 8, sampled (2410) 2301 2298

The harness counts no answer wrong in either. The 19 problems the two builds disagreed on, pocket and sample together, run again one build at a time: this answers 15 that master does not, 1.3.2:723-726, 731-736 and 739-742 and 1.3.1's x^2 (3 a + b x^2)/(a^2 + 2 a b x^2 + b^2 x^4 + c^2 x^6), and master none that this does not. The other four take over 19 seconds on either build, and the load decides whether they are answered: 1.1.2.4's x^4/((a + b x^2)^2 (c + d x^2)^3) was past the budget on master here and answered in 22 seconds in another run.

The suite on the commit measured, 7f146c2e, fails three tests that hold a wall clock, in a run that took 30 minutes with corpus runs and other suites on the machine: cos(x)^6/(a + b sin(x))^2 and 2 (1 - x^2)^5/((1 + x^2)^4 (a - a x^2 + 2 b x)^2) were not answered within a minute, and IntegralAnswerCacheTest.AnIntegralWithNoAnswerStillFinishesQuickly took 88 s. Run alone, the two classes pass on it in what they take on master: 5 to 8 seconds against 5 to 7, 2 against 2, and 8 to 11 against 7 to 9. The allocation gate passed. The head here, 7709df9f, merges master 91149594; the calculus and corpus tests pass on it, 4,297 tests, and the library builds for netstandard2.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits October 5, 2026 03:51
…ctangent over one plus a multiple of its square

(k - 4 f x^3)/(k^2 + 4 d f x^2 + 4 k f x^3 + 4 f^2 x^6) is
w'/(2 f (1 + (d/f) w^2)) for w = x/(x^3 + k/(2 f)), and was declined: the
partial fractions over a sextic in x, or over a sum of symbolic powers of it,
are out of reach, and nothing read the quotient. A denominator
a + b x^p + c x^(2p) + d x^(2j) with b^2 = 4 a c is read as c L^2 + d x^(2j)
for L = x^p + b/(2c), and a numerator that is a constant multiple of
(x^j/L)' L^2 is integrated as an arctangent of x^j/L, or a logarithm, by the
sign of d/c. The constants are put in lowest terms over the symbols, and the
ratio is named while it is integrated, where as a quotient of symbols it was
read as a general quadratic's coefficient.

Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…-binomial-under-its-squares-sum-is-an-arctangent

# Conflicts:
#	BREAKING-CHANGES.md
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 5, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit d0b8905 into master Oct 5, 2026
35 of 37 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the a-power-of-x-over-a-binomial-under-its-squares-sum-is-an-arctangent branch October 29, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant