Repository navigation
A rational function of the tangent beside a power of a + i a tan is integrated in that sum - #1779
Merged
Rafael-SOWNet merged 4 commits intoOct 5, 2026
Conversation
…ntegrated in that sum With S = a + c tan(z) and c = +-i a, tan(z) is (S - a)/c and, since c^2 = -a^2, dS/dz = c sec(z)^2 = S (S - 2a)/c. A rational function of the tangent and cotangent of z beside a power of S, below the bar or not whole, is a rational function of S beside a power of it, over the factors S, S - 2a and S - a, with no imaginary root among them. Rubi's 4.3.3.1 rows with a power of the tangent beside A + B tan over a power of a + i a tan ran past the budget under u = tan(z), where the factors are 1 + i u and 1 - i u with symbols in every coefficient. Whole powers of the tangent only: a root of (S - a)/c, taken apart over the imaginary constant, changed its branch. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…e is the variable a + i a tan(z) and q - i q tan(z) are each linear in the other: in the one under a power that is not whole the other is a whole power of a linear, where in the other it would be the root of one. (a + i a tan(z))/(q - i q tan(z))^(3/2) and the rest of Rubi's 4.3.2.1 with the two sums ran past the budget. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…e variable it is Beside a second imaginary sum q + c' tan(z), written as q + c' (S - a)/c in the variable S = a + c tan(z), nothing cancelled the S - 2a of dz against the same factor in the other sum, and the pole left over made the answers piecewise and long: (a + i a tan(z))^2/sqrt(q - i q tan(z)) was fourteen thousand characters. The other sum is written as (c'/c)(S - r) for r = a - q c/c', its root spelled 2a where it is that, and the answer is a hundred and fifty. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…-of-the-tangent-beside-a-power-of-a-plus-i-a-tan
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 + B tan(c + d x))/sqrt(a + i a tan(c + d x))ran past the budget, with the rest of Rubi's 4.3.3.1 that put a whole power of the tangent or cotangent andA + B tanover a power ofa + i a tan, whole or half-odd. 2.5.0 declined them, and the unreleased master runs past half a minute on them:092b2815(k + q tan(c + d x))/sqrt(a + i a tan(c + d x))tan(c + d x)^2 (k + q tan(c + d x))/sqrt(a + i a tan(c + d x))cot(c + d x)^2 (k + q tan(c + d x))/(a + i a tan(c + d x))^4(a + i a tan(c + d x))/(q - i q tan(c + d x))^(3/2)(a + i a tan(c + d x))^2/sqrt(q - i q tan(c + d x))Each answer is compared with the integrand as complex numbers, differentiated back at six points; the times include that.
What changes. With
S = a + c tan(z)andc = ±i a,tan(z)is(S - a)/cand, sincec^2 = -a^2,dS/dz = c sec(z)^2 = S (S - 2a)/c, sodz = c dS/(S (S - 2a)). A rational function of the tangent and cotangent ofzbeside a power ofSthat stands below the bar or is not whole is a rational function ofSbeside a power of it, over the factorsS,S - 2aand, from a cotangent,S - a-- none with an imaginary root -- and it is asked inS. Underu = tan(z)the same integrand is a rational function over1 + i uand1 - i uwith symbols in every coefficient, which is where the search spent the budget. Exact: the substitution issec(z)^2 = 1 + tan(z)^2read inS, and the power ofSis the integrand's own. Only whole powers of the tangent and cotangent beside it: a root of(S - a)/c, taken apart over the imaginary constant, changes its branch. Beside a second such sum of the same argument,q - i q tan(z)-- Rubi's 4.3.2.1 has them in pairs -- each sum is linear in the other, and the one under a power that is not whole is the variable, so that the other is a whole power of a linear in it rather than the root of one; where both or neither are, the rule declines.Tests:
RationalInTheTangentBesideAnImaginarySumIntegralTest, seven rows compared as complex numbers; master answers none of them within the budget.Measured first on the 1,480 problems of family 4 with
a ± i a tanora ± i a cotin them, 1,480 run, at the corpus's 5-second budget, against master287c69a7, the branch's base:Measured then on the Rubi corpus against master
287c69a7:The harness counts no answer wrong in either. The 96 problems the two builds disagreed on, pocket and sample together, run again one build at a time: master answers 8 and this 82. One of master's this does not answer within the budget: 4.3.2.1:349,
tan(z)^4/(a + i a tan(z))^(4/3), which master answers in 1.3 s and this takes 44 s for, the cube root ofSmaking a rational function of high degree in its variable; ten of this branch's gains are thirds and two-thirds, so the rule keeps them. Eight more that master answers quickly in a form the harness cannot check on the reals came back past the budget here in the chain, and alone they are answered in 0.1 to 2 s, each differentiating back to the integrand compared as complex numbers -- the time was the harness's, simplifying an answer it could not check. Where master also answers, the answers here are shorter on six of those eight and longer on two, one by much:tan(z)^3/(a + i a tan(z))^(5/2), 6,423 characters where master's exponential form is 374. The figures above were measured with three other corpus runs on the machine.After the chain, the second sum of a conjugate pair is written as the linear in the variable it is,
(c'/c)(S - r)with its root spelled2awhere it is that, so that it cancels theS - 2aofdz:(a + i a tan(z))^2/sqrt(q - i q tan(z))was fourteen thousand characters and is a hundred and fifty. On the 338 problems of family 4 with two such sums, run with the measured head and with this, 256 and 259 are answered, none lost.The suite on the commit measured,
04521cd0, passed, 12,874 tests, and the allocation gate passed. The head here,65f27163, adds the conjugate-pair commitbfb36559and merges master092b2815; the calculus and corpus tests pass on it and the library builds fornetstandard2.0.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura