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 ac6e33f
Browse filesBrowse the repository at this point in the historyBrowse files
Exponentials below the bar beside a power of a linear are integrated to the exponential integral (#1732)
Written in the exponential every other one is a whole power of, exponentials
whose denominator in lowest terms is a power of that one alone are a sum of its
powers, and each term over the linear is the exponential integral's:
1/((c + d x)(a + a tanh(e + f x))) is (1 + e^(-2(e + f x)))/(2 a (c + d x)).
Rubi's 6.3.1 and 6.4.1. Part of #718.
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| `"cos(a+b*ln(c*x^n))^2".Integrate("x")` | `integral(cos(a + b * ln(c * x ^ n)) ^ 2, x)` | an antiderivative in `sin` and `cos` of `2 (a + b ln(c x^n))`, beside `x (c x^n)^(-1/n)` |
3162
3162
3163
+
### Exponentials below the bar beside a power of a linear are integrated to the exponential integral
3164
+
3165
+
**Answers where there were none.** `1/(x e^(2x))` was declined where `e^(-2x)/x` was answered, and so
3166
+
were `1/((c + d x)(a + a tanh(e + f x)))` and its powers, Rubi's 6.3.1, and the same with `coth`, 6.4.1:
3167
+
the rules for an exponential over a linear read it above the bar. Written in the exponential every
3168
+
other one is a whole power of, exponentials whose denominator is then a power of that one alone are a
3169
+
sum of its powers -- `1/(1 + tanh(z))` is `(1 + e^(-2z))/2` -- and each term over the linear is an
3170
+
exponential integral. Where anything else stays below the bar, `1/(x (1 + e^x))`, the integral is not
3171
+
of this kind and is declined as before ([#718](https://github.com/asc-community/AngouriMath/issues/718)).
// Nothing of x below the bar: a polynomial beside the exponentials is the rules' by parts.
5366
+
if (belowX == Number.Integer.One || exponentials.Complexity > 160)
5367
+
return null;
5368
+
5369
+
// One base, and every exponent a rational multiple of the first, its offset included,
5370
+
// so that w is a power of the base at that exponent and no constant is left beside it.
5371
+
Entity? commonBase = null;
5372
+
Entity? unit = null, unitSlope = null, unitOffset = null;
5373
+
var multiples = new Dictionary<Entity, ERational>();
5374
+
foreach (var node in exponentials.Nodes)
5375
+
{
5376
+
if (!IsAnExponential(node) || multiples.ContainsKey(node) || node is not Powf(var @base, var exponent))
5377
+
continue;
5378
+
if (!TreeAnalyzer.TryGetPolyLinear(exponent, x, out var slope, out var offset) || TreeAnalyzer.IsZero(slope))
5379
+
return null;
5380
+
if (commonBase is null)
5381
+
{
5382
+
(commonBase, unit, unitSlope, unitOffset) = (@base, exponent, slope, offset);
5383
+
multiples[node] = ERational.One;
5384
+
continue;
5385
+
}
5386
+
if (@base != commonBase
5387
+
|| Functions.PartialFractions.Bare((slope / unitSlope!).Simplify()).Evaled is not Number.Rational ratio || ratio.ERational.IsZero
5388
+
|| !IsTheZeroPolynomial((offset - ratio * unitOffset!).InnerSimplified))
5389
+
return null;
5390
+
multiples[node] = ratio.ERational;
5391
+
}
5392
+
if (commonBase is null || unit is null)
5393
+
return null;
5394
+
if (commonBase != MathS.e && (commonBase.Evaled is Number.Complex and not Number.Real || commonBase.Evaled is Number.Real { IsNegative: true } || TreeAnalyzer.IsZero(commonBase)))
0 commit comments