Skip to content

a + i a tan of a shifted linear below the bar is integrated in the linear - #1822

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
an-imaginary-tangent-sum-of-a-shifted-linear-is-integrated-in-the-linear
Oct 8, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
an-imaginary-tangent-sum-of-a-shifted-linear-is-integrated-in-the-linear

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

sqrt(a + i a tan(e + f x)) (A + B tan(e + f x))/sqrt(c - i c tan(e + f x)) ran past thirty seconds, with two more of Rubi's 4.3.3.1, where with x for the argument it is answered in a second. SolveByWritingAnImaginaryTangentAsAnExponential writes a + i a tan(z) as a e^(i z)/cos(z); a sample of the stack showed the time going to the phase of e^(i (g + f x)) expanded beside the rest and a substitution search simplifying it. Where every trigonometric function in the integrand is of one linear other than x, and a root stands in it, the rule now integrates in u = g + f x first, dx = du/f. Whole powers are left as they were: (a + i a tan(z))^3 (A + B tan(z))/(c - i c tan(z))^3 is answered in 0.6 s of the linear as written and in 5 s of x, and the first version of this lost it.

integrand 2.5.0 master ea2cb5e3 this
sqrt(a + i a tan(g + f x)) (A + B tan(g + f x))/sqrt(c - i c tan(g + f x)) declined past 30 seconds 448 characters, 1.3 s
(A + B tan(g + f x))/(sqrt(a + i a tan(g + f x)) (c - i c tan(g + f x))^(3/2)) declined past 30 seconds 597 characters, 0.9 s

Tests: AnImaginaryTangentSumOfAShiftedLinearIntegralTest, the two rows above with every symbol pinned, each differentiated back and compared as a complex number at six real points.

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

master this
solved 2027 2030
unevaluated 50 50
wrong 1 1
past the budget 103 100

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. Three problems are answered here and not on master, all of 4.3.3.1, and none the other way; on the 2,027 both answer the time goes from 1,668 seconds to 1,615.

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

The harness counts no answer wrong in either. The four problems the builds disagreed on, run again one build at a time: master answers none, this the three of 4.3.3.1; the fourth, 4.3.1.2's cos(c + d x)^11 (a + i a tan(c + d x))^(7/2), is past the budget on both. A first version called the rewrite before the rule had read its sum, and moved 4.1.2.3's 1/((c - c sin(e + f x)) sqrt(g sin(e + f x)) sqrt(a + a sin(e + f x))), which has no imaginary tangent in it; it is called only once the sum is read.

The suite passes: 15,159 passed, 13 skipped, none failed. The chain's own run of it was stopped by the machine's memory guard at 8 GB after 11,271 had passed and none failed; run whole again on each tree, the test host peaked at 5.4 GB here and 5.7 GB on master. 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

…near

Where every trigonometric function is of one linear other than x, the rule
that writes a + i a tan(z) as an exponential integrates in u = g + f x
first. 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 8, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit d8dff2a into master Oct 8, 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