Skip to content

A symbolic power of a + i a tan is gathered with the secant's in the sum - #1818

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-power-of-an-imaginary-tangent-sum-is-gathered-with-the-secants-in-the-sum
Oct 7, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-power-of-an-imaginary-tangent-sum-is-gathered-with-the-secants-in-the-sum

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

(k sec(c + d x))^(4 - 2 n) (a + i a tan(c + d x))^n was declined, with three more of Rubi's 4.3.1.2 whose powers are symbols. #1812's rule integrates a power of the secant beside a power of a + i a tan in u = a + i a tan(z), where the integrand is u^n (u/a)^r ((2 a - u)/a)^r with r = (s - 2)/2; here u^(2 - n) (u/a)^(n - 1) is one power of u/a, and written apart no rule read it. u^n is a^n (u/a)^n up to a factor constant on the path, which the rule's quotient already carries, so the two are gathered into (u/a)^(n + r), the exponent simplified.

integrand 2.5.0 master c417571d this
(k sec(x))^(4 - 2 n) (a + i a tan(x))^n declined declined 466 characters
(k sec(x))^(2 n) (a + i a tan(x))^(3 - n) declined declined 675 characters
sec(x)^3 sqrt(a + i a tan(x)) declined 495 characters 285 characters
cos(x)^9 (a + i a tan(x))^(7/2) declined 1,067 characters 768 characters

Every answer this rule gives comes out of the gathered integrand: of the 88 rows of 4.3.1.2, 54 change, 50 of them shorter -- by a third or more for most -- and about twice as fast; four are up to 7% longer, and (d sec(x))^(2/3)/(a + i a tan(x))^(1/3) takes 448 ms where it took 259.

Tests: two rows in SecantBesideAnImaginaryTangentSumIntegralTest, n pinned to 2.3, each differentiated back and compared as a complex number at six real points.

Measured first on every corpus problem with i in its integrand, 2,253 of them, at the corpus's 5-second budget, against master c417571d:

master this
solved 2002 2005
unevaluated 55 49
wrong 1 1
past the budget 130 127

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. On the 2,001 both answer the time goes from 2,015 seconds to 1,901.

Measured then on the Rubi corpus:

master this
family 0, independent suites (1814) 1782 1782
family 1, 40 a file (1381) 1341 1341
families 2 to 8, sampled (2410) 2328 2328

The harness counts no answer wrong in either. The fourteen problems the builds disagreed on, run again one build at a time: the four above are answered here and not on master; six powers of the cosine beside a + i a tan, past the budget on master, are answered here and are unverifiable to the harness, which simplifies an answer it cannot check on the reals within the same five seconds and whose integrand is nowhere real; the other four come out the same on both builds alone.

The suite passes on 958752cc, this change on c417571d: 15,138 passed, 13 skipped, none failed. The chain's own run of it was stopped by the machine's memory guard at 8 GB after 14,904 had passed and none failed; run whole twice more on each tree, the test host peaked at 5.4 and 5.5 GB here and at 4.1 and 6.5 GB on master. Rebased onto c21de3ef without a conflict, the tests of the tangent's rules pass again. 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

In u = a + i a tan(z), u^n beside (u/a)^r is one power of u/a up to a
factor constant on the path; written apart, a symbolic n left them unread.
Part of #718.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 7, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 77899a6 into master Oct 7, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant