Symbolic powers of a ± a sin beside a power of the cosine are integrated through the sine - #1754
Merged
Rafael-SOWNet merged 3 commits intoOct 4, 2026
Conversation
…ted through the sine (1 + sin y)(1 - sin y) is cos(y)^2, so under u = sin(y) a power of a ± a sin(y), a power of g cos(y) beside it and dy itself are powers of 1 + u and 1 - u up to a factor constant on each interval. The rest is asked in u, and the answer is the antiderivative times that factor: the powers as written over the form they were rewritten to, whose logarithmic derivative is zero. The cosine's the same way, by u = cos(y). Only where an exponent is symbolic, since numeric half powers are the half angle's. 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
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 4, 2026
…are integrated (#1756) (a + b x)^m (c + d x)^(-3 - m) was declined, while the sum -2 was answered. Under t = L1/L2 the product L1^A L2^B, with A + B = -k and k >= 2 whole, beside a polynomial of degree at most k - 2, is a power of t beside a polynomial in t. Since t^(A + i + 1) is t^A t^(i + 1) for a whole i + 1, the antiderivative is the two powers as written times a polynomial in x, exact wherever the integrand is defined. A closed rule: with #1754's substitution it also answers the powers of 1 +- sin(y) that rule leaves. Rubi's 1.1.1.2 to 1.1.1.4 with such powers go from 310 to 330 of 339. Part of #718. 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 + a sin(h + f x))^m sqrt(c - c sin(h + f x))was declined, and so were the other powers ofa ± a sinwith a symbolic exponent beside the cosine or a function of the sine -- Rubi's(a + b sin)^m (c + d sin)^nfiles witha^2 = b^2andc^2 = d^2, most of them after the whole budget: the half angle at which1 ± sinis a square wants numeric powers. 2.5.0 declined them too:4dbe73a4(a + a sin(h + f x))^m sqrt(c - c sin(h + f x))cos(h + f x)^2 (a + a sin(h + f x))^m/sqrt(c - c sin(h + f x))(g cos(h + f x))^(1 - 2m) (a + a sin(h + f x))^m (c - c sin(h + f x))^(m - 1)(a + a sin(h + f x))^m (c - c sin(h + f x))^(-1 - m)(a + a cos(h + f x))^m sqrt(c - c cos(h + f x))Each answer is differentiated back with the symbols pinned and compared as a complex number at
x = -2.3, -1.1, -0.4, 0.4, 1.1, 1.9, 2.6; the times include that.What changes.
(1 + sin(y))(1 - sin(y))iscos(y)^2, so underu = sin(y)each such power, a power ofg cos(y)beside it anddy = du/cos(y)itself are powers of1 + uand1 - u, up to a factor constant on each interval where it is defined, and the rest of the integrand, a function of the sine, comes along.(1 + u)^A (1 - u)^B R(u)is asked inu, and the answer is that antiderivative times the factor: the powers as written over the form they were rewritten to, a quotient whose logarithmic derivative is zero, so it holds whatevera,c,gand the exponents are. The cosine's the same way, byu = cos(y). Only where an exponent is symbolic.Tests:
PowersOfOnePlusAndMinusASineIntegralTest, seven rows differentiated back with the symbols pinned, at six points on both sides of zero; none is answered on master.Measured first on the 1,279 problems of family 4 with a power of
a ± a sinora ± a cos, 797 of them run, at the corpus's 5-second budget, against master8f3757cd, the branch's base:The 697 with numeric powers are answered alike, all but one on both builds. Of the 100 with a symbolic power, master answers 37 and this 81. Thirteen of the 19 left ask
(1 + u)^A (1 - u)^Bbeside a polynomial, withA + Ba whole number below-2--(a + a sin)^m (c - c sin)^(-3 - m)and its kin -- whicht = (1 + u)/(1 - u)makes a power oftbeside a polynomial. A rule for two linear powers whose exponents sum to such a number follows in a PR of its own, and with both the thirteen are answered in 0.1 to 0.5 seconds, where either alone runs past eight.Measured then on the Rubi corpus against master
8f3757cd:The harness counts no answer wrong in the pocket or the sample on either build. Of the 49 problems the two builds disagreed on, pocket and sample together, run again one build at a time, master answers 1 and this 42. The 42 are family 4's symbolic powers of
a ± a sin, answered here in a second or less but one at sixteen, where master declines them or runs past the budget. The one master answers,1/(x (a x + b x^3 + c x^5)^2), at twenty-two seconds, ran past the harness's patience here; run again, twice on each build, it runs past it on both.(-3 + 3 sin(h + f x))^(-1 - m) (a + a sin(h + f x))^m, past the budget on master, is answered here where the harness cannot check it, its integrand being complex on the whole real line, and five run past the budget on both.The suite passes on the commit measured,
c342aaea, 14,598 tests with 13 skipped, and the allocation gate with it. On the merge with master4dbe73a4,3a351431, the 4,148 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