First check for the critical points of <em>f</em> by checking where the first-order derivatives vanish.
Notice how the point (1, 2) lies on the line <em>y</em> = 2<em>x</em> ; at this point, we get a value of <em>f</em>(1, 2) = -5 (MIN).
Next, check the points where the boundary lines intersect, which occurs at the points (0, 0), (0, 2), and (1, 2). We already checked the last one. We find <em>f</em>(0, 0) = 1 (MAX) and <em>f</em>(0, 2) = -3.
Now check on the boundary lines themselves. If <em>x</em> = 0, then
which has a maximum value of -3 when <em>y</em> = 2 (so we get the same critical point as before).
If <em>y</em> = 2, then
with a maximum of -5 when <em>x</em> = 1.
If <em>y</em> = 2<em>x</em>, then
with the same maximum of -5 when <em>x</em> = 1.