3d minimization


Can somebody give an advise how to find minimum of 3d function?

I have a function with 5 parameters, with each set of parameters two values (sigma_x and sigma_y) are calculated. I need to find set of parameters providing minimum for both values simultaneously.

As far as I undesrtand TMinuit does it only for minimum of one value.

Thank you,


gnu.org/software/gsl/manual/ … ation.html

AFAIK ROOT has wrappers for GSL in mathmore.

Look at GSLMinimizer etc. in mathmore.

I think you need to define what you mean “minimum for both values simultaneously.” Once you define this (e.g., you want the sum or the product of the two outputs to be minimized), I think Minuit can do this for you. Until you define this, I don’t think the problem has a solution.


root.cern.ch/root/html/examples/ … fit.C.html


Hi Anton,

Your description of the problem is not precise .

Do you mean with 3d function that you have 3 control variables
x_0, x_1 and x_2 ? This is for the fitting problem not relevant.

You describe that you want to fit 5 parameters, have a look
at $ROOTSYS/test/StressFit.cxx



what I meant was that I have two functions depending on the same set variables. I want to find such values of the variables at which both functions have minimum.

Thank you all for advise.

What I did is defining fcn as square root of summation of squared functions i.e. fcn=\sqrt{w1f1^2+w2f2^2}, where w1 and w2 are the weights wich I choose depending if I liked the found minimum or not. Than I used TMinuit to find minimum of fcn.

It works ok for me, not the best, I still have some doubts if it is the best way to do.



Your description is still not clear . Do you want to determine the
variables where both function have their minimum .
Well, minimize both functions separately and compare the coordinates.
This is (of course) not what you want but it is what you describe :slight_smile: .