Skip to content

A symbolic power of a + i a tan beside a power of the secant is integrated as an exponential - #1796

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
a-symbolic-power-of-an-imaginary-tangent-beside-the-secant
Oct 5, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
a-symbolic-power-of-an-imaginary-tangent-beside-the-secant

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

(k sec(c + d x))^(-4 - n) (a + i a tan(c + d x))^n and the rest of Rubi's 4.3.1.2 whose two powers are symbols adding up to a whole number were declined:

integrand 2.5.0 master a5ce1c55 this
(a + i a tan(c + d x))^n/(pe sec(c + d x))^n declined declined 172 characters
(pe sec(c + d x))^(-1 - n) (a + i a tan(c + d x))^n declined declined 232 characters
(pe sec(c + d x))^(-2 - n) (a + i a tan(c + d x))^n declined declined 273 characters
(pe sec(c + d x))^(-3 - n) (a + i a tan(c + d x))^n declined declined 335 characters
(pe sec(c + d x))^(-4 - n) (a + i a tan(c + d x))^n declined declined 374 characters

pe stands for Rubi's e, which the parser reads as Euler's number. Each answer is differentiated back at six points with the symbols pinned, compared as complex numbers.

What changes. SolveAPowerOfAnImaginaryTangentBesideAPowerOfTheSecant integrates (A + i A tan(z))^n (c sec(z))^m with n + m a whole number k as the exponential it is, A + i A tan(z) being A sec(z) e^(i z) on the real line: in w = e^(i z) it is (2 w/(w^2 + 1))^k w^n dw/(i w). It read the two powers as numbers only. A symbol is read now, the sum simplified to its number, so that (-4 - n) + n is -4: the integral in w is then w^(n - 5) (w^2 + 1)^4, a sum of powers. At a sum of 0 the power of w is written alone, since (w^2 + 1)^0 is 1 only where w^2 + 1 is not 0, and the integral with that condition beside it was declined. A short sum of symbols in the answer is simplified, since the power rule writes w^(n + -4 - 1 + 1)/(n + -4 - 1 + 1) for w^(n - 4)/(n - 4).

The rest of 4.3.1.2's symbolic rows, (k sec(z))^(6 - 2n) (a + i a tan(z))^n and the like, add up to j - n and are not read by this rule: there sec(z)^2 is the product of the two conjugate sums, which leaves a symbolic power of one beside a whole power of the other.

Tests: ImaginaryTangentBesideTheSecantIntegralTest, three rows with a symbolic power, adding up to -4, -1 and 0, compared as complex numbers on both sides of 0 and where the cosine is negative.

Measured first on all of Rubi's 4.3.1.2, at the corpus's 5-second budget, against master b1af529d, the branch's base:

master this
solved 328 332
unevaluated 75 70
wrong 0 0
past the budget 29 29

Measured then on the Rubi corpus against master b1af529d:

master this
family 0, independent suites (1814) 1775 1775
family 1, 40 a file (1381) 1316 1318
families 2 to 8, sampled (2410) 2315 2314

The harness counts no answer wrong in either.

The 16 problems the two builds disagreed on, pocket and sample together, run again one build at a time: this answers four that master does not, (pe sec(c + d x))^(-k - n) (a + i a tan(c + d x))^n for k from 0 to 3, and a fifth, k = 4, which the harness cannot verify. One that master answered alone ran past the budget here, 6.6.1:24, which takes 23 seconds on either build asked on its own. The other ten are answered by both or by neither.

The suite on the commit measured, 7e709fc3, passes, 14,988 tests, and so does the allocation gate: every gated benchmark allocates what the baseline says. The head here, 360de735, merges master a5ce1c55; the calculus and corpus tests pass on it, 4,350 tests, and the library builds for netstandard2.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits October 5, 2026 08:18
…rated as an exponential

(k sec(c + d x))^(-4 - n) (a + i a tan(c + d x))^n and the rest of Rubi's
4.3.1.2 whose two powers are symbols adding up to a whole number were
declined: the powers were read as numbers only. At a sum of 0 the power of
w is written alone, since (w^2 + 1)^0 is 1 only where w^2 + 1 is not 0 and
the integral with that condition beside it was declined. A short sum of
symbols in the answer is simplified.

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 5, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit e604369 into master Oct 5, 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