Skip to content

Answer a half-angle integrand through two roots where the cosine is negative too - #1959

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-half-angle-answer-through-two-roots-holds-where-the-cosine-is-negative
Oct 20, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-half-angle-answer-through-two-roots-holds-where-the-cosine-is-negative

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The half-angle rule beside a half-odd power of 1 ± sec(y) (#1584, after 2.5.0) writes each root of a constant times the secant or the cosine apart in t = tan(y/2). That holds where cos(y) > 0. Beyond that, each root turns its sign by its constant's, while two roots make the integrand real on both sides. So an answer through two roots said provided cos(y) >= 0: correct, but silent on half of the integrand's real domain.

Which roots turn is known from their constants. For an even number of them, the turns multiply to (-1)^n s, where n is the number of roots of the cosine and s is the sign of the product of the constants. The integrand is real exactly where s > 0. The answer now holds there as written, with sgn(cos(y)) in front when n is odd. It says provided a > 0 or cos(y) >= 0 only where the sign of s is not known. An odd number of roots above one still says provided cos(y) >= 0.

Probed at points on both sides of the cosine's zeros, 381 of the 481 two-root rows of Rubi's 4.5 go from an answer missing there to one that differentiates back everywhere the integrand is real. None got worse.

Measured on 8a1ef454, branch against master. intbench already counted these rows as solved from the side where the answer held, so the counts do not move:

Run Problems Master Branch
Pocket: Rubi's 4.5 and the files that reach the rule 2,966 2,950 2,950
Family 1, 40 a file 1,381 1,362 1,362
Family 0, whole 1,814 1,789 1,789
Families 2 to 8, sampled 2,410 2,362 2,360

The two moves are 3.2.1:292 and 7.4.1:369. Both time out on both builds when re-run alone. No run had a wrong answer.

OnePlusASecantHalfPowerIntegralTest checks both signs of the cosine and of the constants; 13 of its cases fail on the old rule. In LinearRadicalSubstitutionIntegralTest, two cases that asserted the old condition now accept a right value or none beyond it, with the reason in their comments. The rule's unreleased BREAKING-CHANGES.md entry is amended.

Part of #233.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…egative too

The half-angle rule beside a half-odd power of `1 ± sec` writes each root of a
constant times the secant or cosine apart in t = tan(y/2). That is exact where
cos(y) > 0. Beyond it each root turns its sign by its constant's, and two roots
make the integrand real on both sides at once, so the answer said
`provided cos(y) >= 0`: half of the integrand's domain, for every one of the
165 rows of Rubi's 4.5.4.2 that took the rule. Which roots turn is known from
their constants. For an even number of roots, the turns multiply to (-1)^n s,
where n is the number of roots of the cosine and s is the sign of the product
of the constants, and the integrand is real just where s > 0. The answer now
holds there as written, with `sgn(cos(y))` in front for an odd n, and says
`provided a > 0 or cos(y) >= 0` only where s is not known. An odd number
above one still says `provided cos(y) >= 0`.

Part of #233.

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 20, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit d1d0296 into master Oct 20, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 20, 2026
Rafael-SOWNet added a commit that referenced this pull request Oct 20, 2026
…#1967)

The half-angle rule beside a half-odd power of 1 ± sec writes each root of a
constant times the secant or cosine apart in t = tan(y/2). For N roots, n of
them of the cosine, with s the sign of the product of their constants: where
the cosine is negative the turns multiply to (-1)^(N+n) s, the integrand is real
there exactly where (-1)^N s > 0, and there the turns are (-1)^n. #1959 used
this for an even N. For an odd N the root of 1 - t^2 stays in the answer in t,
which is kept beyond t^2 < 1 only where its derivative holds there at sampled
points of both signs. With the cosine's sign in front where n is odd, it holds
on the whole real domain. Where s is not known the condition is now
`provided <product> < 0 or cos(y) >= 0`. The cosecant takes the same path
through the complement, with sgn(sin(y)).

sqrt(-1 - sec(x)) sqrt(sec(x)) sqrt(cos(x)), real only where the cosine is
negative, had no value anywhere it is real. No Rubi row has an odd root count
above one, and the answers to every fair row of Rubi's 4.5 and 4.6 (2,966 rows,
1,317 of them with roots) are byte-identical.

Part of #233.


Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant