FunctionOfExponentialTest: walk u, registering exponential bases/exponents. * Returns true iff u is a function of a single common F^v.
(u: Expression, x: string, st: FoeState)
| 3281 | // (a Cos)^m (b Csc)^n == (a Sin[θ+π/2])^m (-b Sec[θ+π/2])^n |
| 3282 | if (g.head === 'cos' && h.head === 'csc') |
| 3283 | return ce.function('Multiply', [ |
| 3284 | buildMono(ce, g.coef, 'sin', argP, g.exp), |
| 3285 | buildMono(ce, h.coef.neg(), 'sec', argP, h.exp), |
| 3286 | ]); |
| 3287 | // (a Cos)^m (b Sec)^n == (a Sin[θ+π/2])^m (b Csc[θ+π/2])^n |
| 3288 | if (g.head === 'cos' && h.head === 'sec') |
| 3289 | return ce.function('Multiply', [ |
| 3290 | buildMono(ce, g.coef, 'sin', argP, g.exp), |
| 3291 | buildMono(ce, h.coef, 'csc', argP, h.exp), |
| 3292 | ]); |
| 3293 | } |
| 3294 | if (g.kind === 'mono' && h.kind === 'binom' && h.head === 'cos') { |
| 3295 | const binomM = buildBinom(ce, h.a, h.b.neg(), 'sin', argM, h.exp); // a − b Sin[θ−π/2] |
| 3296 | const binomP = buildBinom(ce, h.a, h.b, 'sin', argP, h.exp); // a + b Sin[θ+π/2] |
| 3297 | // (g Sin)^p (a+b Cos)^m == (g Cos[θ−π/2])^p (a−b Sin[θ−π/2])^m |
| 3298 | if (g.head === 'sin') |
| 3299 | return ce.function('Multiply', [ |
| 3300 | buildMono(ce, g.coef, 'cos', argM, g.exp), |
| 3301 | binomM, |
| 3302 | ]); |
| 3303 | // (g Csc)^p (a+b Cos)^m == (g Sec[θ−π/2])^p (a−b Sin[θ−π/2])^m |
| 3304 | if (g.head === 'csc') |
| 3305 | return ce.function('Multiply', [ |
| 3306 | buildMono(ce, g.coef, 'sec', argM, g.exp), |
| 3307 | binomM, |
| 3308 | ]); |
| 3309 | // (g Cot)^p (a+b Cos)^m == (-g Tan[θ−π/2])^p (a−b Sin[θ−π/2])^m |
| 3310 | if (g.head === 'cot') |
no test coverage detected