MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / cleanExpansionResult

Method cleanExpansionResult

src/compute-engine/rubi/driver.ts:752–769  ·  view source on GitHub ↗

Clean the exponential-fallback antiderivative: collect like terms via a * bounded simplify (the raw expansion repeats `c·x` once per exponential * term, which otherwise bloats high-degree results past the verifier's leaf * cap), then fold the stray `ln(e)` the Chapter-2 rules leave. The val

(F: Expression)

Source from the content-addressed store, hash-verified

750 // of inert `Integrate(term)` placeholders, each patched by its term's own
751 // recorded steps as the recursion below fills them in.
752 this.record(
753 entryNode,
754 () =>
755 ce.function(
756 'Add',
757 tcs.map((tc) => inert(tc))
758 ),
759 'integrate.sum'
760 );
761 return ce.function(
762 'Add',
763 tcs.map((tc) => recurse(tc) ?? inert(tc))
764 );
765 }
766 // ∫ c·u dx = c·∫u dx
767 if (integrand.operator === 'Multiply' && integrand.ops) {
768 const free = integrand.ops.filter((o) => !o.has(variable));
769 if (free.length > 0) {
770 const rest = integrand.ops.filter((o) => o.has(variable));
771 const c = recanonicalize(
772 ce,

Callers 2

intUncachedMethod · 0.95

Calls 2

foldLnExponentialEFunction · 0.90
simplifyMethod · 0.65

Tested by

no test coverage detected