A power of the cotangent that is not whole below the bar is integrated beside the tangent - #1735
Merged
Rafael-SOWNet merged 2 commits intoOct 4, 2026
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, whiletan(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:ac6e33fa1/(cot(x)^(7/2) (a + b tan(x))^(3/2))sqrt(tan(x))andsqrt(a + b tan(x)), in 15 s1/(cot(x)^(5/2) (a + i a tan(x))^(5/2))sqrt(tan(x))/sqrt(1 + i tan(x)), in 0.7 sWhat changes. The tangent substitution writes the cotangent as
1/u, and a power of1/uthat 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 byK = cot(x)^p tan(x)^p.Kis 1 where the tangent is positive. Where it is negativeKis a constant too, -1 for an odd number of halves andifor a quarter, so the answer holds on every interval where the tangent keeps its sign. Only below the bar: above it, the same rewrite takescot(x)^(3/2)/(a + b tan(x)), answered in a few seconds as written, past a minute as1/(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 whereKis 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)))and1/(cot(x)^(1/4) (a + b tan(x))), masterac6e33faanswers in the cotangent where8f3757cd, 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 masterac6e33fawith the branch merged into it:8f3757cdac6e33faMeasured then on the Rubi corpus against master
8f3757cd, the branch's base: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 masterac6e33fa,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