# Integral with dependent bounds

Dear all,

I have posted a question as a part of ROOT category over here . I want to post the same thing with now RooFit. Is there any way to calculate double, or actually quadrupole integrals with dependent bounds with RooFit? I want to fit this function to data later on. While this is just a representative form, the function looks something like this before I change variables:

\int_{9.5}^{10.5}da \frac{1}{x} \int_{0}^{a}dt\ t*sin(x \int_{t}^{a}dc\ c) * sph\_bessel(x,x*\int_{a}^{10000}dl\ *l)

if I change variables to have independent limits, it looks like this:

\int_{9.5}^{10.5}da \frac{1}{x} \int_{0}^{1}dt\ a*t*sin(x \int_{1}^{0}dk\ a*t*k) * sph\_bessel(x,x*\int_{1}^{0}dl\ a*l)

Can I do this over RooFit? Thanks so much for your help!

Cheers,
morbik

In the first formula, the integral over “dl” is just “(1.e8-a*a)/2.” and the integral over “dc” is just “(a*a-t*t)/2.”.

BTW. It seems to me that the “change of variables” (for “l”, “c” and “t”) in the second formula is not correct.

1 Like

Dear @Wile_E_Coyote, thank you for your answer but this is a representative form as I have indicated. The real form of the function is like this:

\int_{9.5}^{10.5}da\frac{0.6}{\sqrt{3}x} \{ \int_a^1db\frac{b^{3/2}}{(1+b)^{1/2}}sin(\frac{x}{0.6\sqrt{3}}\int_b^a dc \frac{1}{c(1+c)^{1/2}})*sph\_bessel(x,\frac{x}{0.6} \int_a^{10000} dc \frac{1}{c(1+c)^{1/2}}) \}

I want to draw this function as x extends from 1 to 1000.

I didn’t want to explicitely give this as it is quite complicated. I can change the limits of the integrals to be 1 and 0 as you have suggested earlier. But the thing is that: I am just trying to understand if ROOT can perform integrals that are not of the form \int\int\int\int f(x,y,z,t)dx dy dz dt.

I hope I am able to make myself clear.

Best regards,
morbik

For available “quadrature” routines see:

See also the “MathCore” and “MathMore” documentation.

In principle, ROOT internally often uses:

If you find some appropriate routine in GSL (GNU Scientific Library), you should be able to use it in ROOT.

BTW. The integrals over “dc” can be calculated analytically. In principle, one should use clean “analytical formulas” whenever possible.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.