Documentation moved.
This entry is now part of the unified function reference. Open the unified page →
Function
src/index.ts:847nerdamer.defint
nerdamer.defint(f: ExpressionInput, dx: ExpressionInput, from: ExpressionInput, to: ExpressionInput): ExpressionCalculates the definite integral using Adaptive Simpson. Note that this function uses native JS number due to severe computational overhead when implemented with Decimal.js.
Parameters
| Name | Type | Description |
|---|---|---|
f | ExpressionInput | The function being integrated |
dx | ExpressionInput | The variable of integration |
from | ExpressionInput | The lower limit of the integral |
to | ExpressionInput | The upper limit of the integral |
Returns
Expression — The numeric value if possible else a symbolic function
Examples
defint('cos(x)-x^2+6', 'x', 1, 6); // -42.787553149673464