Skip to content

Two roots of linears over a linear off the real line are integrated - #1780

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
a-sign-arm-off-the-real-line-beside-two-roots
Oct 5, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
a-sign-arm-off-the-real-line-beside-two-roots

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

1/(sqrt(x) sqrt(a + b x) (1 - i x)) was answered on master with a piecewise that held at no point. 2.5.0 declined it:

integrand 2.5.0 master 092b2815 this
1/(sqrt(x) sqrt(a + b x) (1 - i x)) declined no value at any point 99 characters
sqrt(x)/(sqrt(a + b x) (1 + i x)) declined no value at any point 442 characters
sqrt(x) sqrt(a + b x)/(1 + i x) declined no value at any point 597 characters

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

What changes. SolveAPolynomialOverAPowerOfALinearBesideTwoRoots ends with two closed forms over the roots of two linears, one for int 1/S and one for int 1/(y S) with y a third linear, each an arctangent for one sign of a quantity and a logarithm for the other, chosen by BySign: the form for the sign of a number, and both, each where it holds, for a quantity with symbols in it. Over a linear whose coefficients are not real the quantity has no sign -- -i a - b < 0 is NaN, the complex numbers not being ordered -- and neither arm held. Both forms use nothing about their root but sqrt(q)^2 = q, so either is an antiderivative wherever the quantity is not zero, whatever its phase; the sign only chooses the form that is real on the real line. The two calls say so now, and a quantity with the imaginary unit in it takes the form for a positive one alone, rather than a piecewise. The other callers of BySign, an arcsine among their forms, need more of their root and are left as they were.

Tests: RootsOfLinearsOffTheRealLineIntegralTest, three rows compared as complex numbers; master answers all three with a piecewise that has no value at any of the four points.

Measured first on all of Rubi's 4.3.2.1 and 4.3.3.1, 1,948 problems run, at the corpus's 5-second budget, against master 287c69a7, the branch's base:

master this
solved 1514 1515
wrong 0 0
past the budget 308 308

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 1306
families 2 to 8, sampled (2410) 2301 2301

The corpus cannot see the change: an answer with no value at any point is filed by the harness as one it cannot check on the reals, and so is one compared as complex numbers, so master's piecewise and this branch's answers count alike. The seven problems the two builds disagreed on, run again one build at a time, are rows at the edge of the harness's patience, answered at 8 to 24 seconds by both builds where either answers; master answers five of them alone and this four, the fifth 1.1.2.4:343, at 23 seconds on master, which went the same way in two other branches' runs the same night. The figures above were measured with three other corpus runs on the machine.

The suite on the commit measured, 864693e3, passed but for IntegralAnswerCacheTest.AnIntegralWithNoAnswerStillFinishesQuickly, which allows a declined integral thirty seconds and took forty-six with four corpus runs on the machine; its class passes alone in four seconds. The allocation gate passed. The head here, 0f8e76a6, merges master 092b2815; the calculus and corpus tests pass on it 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 4, 2026 22:56
1/(sqrt(x) sqrt(a + b x) (1 - i x)) was declined: the closed forms for two
roots of linears over a third chose between an arctangent and a logarithm by
the sign of a quantity that has none off the real line, and the piecewise on
it held at no point. Both forms use nothing about their root but
sqrt(q)^2 = q, so the one for a positive quantity is an antiderivative
whatever the quantity's phase, and with the imaginary unit in the quantity it
is taken alone. Only for those two forms; the other callers of the same
choice, an arcsine among them, are left as they were.

Part of #718

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 5, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit f6e1e30 into master Oct 5, 2026
34 checks passed
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