Absolute extrema function of 2 variables

In summary: If you do ##f(-10) = -1000## and ##f(10) = 1000##, so obviously the max and min must be somewhere at the boundary. You check them all and you find that the max is at ##-10## and the min is at ##10##.
  • #1
toothpaste666
516
20

Homework Statement


I need to find the absolute extrema of the function in the specified region

f(x, y) = x^2 + xy R = {(x,y): |x|<=2, |y|<=1}

The Attempt at a Solution


The first partial derivatives are
fx(x,y) = 2x+y and fy(x,y) = x
They are both 0 only when x and y are both 0. So (0,0) is a critical point and f(0,0) = 0 now we look at the boundaries:
f(2,1) = 4 +2 = 6
f(2,-1) = 4-2 = 2
f(-2,1) = 4-2 = 2
f(-2,-1) = 4+2 = 6

so the absolute min is at (0,0) (this would normally be a saddle point but in the specified region it is a minimum) and the absolute max are at (2,1) and (-2,-1)
Am I correct about this?
 
Physics news on Phys.org
  • #2
No you're not checking the boundary properly on each edge you get a normal one variable function to min/max. Your max value happends to be correct but not your min value.
 
  • #3
toothpaste666 said:

Homework Statement


I need to find the absolute extrema of the function in the specified region

f(x, y) = x^2 + xy R = {(x,y): |x|<=2, |y|<=1}

The Attempt at a Solution


The first partial derivatives are
fx(x,y) = 2x+y and fy(x,y) = x
They are both 0 only when x and y are both 0. So (0,0) is a critical point and f(0,0) = 0 now we look at the boundaries:
f(2,1) = 4 +2 = 6
f(2,-1) = 4-2 = 2
f(-2,1) = 4-2 = 2
f(-2,-1) = 4+2 = 6

so the absolute min is at (0,0) (this would normally be a saddle point but in the specified region it is a minimum) and the absolute max are at (2,1) and (-2,-1)
Am I correct about this?

No: (0,0) is still a saddle point (because (0,0) is in the interior of the constraint set, not on the boundary). You can check this for yourself: go away from the point (0,0) along the lines y = kx for various constants k, and see what happens on the different lines using different values of k.

Anyway, stationarity is nearly irrelevant in constrained problems. If you have a constraint of the form ##a \leq x \leq b## you need ##f'(x^*) = 0## for an interior optimum ##a < x^* < b##, but in a max problem you need ##f'(x^*) \leq 0## at ##x^* = a## (left end) or ##f'(x^*) \geq 0## at ##x^* = b## (right end). For a min problem, just reverse the direction of the inequalities. These also apply component-by-component in multivariate cases, using partial derivatives instead of ##f'##.

In this case there is no local max or min at any interior point, so any local max or min will occur on the boundary. You can check each of the boundaries separately, because on each boundary you are left with a single-variable problem. For example, when ##x = -2## you are left with the univariate problem ##\max/ \min f(-2,y), \: -1 \leq y \leq 1##, etc.
 
  • #4
oops. ok so we have

y = -1 |x| <= 2
f(x, -1) = x^2 - x
f'(x, -10 = 2x -1 = 0
2x = 1
x = 1/2
doing the same with y=1 we get x = -1/2
so the mins are at
(.5, -1) and (-.5, 1)

but now I am confused because
when x = -2 |y| <= 1
f(-2,y) = 4 -2y
f' = -2 != 0
so there is a problem there because the derivative does not equal 0. How would I find the max this way?
 
  • #5
toothpaste666 said:
oops. ok so we have

y = -1 |x| <= 2
f(x, -1) = x^2 - x
f'(x, -10 = 2x -1 = 0
2x = 1
x = 1/2
doing the same with y=1 we get x = -1/2
so the mins are at
(.5, -1) and (-.5, 1)

but now I am confused because
when x = -2 |y| <= 1
f(-2,y) = 4 -2y
f' = -2 != 0
so there is a problem there because the derivative does not equal 0. How would I find the max this way?
The derivative needs to be zero at a local extreme, but not at an absolute one. Find it at the boundaries.
 
  • #6
toothpaste666 said:
oops. ok so we have

y = -1 |x| <= 2
f(x, -1) = x^2 - x
f'(x, -10 = 2x -1 = 0
2x = 1
x = 1/2
doing the same with y=1 we get x = -1/2
so the mins are at
(.5, -1) and (-.5, 1)

but now I am confused because
when x = -2 |y| <= 1
f(-2,y) = 4 -2y
f' = -2 != 0
so there is a problem there because the derivative does not equal 0. How would I find the max this way?

Did you not read my post #3, where that issue was discussed in detail? Anyway, why bother with derivatives on such a simple problem? Solving it by inspection is much faster.
 
Last edited:
  • #7
I read it I just don't think I fully understand. So basically there is no critical point inside the interval for the function 4-2y so I just have to plug in the boundaries?

so the max is z = 6 and the min is z = -1/4
 
  • #8
toothpaste666 said:
I read it I just don't think I fully understand. So basically there is no critical point inside the interval for the function 4-2y so I just have to plug in the boundaries?

so the max is z = 6 and the min is z = -1/4
This is mostly correct, but a local extreme point doesn't mean it's the largest or smallest point, you always have too compare with the boundary. However note that this is true for this problem, other problems may indeed have an absolute min/max inside the domain. When having a problem of this type you have to check both the inside and all the boundary's. You do the same in any dimension say you have a cube you first check inside the cube then you have to check each surface and then each edge.

Compare it with a one dimensional problem:
##f(x) = x^3## in ##-10\le x \le 10##.
You have a local stationary point at at ##0## that you can find by differentiating but you don't know if this is an absolute maximum or minimum(or either) yet. We have that ##f(0) = 0## Next check the two boundary's. in this case it's at ##f(-10)=-100## and ##f(10)=100## so those are the absolute min and max. You always need to check both stationary point's and every endpoint (edge, surface etc.)
 
  • Like
Likes toothpaste666
  • #9
I think I am starting to get it. I check critical points by finding the first partial derivatives. This will give possible mins or maxs in the interior of the region. Then we plug in the constraints to get one variable functions for the boundaries of this region. i am picturing these as sort of 2d slices through the 3d graph. now I find the derivative of these one variable functions and set them to 0 to find critical points on the inside of that interval. Now I also have to plug in the constraints into the one variable function to find the max and mins on the edges of that one variable function. so then I take the points from setting the first partials of the 2 variable function to 0, the points from setting the derivatives of the one variable boundary functions to 0, and the points from plugging the constraint in the one variable functions and plug all these points in the original function and whichever ones give the highest value is the max and whichever ones give the lowest is the min?
 
  • #10
Exactly! In the end you have to compare all those possible points you find to know.
 
  • #11
Incand said:
Exactly! In the end you have to compare all those possible points you find to know.

Whether or not this is true depends on the nature of the function and the feasible region. For example, if you are minimizing a convex function over a convex region, any local minimum is automatically a global minimum, so finding one, single local min is enough. However, if you were maximizing a convex function (instead of minimizing) then, in the worst case you might need to check millions of local maxima in order to find the single best one. That's why, even today, industrial-strength non-convex global optimization problems are so difficult.

In the current problem, the function is neither convex nor concave, so in this particular case you do need to check various boundary solutions and pick the numerically best ones.
 
  • #12
toothpaste666 said:
I read it I just don't think I fully understand. So basically there is no critical point inside the interval for the function 4-2y so I just have to plug in the boundaries?

so the max is z = 6 and the min is z = -1/4

There is not a whole lot to understand---just draw some pictures to grasp what is happening. For example, if you want to maximize a function f(x) on an interval a ≤ x ≤ b, can the left end (x=a) be a local max if the derivative is positive there? Just make a sketch to see why not. That's all there is to it.
 

Related to Absolute extrema function of 2 variables

1. What is the definition of absolute extrema function of 2 variables?

The absolute extrema function of 2 variables refers to the maximum and minimum values of a function that has two independent variables. These values represent the highest and lowest points on the graph of the function.

2. How do you find the absolute extrema of a function of 2 variables?

To find the absolute extrema of a function of 2 variables, you must first find the critical points by taking the partial derivatives of the function with respect to each variable and setting them equal to 0. Then, you can use the second derivative test to determine if these points are maximum or minimum values.

3. What is the difference between absolute extrema and relative extrema?

The absolute extrema of a function are the overall maximum and minimum values of the function, while the relative extrema are the local maximum and minimum values within a specific interval. In other words, relative extrema only exist within a certain range, while absolute extrema apply to the entire function.

4. Can a function of 2 variables have more than one absolute extrema?

Yes, a function of 2 variables can have multiple absolute extrema. This is often the case when the function has a saddle point, where the function has a maximum in one direction and a minimum in another direction.

5. How can the absolute extrema of a function of 2 variables be used in real-world applications?

The absolute extrema of a function of 2 variables can be used to optimize a system in real-world applications. For example, in economics, the maximum profit and minimum cost values can be found using the absolute extrema of a cost or revenue function with two independent variables.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
485
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
879
  • Calculus and Beyond Homework Help
Replies
2
Views
583
  • Calculus and Beyond Homework Help
Replies
10
Views
850
  • Calculus and Beyond Homework Help
Replies
6
Views
897
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
770
  • Calculus and Beyond Homework Help
Replies
2
Views
250
  • Calculus and Beyond Homework Help
Replies
8
Views
527
Back
Top