Skip to content

An answer through the quotient of the logarithm's linears holds where it is given - #1663

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
an-answer-past-the-cut-keeps-its-sign
Oct 2, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
an-answer-past-the-cut-keeps-its-sign

Conversation

@Rafael-SOWNet

@Rafael-SOWNet Rafael-SOWNet commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Closes #1655.

e^atanh(a x) sqrt(c - a c x) was integrated by SolveByTheQuotientOfTheLogarithmsLinears. That route substitutes t = (1 + a x)/(1 - a x), which is the quotient inside the logarithm atanh is written with. It splits the powers of the linears as the generic case, and its comment says the answer is checked at sampled points before it is given.

The check didn't catch anything. Past a x = 1, the answer's derivative contains a fractional power of a negative number. Interval arithmetic carries an imaginary part that is only known to within rounding there, on the power's branch cut, so the interval and decimal evaluations rightly decline to evaluate it. HoldsAtSampledPoints skips a point it cannot evaluate. So it compared only the two points inside |a x| < 1, and passed. At the other two points the answer had the wrong sign:

a = 1.37, c = 3.71 derivative integrand
x = 1.43 +3.3133 −3.3133
x = 3.17 +4.4522 −4.4522

The route now also asks DiffersWhereReal, which counts a point where the integrand is real and the derivative has no value as a difference. With that the route declines, and SolveByLinearRadicalSubstitution answers instead:

(2/(3 a c)) (c (1 + a x))^(3/2) provided c - a c x >= 0

That answer is right where it is given and makes no claim past a x = 1. The neighbouring even-root step answers its relative this way already.

Test: AnExponentialOfAnInverseTangentBesideTheRootSaysWhereItHolds checks the answer's derivative inside, at a x < 1, and past it, where the integrand is real and the answer must either agree or claim nothing. Without the fix it fails at x = 1.43 with the sign above.

Measured on the Rubi corpus against master 7219aeae, with both builds side by side and every problem in each family:

family master this
3, logarithms (1382) 1323, 2 wrong 1323, 2 wrong
7, inverse hyperbolics (4289) 3679, 23 wrong 3689, 13 wrong
0, independent suites (1814) 1756, 0 wrong 1756, 0 wrong

Twelve problems moved, and I re-ran each alone. Master answers ten of them wrongly: Rubi 7.3.6 #273–#281, which are e^atanh(a x) (c - a c x)^p for every half-integer p from −7/2 to 9/2, and #455, the same integrand as #277. This PR answers all ten rightly. The other two give the same verdict on both builds when run alone. The suite passes, 14,304 tests on a fresh build, and so does the allocation gate.

Thirteen wrong answers remain in family 7, on master and here alike:

Family 3's two wrong answers are on master as well, and come from the degenerate 1/(x ln(e^x)): both our answer and Rubi's divide by ln(e^x) - x.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

… it is given

SolveByTheQuotientOfTheLogarithmsLinears splits the linears' powers as the generic case does, and
checks the answer at sampled points before giving it. That check skips a point where the
derivative has no value. Past the generic case's domain, the derivative is a fractional power of a
negative number, which the interval and decimal evaluations decline, so the check compared only
where the generic case holds. e^atanh(a x) sqrt(c - a c x), as e^(ln((1 + a x)/(1 - a x))/2), passed
it, and was wrong by its sign past a x = 1, where the integrand is real.

The route now also asks DiffersWhereReal, which counts a point where the integrand is real and
the derivative has no value as a difference. With that it declines, and the linear radical
substitution answers (2/(3 a c)) (c (1 + a x))^(3/2) provided c - a c x >= 0, which is right where
it is given.

Measured on the Rubi corpus against master 7219aea, every problem of each family, both arms
side by side: family 7 is 3679 -> 3689 of 4289 solved and 23 -> 13 wrong, with families 3 and 0
unchanged. Of the 12 problems whose verdict moved, re-run alone, master answers 10 wrongly and
this answers those 10 rightly. The suite passes, 14,304 tests, and so does the allocation gate.

Closes #1655.

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 2, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit bc6c190 into master Oct 2, 2026
34 checks passed
Rafael-SOWNet added a commit that referenced this pull request Oct 2, 2026
…and the spellings at risk measured again (#1671)

* Breaking-changes entries for the integrals that say where they hold

Two entries for answers #1663, #1667 and #1669 changed, measured on the
2.5.0 tag and on master 94ba5ff: e^atanh(a x) beside a half-integer power
of a linear, and a logarithm of e^x named as a linear, both left
unevaluated in 2.5.0.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

* The spellings at risk, measured again

`2 | 6` is divisibility now, which is what it says, so it leaves the
section; `{ x | x > 0 }` is still a one-element set, holding a
divisibility rather than a disjunction; `a != b` is still `a! = b`. And a
not-equal written `<>` prints as `not a = b`, not as `<>`. Measured on
94ba5ff.

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>
@Rafael-SOWNet
Rafael-SOWNet deleted the an-answer-past-the-cut-keeps-its-sign 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.

The integral of e^atanh(a x) sqrt(c - a c x) has the wrong sign where a x > 1

1 participant