# Homework Help: Maximizing Function Using Partial Derivatives

1. Nov 29, 2011

### SeannyBoi71

1. The problem statement, all variables and given/known data
Find (x,y) which maximizes f(x,y) for x ≥ 0.
f(x,y) = e-x - e-2x + (1 - e-x)(4/5 - (3/4 - y)2)

2. Relevant equations

3. The attempt at a solution
Due to the question prior to this one, I know all the first order and second order partial derivatives of the formula. I do not understand what to do to find (x.y) that maximizes f(x,y). I thought that maybe it basically means finding the global maximum, except using the second derivative test I found that there is no global max or min, but only a saddle point. Is this the right approach? If so, I can show my work for you guys. Thanks!

Last edited: Nov 29, 2011
2. Nov 29, 2011

### Dick

I find a critical point but it doesn't look like a saddle point to me. It looks like a local max. Your approach is right, but you are getting the wrong answer. Showing your work would be good thing.

3. Nov 29, 2011

### SeannyBoi71

Alright.

I got ∂g/∂x = -e-x + 2e-2x + (e-x)(4/5 - (3/4 - y)2). Set this equal to zero, and solved for x to find an expression for x:

2(e-x)2 = e-x(1 - (4/5 - (3/4 - y)2))

2e-x = -29/80 + 3y/2 -y2, then taking natural logs and rearranging

x = ln(160 / (-80y2 +120y -29))

Now ∂g/∂y = (1 - e-x)(3/2 - 2y). And from this I see that critical points involve x=0, and y=3/4. Then I plugged in this y value to my expression for x above to find any other x points that are critical points and got x = ln(10). So my critical points are (0,3/4) and (ln(10), 3/4).

2g/∂x2 = e-x - 4 e-2x - (e-x)*(4/5 - (3/4 - y)2)

2g/∂y2 = 2e-x - 2

and finally ∂2g/∂x∂y = 3e-x/2 - 2ye-x.

I used D(a,b) = ∂2g/∂x2 * ∂2/∂y2 - (∂2g/∂x∂y)2.

For the point (0,3/4) I got that D=0 and the test is inconclusive. For the point (ln(10),3/4) I got that D < 0 and so it was a saddle point.

Just a note I realized I missed a couple of the negative signs in exponents while I did this on paper earlier.. so that may be where I made a mistake. Insight is still greatly appreciated though :)

4. Nov 29, 2011

### Dick

That's really quite good. I think you only went wrong at the very end. You can simplify things a bit by realizing that you don't even need to check (0,3/4) using the second derivative test. It's on the boundary. You should think about the boundary separately. As for the (log(10),3/4), I get D>0. What did you get for the numerical values of the 2x2 matrix of second derivatives at (log(10),3/4)?

Last edited: Nov 29, 2011
5. Nov 29, 2011

### SeannyBoi71

I am not familiar with the matrix way of doing this I guess, our instructor told us simply use the D equation, and plug in the values of the critical point. I got

D(ln(10),3/4) = (1/10 - 1/25 - 0)*(1/5 - 10/5) - (3/20 - 3/20)2 = (15/250)(-9/5). Guessing I just evaluated it wrong?

6. Nov 29, 2011

### Dick

Yeah, I just meant show the numbers. What happened to the (-4/5)*exp(-x) part in the xx derivative?

7. Nov 29, 2011

### SeannyBoi71

Oops! Must have forgot to write it in! So now I got that D = 9/250 > 0, and the xx derivative is < 0, which means, by the second derivative test, that the point is a local maximum. Now for the actual question in the problem, the point (x,y) that will maximize f(x,y) is just the point where the global maximum will occur, correct? So f(x,y) is maximized at (ln(10),3/4). How's that?

8. Nov 29, 2011

### Dick

Almost there. You do have to check there's not a maximum on the boundary x=0 that's greater than the local max at (ln(10),3/4). That's pretty easy.

9. Nov 29, 2011

### SeannyBoi71

How do I do that?... Did I not do that by using the same D equation except that I found it was inconclusive?

10. Nov 29, 2011

### Dick

No! The function on the boundary x=0 is a function of single variable. It's f(0,y). It's a pretty simple function. A max or a min on the boundary doesn't have to be a critical point in the sense of satisfying df/dx=df/dy=0.

11. Nov 29, 2011

### SeannyBoi71

If a max on the boundary doesn't have to be a critical point, how am I supposed to show if it really is a max or not?

12. Nov 29, 2011

### Dick

An extremum of f(0,y) is going to be a critical point in the single variable y. Just treat is as a one variable problem. So no partial derivatives needed. But this is getting out of control. What is f(0,y)? If you just work it out you'll see there is no deep problem here. My point is that you should always look at the boundary. An absolute min or max can sit there as well as in the interior.

13. Nov 29, 2011

### SeannyBoi71

f(0,y) = (4/5 - (3/4 - y)2). I still fail to see where this is going... I'm terribly sorry it's getting late and I'm tired that's my excuse for not understanding this :zzz: :P

14. Nov 29, 2011

### Dick

NO. f(0,y)=0 since (1-exp(0))=0. That's less than your max at (log(10),3/4). So there is nothing bigger on the boundary. Yeah, probably is getting late.

Last edited: Nov 29, 2011