I think I finally understand what you were asking (takes me a while to get in gear in the morning...), and I believe that you are simply running into numerical problems.
In fact, according to its documentation, Minimize
will call NMinimize
automatically when given numerical input. NMinimize
(docs here) will still attempt a search for a global minimum on the specified domain, but it is guaranteed to find one only if the function and the constraints are linear, and yours do not appear to be. Otherwise, NMinimize
may find only a local minimum.
For instance, you can see that different algorithms for NMinimize
give you different results. Let's try them all using the unit ring constraint you want, and with each method's stock parameters:
NMinimize[{Cost[0.27, 0.96286, x, y], x^2 + y^2 == 1}, {x, y}, Method -> #]&
/@ {"NelderMead", "DifferentialEvolution", "SimulatedAnnealing", "RandomSearch"}
Here are the results:
Nelder-Mead 0.999993 x->1. y->-2.50072*10^-7
Differential evolution 0.873162 x->-0.244627 y->-0.969618
Simulated annealing 0.999996 x->1. y->-0.0000166821
Random search 1. x->1. y->-6.6605*10^-9
Notice that the differential evolution method stumbles upon one of your lower minima (given the symmetry of the problem, there is more than one), but others only find a local minimum, at least with the stock parameters. I'll have to leave it to you to play with the parameters to see if you can make them behave better.
As an aside, NMinimize
has internal methods to determine which algorithm to use when you don't specifically request one. I did not know how to figure out which one is being used for a certain optimization, until @GuessWhoItIs pointed me in the direction of an older discussion, aptly titled Determining the default Method used in optimization and root-finding algorithms, in which he provided code to answer that very question.
Lifting @Guess's code bodily, and applying it to your minimization, we discover that the Nelder - Mead method is automatically chosen in your case:
Cases[
Trace[NMinimize[{Cost[0.27, 0.96286, x, y], x^2 + y^2 == 1}, {x, y}],
Optimization`NMinimizeDump`method, TraceInternal -> True],
{HoldForm[Optimization`NMinimizeDump`method],
m_ /; FreeQ[m, Automatic]} :> m, Infinity
]
(* Out: {"NelderMead"} *)
y
withSqrt[1-x^2]
with the constraint-1<=x<=1
(yourCost
function depends only ony^2
anyways). $\endgroup${Cos[t], Sin[t]} /. t -> ArgMin[{Cost[0.27, 0.96286, Cos[t], Sin[t]], 0 <= t < 2 π}, t]
$\endgroup$