1. I get a very strange output for this minimization

Minimize[(1 - x y)^2 + x^2, {x, y}]
(*{0, {x -> Indeterminate, y -> Indeterminate}}*)

Is it correct? Can you help me to interpret it. I would expect that the image of a polynomial with real coefficients should be closed implying a well defined solution of the above expression.

2. Notice how different the output is from

Minimize[x^2 + y^2, {x, y}]
{0, {x -> 0, y -> 0}}

3. But let us look now at a more broad class of functions

Minimize[1/x^2, {x}]
(*Minimize::natt: The minimum is not attained at any point satisfying the given constraints.*)
(*{0, {x -> -\[Infinity]}}*)

In contrast to 1., the warning is given (per comment of Michael E2 the same warning is given in 1. with a newer version of MA).

What should be the correct output in the cases 1. and 3.?

After reading some comments below, I re-read the documentation

  • Minimize is also known as infimum.
  • Minimize finds the global minimum of $f$ subject to the constraints given.

It seems MA makes not distinction between the minimum and the infimum, which is fine with me. However, there is one and interested readers can find more under this link.

  • 2
    $\begingroup$ I get Minimize::natt in # 1 in V12.3.1. It has no minimum in $\bf R^2$. It's a bit odd that it says there's no answer and then gives one. That it is the greatest lower bound kind of makes sense. (The function approaches zero from above as $x \rightarrow 0$, $y \rightarrow \pm\infty$ along $xy=1$.) $\endgroup$
    – Michael E2
    Commented Sep 17, 2021 at 13:36
  • 2
    $\begingroup$ It strikes me as a better result than alternatives such as returning unevaluated. $\endgroup$ Commented Sep 17, 2021 at 14:12
  • $\begingroup$ @DanielLichtblay: Disagreed: the output {0, {x -> Indeterminate, y -> Indeterminate}} is informative (see Minimize/Scope/Multivariate Problems and an example Minimize[{x^2 + 1, x y >= 1}, {x, y}] there), whereas the returned input isn't. $\endgroup$
    – user64494
    Commented Sep 17, 2021 at 18:09
  • $\begingroup$ @user64494 We are saying the same thing. $\endgroup$ Commented Sep 17, 2021 at 19:48

1 Answer 1


The primary difference between case #1 and case #3 is that the former is a polynomial, whereas the latter is not.

As per Mathematica documentation for Minimize, if the function to be minimzed and the constraints (if any) for minimization happen to be polynomials, then Minimize would give us the global minimum (if one exists in the first place, that is). A quick 3D plot for 1 reveals that it has no global minimum, which explains why Minimize demonstrates the behaviour it does.

Plot for #1, both x and y run from -1000 to 1000

In fact, #1 describes a saddle surface.

In case of #3, however, it can be clearly understood that the function descends from $\infty$ as Abs[x] grows larger, on either side of the $y$-axis, and as Abs[x] $ \rightarrow \infty $ on either side, y $ \rightarrow 0 $ asymptotically. There's no global minimum again, in-fact, no stationary points at all (contrast this with saddle/inflection points of a curve, where the univariate function is stationary, even if it's not an extremum).

So, in both cases, the output obtained is what one should expect, going by the behaviour of the function, and the Mathematica documentation for Minimize.

Edit 1:

Since the limits for my 3D plot were $x \in [-1000,1000], y \in [-1000,1000]$, the origin is a suitable point to check if there's a saddle point there or not. From the looks of the plot, there should be one.

Condition for a function $f(x,y)$ to have saddle point at a given point $(a,b)$: $f_{xx}f_{yy} < f_{xy}^2$ at $(a,b)$.

Now, we have the following:

f=(1 - x y)^2 + x^2;

D[f, x, y]^2 /. {x -> 0, y -> 0} 

gives 4, and,

D[f, x, x] D[f, y, y] /. {x -> 0, y -> 0}

gives 0, thus demonstrating that $(0,0,1)$ is indeed a saddle point for case #1.

Edit 2

~ From the comments to my answer, I realised that I had misinterpreted the question. The following is my attempt to answer it after getting the confusion clarified. Thanks to @user64494 and @yarchik for their useful comments.~

As it turns out, Minimize has no issues with saddle points whatsoever, at least not so in case of #1.

The fundamental issue seems to be about the domains that Minimize accepts. Among others, it accepts Reals and Integers. But NOT Complexes.

That Minimize has no issue with $(0,0)$ being a saddle point can be ascertained via the following:

In[1]:= f = (1 - x y)^2 + x^2;
Minimize[{f, {x, y} \[Element] Integers}, {x, y}]

Out[1]= {1, {x -> 0, y -> 0}}

which is precisely what one should expect.

As per the following condition: "If the minimum is achieved only infinitesimally outside the region defined by the constraints, or only asymptotically, Minimize will return the infimum and the closest specifiable point", when restricted to Reals (which is the default domain for variables x and y), Minimize tries to figure out the value at which the infimum $0$ occurs. A minimum is attainable, an infimum not necessarily so, and when it's not, the best one can speak about is "tending towards the infimum". A quick use of Solve would show that the values of x and y at which the function evaluates to $0$ are typically complex - but Minimize cannot deal with variables in the domain Complexes. As such, despite providing the correct infimum value, it fails to show the corresponding values for the variables.

The reason that this confusion arises only when the domain is Reals instead of Integers is because of the word infinitesimally in the documentation. As you can see, the minimum in case of Integers is $1$, while for Reals this "minimum" is $0$ - this difference is not infintesimal.

  • $\begingroup$ If $x\to 0$ and $y= \frac 1 x \to \infty$. then $(1 - x y)^2 + x^2 \to 0$. This explains the result of Minimize. $\endgroup$
    – user64494
    Commented Sep 17, 2021 at 15:42
  • $\begingroup$ @yarchik: 0 is the infimum of the polynomial under consideration and this infimum is not attained at any point. This is described in the documentation $\endgroup$
    – user64494
    Commented Sep 17, 2021 at 15:48
  • $\begingroup$ @user64494 I am not sure I found the same place in the documentation as you did. But I read "If the minimum is achieved only infinitesimally outside the region defined by the constraints, or only asymptotically, Minimize will return the infimum and the closest specifiable point." So where is the closest specifiable point? $\endgroup$
    – yarchik
    Commented Sep 17, 2021 at 15:56
  • $\begingroup$ @yarchik See Minimize/Scope/Multivariate Problems: and an example Minimize[{x^2 + 1, x y >= 1}, {x, y}] there. $\endgroup$
    – user64494
    Commented Sep 17, 2021 at 16:44
  • $\begingroup$ @user64494 Ok, thank you for pointing out, its well hidden. So it is not a bug, but a feature. $\endgroup$
    – yarchik
    Commented Sep 17, 2021 at 16:49

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.