Repository navigation
A half-odd power of the secant beside the cosine is integrated as the cosine's - #1743
Merged
Merged
Conversation
… cosine's sec(x)^(3/2)/sqrt(1 + cos(x)) was declined while 1/(cos(x)^(3/2) sqrt(1 + cos(x))) was answered: the substitutions that read a function of the cosine read the secant as 1/cos to a whole power only. A half-odd power of the secant beside the cosine is written as the cosine's on the other side of the bar, sec^p = K/cos^p, with K = sec^p cos^p in front of the answer, which is 1 where the cosine is positive and -1 where it is negative. The same for the cosecant beside the sine. Rubi's 4.2.2.1, 4.2.3.1 and 4.2.4.2. 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 was referenced Oct 4, 2026
A trigonometric function of an imaginary multiple of a logarithm is integrated in exponentials
#1744
Merged
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.
sec(x)^(3/2)/sqrt(1 + cos(x))was declined, while1/(cos(x)^(3/2) sqrt(1 + cos(x))), which it is wherever the cosine is positive, was answered: the substitutions that read a function of the cosine read the secant as1/costo a whole power only. 2.5.0 declined them too:7075a747sec(x)^(3/2)/sqrt(1 + cos(x))sec(x)^(5/2) (a + a cos(x))^(3/2)(a + a cos(x))^(3/2) (A + B cos(x))/sqrt(sec(x))sqrt(csc(x)) sqrt(a + a sin(x))The times of this column include differentiating the answer back to check it.
What changes. A half-odd power of the secant beside the cosine of the same argument is written as the cosine's power on the other side of the bar,
sec(x)^p = K/cos(x)^p, and the answer for that is multiplied byK = sec(x)^p cos(x)^p-- divided, for a power below the bar.Kis 1 where the cosine is positive and -1 where it is negative, so the answer holds on both sides, and the integrand is real exactly where the rewritten one is. The same for the cosecant beside the sine. Only a half-odd power of the secant itself: a quarter, or a constant inside the power, makesKimaginary on one side and the integrand real where the rewritten one is not, where an answer for the rewritten one says nothing. Only beside the cosine, so that a power of the secant with no cosine keeps the rules for the secant.Tests:
PowerOfTheSecantBesideTheCosineIntegralTest, seven rows compared as complex numbers at points on both sides of the cosine's zeros; all seven are declined on master.Measured first on the 819 problems with a fractional power of the secant beside the cosine, or of the cosecant beside the sine, of the same argument, 214 run, at the corpus's 5-second budget, against master
8f3757cd, the branch's base:Measured then on the Rubi corpus against master
8f3757cd:No answer is wrong in the pocket or the sample on either build. Of the 225 problems the two builds disagreed on, pocket and sample together, run again one build at a time, master answers 4 and this 219: two hundred and eighteen of them powers of the secant or the cosecant beside the cosine or the sine, declined or past the budget on master. The three master answers alone,
log(e (f (a + b x)^p (c + d x)^q)^r)/(a + b x)^4and two of 3.2.1's, take twenty to twenty-four seconds there, at the edge of the harness's patience, and ran past it here this time. Family 1's two in the sample arex^4/((a + b x^2)^2 (c + d x^2)^3)and1/(x (a x + b x^3 + c x^5)^2), past the budget on both builds run alone, with one more from family 4. All of these cross that edge one way or the other on every build.The suite passes on the commit measured,
9c55cb46, 14,598 tests with 13 skipped, and the allocation gate with it. On the merge with master7075a747,ea3b574f, the 4,104 calculus and corpus tests that run pass, with 2 skipped. Every row of the first table is as it says on the merge.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura