Repository navigation
a + i a tan below the bar is integrated beside a root of the tangent, and beside q - i q tan above it - #1778
Merged
Rafael-SOWNet merged 2 commits intoOct 5, 2026
Conversation
… and beside q - i q tan above it sqrt(tan(c + d x)) (A + B tan(c + d x))/(a + i a tan(c + d x)) ran past the budget, with the rest of Rubi's 4.3.3.1 beside a root of the tangent or the cotangent, and so did (a + i a tan(z))^2 (A + B tan(z))/(q - i q tan(z))^4. Beside a root of the tangent the exponential spelling of the sum is read by nothing, and the integrand is left to t = tan(z). Above the bar a sum is written as its exponential too, and a polynomial in e^(i z) and its reciprocal is multiplied out, each exponent gathered to its slope and offset. Part of #718 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…nt-is-not-written-in-exponentials
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.
sqrt(tan(c + d x)) (A + B tan(c + d x))/(a + i a tan(c + d x))ran past the budget, with the rest of Rubi's 4.3.3.1 beside a root of the tangent or the cotangent, and so did(a + i a tan(z))^2 (A + B tan(z))/(q - i q tan(z))^4and the other whole powers of the two conjugate sums on the two sides of the bar. 2.5.0 declined them, or ran past the budget too:4105b3bfsqrt(tan(c + d x))/(a + i a tan(c + d x))sqrt(tan(c + d x)) (A + B tan(c + d x))/(a + i a tan(c + d x))tan(c + d x)^(3/2) (A + B tan(c + d x))/(a + i a tan(c + d x))^2(A + B tan(c + d x))/(sqrt(cot(c + d x)) (a + i a tan(c + d x)))(a + i a tan(c + d x))^2 (A + B tan(c + d x))/(q - i q tan(c + d x))^4(a + i a tan(c + d x))^3 (A + B tan(c + d x))/(q - i q tan(c + d x))^5Each answer is compared with the integrand as complex numbers, differentiated back at six points; the times include that.
What changes. All three are in
SolveByWritingAnImaginaryTangentAsAnExponential, which writesa + i a tan(z)below the bar asa e^(i z)/cos(z).t = tan(z)answers the integrand as written in a third of a second.(a + i a tan(z))^2above was a sum of exponentials that nothing gathered:(a + i a tan(z))^2 (A + B tan(z))/(q - i q tan(z))^4isa^2 e^(6 i z) (A cos(z)^2 + B sin(z) cos(z))/q^4.e^(i z)and its reciprocal with nothing else ofxin it -- the exponentials below the bar taken above as their reciprocals -- is multiplied out, each term's exponentials gathered into one withPatterns.GatherPowersOfOneBaseand its exponent to its slope and offset, so that a term whose exponents cancel is a constant. Each term is thene^(k i z)times a constant, which the closed rule answers. Not beside a polynomial inx, which would be multiplied out too, and its answer with it.Tests:
ImaginaryTangentSumAsAnExponentialIntegralTest, six rows compared as complex numbers; master answers one of them, in seven seconds.Measured first on the 1,840 problems of 4.3 and 4.4 with the imaginary unit in them, 1,517 run, 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 either. The 71 problems the two builds disagreed on, pocket and sample together, run again one build at a time: master answers 4 and this 53. Of the 18 this does not answer, 13 are rows master ran past the budget on, which this declines in two to five seconds or answers in a form the harness cannot check on the reals -- six of them, complex-valued, each of which differentiates back to the integrand compared as complex numbers -- two are rows master answers at 21 and 23 seconds, at the edge of the harness's patience, 3.2.1:152 and 3.2.3:29, and three neither answers. 3.2.1:152 went the other way in another branch's run the same night. The figures above were measured with three other corpus runs on the machine.
The suite on the commit measured,
d4d6c89e, passed but forIntegralAnswerCacheTest.AnIntegralWithNoAnswerStillFinishesQuickly, which allows a declined integral thirty seconds and took thirty with four corpus runs on the machine; its class passes alone in three seconds. The allocation gate passed. The head here,fbafe34d, merges master4105b3bf; the calculus and corpus tests pass on it and the library builds fornetstandard2.0.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura