Repository navigation
A power of csc - sin or sec - cos is integrated as sine and cosine powers - #1760
Merged
Rafael-SOWNet merged 3 commits intoOct 4, 2026
Conversation
…wers Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…on's power is not `(a csc(z)^2)^(-7/2)` is a whole power of the modulus of the cosecant, which the rule for an even power under a root answers with its sign; reading the outer power alone, the product rule took it first. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…eciprocal-trigonometric-function-is-a-quotient
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.
(csc(x) - sin(x))^(5/2)was declined, with the rest of Rubi's 4.7.7 to a power that is not whole ofcsc(x) - sin(x)orsec(x) - cos(x), either way up. 2.5.0 declined all sixteen; master answers the two square roots:a10be86c(csc(x) - sin(x))^(7/2)(csc(x) - sin(x))^(5/2)(cos(x)^2/sin(x))^(5/2)times powers ofsin(x), in 0.1 s(csc(x) - sin(x))^(3/2)(csc(x) - sin(x))^(1/2)1/(csc(x) - sin(x))^(1/2)1/(csc(x) - sin(x))^(7/2)(sec(x) - cos(x))^(5/2)1/(sec(x) - cos(x))^(3/2)Each answer is differentiated back and compared at
x = -2.5, -1, 0.4, 1.1, 2.2, 4, as complex numbers: on some of those intervals the integrand is imaginary. The times include that.What changes.
csc(z) - sin(z)iscos(z)^2/sin(z)andsec(z) - cos(z)issin(z)^2/cos(z). A new rule writes either difference, in either order, as that quotient and asks the same question, just before the rule that integrates a product of powers of the six functions, some not whole, through the tangent. That rule read only a constant times one function, or a whole power of one, inside each power. It now reads a constant times any product and quotient of whole powers of the six functions, so(cos(z)^2/sin(z))^(5/2)iscos(z)^5 sin(z)^(-5/2)to it, with the root of the quotient kept in front as the integrand writes it. The product counts as not whole, as before, only where some function's power in it is not:(a csc(z)^2)^(-7/2)is a whole power of the modulus of the cosecant, which the rule for an even power under a root answers with its sign.Tests:
DifferenceOfReciprocalFunctionsIntegralTest, seven rows differentiated back on both sides of the zeros of the sine and cosine; 2.5.0 declines all seven.Measured first on the powers of products of the six functions in Rubi's 4.1.0 to 4.6.0 and the powers in 4.7.7, 615 problems, at the corpus's 5-second budget, against master
287c69a7, the branch's base:Measured then on the Rubi corpus against master
287c69a7:The harness counts no answer wrong in the pocket or the sample on either build. The family figures were measured with three other corpus runs on the machine. Of the 23 problems the two builds disagreed on, pocket and sample together, run again one build at a time, master answers 9 and this 21. The fourteen more are 4.7.7's powers of the two differences that are neither whole nor a square root, the first table's rows among them. The other nine take seventeen to twenty-four seconds on master, at the edge of the harness's patience, and none is a power of the two differences: two of them ran past it here, and run again, twice on each build, both builds ran past it on both.
The suite on the commit measured,
d4e5b61e, passed but for two rows ofEvenPowerSignTest, which ask for the sign rule's form of1/(a csc(x)^2)^(7/2)and1/sqrt(a cot(x)^2): the product rule had taken them first, reading the outer power alone, and521d6531has it decide from each function's power. On that commit the pocket was run again, 602 of 615 again, and so were the 23; three more of the nine slow ones ran past the patience, with four other corpus runs on the machine. On the merge with mastera10be86c,ec0ca899, the 4,184 calculus and corpus tests that run pass, with 2 skipped, and the library builds fornetstandard2.0; the allocation gate passed on the commit measured. Every row of the first table is as it says on the merge.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura