There is however one important remark. ##Warning:
Maximize
(respectively Minimize
) yielding appropriate extremal values of the function can omit some arguments where it has extremal pointsvalues. This problem can be resolved using Lagrange multipliers (see e.g. How can I implement the method of Langrange multipliers to find constrained extrema?) or solving directly adequate equations.
Solve[{5#1 x^2== +First[ xMaximize[{#1, +#2}, 2x]], ==#2}, First[x]& Maximize[@@ { 5 x^2 + x + 2, -(26/5)
<= x <= 5}, x]],
-(26/5) <= x <= 5}, x]}
Here boundary arguments were omitted, but solving this system we can get all solutions
Union @
Solve[{#1 x^4== -First[ 3Maximize[{#1, x^2#2}, -x]], 1#2}, ==x]& First[Maximize[@@ { x^4 - 3 x^2 - 1,
-Sqrt[3] <= x <= Sqrt[3]}, x]],
-Sqrt[3] <= x <= Sqrt[3]}, x]
Similar problems we can encounter in more dimensional spaces and higher order equations.