Quick integration of a known function

From LPTMS Wiki
Revision as of 15:57, 15 January 2013 by Roux (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)