# Best way to integrate a function

**URL:** <https://root-forum.cern.ch/t/best-way-to-integrate-a-function/28638>\
**Category:** ROOT\
**Created:** [April 11, 2018, 9:42am UTC](https://root-forum.cern.ch/t/best-way-to-integrate-a-function/28638 "2018-04-11T09:42:13Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [April 11, 2018, 2:00pm UTC](https://root-forum.cern.ch/t/best-way-to-integrate-a-function/28638/7 "2018-04-11T14:00:39Z")

</div>

What concerns “intergration”, see for example:

> [@IntegratorMultiDim accuracy](https://root-forum.cern.ch/t/integratormultidim-accuracy/27827):
>
> Hello, I was trying to learn how to use IntegratorMultiDim by calculating a volume of ball with a following macro: [testIntegral.C](https://root-forum.cern.ch/uploads/default/original/2X/0/059bc9c0b5f489a997adc72e6e8fb73d7188a59f.C) (727 Bytes) On ROOT v6-12-04 it gives the following result: exact : 4.18879 kDEFAULT : 4.17793 , error: 0 kADAPTIVE : 4.17793 , error: 0 kVEGAS : 4.18659 , error: 0 kMISER : 4.20576 , error: 0 kPLAIN : 4.20984 , error: 0 Why with tolerance settings at 1e-9 I have accuracy worse than 1e-3? Best regards, Antoni

---

_[View the full topic](https://root-forum.cern.ch/t/best-way-to-integrate-a-function/28638)._
