Function reference · Calculus

defint

Evaluates a definite integral over an interval.

Nerdamer uses symbolic integration when available and can use numerical evaluation for supported numeric bounds. Symbols that are independent of the integration variable are treated as constants.

Supplying the integration variable explicitly avoids ambiguity in expressions containing more than one symbol.

Examples

These examples use Nerdamer Notation.

Evaluate a simple polynomial definite integral with numeric bounds.

defint(x,x,0,1)
// → 0.5

Evaluate the singular-endpoint integral numerically; the result is approximately -1.

defint(log(x),x,0,1)

Keep parameters that are independent of the integration variable.

defint(2*z,x,1,4)
// → 6*z

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · nerdamer API · Direct API

Nerdamer Notation

Use this form inside input passed to nerdamer(...).

defint(arg1, arg2, arg3, arg4)

nerdamer.defint

Call the operation through the default nerdamer import.

nerdamer.defint(f: ExpressionInput, dx: ExpressionInput, from: ExpressionInput, to: ExpressionInput): Expression

Parameters

NameTypeDescription
fExpressionInputThe function being integrated
dxExpressionInputThe variable of integration
fromExpressionInputThe lower limit of the integral
toExpressionInputThe upper limit of the integral

Returns

Expression — The numeric value if possible else a symbolic function

Browse the nerdamer API →

Direct JavaScript / TypeScript API

Import the operation directly from its package entry point.

import { defint } from 'nerdamer/calculus';
defint(f: ExpressionInput, dx: ExpressionInput, from: ExpressionInput, to: ExpressionInput): Expression

Parameters

NameTypeDescription
fExpressionInputThe function being integrated
dxExpressionInputThe variable of integration
fromExpressionInputThe lower limit of the integral
toExpressionInputThe upper limit of the integral

Returns

Expression — The numeric value if possible else a symbolic function

Browse nerdamer/calculus

← Back to Reference