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)
| 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 */ |
| 2349 | function 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]; |
no test coverage detected