Skip to content

An odd power of the secant is read in the tangent, with the cosine's sign - #1816

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
an-odd-power-of-the-secant-is-read-in-the-tangent-with-the-cosines-sign
Oct 7, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
an-odd-power-of-the-secant-is-read-in-the-tangent-with-the-cosines-sign

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

sec(c + d x)^5/(a + b tan(c + d x))^2 was declined, and sec^7/(a + b tan)^3 and two like it ran past the corpus's five seconds: Rubi's 4.3.1.2 with a general b. Under u = tan(x), SolveByTangentSubstitution reads an odd power of the sine or the cosine as its sign times a function of the tangent, cos(x) = sgn(cos(x))/sqrt(1 + u^2), and not the secant, which is the same the other way up. It reads the secant too now:

sec(x)^5/(a + b tan(x))^2 = sgn(cos(x)) (1 + u^2)^(5/2)/(a + b u)^2,  dx = du/(1 + u^2)
integrand 2.5.0 master c417571d this
sec(x)^5/(a + b tan(x))^2 declined declined 901 characters
sec(x)^7/(a + b tan(x))^3 declined declined 1,253 characters
sec(x)/(a + b cot(x)) declined declined 571 characters

Each answer carries sgn(cos(x)), constant between the zeros of the cosine.

Tests: three rows in TangentSubstitutionIntegralTest, each differentiated back with the symbols pinned and compared at six points on both signs of the cosine.

Measured first on every corpus problem with a secant in its integrand, 5,093 of them, at the corpus's 5-second budget, against master c18738db:

master this
solved 4965 4971
unevaluated 71 68
wrong 0 0
past the budget 51 48

Six problems are answered here and not on master, and none the other way: the five of 4.3.1.2 and 4.4.1.3's sec(x)/(a + b cot(x)). On the 4,965 both answer the time goes from 1,617 seconds to 1,629.

Measured then on the Rubi corpus:

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

The harness counts no answer wrong in either. The seven problems the builds disagreed on, run again one build at a time: master answers none, this answers all seven. The seventh, 3.2.3's log(pe (f (a + b x)^p (c + d x)^q)^r)/(a + b x)^5, has no trigonometric function in it; master answered it in 25 seconds in the sample and is past the budget alone, this the other way round.

The suite passes on a867b351, this change on c18738db: 15,136 passed, 13 skipped, none failed. Rebased onto c417571d without a conflict, the tangent substitution's tests and both imaginary-tangent rules' pass again. 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

…sign

The substitution u = tan(x) read an odd power of the sine or the cosine as
its sign times a function of the tangent, and not the secant, the same the
other way up. 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 7, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit c21de3e into master Oct 7, 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