Skip to content

Answer an odd number of secant roots where the cosine is negative too - #1967

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
an-odd-number-of-secant-roots-holds-where-the-cosine-is-negative
Oct 20, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
an-odd-number-of-secant-roots-holds-where-the-cosine-is-negative

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

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:

  • the turns multiply to (-1)^(N+n) s;
  • the integrand is real there exactly where (-1)^N s > 0;
  • where it is real, the turns are (-1)^n.

For an odd N the root of 1 - t^2 stays in the answer in t. That answer is kept beyond t^2 < 1 only 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 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)) 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 Partial verdict included) on every fair row of Rubi's 4.5.x and 4.6.x, 2,966 rows, master a639f292 against the branch:

  • 0 Partial on both builds;
  • no row moved to Partial or Wrong;
  • the answers on all 1,317 rows with roots are byte-identical.

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.

DerivativeHoldsAtSampledPoints gains an optional set of points. OnePlusASecantHalfPowerIntegralTest adds 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.md has 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

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
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 20, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 07d3df5 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
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