# Why is my integral zero?

**URL:** <https://root-forum.cern.ch/t/why-is-my-integral-zero/21999>\
**Category:** ROOT\
**Created:** [October 6, 2016, 1:05pm UTC](https://root-forum.cern.ch/t/why-is-my-integral-zero/21999 "2016-10-06T13:05:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [October 6, 2016, 2:01pm UTC](https://root-forum.cern.ch/t/why-is-my-integral-zero/21999/3 "2016-10-06T14:01:40Z")

</div>

I don’t think your calls to “Integral” are wrong.

I guess it’s a deficiency in ROOT.

It’s the “efficiency” / “efficiencyF” function which fools ROOT. It’s value “jumps” between 0 and 1 and the current “integrator” is known to misbehave in such cases.  
See also, for example: [Simple Integral - #2 by Pepe\_Le\_Pew](https://root-forum.cern.ch/t/simple-integral/21760/2)

Sometimes you can try to “hide” this problem if you increase the number of points … for each of your functions try to add:  
`SomeTF2->SetNpx(1000); SomeTF2->SetNpy(1000);`  
But I wouldn’t really trust the result.

---

_[View the full topic](https://root-forum.cern.ch/t/why-is-my-integral-zero/21999)._
