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

Function fractionalLinearInnerQ

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

True if `u` contains a `Power(base, p)` whose base is LINEAR in `x` and * whose exponent `p` is a POSITIVE non-integer literal (`√(c+d·x)`, * `(c+d·x)^(3/2)`) — the linear-inner shape whose substitution reduction * (4.1.12 #81-86) lands an elementary sin/cos·poly antiderivative. Distinguishes *

(u: Expression, x: string)

Source from the content-addressed store, hash-verified

2336 const coeffs = trimZeros(coeffs0);
2337 const n = coeffs.length - 1;
2338 if (n <= 2) return null;
2339 const d = rtExpr(coeffs[n], n);
2340 const c = coeffs[n - 1].div(ce.number(n).mul(d.pow(n - 1))).evaluate();
2341 const X = ce.symbol(x);
2342 const a = safeSimplify(u.sub(c.add(d.mul(X)).pow(n)));
2343 if (zeroQ(a) || a.has(x)) return null;
2344 return { a, b: ce.One, c, d, n };
2345}
2346
2347/** Rubi FractionalPowerFactorQ: a factor of u is a complex constant or a
2348 * fractional power */
2349function fracPowerFactorQ(u: Expression): boolean {
2350 if (!u.ops) return isNumber(u) && typeof u.im === 'number' && u.im !== 0;
2351 switch (u.operator) {
2352 case 'Power': {
2353 const e = u.ops[1];

Callers 1

walkFunction · 0.85

Calls 2

polyDegreeXFunction · 0.85
isIntegerMethod · 0.45

Tested by

no test coverage detected