1

Why does this work:

Table[ FindMaximum[x^2 - y^2, {y, 1}][[1]], {x, 1}]

While this does not:

FindMinimum[ FindMaximum[x^2 - y^2, {y, 1}][[1]], {x, 1}]

How can I make it work? It is not substituting the value of x before maximizing, but nothing I try seems to help.

1 Answers1

1

The inner FindMaximum gives a result, which doesn't depend on x!

Try

max = MaxValue[{x^2 - y^2 }, y] (* x^2, which implies y==0 *)
minmax = FindMinimum[ max, x] (* {0., {x -> 0.}}*) 

which gives the sollution x==0, y==0 for your minmax-problem

Show[{Plot3D[x^2 - y^2, {x, -1, 1}, {y, -1, 1},AxesLabel -> {x, y, z}],
Graphics3D[{Red, PointSize[.05],Point[{x, y, x^2 - y^2} /. {x -> 0, y -> 0}]}]}]

enter image description here

Ulrich Neumann
  • 53,729
  • 2
  • 23
  • 55
  • I watered down the original problem, which didn't have this nice symmetry, and is too complicated for an analytic solution. Both the maximum and minimum need to be determined numerically, one as a function of the other. Is there any way to accommodate that? – Christopher Crawford Sep 11 '18 at 01:18
  • In this link "https://mathematica.stackexchange.com/questions/171531/minimax-optimization-in-mathematica/171562#171562" Michael E2 shows how to realize minmax problems in MMA – Ulrich Neumann Sep 11 '18 at 07:20