Skip to content

Fractional powers of a ± a sin(y) are integrated by the half angle at which they are squares - #1405

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
half-angle-square
Sep 17, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
half-angle-square

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The largest remaining pocket of Rubi's family 4 was fractional powers of a ± a sin(y) and a ± a cos(y) beside other things — (A + C sin^2)/((c - c sin)^(3/2) sqrt(a + a sin)), (A + B sin)/((a + a sin)(c - c sin)^(5/2)), sec^2/(a + a cos)^(5/2) — every one a timeout or a decline: the substitution search has no radical of a trigonometric function it can rationalise, and SolveAHalfPowerOfOnePlusASine reads one such power alone, to a positive exponent, with a^2 = b^2 decided by evaluation (so sqrt(a + a sin(x)) with a symbol was not even that).

The rule. 1 + sin(y) is 2 sin(u)^2 and 1 - sin(y) is 2 cos(u)^2 for u = y/2 + pi/4; 1 ± cos(y) the same with u = y/2. So (a + a sin(y))^p is a^p 2^p |sin(u)|^(2p) = a^p 2^p sgn(sin(u)) sin(u)^(2p) for a half-integer p, the sign a constant between the zeros of the sine that comes out in front of the integral (top level only, as every rule that writes a sign for a function), and with sin(y) = 2 sin(u)^2 - 1, cos(y) = 2 sin(u) cos(u) and dx = 2 du/f what is left is rational in sin(u) and cos(u), which the chain answers. Exact for any a: 1 + sin(y) is not negative, so (a q)^p = a^p q^p for the principal powers whatever a is — the test pins a = -3 as well as a = 2. a^2 = b^2 is decided by simplification, not assumed; a lone positive power still goes to the closed rule first, which answers it in one form across the zeros. Before the substitution search, which spent twenty seconds on the radicals before declining.

Measured. Rubi's family 4 sample (422, six per file): 261 → 277, sixteen rows and none lost, six of them timeouts before — (A + C sin^2)/((c - c sin)^(3/2) sqrt(a + a sin)) at 498 ms, (a + a sin)^(7/2) and 1/(a + a sin)^(5/2) (which the closed rule could not decide for a symbolic a), sin^2 (a + a sin)^(3/2)(c - c sin) at 30 ms where it had run 24 s, and the cosine and secant kin. The 1,774-problem independent suite: 1706/1774, 0 wrong, 0 timeouts, verdicts identical to master, 89.6 s → 85.0 s. All four suites green (11,517); HalfAngleSquareTest (6 rows × two values of a) with its .editorconfig section; BREAKING-CHANGES entry.

Not this rule's: a second radical beside them (sqrt(g sin) sqrt(a + a sin)), a symbolic exponent m, and (a + a sec)^(m/2) shapes, which want the secant read first.

Part of #718.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

… which they are squares

(A + C sin(y)^2)/((c - c sin(y))^(3/2) sqrt(a + a sin(y))) and its kin ran past any budget:
the substitution search has no radical of a trigonometric function it can rationalise, and the
closed rule for (a + b sin)^n with a^2 = b^2 reads one such power alone. 1 + sin(y) is
2 sin(u)^2 and 1 - sin(y) is 2 cos(u)^2 for u = y/2 + pi/4, and 1 ± cos(y) the same with
u = y/2, so each such power is a whole power of a sine or cosine of u times its sign -- a
constant between the zeros, written in front -- and what is left is rational in sin(u) and
cos(u), which the rules answer. Exact for any a, since 1 + sin(y) is not negative and
(a q)^p = a^p q^p for the principal powers whatever a is; a^2 = b^2 is decided, not assumed; a
lone positive power goes to the closed rule first, which answers it in one form across the
zeros. Before the substitution search, which spent twenty seconds on the radicals.

Rubi's family 4 sample: 261 to 277 of 422, sixteen rows and none lost, six of them
timeouts before. The 1774-problem suite is unchanged at 1706 with 0 wrong.

Part of #718.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet

Copy link
Copy Markdown
Member Author

The Ubuntu leg failed twice on ANonElementaryRemainderIsDeclinedQuickly at 20.4–25.7 s, in a suite taking 14–17 minutes where Windows took 6 (every Ubuntu C# Test job this evening is 12–17 min, master's included); atan(x)^2/x^2 declines in 3.4 s here on master and on this branch. #1406 bounds the four such tests by a 60 s guard and is merged; master merged in here (no conflicts) so the rerun carries it.

@Rafael-SOWNet
Rafael-SOWNet merged commit 7b7f28e into master Sep 17, 2026
31 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the half-angle-square branch September 17, 2026 21:05
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