In the course of doing ellipse packing using Lagrange multipliers, I've discovered that , in some instances, NSolve Method -> Automatic doesn't work whereas setting a variety of Method choices does. The equations defining the problem and all the tests are in the attached notebook. Here are a couple examples:
In[6]:= NSolve[
lagceqns[elvals1][elvals2][{x1, y1, \[Lambda]1}][{x2,
y2, \[Lambda]2}], {x1, y1, \[Lambda]1, x2, y2, \[Lambda]2}, Reals]
Out[6]= {}
In[7]:= NSolve[
lagceqns[elvals1][elvals2][{x1, y1, \[Lambda]1}][{x2,
y2, \[Lambda]2}], {x1, y1, \[Lambda]1, x2, y2, \[Lambda]2}, Reals,
Method -> {"UseSlicingHyperplanes" -> True}]
Out[7]= {{x1 -> 2.60915, y1 -> 3.09158, \[Lambda]1 -> -5.49682,
x2 -> 0.449195,
y2 -> -0.738743, \[Lambda]2 -> 5.80126}, {x1 -> 1.53796,
y1 -> 0.834143, \[Lambda]1 -> 5.70837, x2 -> -0.326767,
y2 -> -3.32313, \[Lambda]2 -> -6.10992}, {x1 -> 2.41455,
y1 -> 3.18634, \[Lambda]1 -> -8.86259, x2 -> -0.288259,
y2 -> -3.33973, \[Lambda]2 -> -9.52232}, {x1 -> 1.38751,
y1 -> 0.910312, \[Lambda]1 -> 2.37167, x2 -> 0.452039,
y2 -> -0.740351, \[Lambda]2 -> 2.50213}}
In[8]:= NSolve[
lagceqns[elvals1][elvals2][{x1, y1, \[Lambda]1}][{x2,
y2, \[Lambda]2}], {x1, y1, \[Lambda]1, x2, y2, \[Lambda]2}, Reals,
Method -> {"UseSlicingHyperplanes" -> False}]
Out[8]= {{x1 -> 2.60915, y1 -> 3.09158, \[Lambda]1 -> -5.49682,
x2 -> 0.449195,
y2 -> -0.738743, \[Lambda]2 -> 5.80126}, {x1 -> 1.53796,
y1 -> 0.834143, \[Lambda]1 -> 5.70837, x2 -> -0.326767,
y2 -> -3.32313, \[Lambda]2 -> -6.10992}, {x1 -> 2.41455,
y1 -> 3.18634, \[Lambda]1 -> -8.86259, x2 -> -0.288259,
y2 -> -3.33973, \[Lambda]2 -> -9.52232}, {x1 -> 1.38751,
y1 -> 0.910312, \[Lambda]1 -> 2.37167, x2 -> 0.452039,
y2 -> -0.740351, \[Lambda]2 -> 2.50213}}
In[9]:= NSolve[
lagceqns[elvals1][elvals2][{x1, y1, \[Lambda]1}][{x2,
y2, \[Lambda]2}], {x1, y1, \[Lambda]1, x2, y2, \[Lambda]2}, Reals,
Method -> {"Homotopy"}]
Out[9]= {{x1 -> 2.60915, y1 -> 3.09158, \[Lambda]1 -> -5.49682,
x2 -> 0.449195,
y2 -> -0.738743, \[Lambda]2 -> 5.80126}, {x1 -> 1.53796,
y1 -> 0.834143, \[Lambda]1 -> 5.70837, x2 -> -0.326767,
y2 -> -3.32313, \[Lambda]2 -> -6.10992}, {x1 -> 2.41455,
y1 -> 3.18634, \[Lambda]1 -> -8.86259, x2 -> -0.288259,
y2 -> -3.33973, \[Lambda]2 -> -9.52232}, {x1 -> 1.38751,
y1 -> 0.910312, \[Lambda]1 -> 2.37167, x2 -> 0.452039,
y2 -> -0.740351, \[Lambda]2 -> 2.50213}}
Attachments: