1 | initial version |

For numerical integrals in Sage, use numerical_integral. The function integrate is more appropriate for symbolic integration.

With your example:

```
sage: import scipy.stats as st
sage: numerical_integral(lambda x : st.norm.pdf(x), (-1, 1))
(0.6826894921370862, 7.579375928402479e-15)
```

As far as i'm aware, there is no built-in multi-dimensional numerical integration in Sage. This can be worked around by a nested call to `numerical_integral`

, but it will not be as efficient as it could be for some applications (see also this question. There are examples in Mathematical Computation in Sage, Ch. 14, page 315.

2 | No.2 Revision |

For numerical integrals in Sage, use numerical_integral. The function integrate is more appropriate for symbolic integration.

With your example:

```
sage: import scipy.stats as st
sage: numerical_integral(lambda x : st.norm.pdf(x), (-1, 1))
(0.6826894921370862, 7.579375928402479e-15)
```

The first component is the value of the integral, and the second component is an error estimate.

As far as i'm aware, there is no built-in multi-dimensional numerical integration in Sage. This can be worked around by a nested call to `numerical_integral`

, but it will not be as efficient as it could be for some applications (see also this question. There are examples in Mathematical Computation in Sage, Ch. 14, page 315.

3 | No.3 Revision |

For numerical integrals in Sage, use numerical_integral. The function integrate is more appropriate for symbolic integration.

With your example:

```
sage: import scipy.stats as st
sage: numerical_integral(lambda x : st.norm.pdf(x), (-1, 1))
(0.6826894921370862, 7.579375928402479e-15)
```

The first component is the value of the integral, and the second component is an error estimate.

As far as i'm aware, there is no built-in multi-dimensional numerical integration in Sage. This can be worked around by a nested call to `numerical_integral`

, but it will not be as efficient as it could be for some ~~applications (see also this question. ~~applications. There are more examples in Mathematical Computation in Sage, Ch. 14, page 315.

4 | No.4 Revision |

With your example:

```
sage: import scipy.stats as st
sage: numerical_integral(lambda x : st.norm.pdf(x),
```~~(-1, 1))
(0.6826894921370862, 7.579375928402479e-15)
~~(-oo, 0.5))
(0.6914624612740132, 1.580169726891987e-09)

The first component is the value of the integral, and the second component is an error estimate.

As far as i'm aware, there is no built-in multi-dimensional numerical integration in Sage. This can be worked around by a nested call to `numerical_integral`

, but it will not be as efficient as it could be for some applications. There are more examples in Mathematical Computation in Sage, Ch. 14, page 315.

5 | No.5 Revision |

With your example:

```
sage: import scipy.stats as st
sage: numerical_integral(lambda x : st.norm.pdf(x), (-oo, 0.5))
(0.6914624612740132, 1.580169726891987e-09)
```

The first component is the value of the integral, and the second component is an error estimate.

As far as i'm aware, there is no built-in multi-dimensional numerical integration in Sage. This can be worked around by a nested call to `numerical_integral`

, but it will not be as efficient as it could be for some applications. There are more examples in Mathematical Computation ~~in Sage, ~~with SageMath, Ch. 14, page 315.

6 | No.6 Revision |

With your example:

```
sage: import scipy.stats as st
sage: numerical_integral(lambda x : st.norm.pdf(x), (-oo, 0.5))
(0.6914624612740132, 1.580169726891987e-09)
```

The first component is the value of the integral, and the second component is an error estimate.

As far as i'm aware, ~~there is no built-in ~~Sage does not expose a multi-dimensional numerical integration ~~in Sage. ~~function. This can be worked around by a nested call to `numerical_integral`

, but it will not be as efficient as it could be for some applications. There are more examples in Mathematical Computation with SageMath, Ch. 14, page 315.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.