Skip to content

Integrate a power beside a sine or a cosine as incomplete gamma functions - #2085

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-power-beside-a-trigonometric-function-as-exponentials
Oct 23, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-power-beside-a-trigonometric-function-as-exponentials

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Integrates a power of x or of a linear that is not a polynomial, beside sin(u)^k cos(u)^j, through Euler's formula. Part of #2075.

sin(u)^k cos(u)^j is a sum of e^(i q u). Each term beside the power is a gamma function of the rule from #2083, and the term with q = 0 is the power's own integral. Where any term is declined, so is the integrand: a whole power keeps its elementary answer by parts, and a half-whole order, which is Fresnel's, stays unanswered as before. The gamma functions' arguments are imaginary on the real line, off the cut, so the branch question of #2080 does not arise.

integrand
(c + d x)^m sin(a + b x) Rubi's 4.1.10 and 4.2.10
x^4 (a + b sin(c + d x^3))^2 4.1.12 and 4.2.12, after the integrator expands the power
sin(c + d x^3) a function of a power of x alone

Measured on Rubi's suite, read with the harness that maps GAMMA, against master 23c8eca1, the whole corpus each side:

master this
solved 48,700 of 49,052 48,850
wrong 0 0
solved rows lost 0
rows to a timeout 0

The gains are 57 in 4.1.12, 26 in 4.1.10, 25 in 4.2.10, 18 in 4.2.12, 12 in 5.1.4, 9 in 4.7.3, 2 in 8.4 and one of Moses's problems. Family 4 goes from 14,107 to 14,242 of 14,262. Time and allocation per stream are within 3%, and no answer's allocation grew.

By value. Four definite integrals agree with quadrature to 25 digits, and each is real:

this quadrature
integral((5/4 + x/2)^(3/7)*sin(1/3 + 2*x/3), x, 1, 2) 1.285098118992018756434479… 1.285098118992018756434479
integral(x^4*sin(1 + x^3/2), x, 1, 2) -1.812892710574357659353896… -1.812892710574357659353896
integral(x^(1/3)*sin(x)*cos(x), x, 1, 3) -0.494468890224824612997499… -0.4944688902248246129974997
integral(sin(x^3)^2, x, 1, 2) 0.578821039202935718900446… 0.578821039202935718900446

The suite passes (16,934) and so do the MCP tests (329). The new tests differentiate six shapes back, and pin x^2 sin(x) and sin(x)/x to their old answers.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…ions

A power of x or of a linear that is not a polynomial, beside sin(u)^k cos(u)^j,
is integrated through Euler's formula: sin(u)^k cos(u)^j is
(2 i)^(-k) 2^(-j) sum C(k, r) (-1)^(k - r) C(j, t) e^(i (2 r - k + 2 t - j) u),
each e^(i q u) beside the power is a gamma function of the gamma rule for a power
beside an exponential, and the term with q = 0 is the power's own integral. Where
any term is declined -- a whole power, whose integral is elementary and answered
by parts, or a half-whole order, which is Fresnel's -- so is the integrand. The
gamma functions' arguments are imaginary on the real line, off the cut.

Rubi's suite on the harness that reads GAMMA, against master 23c8eca:
48,700 -> 48,850 of 49,052, 0 wrong, no solved row lost, no row to a timeout, no
answer's allocation grown. The gains are 57 in 4.1.12, 26 in 4.1.10, 25 in
4.2.10, 18 in 4.2.12, 12 in 5.1.4, 9 in 4.7.3, 2 in 8.4 and one Moses problem.
Four definite integrals agree with quadrature to 25 digits, real.

Part of #2075.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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