You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7b7f28e
Browse filesBrowse the repository at this point in the historyBrowse files
Fractional powers of a ± a sin(y) are integrated by the half angle at which they are squares (#1405)
(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.
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: BREAKING-CHANGES.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -369,6 +369,26 @@ power of the variable every term holds comes out the same way.
369
369
|`"x^2/((a*x + a)*(1 - x^2))".Integrate("x")`| unevaluated | the partial fractions over `(x + 1)^2 (1 - x)`, over `a`|
370
370
|`"cot(x)^3/(a + b*csc(x))".Integrate("x")`| unevaluated |`-1/(b sin(x)) - a ln(sin(x))/b^2 + (b^2 - a^2) ln(a sin(x) + b)/(a b^2)`, once `a u^4 + b u^3` is read as `u^3 (a u + b)`|
371
371
372
+
### Fractional powers of `a ± a sin` are integrated by the half angle at which they are squares
373
+
374
+
**Improvement, not silent.**`(A + C sin(y)^2)/((c - c sin(y))^(3/2) sqrt(a + a sin(y)))` and
375
+
its kin ran past any budget: the substitution search has no radical of a trigonometric function
376
+
it can rationalise, and the closed rule for `(a + b sin)^n` with `a^2 = b^2` reads one such power
377
+
alone. `1 + sin(y)` is `2 sin(u)^2` and `1 - sin(y)` is `2 cos(u)^2` for `u = y/2 + pi/4`
378
+
(`1 ± cos(y)` the same with `u = y/2`), so each such power is a whole power of a sine or cosine
379
+
of `u` times its sign — a constant between the zeros, written in front — and what is left is
380
+
rational in `sin(u)` and `cos(u)`, which the rules answer. Exact for any `a`: `1 + sin(y)` is not
381
+
negative, so `(a q)^p = a^p q^p` for the principal powers whatever `a` is; `a^2 = b^2` is decided,
382
+
not assumed, and a lone positive power still goes to the closed rule first, which answers it in
383
+
one form across the zeros.
384
+
385
+
|| Was | Is |
386
+
|---|---|---|
387
+
|`"(A + C*sin(x)^2)/((c - c*sin(x))^(3/2)*sqrt(a + a*sin(x)))".Integrate("x")`| unevaluated after the budget |`sgn(cos(u)) sgn(sin(u)) (…)` in `u = x/2 + pi/4`, half a second |
foreach (var term in Sumf.LinearChildren(radicand))
2396
+
{
2397
+
if (!term.ContainsNode(sine) && !term.ContainsNode(cosine))
2398
+
{
2399
+
a += term;
2400
+
continue;
2401
+
}
2402
+
Entity coefficient = Number.Integer.One;
2403
+
foreach (var factor in Mulf.LinearChildren(term))
2404
+
{
2405
+
if (factor == sine || factor == cosine)
2406
+
{
2407
+
if (function is not null)
2408
+
return null;
2409
+
function = factor;
2410
+
}
2411
+
else if (!factor.ContainsNode(sine) && !factor.ContainsNode(cosine))
2412
+
coefficient *= factor;
2413
+
else
2414
+
return null;
2415
+
}
2416
+
if (function is null || b is not null)
2417
+
return null;
2418
+
b = coefficient;
2419
+
}
2420
+
if (b is null || function is null)
2421
+
return null;
2422
+
a = a.InnerSimplified;
2423
+
b = b.InnerSimplified;
2424
+
if (a.Evaled is Number.Complex { IsZero: true })
2425
+
return null;
2426
+
var plus = (a - b).InnerSimplified.Evaled is Number.Complex { IsZero: true } || (a - b).Simplify().Evaled is Number.Complex { IsZero: true };
2427
+
var minus = !plus && ((a + b).InnerSimplified.Evaled is Number.Complex { IsZero: true } || (a + b).Simplify().Evaled is Number.Complex { IsZero: true });
2428
+
if (!plus && !minus)
2429
+
return null;
2430
+
return (a, plus, function == sine);
2431
+
}
2432
+
2263
2433
/// <summary>
2264
2434
/// A whole power of the secant or cosecant, brought down two at a time by the standard
2265
2435
/// reduction until the power rule for the first or the zeroth takes over.
0 commit comments