integrate
Computes a symbolic antiderivative with respect to a variable when Nerdamer has a supported integration path.
Integration handles linear combinations, constant factors, common elementary functions, scaled arguments, and a broader set of algebraic and trigonometric forms through Nerdamer's integration routines.
When an antiderivative is not available, Nerdamer can leave the integral unevaluated instead of inventing a result.
Examples
These examples use Nerdamer Notation.
Integrate a polynomial term by term.
integrate(x^2+3*x+1,x)
// → x+(3/2)*x^2+(1/3)*x^3Use linearity across elementary functions.
integrate(sin(x)+cos(x),x)
// → -cos(x)+sin(x)Account for a scaled inner argument.
integrate(sec(2*x)^2,x)
// → (1/2)*tan(2*x)Interfaces
The same operation is available through the interfaces below.
Nerdamer Notation
Use this form inside input passed to nerdamer(...).
integrate(expression[, variable])
Parameters
expression— Expression to integrate.variable— Optional integration variable.
nerdamer.integrate
Call the operation through the default nerdamer import.
nerdamer.integrate(expr: ExpressionInput, dx: ExpressionInput, depth: number): Expression
Parameters
| Name | Type | Description |
|---|---|---|
expr | ExpressionInput | Integrand to normalize and integrate. |
dx | ExpressionInput | Plain integration variable. |
depth | number | Internal recursion depth. Defaults to zero. |
Returns
Expression — A symbolic antiderivative without an integration constant, or an unevaluated `integrate(...)` Expression.
Direct JavaScript / TypeScript API
Import the operation directly from its package entry point.
import { integrate } from 'nerdamer/calculus';
integrate(expr: ExpressionInput, dx: ExpressionInput, depth: number): Expression
Parameters
| Name | Type | Description |
|---|---|---|
expr | ExpressionInput | Integrand to normalize and integrate. |
dx | ExpressionInput | Plain integration variable. |
depth | number | Internal recursion depth. Defaults to zero. |
Returns
Expression — A symbolic antiderivative without an integration constant, or an unevaluated `integrate(...)` Expression.
