# ArgMin and NArgMin gives different result

Im doing the same problem with ArgMin and NArgMin, however NArgMin messes up the order of the solution.

Given function:

L[x_]=x a + (1+4/x) b;

NArgMin[{L, L' == 0, L == 100}, {a, b}]
{11.1111, 44.4444}


However:

ArgMin[{L, L' == 0, L == 100}, {a, b}] // N
{44.4444, 11.1111}


The correct result is a = 44.4444, b = 11.1111 coming from ArgMin, where NArgMin swaps a and b.

Is this a bug or I am doing something wrong? If I scale the problem to many more variables (a,b,c,...) I want to know what output corresponds to.

Edit: This is a bug I had in Mathematica version 11.3. After installing Version 12.0, both approaches gives the same answer.

• The workaround in v11.3 is to use NMinimize, i.e., {a, b} /. NMinimize[{L, L' == 0, L == 100}, {a, b}][] – Bob Hanlon May 25 at 15:01
• Note that the first argument L is not valid. Perhaps you meant L? (It's only a side issue here, because there is just one point satisfying the constraints.) – Michael E2 May 25 at 21:52 