Repository navigation
Answer an odd number of secant roots where the cosine is negative too - #1967
Merged
Rafael-SOWNet merged 1 commit intoOct 20, 2026
Conversation
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. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #1959, which answered an even number of roots of a constant times the secant or cosine on both sides of the cosine's zeros. This does the same for an odd number.
For N roots, n of them of the cosine, let s be the sign of the product of their constants. Where the cosine is negative:
(-1)^(N+n) s;(-1)^N s > 0;(-1)^n.For an odd N the root of
1 - t^2stays in the answer int. That answer is kept beyondt^2 < 1only where its derivative holds there at sampled points of both signs. It then carries the cosine's sign in front where n is odd, and holds on the whole real domain. Where s is not known, the condition is nowprovided <product> < 0 or cos(y) >= 0. The cosecant takes the same path through the complement, withsgn(sin(y)).sqrt(-1 - sec(x)) sqrt(sec(x)) sqrt(cos(x))is real only where the cosine is negative, and its answer had no value anywhere the integrand is real. It holds there now. 2.5.0 declined these integrands.No Rubi row has an odd root count above one. Measured with the canonical intbench (its
Partialverdict included) on every fair row of Rubi's 4.5.x and 4.6.x, 2,966 rows, mastera639f292against the branch:One row moved from Solved to Timeout under load 20 (4.6.7:19). Re-run back to back, it is solved on both builds: 20.8 s on master, 18.2 s on the branch.
DerivativeHoldsAtSampledPointsgains an optional set of points.OnePlusASecantHalfPowerIntegralTestadds 18 cases at both signs of the cosine and of the constants, compared wherever the integrand is real. They replace a case that asserted the old condition.BREAKING-CHANGES.mdhas the entry, and the half-angle entry's sentence on three roots is corrected.Part of #233.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura