This is a follow-up to this question and I'm aware of this question for the local minimizers case.
Consider, for $0\leq \epsilon\leq 1$ and $0<q,p<1$, the function $$ \begin{align} f(\epsilon,q,p)&=\frac{(1-\epsilon)}{3}\left[\cos\left(2\pi q\right)+\cos\left(2\pi p\right)+\cos\left(2\pi\left(q+p\right)\right)\right]\nonumber\\ &\hspace{5mm}+\frac{\epsilon}{6}\bigg[\cos\left(4\pi q\right)+\cos\left(2\pi (p-q)\right) + \cos\left(4\pi p\right)\nonumber\\ &\hspace{10mm}+\cos\left(2\pi\left(2q+p\right)\right)+\cos\left(2\pi\left(q+2p\right)\right)+\cos\left(4\pi\left(q+p\right)\right) \bigg] \end{align} $$
Given, in Mathematica, as
f = Function[{e, q, p},
((1 - e)/3) (Cos[2 Pi q] + Cos[2 Pi p] +
Cos[2 Pi (q + p)]) + (e/6) (Cos[4 Pi q] + Cos[2 Pi (q - p)] +
Cos[4 Pi p] + Cos[2 Pi (2 q + p)] + Cos[2 Pi (q + 2 p)] +
Cos[4 Pi (q + p)])];
For each $\epsilon$, I want to find all (or as many as possible) global minimizing pairs $(q,p)$ of $f$. For example, following the methodology in my previous question, I can use inbuilt functions like Minimize, NMinimize or FindInstance to get some results, but I was wondering whether there is a better way. Doing so in the case $\epsilon=0$, for instance, I get the minimizing pairs $(1/3,1/3)$ and $(2/3,2/3)$ with the following code
eps = 0; n = 10;
min = NMinimize[{f[eps, q, p], 0 < q < 1 && 0 < p < 1}, {q, p}];
FindInstance[{f[eps, q, p] == N[Rationalize[min[[1]]]],
0 < q < 1 && 0 < p < 1}, {q, p}, n]
However, for other values of $\epsilon$ (for example $0.6$ and $0.8$), this fails. FindInstance does not return anything, though at least one minimizer is found is found via NMinimize. What is happening? Plotting $f$ for $0.6$ and $0.8$ seems to suggest that there are more than one global minimizers, but I can't find them
Plot3D[f[0.6, q, p], {q, 0, 1}, {p, 0, 1}]
Plot3D[f[0.8, q, p], {q, 0, 1}, {p, 0, 1}]
By doing it in the tradicional manner, that is, finding the gradient and Hessian, one could hope to get better results (though this would include local minima, if not coincident with the global minimum), and this was suggested before, but it does not seem to work as well due to some limitations of Solve or NSolve.
Any ideas?



minas you define (that is, $-0.220032...$) instead of $-0.22$,solreturns{}. Any idea why this happens? What would be an automatic rounding procedure? – sam wolfe Mar 02 '21 at 19:39minyou need to change the test to<=rather than<. Although since theNMinimizewas done with machine precision, in some cases you might run into precision issues in the comparison. In general it might be better to use a two argument form ofCeilingin the test. Using6/10rather than0.6(a machine precision number) avoidsFindRoot::precwwarnings when specifying aWorkingPrecision. In general I recommend entering any known values as exact. This allows for specifying whatever desiredWorkingPrecisionin subsequent calculations. – Bob Hanlon Mar 02 '21 at 20:11