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 6c94652
Browse filesBrowse the repository at this point in the historyBrowse files
An exponential or a hyperbolic function over several linears is split into partial fractions (#1640)
e^x/(x (x + 1)) was left unevaluated, where e^x/x and e^x/(x + 1) were each answered with the
exponential integral. The rule for an exponential of a linear over a power of a linear read one
linear below the bar, and the rule for sinh and cosh, which arrive as sums of exponentials, did
the same. The rule for a sine or a cosine already split a quotient over several linears into
partial fractions, each term the one-linear question; the exponential and hyperbolic ones do too
now, through PartialFractions.TrySplitOverWrittenFactors, which reads symbolic coefficients and
checks the split at pinned points before it is used. e^x/(x (x + 1)) is Ei(x) - Ei(x + 1)/e.
It is also what by parts leaves of Ei(a + b x)/x^2: e^(a + b x)/((a + b x) x).
The polynomial part comes off by long division only where the fraction is not proper already. The
rule for a sine or a cosine divided every time, and x over (c + d x)(x - 2) came back as a quotient
and a remainder 2 provided not c + d x = 0, which nothing splits: x sin(x)/((c + d x)(x - 2)) was
declined where x sin(x)/((x + 3)(x - 2)) was answered. Both rules divide only an improper fraction
now.
Measured on the Rubi corpus, master at 9193d97 and this change on it, run side by side: family 8
296 -> 302 of 420 (Ei, Shi and Chi of a + b x over x^2 and over x^3), family 6 at twenty a file
412 -> 414 of 472 (cosh(c + d x)/(x (a + b x)) and over x^3 (a + b x)^3), family 2 543 of 650 on
both, the independent suites 1756 of 1814 and families 1, 3, 4, 5 and 7 at five a file 682 of 768
on both. 0 wrong everywhere. Run alone, the eight are 0 of 8 on master and 8 of 8 here.
The unit tests pass, 14,240, also with the GC heap held to 4 GB, and the performance gate passes on
3b94625d, which is this change on 9193d97: allocation is what the baseline says on all 19 gated
benchmarks.
ExponentialIntegralIntegrationTest and HyperbolicIntegralIntegrationTest have a row set each over
several linears, and TrigonometricIntegralIntegrationTest two rows over symbolic ones, each
differentiated back with its parameters pinned.
Part of #1501.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
if (numerator.ContainsNode(x) && TreeAnalyzer.PolynomialLongDivision(numerator, denominator, genericCase: true, inTermsOf: x) is var (quotient, remainder))
4646
+
if (numerator.ContainsNode(x)
4647
+
&& TreeAnalyzer.TryGetPolynomial(numerator, x, out var monomialsAbove)
0 commit comments