Python | Scipy integrate.quadrature() method

With the help of `scipy.integrate.quadrature()` method, we can get the computation of definite integral using fixed tolerance gaussian quadrature by using `scipy.integrate.quadrature()` method.

Syntax : `scipy.integrate.quadrature(func, a, b)`

Return : Return gaussian quadrature approximation to integral.

Example #1 :
In this example we can see that by using `scipy.integrate.quadrature()` method, we are able to get the gaussian quadrature approximation to integral function from limit a to b by using this method.

 `# import scipy.integrate. ` `from` `scipy ``import` `integrate ` ` `  `gfg ``=` `lambda` `x: x``*``*``8` `+` `x``*``*``4` ` `  `# using scipy.integrate.quadrature() method ` `geek ``=` `integrate.quadrature(gfg, ``0.0``, ``1.8``) ` ` `  `print``(geek) `

Output :

25.81905715199999

Example #2 :

 `# import scipy.integrate. ` `from` `scipy ``import` `integrate ` ` `  `gfg ``=` `lambda` `x: x``*``*``2` `+` `2` `*` `x ``+` `4` ` `  `# using scipy.integrate.quadrature() method ` `geek ``=` `integrate.quadrature(gfg, ``0.0``, ``4.0``) ` ` `  `print``(geek) `

Output :

53.33333333333333

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.