# 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:** 1

<div class="post-metadata">

**Author:** ![libalk](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/7993a0/32.png) [@libalk](https://root-forum.cern.ch/u/libalk)\
**Post date:** [October 6, 2016, 1:05pm UTC](https://root-forum.cern.ch/t/why-is-my-integral-zero/21999/1 "2016-10-06T13:05:32Z")

</div>

I am using root 5.34/36.  
I have defined a 2D function that I want to integrate, as in the attachment. This function is a sort of convolution, and I am using TF2. When I perform the integral with the given parameters it returns 0, but I can draw the function and see that it is zero or positive in the area of integration.  
I run the macro compiled in root with:  
root [0] .L fit.C+  
root [1] fit();

I want to use this function in a minimization (changing the parameters), with the integral in the denominator. I am open to suggestions about how to calculate this integral faster.

thanks!  
[fit.C](https://root-forum.cern.ch/uploads/default/original/2X/8/8d70e7b3c6f3a574195fc537b74d879a30d2491d.C) (3.08 KB)

---

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