# Global extrema question

1. Mar 11, 2005

### mathrocks

I'm supposed to find the absolute max and min for f(x,y)=sin(x) +cos(y) on the rectangle defined by 0<=x<=2*pi 0<=y<=2*pi. Can someone point me in the right direction. I got the critical points but i dont know what to do after that.

2. Mar 11, 2005

### Jimmy Snyder

This can be solved with a few elementary facts concerning the sin and cos functions and no calculus at all.

First, disregarding the rectangle for a moment, it is obvious that f(x,y) must lie between -2 and 2 inclusive for any x and y, because both sin(x) and cos(y) lie between -1 and 1 inclusive, and f(x,y) is the sum of these two.

Second, it is easy to find a pair (x,y) in the rectangle where the values of -2 and 2 are actually attained. For instance if x = PI/2 and y = 0 then f(x,y) = 2. I leave -2 for you to do.

Since f(x,y) attains the values of -2 and 2 on the rectangle, and these values cannot be exceeded for any (x,y), they must be the absolute max and min.

3. Mar 11, 2005

### mathrocks

How do I do this using calculus though, so I know what to do for other problems that arise. I know I must find the partial derviative for f(x,y) and find the critical values of each of those, which I believe are (pi/2, pi), (3*pi/2, 2*pi). Then I'm suppose to do something with the rectangle but I'm not sure what?

4. Mar 11, 2005

### Jimmy Snyder

You need to check the value of f(x,y) along the perimeter of the rectangle.

Consider the fact that the maximum value of the function f(x) = x on the interval from 0 to 1 occurs at the point x = 1 where the maximum value is f(1) = 1. At that point, f'(x) = 1, not 0. So looking for points where f'(x) = 0, while necessary, is not sufficient. Loosely speaking, you need to examine the edges of the domain as well as the points where the derivative is zero.

5. Mar 11, 2005

### mathrocks

Ok, I'm starting to understand this a little better now. Now my new question is when you have the domain be something like 0<=x<=2*pi, 0<=y<=2*pi, do you have to actually go through each value and see which combination gives you a maximum? Because in the case of f(x,y)=sin(x)+cos(y), the endpoints dont yield a maximum.

6. Mar 11, 2005

### Jimmy Snyder

In general, yes. The reason is somewhat technical, and if you don't understand the rest of this paragraph, you can just accept the answer and safely skip on to the next one. Loosely speaking again, you cannot be assured that the 'edge' of the domain allows analysis. For instance, let the domain be the interior of the rectangle along with some points along the edge thrown in for good measure. Then finding the max of a function on that domain could require you to evaluate the function at those extra points on the edge one by one. Of course, if there were a lot of them, then you could be in it for the long haul. The good news is that the teacher would have the same amount of work to do in order to check your answer, so it probably won't happen to you while you are in school.

However in particular cases you may be able to do better. In fact, for the case at hand, you can look for the extrema along each of the 4 edges by looking for points where the partials are 0 and then evaluate the function at each of the 4 corners.

7. Mar 11, 2005

### mathrocks

That's the thing, when I look for the points where the partials are 0, I get
(x=pi/2), (x=3*pi/2) and (y=pi), (y=2*pi). And when I evaluate the function at the corners which are (x=0), (x=2*pi), (y=0), (y=2*pi), I get x=0, x=0, y=1, y=1. So I dont see how I can get -2,2 even though I know I should.

8. Mar 11, 2005

### Jimmy Snyder

So you need to look at the following points:

1. The points in the interior of the rectangle where the partials are 0.

2. The points along the sides where the partials are 0.

3. The corners.

The largest value of f(x,y) among the union of these three sets of points is the absolute maximum. Similarly for the minimum value.

9. Mar 11, 2005

### dextercioby

$$f(x)=:\sin x+\cos y$$

The condition for extremum-------->critical points.

$$\frac{\partial f}{\partial x} =0 ;\frac{\partial f}{\partial y}= 0$$

The type of extremum---------->

Hess(f)|_{sol.critical points} ? 0

Daniel.

P.S.If the hessian is the positive,then it's a minimum,if it's negative,it's a maximum,if it's zero,it's a saddle point...