Question: minimize and the argmin

Is this the best way to extract the argmin with "minimize"? Thanks for your suggestions.

minimum := minimize( x^2, x = -1 .. 1, 'location' = true );
y_min := minimum[1];
x_argmin := rhs(op(op(minimum[2])[][1]));
                       0, {[{x = 0}, 0]}
                               0
                               0

The syntax rhs(op(op(minimum[2])[][1])); is rather roundabout!

The help pages do not give any information about how to extract the argmin.

?minimize

Please Wait...