Skip to content

A tangent above an imaginary tangent below is written in sines and cosines, and those as exponentials - #1711

Merged
Rafael-SOWNet merged 4 commits into
masterfrom
the-imaginary-tangent-cancels-its-cosine
Oct 3, 2026
Merged

Rafael-SOWNet merged 4 commits into
masterfrom
the-imaginary-tangent-cancels-its-cosine

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

a + i a tan(z) below the bar is a e^(i z)/cos(z), and the rule that writes it so left a tangent of z above the bar as it was: tan(z) cos(z) was handed on as written, and with z = c + d x the phase was expanded into sin(c) and cos(c) beside d x, a search past any budget.

integrand master 9c2509d8 this
tan(c + d x)/(a + i a tan(c + d x)) past 60 s 0.4 s
1/(a + i a tan(c + d x)) declined after 3.8 s 0.4 s
tan(c + d x)^3/(a + i a tan(c + d x))^4 declined after 39 s 0.6 s
tan(c + d x)^2/(a + i a tan(c + d x)) past 60 s 0.7 s
cot(c + d x)/(a + i a cot(c + d x)) past 120 s 0.5 s

What changes. In the rule that writes an imaginary tangent as an exponential, a tangent or cotangent of the same argument above the bar is written in sines and cosines, what the identity puts below cancels against it, and the sines and cosines left are written as exponentials, so the whole is a rational function of e^(i z). Only where nothing of x stands beside them but exponentials of linears and polynomials in x; anything else is read through the tangent as before, since written as exponentials sec(z)^8/(a + i a tan(z))^4 and sqrt(tan(z))/(a + i a tan(z))^(5/2) took minutes.

#1710 answers two of the five rows on its own, the second in 0.7 s and the third in 3.4 s; the other three run past a minute there too.

Tests: PolynomialExponentialTrigTest.AnImaginaryTangentOfALinearWithATangentAboveTheBar, the five rows above, each differentiated back with the symbols pinned after integrating.

Measured first on the 531 corpus problems with a ± i a tan or a ± i a cot below the bar, at the corpus's 5-second budget, against master e73a940a, the branch's base:

master this
solved 168 283
wrong 0 0

115 more are answered, 64 of them in 4.3.2.1 (a + b tan)^m (c + d tan)^n and 36 in 4.3.3.1, and none that master answers is lost.

Measured then on the Rubi corpus against master e73a940a:

master this
family 0, independent suites (1814) 1758 1758
family 1, 40 a file (1381) 1279 1279
families 2 to 8, sampled (2410) 2178 2189

No answer is wrong on either build. The 15 problems the two builds disagreed on, run again one build at a time, are 11 answered here and none on master.

The suite passes on the commit measured, 57767ba7, 14,522 tests, and so does the allocation gate. Master 9c2509d8 is merged in since, without conflicts, and the calculus tests pass on the merge, 3,924 of them.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits October 3, 2026 07:38
…sines, and those as exponentials

With A + i A tan(z) below the bar written as A e^(i z)/cos(z), a tangent
of z above it stayed one, so tan(z) cos(z) was handed on as written, and
with z = c + d x the phase was expanded into sin(c) and cos(c) beside
d x: tan(c + d x)/(a + i a tan(c + d x)) ran past the budget. The tangent
or cotangent above is written in sines and cosines, what the identity
puts below cancels against it, and the sines and cosines of z left are
written as exponentials, so the whole is a rational function of e^(i z).
Only where nothing of x stands beside them but exponentials of linears
and polynomials in x: sec(z)^8/(a + i a tan(z))^4 and
sqrt(tan(z))/(a + i a tan(z))^(5/2) are read through the tangent as
before.

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 3, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 2340e8a into master Oct 3, 2026
34 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the the-imaginary-tangent-cancels-its-cosine branch October 29, 2026 00:44
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