Skip to content

A power of the cosine beside a power of a + i a tan is read as one of the secant - #1814

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-power-of-the-cosine-below-a-power-of-an-imaginary-tangent-sum-is-read-as-the-secants
Oct 7, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-power-of-the-cosine-below-a-power-of-an-imaginary-tangent-sum-is-read-as-the-secants

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

sqrt(a + i a tan(c + d x))/(k cos(c + d x))^(3/2) was declined, with the three like it in Rubi's 4.3.1.2. #1796's rule integrates a power of a + i a tan(z) beside a power of the secant in e^(i z) where the powers add up to a whole number, and it read the secant only; a power of the cosine is the same power of the secant with its sign turned.

integrand 2.5.0 master 8a310f7f this
sqrt(a + i a tan(x))/(k cos(x))^(3/2) declined declined 533 characters
(k cos(x))^(3/2) sqrt(a + i a tan(x)) declined 763 characters 172 characters

What changes. SolveAPowerOfAnImaginaryTangentBesideAPowerOfTheSecant reads cos(z)^p, and (k cos(z))^p, as a secant power -p, the factors kept as they are written. Rows that #1812's rule answered in u = a + i a tan(z) are now answered by this one first, all of them shorter: of the 88 rows of 4.3.1.2, 54 have the same answer as on master, 11 a shorter one (920 characters to 231 is typical), and 4 an answer where master has none, 579 to 766 characters long.

Tests: two rows added to ImaginaryTangentBesideTheSecantIntegralTest, one with the cosine below the bar and one above it, each differentiated back and compared as a complex number at 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 8a310f7f:

master this
solved 1987 1991
unevaluated 63 60
wrong 1 1
past the budget 137 136

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. Four problems are answered here and not on master, the four of 4.3.1.2 named above, and none the other way; on the 1,987 both answer the time goes from 1,882 seconds to 1,852.

Measured then on the Rubi corpus against master 8a310f7f:

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 five problems the builds disagreed on, run again one build at a time: master answers none, this answers the four; the fifth, a 4.3.2.1 quotient, neither answers.

The suite passes: 15,133 passed, 13 skipped, none failed. 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

… the secant

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 c18738d 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