I use the LevenbergMarquardt method of the FindMinimum function to minimize a residual function (mathematical-optimization). The 2013 post Is it possible to use the LevenbergMarquardt (LM) algorithm for fitting a black-box residual function? was very helpful to determine how to use the LM algorithm.

Now, I would like to set upper and lower bounds for the three parameters I need to optimize, but I was not able to find any information in Mathematica Help or online on how to do this. Does anyone know if this is possible ? what would be the correct syntax ?

Thaks for your help !

  • $\begingroup$ Please, post a minimal example demonstrating the behaviour you are after. $\endgroup$
    – Sektor
    Commented Sep 18, 2015 at 8:56
  • $\begingroup$ please post your code here. $\endgroup$ Commented Sep 18, 2015 at 10:15

1 Answer 1


The "LevenbergMarquardt" Method is an unconstrained optimization algorithm, so it does not allow setting bounds for the parameters. If you need to set bounds you should use one of the algorithms for constrained optimization.

The correct syntax for local constrained optimization is given on the Documentation page for FindMinimum:

FindMinimum[{f[x,y,...], cons}, {{x,x0}, {y,y0}, ...}]  

searches for a local minimum subject to the constraints cons starting from the points x = x0, y = y0 ...

The function f[x,y,...] can be a black-box function defined via one of the forms of the "black box" pattern, for example:

f[x_Real, y_Real, z_Real] := ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.