# Homework Help: Extrema of Two Variable Bounded Function

Tags:
1. Mar 2, 2017

### Kaura

1. The problem statement, all variables and given/known data

Find the maximum and minimum value attained by f(x, y) = x2 + y2 - 2x over a triangular region R with vertices at (0, 0), (2, 0), and (0, 2)

2. Relevant equations

partial x = 0 and partial y = 0 at extrema

3. The attempt at a solution

partial x = 2x - 2
partial y = 2y
2x - 2 = 0
2y = 0
2x - 2 = 2y
x - 1 = y
me = lost
I really have no idea how to do these bounded problems so any help on a method or something would be much appreciated

2. Mar 2, 2017

### Math_QED

From $2x - 2 = 0$, we find that $x=1$. From $2y = 0$, we find that $y = 0$. Therefore, we have found a stationary point at $(1,0)$. Can you proceed now? Do you know how to know what kind of extremum this is?

3. Mar 2, 2017

### Kaura

Ah that makes sense, I think that would be a minimum correct?

4. Mar 2, 2017

### Math_QED

Correct! (I had to look up the formulas haha)

5. Mar 2, 2017

### Kaura

So then for the maximum do I just check each vertex and find which one gives the largest value?

6. Mar 2, 2017

### Ray Vickson

Forget about setting the partial derivatives to zero: that often does not apply when you have constraints. For example, the solution of the problem $\max / \min f_1(x) = x,\;\; 0 \leq x \leq 1$ is easily seen to be: $\min$ at $x = 0$, $\max$ at $x = 1$, but the derivative is $f'_1(x) = 1$ at both of those points. For the problem $\max /\min f_2(x) = (x-1)^2\; \; 0 \leq x \leq 3$ there is a minimum at $x = 1$, and the derivative = 0 there. However, there are two local maxima on $[0,3]$, one at $x = 0$ and the other at $x = 3$. We have $f'_2(0) < 0$ and $f'_2(3) > 0$. Furthermore, by calculating $f_2$ at $x=0$ and $x=3$ we see that the solution is at $x=3$.

In your case the solution is either (1) in the interior of the triangle---and the derivatives = 0 in that case; (2) on one of the sides---the derivatives need not be zero there, but the gradient vector of $f$ must be perpendicular to the side (another way of stating the Lagrange multiplier rule); or (3) at one or more of the three corners. At a corner you have a (local) minimum if the gradient of $f$ points into the triangle and a (local) max if the negative of the gradient points into the triangle. Basically, though, if the solution is not in the interior or on one of the sides, it must be at a corner and you don't really need to look at derivatives there at all (why?).

7. Mar 2, 2017

### Math_QED

There are formulas involving the partial derivatives from which you can easily see what extremum it is. You can also look at the values of f in a neighbourhood of $(1,0)$ and try to convince yourself that $f(1,0) < f(x,y)$ for all $(x,y)$ in that neighbourhood. One has to be careful using this technique though, as your stationary point might be a saddle point.

8. Mar 2, 2017

### Ray Vickson

This is not quite true: for maximizing a convex function over a convex polyhedron, the solution is at one of the extreme points (corners), but in the worst case the only known algorithm is to evaluate the function at each corner and take the best value! This really is true: there are no derivative tests that can tell you whether one corner is better than another one a long way off in another part of the region. The OP's function is (strictly) convex and his feasible region is convex, so the general result applies.

However, if you meant that there are derivative formulas that tell you whether you have a local max or min, then I agree: that is certainly true.

Techincally, the problem of maximizing a convex function over a convex polyhedron is NP-hard, which means that it is unlikely that any efficient algorithm can be found for the problem; that applies even for functions as simple as $f = x_1^2+x_2^2+ \cdots + x_n^2$. For more on this, see, eg.,
https://en.wikipedia.org/wiki/NP-hardness and/or
https://en.wikipedia.org/wiki/List_of_NP-complete_problems .

9. Mar 2, 2017

### Kaura

So would the local maximum be 4 at (0, 2) ???

10. Mar 3, 2017

### Ray Vickson

What do YOU think?

11. Mar 5, 2017

### Kaura

I am 96.8842% positive with a percent error of +/- 4.2263%

12. Mar 6, 2017

### ehild

It is not local maximum, but absolute maximum on the domain. You have the only stationary point of the function at x=1, y=0, and it proved to be minimum.