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

Function hyperbolicToExp

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

TrigToExp for Sinh/Cosh: rewrite Sinh/Cosh[w] → exp form in E^(±w), with the * ½ coefficient DISTRIBUTED into the two terms so a power base stays a pure Add * (CE's Expand will not pull a scalar out of a power base). The argument w is * kept symbolic; all other heads — including the reciprocal

(ce: ComputeEngine, u: Expression)

Source from the content-addressed store, hash-verified

3610 x: string,
3611 st: FoeState
3612): boolean {
3613 const ce = base.engine;
3614 if (st.base === null) {
3615 st.base = base;
3616 st.expon = expon;
3617 return true;
3618 }
3619 // tmp = Log[base]·Coeff[expon,x,1] / (Log[$base$]·Coeff[$expon$,x,1]).
3620 // The exponentials share a common base iff tmp is rational.
3621 let tmp = safeSimplify(
3622 base
3623 .ln()
3624 .mul(coeffX(expon, x, 1))
3625 .div(st.base.ln().mul(coeffX(st.expon!, x, 1)))
3626 );
3627 if (!(tmp.isNumberLiteral && tmp.isRational === true)) return false;
3628
3629 // Do the constant terms share the same ratio? (skip when $expon$ has none)
3630 const e0 = coeffX(st.expon!, x, 0);
3631 let constCommensurate = false;
3632 if (!zeroQ(e0)) {

Callers 3

expandTrigReduceFunction · 0.85
expandHyperbolicToExpFunction · 0.85
rubi-utils.tsFile · 0.85

Calls 7

powMethod · 0.65
negMethod · 0.65
numberMethod · 0.65
addMethod · 0.65
mulMethod · 0.65
functionMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected