Skip to content

An even root written apart says where it holds when the integrand is real beyond it - #1669

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
the-folded-root-keeps-its-sign
Oct 2, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
the-folded-root-keeps-its-sign

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Closes #1664.

e^atanh(x) sqrt(1 - x) is sqrt((1 + x)/(1 - x)) sqrt(1 - x). SolveByWritingAPowerOfAQuotientApart wrote the root of the quotient apart as sqrt(1 + x) (1 - x)^(-1/2) and answered (1 + x)^(3/2)/(3/2). An even root written apart is exact wherever the root is real, and AnEvenRootOfAProductSplits checks that on every interval between the roots of the factors. Where the product is negative, the root is not real, and the check took that to mean the integrand is not asked about there. Past x = 1 it is asked about. e^atanh(x) and sqrt(1 - x) are both imaginary there, so their product is real, and the root written apart has the other sign:

on master x = 0.29 x = 1.43 x = 3.17
integrand 1.13578 −1.55885 −2.04206
derivative of the answer 1.13578 +1.55885 +2.04206

Now, on an interval where the product is negative, the integrand is evaluated at the interval's sample point in interval arithmetic, with any other symbol pinned to either sign. If it is decidedly not real there, nothing changes. Otherwise the root is still written apart, and the answer says where it holds:

e^atanh(x)*(1-x)^(1/2)   =>   (1 + x)^(3/2)/(3/2) provided (1 + x)/(1 - x) >= 0

The only answers that change are ones that were wrong past the root. Where the integrand is not real between the roots, as for ((x - 1)^3 (x + 2)^5)^(1/4) between −2 and 1, the answer stays unconditional. Declining the split instead would leave sqrt((1 + x)/(1 - x)) sqrt(1 - x) with no answer at all.

Test: AnAnswerFromARootWrittenApartHoldsWhereItIsGiven covers e^atanh(x) sqrt(1 - x), e^atanh(x)/sqrt(1 - x) and the bare sqrt((1 + x)/(1 - x)) sqrt(1 - x). The answer's derivative must equal the integrand at x = 0.29 and −0.61. At 1.43 and 3.17, where the integrand is real, the answer must agree or claim nothing. All three rows fail on master, which gives the sign in the table above.

Measured on the Rubi corpus against master 38974356, which has the same library as this branch's base 422c7112, with both builds side by side:

master this
family 7, inverse hyperbolic functions (4289) 3673, 23 wrong 3682, 15 wrong
family 0, independent suites (1814) 1758 1758
families 1 to 6, sampled (1724) 1509 1509

Twelve problems moved, and I re-ran each alone on both builds:

The 15 still wrong in family 7 are the ten #1663 fixed on master, which this branch's base doesn't have, and the five of #1665.

The suite passes, 14,306 tests on a fresh build, and so does the allocation gate.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…real beyond it

`e^atanh(x) sqrt(1 - x)` is `sqrt((1 + x)/(1 - x)) sqrt(1 - x)`, and the root of the quotient was
written apart as `sqrt(1 + x)`, which is the integrand only for `x < 1`. Past `x = 1` the even root is
not real, and the splitting took that to mean the integrand is not asked about there; but the
integrand is real, the product of two imaginary factors, and of the other sign.

Where the product under an even root is negative on an interval, the integrand is now evaluated at
that interval's sample point in interval arithmetic. Unless it is decidedly not real there, the root
still splits, and the answer says it holds where the root is real: `provided (1 + x)/(1 - x) >= 0`.

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 94ba5ff 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 the-folded-root-keeps-its-sign branch October 29, 2026 00:44
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(x) times a half-integer power of 1 - x has the wrong sign past x = 1

1 participant