Numerical Integrals

Description

Sage uses an adaptive algorithm to numerically approximate a definite integral. In addition to the approximation, an error bound is returned. The following Sage command evaluates

(1)
\begin{align} \int_0^1 e^{-x^2} \, dx \end{align}

Sage Cell

Code

numerical_integral(exp(-x^2),  0, 1)


Options

Option

Use +Infinity and -Infinity for plus or minus infinity.

Code

numerical_integral(exp(-x^2),  0, +Infinity)


Tags

Primary Tags: Calculus - Single Variable

Secondary Tags: Integrals: Definite Integrals