Skip to content

Integrate a power beside a Laurent polynomial in an exponential term by term - #2103

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-power-of-a-linear-beside-a-tangent-as-exponentials
Oct 24, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-power-of-a-linear-beside-a-tangent-as-exponentials

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #2075.

(c + d x)^m/(a + a tanh(e + f x)) was declined. Since tanh(u) is (e^(2u) - 1)/(e^(2u) + 1), the factor is (1 + e^(-2u))/(2a): a Laurent polynomial in e^(2u). Each of its terms beside the power of the linear is a gamma function.

This reads a rational function of one exponential e^B in w = e^B, with every exponential a whole multiple of B. Where the quotient in w has a power of w below the bar and two terms or more, each term is integrated alone. The sine, cosine, tangent and cotangent of a linear are first written in e^(i A), so 1/(1 + i tan(u)) is (1 + e^(-2 i u))/2. A power of an exponential, (F^E)^n, is F^(n E) times a factor that is constant between the cuts, and that factor is carried through as a constant.

Only constants and the powers the gamma rule reads may stand beside it: powers of x, or of one linear with at least one exponent not whole. The first version took anything beside, and it failed 23 suite tests, lost 3 corpus rows, and allocated up to 20 GB on (a + b x^n)^p sin(c + d x). It also answered sin(x)/x in gamma functions rather than as Si(x).

Corpus (the full fair Rubi corpus, at base 2be40bad against 68211405): +26 solved, none lost, 0 wrong. Five of the 26 (6.1.1:205–207, 6.1.3:98/100) are already solved on master by #2096–#2100, so the gain on master is 21:

file rows
4.3.10 (c+d x)^m (a+b tan)^n 57, 58, 59
4.4.10 (c+d x)^m (a+b cot)^n 55, 56, 57
6.3.1 (c+d x)^m (a+b tanh)^n 77, 78, 79
6.4.1 (c+d x)^m (a+b coth)^n 55, 56, 57
6.1.3 (e x)^m (a+b sinh(c+d x^n))^p 117, 118, 119, 121
6.2.3 (e x)^m (a+b cosh(c+d x^n))^p 60
2.2 (c+d x)^m (F^(g (e+f x)))^n (a+b (F^(g (e+f x)))^n)^p 95, 96 (timeouts), 97
2.1 u (F^(c (a+b x)))^n 65

Allocation per stream is 1.0010 / 1.0023 / 0.9759. The one row flagged, 6.1.7:196, is memo warmth that comes back on its own run. The branch is rebased onto e1fe08c2, and the full suite passes there.

Tests: APowerBesideALaurentPolynomialInAnExponential, nine integrands, each differentiated back.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…by term

(c + d x)^m/(a + a tanh(e + f x)) was declined. tanh(u) is (e^(2u) - 1)/(e^(2u) + 1) here, so the
factor is (1 + e^(-2u))/(2a), a Laurent polynomial in e^(2u), and each of its terms beside the
power of the linear is a gamma function. A rational function of one exponential e^B is now read in
w = e^B, every exponential a whole multiple of B, and where the quotient has a power of w below the
bar and two terms or more, each term is integrated alone. Beside it only constants and powers of x
or of one linear, the shapes the gamma rule reads:
- for a linear B, at least one of them not whole. Whole powers are elementary or the sine and
  cosine integrals, sin(x)/x is Si(x), and are answered as such;
- for any other B, powers of x alone: x sinh(a + b x^n)^2 is x (e^(2a + 2b x^n) - 2 +
  e^(-2a - 2b x^n))/4. Beside anything else, sin(c + d/x)/(e + f x) or (a + b x^n)^p sin(c + d x),
  asking the gamma rule of each term was a slow decline, and the first version of this answered
  sin(x)/x in gamma functions.
The sine, cosine, tangent and cotangent of a linear A are written in e^(i A) first:
1/(1 + i tan(u)) is (1 + e^(-2 i u))/2. And a power of an exponential, (F^E)^n, is F^(n E) times
(F^E)^n F^(-n E), which is constant between the cuts and is carried through as a constant:
(a + b (F^(g (e + f x)))^n)^2 (c + d x)^m, which timed out, is three gamma functions.

Part of #2075.

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.7.0 milestone Oct 23, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 6d8f3ca into master Oct 24, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 24, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the a-power-of-a-linear-beside-a-tangent-as-exponentials branch October 24, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant