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

Function substTrigNode

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

The substitution target trig node of `v` (the rule passes `trig(arg)/d`); * returns the bare trig node after dropping x-free factors, or null.

(
  v: Expression,
  x: string,
  ce: ComputeEngine
)

Source from the content-addressed store, hash-verified

3464 if (op === 'Multiply') {
3465 const nonfree = u.ops.filter((o) => o.has(x));
3466 return nonfree.length <= 1 && nonfree.every((o) => easyDQ(o, x));
3467 }
3468 if (op === 'Add') return u.ops.every((o) => easyDQ(o, x));
3469 return false;
3470}
3471
3472/** DerivativeDivides[y, u, x] — see block comment. Returns the x-free quotient
3473 * or the `False` symbol. */
3474function derivativeDivides(y: Expression, u: Expression, ctx: Ctx): Expression {
3475 const ce = ctx.ce;
3476 const x = ctx.x;
3477 const FALSE = ce.symbol('False');
3478 // Rubi: MatchQ[y, a_.*x /; FreeQ[a,x]] → False (degree-1 monomial, no

Callers 2

functionOfQFunction · 0.85
substFor3Function · 0.85

Calls 2

selectFactorsFunction · 0.85
activeTrigHeadQFunction · 0.85

Tested by

no test coverage detected