Quick integration of a known function

From LPTMS Wiki
Jump to: navigation, search

Using scipy.integrate

from scipy.integrate import quad,Inf
from math import sqrt,pi,exp

print sqrt(pi), quad(lambda x: exp(-x**2),-Inf,Inf)