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

Function algebraicFnQ

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

Rubi AlgebraicFunctionQ — u is an algebraic function of x

(u: Expression, x: string, flag: boolean)

Source from the content-addressed store, hash-verified

2158 }
2159 if (zeroQ(k.sub(n.mul(2)))) {
2160 const c = c1.add(b4).evaluate();
2161 if (zeroQ(c)) return null;
2162 return { kind: 'tri', p: { a: a1.add(a4).evaluate(), b: b1, c, n } };
2163 }
2164 return null;
2165 }
2166 // tri + tri
2167 if (u.kind === 'tri' && v.kind === 'tri') {
2168 if (!zeroQ(u.p.n.sub(v.p.n))) return null;
2169 const b = u.p.b.add(v.p.b).evaluate();
2170 const c = u.p.c.add(v.p.c).evaluate();
2171 if (zeroQ(b) || zeroQ(c)) return null;
2172 return {
2173 kind: 'tri',
2174 p: { a: u.p.a.add(v.p.a).evaluate(), b, c, n: u.p.n },
2175 };
2176 }
2177 return null;
2178}
2179
2180type GenBinParts = {
2181 a: Expression;
2182 b: Expression;
2183 n: Expression;
2184 q: Expression;

Callers 1

rubi-utils.tsFile · 0.85

Calls 3

isLiteralRationalFunction · 0.85
hasMethod · 0.65
evaluateMethod · 0.65

Tested by

no test coverage detected