Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

integral python

from scipy import integrate
>>> x2 = lambda x: x**2
>>> integrate.quad(x2, 0, 4)
(21.333333333333332, 2.3684757858670003e-13)
>>> print(4**3 / 3.)  # analytical result
21.3333333333
Source by docs.scipy.org #
 
PREVIOUS NEXT
Tagged: #integral #python
ADD COMMENT
Topic
Name
4+7 =