Hello everyone. I have a two-dimensional function, say f(x,y), and I defined it as a TF2. I was wondering if there is any method to define a TF1 as the integral of the previous TF2. I would like to do something like:
Hello,
Referring to the root reference guide here root.cern.ch/root/html530/TF2.html#TF2:Integral root offers a numeric integration, and not an analytic one. So partial integration is not implemented imho.
I think the only thing you could do in if you know the f(x,y) analytic formula you previously calculate the F(x) and load that as a TF1.
If you plan to calculate the F(x) at certain x values you could do something like that, bypassing the TF2->TF1 convertion:
where #.# is a double/real value placeholder and epsilon is a redefinition of the numerical integration step (epsilon/2. should avoid significant deviations from the analytic x0 calculation of the integral).