(a: Expression, b: Expression)
| 303 | const r = build( |
| 304 | ['RationalFunctionExponents', ['Divide', ['Add', ['Power', 'x', 2], 1], ['Add', ['Power', 'x', 3], 'x']], 'x'], |
| 305 | ctx |
| 306 | ); |
| 307 | expect(r.operator).toBe('List'); |
| 308 | expect(r.ops![0].isSame(2)).toBe(true); |
| 309 | expect(r.ops![1].isSame(3)).toBe(true); |
| 310 | }); |
| 311 | |
| 312 | test('FunctionOfLog[u, x] detects u = F(Log[a·xⁿ]) (RUBI.md §5, R19)', () => { |
| 313 | // The 3.5 `∫F(Log[a·xⁿ])/x` rule feeds Cancel[x·u]; the CE `Cancel` cannot |
| 314 | // cancel a common x monomial (x/(x+x·Log²) → 1/(1+Log²)), so functionOfLog |
| 315 | // does it itself. Result is the triple {F(x), a·xⁿ, n}. |
| 316 | const asTriple = (j: Json) => build(['FunctionOfLog', j, 'x'], ctx); |
no test coverage detected