Skip to content

A power of the cotangent that is not whole below the bar is integrated beside the tangent - #1735

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
a-fractional-power-of-the-cotangent-beside-the-tangent
Oct 4, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
a-fractional-power-of-the-cotangent-beside-the-tangent

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

A power of the cotangent that is not whole, below the bar beside the tangent, was read by no rule: 1/(cot(x)^(7/2) (a + b tan(x))^(3/2)) was declined, while tan(x)^(7/2)/(a + b tan(x))^(3/2), which it is wherever the tangent is positive, was answered. 2.5.0 declined them too:

integrand 2.5.0 master ac6e33fa this
1/(cot(x)^(7/2) (a + b tan(x))^(3/2)) declined declined in sqrt(tan(x)) and sqrt(a + b tan(x)), in 15 s
1/(cot(x)^(5/2) (a + i a tan(x))^(5/2)) declined declined in sqrt(tan(x))/sqrt(1 + i tan(x)), in 0.7 s

What changes. The tangent substitution writes the cotangent as 1/u, and a power of 1/u that is not whole below the bar is read by no rule. Such a power is now written as the tangent's above the bar, 1/cot(x)^p = tan(x)^p/K, and the answer is divided by K = cot(x)^p tan(x)^p. K is 1 where the tangent is positive. Where it is negative K is a constant too, -1 for an odd number of halves and i for a quarter, so the answer holds on every interval where the tangent keeps its sign. Only below the bar: above it, the same rewrite takes cot(x)^(3/2)/(a + b tan(x)), answered in a few seconds as written, past a minute as 1/(tan(x)^(3/2) (a + b tan(x))). And only beside the tangent; a power of the cotangent alone keeps the answer it had.

Tests: TangentSubstitutionIntegralTest.APowerOfTheCotangentBelowTheBarBesideTheTangent, four rows compared where the tangent is positive and the integrand real, and where it is negative and the integrand complex, which is where K is what keeps the answer right. The first two fail on master. The other two, (A + B tan(x))/(cot(x)^(3/2) (a + i a tan(x))) and 1/(cot(x)^(1/4) (a + b tan(x))), master ac6e33fa answers in the cotangent where 8f3757cd, the branch's base, did not, and the first of them is now answered in the tangent.

Measured first on the 200 problems of 4.3.2.1 and 4.3.3.1 with a power of the cotangent that is not whole beside the tangent, at the corpus's 5-second budget, against master 8f3757cd, the branch's base, and again against master ac6e33fa with the branch merged into it:

master 8f3757cd this master ac6e33fa this, merged
solved 73 110 73 109
wrong 0 0 0 0
past the budget 25 22 26 23

Measured then on the Rubi corpus against master 8f3757cd, the branch's base:

master this
family 0, independent suites (1814) 1766 1766
family 1, 40 a file (1381) 1296 1296
families 2 to 8, sampled (2410) 2215 2221

No answer is wrong in the pocket or the sample on either build. Of the 44 problems the two builds disagreed on, run again one build at a time, master answers 6 and this 43.

The suite passes on the commit measured, 5a047fee, 14,595 tests with 13 skipped, and the allocation gate with it. On the merge with master ac6e33fa, ae64fd46, the 4,056 calculus and corpus tests pass, and every row of the first table is as it says.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits October 3, 2026 22:27
…d beside the tangent

1/(cot(x)^(7/2) (a + b tan(x))^(3/2)) was declined while
tan(x)^(7/2)/(a + b tan(x))^(3/2) was answered: the substitution
u = tan(x) wrote the cotangent as 1/u, and nothing read a power of 1/u
that is not whole below the bar. Such a power is written as the
tangent's above it, 1/cot^p = tan^p/K, with K = cot^p tan^p dividing
the answer, a constant on every interval where the tangent keeps its
sign. Rubi's 4.3.2.1 and 4.3.3.1.

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 4, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit ea200c5 into master Oct 4, 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