Repository navigation
A power of the secant beside a power of a + i a tan is integrated in the sum, whatever the powers - #1812
Merged
Conversation
…the sum, whatever the powers Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> 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.
sec(c + d x)^3 sqrt(a + i a tan(c + d x))was declined, with most of Rubi's 4.3.1.2: a power of the secant or the cosine beside a power ofa + i a tan, the powers adding up to no whole number, which #1796's rule, integrating ine^(i z), does not take.db33ae1bsec(x)^3 sqrt(a + i a tan(x))sec(x)^5/(a + i a tan(x))^(3/2)(k cos(x))^(3/2) sqrt(a + i a tan(x))(m sec(x))^(2/3) (a + i a tan(x))^(5/3)cos(x)^9 (a + i a tan(x))^(7/2)1 + i tan(x) >= 0Each is differentiated back and compared with the integrand as a complex number at real points with the symbols pinned. Of the 56 rows of 4.3.1.2 this answers that master does not, the longest answer is 1,511 characters and the median 779.
What changes. Under
u = A + i A tan(z),du = i A sec(z)^2 dzandsec(z)^2 = (u/A) ((2 A - u)/A), the product of the principal powers of1 + i tan(z)and1 - i tan(z)being(sec(z)^2)^rexactly, since their arguments are opposite and less than a right angle. Sosec(z)^s u^n dzisu^n (u/A)^r ((2 A - u)/A)^r du/(i A)withr = (s - 2)/2, up to a factor constant wherever it is continuous: a power ofubeside a power of2 A - u, which the integrator reads.SolveAPowerOfTheSecantBesideAPowerOfAnImaginaryTangentSumInTheSumasks that, and answers with the integrand times the antiderivative inuover what that antiderivative differentiates back to, as #1796's rule does, so the constant is never written. Two things it does not leave to chance:uis found for a realu, and its conditions say so: a radicand at least zero. On the pathuis not real, the conditions hold nowhere, and the first version of this answered nothing on 58 of the rows. They are dropped, each piecewise is taken arm by arm, and an answer is kept only where its derivative is the integrand at the sampled points.cos(x)^9 (a + i a tan(x))^(7/2)'s answer on master carries exactly such a condition,1 + i tan(x) >= 0, which no realxbut the tangent's zeros meets; checked at 50, 300 and 2,000 digits, its derivative has no value at a real point.uthey ran past five, and five of the pocket's rows were lost that way before the rule was told so.Tests:
SecantBesideAnImaginaryTangentSumIntegralTest, the five rows above, each differentiated back and compared as a complex number at six real points, with its answer under 5,000 characters.Measured first on every corpus problem with
iin its integrand, 2,253 of them, at the corpus's 5-second budget, against masterdb33ae1b:The one counted wrong on both is the known 6.1.5
1/(a + i a sinh(c + d x))^(1/2), the harness's own. Fifty problems are answered here and not on master, all of 4.3.1.2, and none the other way; on the 1,928 both answer the time goes from 1,878 seconds to 1,791.Measured then on the Rubi corpus against master
db33ae1b:The harness counts no answer wrong in either.
The 55 problems the two builds disagreed on, pocket and sample together, run again one build at a time: master answers none of them, and this answers 50. Four of the other five,
cos(c + d x)^4/(a + i a tan(c + d x))^(3/2)and three like it, are unverifiable to the harness on master and past its budget here: the harness simplifies an answer it cannot check on the reals within the same five seconds, and an integrand that is nowhere real is never checkable there. Probed alone, both builds' answers to the four differentiate back to the integrand, this one's in 0.3 to 1.2 seconds against master's 1.3 to 19.The suite passes on the head here,
664ac579, which is masterdb33ae1band this change: 15,130 tests, every one reported, the test host peaking at 4.9 GB against master's 5.1. Two earlier runs of it were stopped by the machine's memory guard at 8 GB; the peak varies by gigabytes between runs of one tree -- the half of the suite outside the calculus tests peaked at 5.4 GB and then 3.2 GB here, and at 3.2 GB and then 3.8 GB on master -- and run whole again it stayed below master's. The allocation gate passes: every gated benchmark allocates what the baseline says. The library builds for every target.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura