Skip to content

A rational function of the secant with two sums below the bar is written in the cosine - #1824

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-rational-function-of-the-secant-is-written-in-the-cosine
Oct 8, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-rational-function-of-the-secant-is-written-in-the-cosine

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

sec(e + f x)/((a + b sec(e + f x)) (c + d sec(e + f x))^2) ran past thirty seconds, with two more of Rubi's 4.5.2.3, where cos(x)^2/((a cos(x) + b) (c cos(x) + d)^2), the same function, is answered in half of one. A sample of the stack showed SolveByHalfAngleSubstitution reading the secant's spelling into a rational function of the half-angle tangent, and a substitution search under it expanding that without end. SolveByWritingARationalFunctionOfTheSecantInTheCosine, ahead of Bioche's substitutions and the half angle, writes a rational function of the secant of one argument, or the cosecant, in the cosine as one quotient and asks the same question.

Only where two sums in the secant stand below the bar and none above. Written so wherever the secant stands alone, it was measured on all 6,489 corpus problems with a secant or a cosecant in them and lost 51 that master answers -- sec(c + d x)^5/(a + b sec(c + d x))^3 and its like, which the secant's own rules answer in half a second and the cosine's spelling sends past five -- for 6 gained.

integrand 2.5.0 master 1ea1f8ac this
sec(x)/((a + b sec(x)) (c + d sec(x))^2) declined past 30 seconds 9,439 characters, 0.8 s
sec(x)/((a + b sec(x))^2 (c + d sec(x))) declined past 30 seconds 9,430 characters, 0.6 s

The answers carry a case for each sign of two discriminants, which is most of their length.

Tests: ARationalFunctionOfTheSecantInTheCosineIntegralTest, the two rows above, each differentiated back and compared at six points.

Measured on every corpus problem with a secant or a cosecant in its integrand, 6,489 of them, at the corpus's 5-second budget, against master 1ea1f8ac:

master this
solved 6330 6336
unevaluated 99 99
wrong 0 0
past the budget 50 44

Six problems are answered here and not on master -- three of 4.5.2.3, two of 4.5.4.2 and one of 4.7.7 -- and none the other way; on the 6,330 both answer the time is 1,927 seconds and 1,921.

master this
family 0, independent suites (1814) 1782 1782
family 1, 40 a file (1381) 1341 1341
families 2 to 8, sampled (2410) 2330 2330

The harness counts no answer wrong in either. The six problems the builds disagreed on, run again one build at a time: master answers none, this all six.

The suite passes: 15,162 passed, 13 skipped, none failed, on the change before its test was added; with it, the secant, Bioche and half-angle tests pass, 354. The allocation gate passes: every gated benchmark allocates what the baseline says. The library builds for every target.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…ten in the cosine

The half-angle substitution read the secant's spelling into a rational
function of the half-angle tangent that a substitution search expanded past
thirty seconds; as one quotient in the cosine it is answered in a second.
Only where two sums in the secant stand below the bar and none above. Part
of #718.

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 8, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 136a7f5 into master Oct 8, 2026
38 of 40 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