Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Python | Scipy integrate.tplquad() method

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

With the help of scipy.integrate.tplquad() method, we can get the triple integration of a given function from limit a to b by using scipy.integrate.tplquad() method.

Syntax : scipy.integrate.tplquad(func, a, b)

Return : Return the triple integrated value of a polynomial.

Example #1 :
In this example we can see that by using scipy.integrate.tplquad() method, we are able to get the triple integrated value of a polynomial from limit a to b by using this method.




# import scipy.integrate.tplquad
from scipy import integrate
  
gfg = lambda z, y, x: x * y*z + x**2 + y**2 + z**2
  
# using scipy.integrate.tplquad() method
geek = integrate.tplquad(gfg, 1, 3, lambda x: 2, lambda x: 3,
                              lambda x, y: 0, lambda x, y: 1)
  
print(geek)

Output :

27.000000000000004

Example #2 :




# import scipy.integrate.tplquad
from scipy import integrate
gfg = lambda z, y, x: x**2 + y**2 + z**2 + 1
  
# using scipy.integrate.tplquad() method
geek = integrate.tplquad(gfg, 1, 3, lambda x: 2, lambda x: 3,
                              lambda x, y: 0, lambda x, y: 1)
  
print(geek)

Output :

24.0


My Personal Notes arrow_drop_up
Last Updated : 23 Jan, 2020
Like Article
Save Article
Similar Reads
Related Tutorials