Skip to content

A radical function of whole powers of x written through its logarithm says where its answer holds - #1729

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
the-logarithm-substitution-says-where-it-holds
Oct 4, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
the-logarithm-substitution-says-where-it-holds

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

1/csch(2 ln(c x))^(1/2) is sqrt(sinh(2 ln(c x))), which is sqrt(((c x)^2 - (c x)^(-2))/2) and real on both sides of zero. Master integrates it under t = ln(c x), and the answer is right for a positive c x and wrong for every negative one; 2.5.0 declined it. Checked on both sides of zero at c = 1.3, x = ±1.3, ±1.9, ±2.7:

integrand master b2157e08 this
1/csch(2 ln(c x))^(1/2) right at the three positive points, wrong at the three negative ones the same answer provided c x > 0, right at the three positive points
csch(2 ln(x))^(-3/2) the same the same, provided x > 0
1/sech(2 ln(x))^(1/2) the same the same, provided x > 0
sqrt(sinh(2 ln(c x))) right at all six unchanged

Why. For a negative c x, t = ln(c x) is ln(-c x) + i pi. The integral in t is found by rules that take t to be real: the exponential substitution u = e^t takes u out from under a root as positive. A function of whole powers of e^t is real at t + i pi as well, so for those integrands it shows: the answer is the integrand's antiderivative for a positive c x and not for a negative one.

What changes. Where the integrand in t holds t only in exponentials e^(k t + a) with a whole k, some of them under a power that is not whole, the logarithm's two substitution rules give their answer provided c x^n > 0 -- or x > 0 -- and nothing is said for a negative c x^n. For an even n and a positive numeric c the condition always holds and is left off. A rational function of e^t uses no positivity and keeps its answer as it was. The same integrand written in powers of x, sqrt(sinh(2 ln(c x))) above, is answered on both sides by the fold of an exponential of a logarithm before either rule, as before.

Tests: LogarithmSubstitutionTest.ARadicalFunctionOfAWholePowerOfX, six rows compared at three negative and three positive points: four answered provided the logarithm's argument is positive, and holding at every positive point, which fail on master at the negative ones; and two written in powers of x, which hold at all six.

Measured first with the corpus's check of the negative side switched on (IB_BOTHSIDES=1) on the 177 problems with an exponential or a hyperbolic function and a logarithm in them, at the corpus's 5-second budget, against master 8f3757cd, the branch's base:

master this
answered 149 155
wrong 6 0

The six wrong on master are 6.5.3's 1/sech(2 ln(c x))^(1/2) and ^(3/2), and 6.6.3's 1/csch(2 ln(c x))^(1/2), ^(3/2), csch(2 ln(c x))^(1/2)/x^4 and csch(2 ln(c x))^(3/2)/x^2, each right for a positive x only; here all six are answered provided c x > 0. Two of them are checked only after Simplify() on both builds, since the derivative of the raw answer holds a sgn the harness does not evaluate.

Measured then on the Rubi corpus against master 8f3757cd:

master this
family 0, independent suites (1814) 1766 1766
family 1, 40 a file (1381) 1296 1297
families 2 to 8, sampled (2410) 2215 2219

No answer is wrong in the sample on either build. The difference is five problems far past the corpus's five seconds on both builds, whose verdict there is decided by when the budget is noticed: run again one build at a time, three of them went the other way. Measured alternately with no budget, four are answered on both builds in the same time, 16 to 35 s -- log(e (f (a + b x)^p (c + d x)^q)^r)/(a + b x)^4, sqrt(g sin(e + f x))/((c + d sin(e + f x)) sqrt(a + a sin(e + f x))), x/csch(x)^(5/2) + 3/5 x/sqrt(csch(x)) and 1/(x (a x + b x^3 + c x^5)^2) -- and 1/((a g + b g x)^3 (A + B ln(e (a + b x)/(c + d x)))) runs past 150 s on both.

The suite passes on the commit measured, 537ca738, 14,597 tests with 13 skipped, run under a 4 GB heap limit, and so does the allocation gate. Master b2157e08 is merged in since, without conflicts; the calculus tests pass on the merge, 4,017 of them, and every row above is as the table says on it.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits October 3, 2026 21:16
… says where its answer holds

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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 4, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit ba8eb99 into master Oct 4, 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