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

Function pseudoBinomialPartsX

src/compute-engine/rubi/rubi-utils.ts:2067–2080  ·  view source on GitHub ↗

Rubi PseudoBinomialParts → {a,1,c,d,n}: u ≡ a + (c+d·x)^n, n > 2

(u: Expression, x: string)

Source from the content-addressed store, hash-verified

2065 return t === null ? null : scaleTri(scale, t);
2066 }
2067 if (dep.length === 2) {
2068 const p1 = binomialPartsX(dep[0], x);
2069 const p2 = binomialPartsX(dep[1], x);
2070 if (p1 === null || p2 === null || !zeroQ(p1.n.sub(p2.n))) return null;
2071 const mid = p1.a.mul(p2.b).add(p1.b.mul(p2.a)).evaluate();
2072 if (zeroQ(mid)) return null;
2073 return scaleTri(scale, {
2074 a: p1.a.mul(p2.a).evaluate(),
2075 b: mid,
2076 c: p1.b.mul(p2.b).evaluate(),
2077 n: p1.n,
2078 });
2079 }
2080 return null;
2081 }
2082 case 'Add':
2083 case 'Subtract': {

Callers 1

rubi-utils.tsFile · 0.85

Calls 14

polyCoeffsXFunction · 0.85
trimZerosFunction · 0.85
rtExprFunction · 0.85
safeSimplifyFunction · 0.85
zeroQFunction · 0.85
evaluateMethod · 0.65
divMethod · 0.65
mulMethod · 0.65
numberMethod · 0.65
powMethod · 0.65
symbolMethod · 0.65
subMethod · 0.65

Tested by

no test coverage detected