Maximizing Function Using Partial Derivatives

SeannyBoi71
Messages
84
Reaction score
0

Homework Statement


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)

Homework Equations


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:
Physics news on Phys.org
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.
 
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 :)
 
SeannyBoi71 said:
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 :)

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:
Dick said:
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)?

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?
 
SeannyBoi71 said:
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?

Yeah, I just meant show the numbers. What happened to the (-4/5)*exp(-x) part in the xx derivative?
 
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?
 
SeannyBoi71 said:
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?

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.
 
How do I do that?... Did I not do that by using the same D equation except that I found it was inconclusive?
 
  • #10
SeannyBoi71 said:
How do I do that?... Did I not do that by using the same D equation except that I found it was inconclusive?

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
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
SeannyBoi71 said:
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?

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
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
SeannyBoi71 said:
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

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:
Back
Top