2D solver

hello, I need to solve the following quite common problem :
I have a function f(x) and a value q, and I look for a and b that verify

Integral from a to b of f(x) = q
f(a) = f(b)

I am a bit lost in all the ROOT MATH classes…
thanks in advance,

unfortunately we don’t have in ROOT at the moment a method for finding the roots of a multi-dimensional function. It is something in our to do list.

However, you might succeed by using Minuit, by trying to find the minimum of an appropriate equivalent 2d function.
For example to find the roots of F(x,y) and G(x,y) you can try to find the minimum of H(x,y) = F(x,y) **2 + G(x,y) **2 and should have a zero value.

Best Regards


Hi Johann,

I would cast your problem in the following shape and solve it
with Minuit :

Mimimize the following function :

{(Integral_{x}^{x+dx} f(y)) - q}^2 under the condition that f(x) = f(x+dx)

Supply now to TMinuit the following function :

{(Integral_x^{x+dx} f(y) - q}^2 +lambda * (f(x)-f(x+dx))

and minimize it wrt the variables x,dx and lambda with dx restricted to only
positive values .