Hi. Besides one dimensional integrals and derivatives, what other types of integrals and derivatives can Root calculate?; Can Root calculate double integrals (2 dimensions); Can Root calculate Triple integrals (3 dimensions)?; How many dimensions, at most, can be considered in Root to calculate integrals and derivatives?. Thanks
ROOT Version: 5.34.25
Platform: Windows 10
Compiler:
Hello @alfredo10101,
it depends a bit how you define the function. Using TF1, TF2, TF3, for example, you can simply call Integral(), and you will get 1-, 2- or 3-dimensional Integrals.
If you defined a generic multi-dimensional function with a signature like double func(double argumentArray[]), you can use ROOT::Math::Functor to create an adapter to the numeric integrators. The integrators can be reached from ROOT::Math::IntegratorMultiDim. They support any dimension.
The tutorial here show how to use these:
And here is the corresponding manual:
Lastly, in RooFit, any dimensionality is possible, but this will be relevant only if you want to perform a multi-dimensional fit.
If you want derivatives, you can e.g. use ROOT::Math::Derivator to wrap the function in a numerical derivation algorithm. The list of all derivators can be found here:
Ok, Thanks for all the information. The information has been helpful. So, with the information you shared I’m going to try to integrate and derive in one, two and three dimensions, and then I’m going to try to integrate and derive in more than three dimensions. Thank you