# Easy FindMaximum returns a wrong answer

FindMaximum in region is a new function in mma10,but when I tried the following example:

region = Polygon[{{0, 0}, {10, 0}, {10, 5}, {5, 5}, {5, 10}, {0, 10}}]
FindMaximum[{x + y, {x, y} \[Element] region}, {x, y}]


Mathematica 10.1 returns

{10., {x -> 5., y -> 5.}}


We can easily know that it is wrong. What's the story?

• NMaximize[{x + y, {x, y} \[Element] region}, {x, y}] however does work? – dr.blochwave Apr 28 '15 at 11:34
• You can also use Maximize[{x + y, {x, y} \[Element] region}, {x, y}] for this case as well. – dr.blochwave Apr 28 '15 at 11:43
• @blochwave I have tried that,but I wonder why FindMaximum "goes wrong". – WateSoyan Apr 28 '15 at 11:50
• The point {5,5} is a local maxima in the region when approached along the line x==y – Bob Hanlon Apr 28 '15 at 21:48
• @BobHanlon why then, if you specify a starting point of e.g. {{x, 9.9}, {y, 4.9}}, does MMA still head off in the direction of {5,5}? – dr.blochwave Apr 29 '15 at 6:50

Defining just one of the points of the region with a decimal point helps, suggesting that the method chosen by FindMaximum for integer coordinates is a perhaps a linear programming method, and gets stuck at the observed {5, 5}.

region = Polygon[{{0., 0}, {10, 0}, {10, 5}, {5, 5}, {5, 10}, {0, 