Repository navigation
A cosine and a sine over a power of another such sum are integrated through its derivative - #1763
Merged
Rafael-SOWNet merged 5 commits intoOct 4, 2026
Merged
Conversation
…hrough its derivative (A + B cos(y) + C sin(y))/(a + b cos(y) + c sin(y))^n is alpha/S^(n-1) + beta S'/S^n + gamma/S^n for the base S, with alpha, beta and gamma read off the cosine, the sine and the constant. The middle term is a logarithm or a power of S, and with T = b sin(y) - c cos(y), T^2 = b^2 + c^2 - (S - a)^2 gives d/dy (T S^m) = (1 + m) S^(m+1) - a (1 + 2m) S^m + m (a^2 - b^2 - c^2) S^(m-1), which brings each power of S down to 1/S, answered by the half-angle tangent. Rubi's sin(x)/(a + b cos(x) + c sin(x)) was declined, and the squares and cubes of the denominator past the budget. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…-over-a-power-of-another
…-over-a-power-of-another
…-over-a-power-of-another
…-over-a-power-of-another
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.
sin(x)/(a + b cos(x) + c sin(x))was declined, with the rest of Rubi's 4.7.7 quotients ofA + B cos(x) + C sin(x)by a whole power ofa + b cos(x) + c sin(x); master answers the squares and cubes after twenty seconds or so, and1/(a + b cos(x) + c sin(x))^2with coefficients past the fiftieth degree in the symbols. 2.5.0 declined them:a10be86csin(x)/(a + b cos(x) + c sin(x))c x/(b^2 + c^2) - b ln(a + b cos(x) + c sin(x))/(b^2 + c^2)and the half-angle answer for1/S, piecewise in the sign ofa^2 - b^2 - c^2, in 0.6 s(k + q cos(x))/(a + b cos(x) + c sin(x))(k + p cos(x) + q sin(x))/(a + b cos(x) + c sin(x))^2(p cos(x) + q sin(x))/(a + b cos(x) + c sin(x))^31/(a + b cos(x) + c sin(x))^2a^59among the coefficientsEach answer is differentiated back with
a = 2.3,b = 0.9,c = 0.7,k = 1.1,p = 0.6,q = 0.8and compared atx = -2.6, -1.6, -0.4, 0.4, 1.4, 2; the times include that.What changes. With
Sthe base andS' = c cos(y) - b sin(y), the numerator isalpha S + beta S' + gamma, matching the cosine, the sine and the constant:alpha = (B b + C c)/(b^2 + c^2),beta = (B c - C b)/(b^2 + c^2),gamma = A - a alpha.beta S'/S^nintegrates to a logarithm or a power ofS. For the powers, withT = b sin(y) - c cos(y) = -S',T^2 = b^2 + c^2 - (S - a)^2givesd/dy (T S^m) = (1 + m) S^(m+1) - a (1 + 2m) S^m + m (a^2 - b^2 - c^2) S^(m-1), which form = 1 - kwritesint S^(-k)throughint S^(1-k)andint S^(2-k), down toint 1/S, which the half-angle tangent answers as before, andy. Exact as that answer is: a linear combination and an identity of derivatives. A constant in the base, both functions in it,a^2 != b^2 + c^2andb^2 + c^2 != 0, decided; without the constant the base is one cosine turned by a phase, which the rotation answers already, and a constant numerator over the first power is1/Sitself.Tests:
CosineAndSineOverAPowerOfAnotherIntegralTest, five rows differentiated back with the symbols pinned inside(-pi, pi).Measured first on all of Rubi's 4.7.7 and 4.7.2, 1,126 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, and the rows they are short by ran past the budget there: of the 20 problems the two builds disagreed on, pocket and sample together, run again one build at a time, master answers 5 and this 17, and none that master answers is lost. This answers 12 that master does not: 8 of 4.7.7's quotients by powers of
a + b cos(x) + c sin(x), each in a fifth of a second or less, where master declines them or runs past the budget; and four integrands of 3.2.1, 3.2.3 and 4.2.4.1 at twenty to twenty-four seconds, at the edge of the harness's patience.The suite on the commit measured,
2f98b450, passed but forIntegralAnswerCacheTest.AnIntegralWithNoAnswerStillFinishesQuickly, which allows a declined integral thirty seconds and took thirty-four, with three other corpus runs on the machine; alone, that class passes in six seconds, and the integral,sin(x)/(x^3 + 1)^2, is declined in two to three seconds on either build. The allocation gate passed. On the merge with mastera10be86c,a4ea9131, the 4,182 calculus and corpus tests that run pass, with 2 skipped, and the library builds fornetstandard2.0; the head here merges master9f2cc36dinto that. Every row of the first table is as it says on the first merge. On the merge with mastera4141483,5caaab6d, the 4,197 that run pass, with 2 skipped, the cache class among them, and the library builds fornetstandard2.0; that run took within one per cent of the same tests on #1762's merge with the same master, and no test that differs reads a cosine and a sine over another such sum.On the merge with master
bf5d1a18,5f2af585, the head here, the 4,202 calculus and corpus tests that run pass, with 2 skipped, and the library builds fornetstandard2.0.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura