-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Description
The integration function doesn't seem to function correctly. It can't compute an antiderivative in some cases and in others it's plain wrong
Steps to Reproduce
import { ComputeEngine } from '@cortex-js/compute-engine'
const ce = new ComputeEngine()
console.log(ce.parse('\\int (2x)\' dx').evaluate().toLatex())
// Expected: Something equiv to: 2x
// Actual: \int\!x\mapsto2x^{\prime}\, \mathrm{d}x
console.log(ce.parse('\\int x \\sin(x) dx').evaluate().toLatex())
// Expected: Something equiv to: -x cos(x) + sin(x)
// Actual: \frac{1}{2}(\sin(x)x^2)-x\cos(x)
console.log(ce.parse('\\int 2x dx').evaluate().toLatex())
// Expected: Something equiv to: x^2
// Actual: 3x^2
console.log(ce.parse('\\int 2x^3 dx').evaluate().toLatex())
// Expected: Something equiv to: \frac{1}{4} x^4
// Actual: \frac{5x^4}{2}Environment
Compute Engine version 0.30.2
Metadata
Metadata
Assignees
Labels
No labels