Skip to content

A power of the cosine beside a secant binomial is integrated in the cosine - #1851

Merged
Rafael-SOWNet merged 3 commits into
masterfrom
a-secant-binomial-is-gathered-in-the-cosine
Oct 11, 2026
Merged

Rafael-SOWNet merged 3 commits into
masterfrom
a-secant-binomial-is-gathered-in-the-cosine

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

A power of the cosine beside a secant binomial, cos(c + d x)^2/(a + b sec(c + d x)), is one quotient in the cosine, cos(c + d x)^3/(a cos(c + d x) + b), wherever the secant is defined. The rule that rewrites a rational function of the secant in the cosine now takes it when the cosine of the same argument stands beside the secant. The same holds for the sine beside a cosecant. Part of #718.

The rule fires only when a sum in the secant is below the bar, and only to the first power:

Measured on master 5dad421 and this branch:

Integrand 2.5.0 master this branch
cos(c+d*x)^2/(a+b*sec(c+d*x)) declined 117,643 chars 1,091 chars
cos^2 (A+B sec)/(a+b sec) declined 89,817 4,347
cos^2 (A+C sec^2)/(a+b sec) declined 89,330 3,999
cos^3 (B sec+C sec^2)/(a+b sec) declined 296,561 4,349
cos^4 (B sec+C sec^2)/(a+b sec) declined 609,741 5,579
cos^2 (A+B sec+C sec^2)/(a+b sec) declined 90,482 12,065
sin(x)^2/(a+b*csc(x)) declined 2,159 898

Rubi corpus, 5 s budget, whole corpus plus a 14,707-problem pocket:

  • Wrong answers: 0.
  • Gains: 4.5.1.2:571, 4.5.3.1:384 and 4.5.4.2:816/962/963/1096. They time out on master and solve here in 0.1 s.
  • Master's one row: 4.7.7:117 takes master 22 s, so it lands at either side of the budget.
  • Unit suite: 15,230 passed.
  • Allocation gate: passed.

A test differentiates five of these answers back at pinned values and bounds their sizes. The breaking-changes entry is under "A power of the cosine beside a secant binomial is integrated in the cosine".

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 3 commits October 11, 2026 15:35
…osine

The route writing a rational function of the secant in the cosine declined
whenever the cosine of the same argument stood beside it, so the half-angle
substitution answered cos(x)^2/(a + b sec(x)) in 117,409 characters where
cos(x)^3/(a cos(x) + b) is 873. The cosine beside the secant, or the sine
beside the cosecant, is accepted now, with the binomial to the first power.

Part of #718.

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>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 11, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 3f651b4 into master Oct 11, 2026
34 checks passed
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.

1 participant