# Revision history [back]

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

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.

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

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.

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

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.

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

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.

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

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.

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

sage: import scipy.stats as st

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.