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

Function xPowerExponent

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

The exponent k of a single `d·xᵏ` term (d x-free): bare `x`→1, `x^k`→k, * `d·x`/`d·x^k`→1/k. Null if `t` is not one x-free-scaled power of x.

(t: Expression, x: string)

Source from the content-addressed store, hash-verified

3774 u: Expression,
3775 x: string
3776): Expression {
3777 const st: FoeState = { base: null, expon: null, flag: false };
3778 foeTest(u, x, st);
3779 if (st.base === null) return u;
3780 return foeFunctionAux(u, x, st);
3781}
3782
3783/** If `u` is PURELY a function of a single exponential F^v with v linear in x
3784 * (Rubi's `FunctionOfExponentialTest` returning true), return `{ v: F^v,
3785 * g: u with F^v → x }` for the rule-2.3#97 substitution; otherwise null.
3786 *
3787 * Unlike `functionOfExponential`, this REQUIRES the test to pass — so it
3788 * rejects integrands with a bare-x factor (e.g. `Tanh[x]/x²`) or a non-linear
3789 * hyperbolic argument (e.g. `Sech[c+d·x²]`), where the substitution would be
3790 * invalid. It also drops Rubi's `$exponFlag$` gate (which demands an explicit
3791 * exponential): the Chapter-6 fallback applies this to pure hyperbolics, whose
3792 * bare-power reductions are not standalone corpus rules. Both v and g come from
3793 * the SAME registered base/exponent, so they are consistent. */
3794export function functionOfExponentialSubstitution(

Callers 1

trigArgMonomialExponentFunction · 0.85

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected