I have a function $f(x,y)$ for which Minimum[{f[ x, y], x > 0, y > 0}, {x, y}] does not find a solution. However, NMinimize[{f[ x, y], x > 0, y > 0}, {x, y}] reveals that the minimum is $0$ at $(x_1,y_1)$.

The first function tries to find a analytical solution, while the second only identifies numerical solutions.

The documentation says "NMinimize returns a machine-number solution". Does this mean that a numerical $(x_1,y_1)$ is found which minimizes $f(x,y)$. Does this (even anayltically) imply that $f(x,y)\geq 0$ for all $x > 0, y > 0$?

  • 6
    $\begingroup$ The documentation of FindMinimum states that it only searches for a local minimum, so no: you cannot be sure that the global minimum is > 0. I recommend checking out NMinimize and the tutorial about optimization: reference.wolfram.com/language/tutorial/… $\endgroup$ – Sjoerd Smit Sep 23 at 9:22
  • $\begingroup$ Thank you, I used NMinimize now and updated the question. $\endgroup$ – Paul Sep 23 at 9:45
  • 3
    $\begingroup$ Without any further details about f I would say that in general you can never have any true guarantees about the minimum found by numerical methods. If f is a black-box function, there is always a possibility that it has a difficult-to-find global minimum that NMinimize didn't detect. The remark about machine-numbers simply means that the result is a double-precision floating point number. $\endgroup$ – Sjoerd Smit Sep 23 at 10:35
  • 1
    $\begingroup$ You may take a look at Resolve and ForAll. If your function is not too complicated, you may be able to use those to prove that your function is always positive. For example: Resolve[ForAll[x, x > 0, x^2 > 0]]. $\endgroup$ – Sjoerd Smit Sep 23 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.