# Numerical integration (numeric_integrate)

Approximate a definite integral numerically.

## How to write it

### numeric_integrate(f, x = a..b)

**f**

The expression or function to work on. Takes an expression.

**x = a..b**

The variable and its bounds, written x = a..b. Takes a variable with its range.

## Examples

- $\displaystyle \int_{0}^{\pi} \sin(x) \, dx \approx 1.9999999999999942$

  `numeric_integrate(sin(x), x = 0..pi)`

  In the solver, `numeric_integrate(sin(x), x = 0..pi)` gives `1.9999999999999942`.

  [Open in the solver](https://hilberon.com/?q=numeric_integrate%28sin%28x%29%2C%20x%20%3D%200..pi%29)

## Functions its examples use

- [sin](https://hilberon.com/library/sin)

  Sine of an angle in radians.

## Related functions

- [integrate](https://hilberon.com/library/integrate)

  Antiderivative of an expression, or its definite integral over a range.
- [residue](https://hilberon.com/library/residue)

  Residue of an expression at a point.
- [limit](https://hilberon.com/library/limit)

  Limit of an expression as a variable approaches a point.
- [total_diff](https://hilberon.com/library/total_diff)

  Total derivative of an expression with respect to a variable.
- [laplacian](https://hilberon.com/library/laplacian)

  Laplacian of an expression: the sum of its second partial derivatives.
- [certified_value](https://hilberon.com/library/certified_value)

  An enclosure of a definite integral or a closed constant, with radius at most 10^-digits.

---
Source: https://hilberon.com/library/numeric_integrate
