Finding Max/Min Values on Functions of 2 Variables

  • Thread starter Thread starter TranscendArcu
  • Start date Start date
  • Tags Tags
    Functions Variables
TranscendArcu
Messages
277
Reaction score
0

Homework Statement


Let g(x,y) = x2 + 4y2. What is the maximum value of F(x,y) = ln(x4y5) on the intersection of the level set g(x,y) = 9 with the quadrant {(x,y): x>0 and y>0}

The Attempt at a Solution


It seems I'm having a lot of difficulty with Lagrange multipliers, but here I go.

Fx = 4/x = gx = 2x * λ
Fy = 5/y = gy = 8y * λ

Then clearly, x2 = 2/λ
and, y2 = 5/(8λ)

Plugging these into the constraint gives,

g(2/λ,5/(8λ)) = 4/λ2 + 4 * (25/(64 * λ2)) = 9.

Attempting to solve for λ gives,

(4/λ2) (1 + 25/64) = 9
4 + 25/16 = 9λ2
λ = ± √(4/9 + 25/144). But I reject the negative because it will yield answers outside the boundary

x = sqrt(2/λ) = sqrt(2/(sqrt((4/9 + 25/144))) ≈ 1.594990568
y = sqrt(5/(8λ) = sqrt(5/(8sqrt((4/9 + 25/144))) ≈ 0.89162683338

So I get an extremum at F(1.594990568,0.89162683338), whatever that is...

Pretty sure this isn't right. Ideas?
 
Last edited:
Physics news on Phys.org
Hi TranscendArcu! :smile:

When you plugged your values into the constraint, you took the square again, when you already had a square...
 
I find that it is often simplest to eliminate \lambda (which is not necessary for the solultion) first by dividing one equation by another.\
Here, you have 4/x= 2\lambda x and 5/y= 8\lambda y=. dividing the first by the second gives (4/5)(y/x)= x/(4y) or 16y^2= 5x^2. y= \pm (\<br /> sqrt{5}/4)x. Substitute that into the constraint and solve for x.
 
However, given the constraint y > 0, we would reject the negative answer for y = (sqrt5/4)x, right?

Supposing I solved out for x instead of y. I begin with 4y/(5x) = x/(4y), which gives 16y^2 = 5x^2. So,

x = 4y/sqrt(5)

Subbing into x^2 + 4y^2 = 9 gives (16y^2/5) + 20y^2/5 = 9. So, 36y^2 = 45, or

y = sqrt(45)/6 = sqrt(5)/2

By our definition of x in terms of y: x = 4(sqrt(5)/2)/sqrt(5) = 2.

Therefore, our maximum value is ln(16 * 5^(5/2)/4^5) = ln(5^(5/2)/64) and exists at (2,sqrt(5)/2)

Sound about right?
 
Yes, that sounds right.

Btw, with a problem like this, you should also pay attention to x=0 and y=0 that might have boundary extrema.
 
But given the constraint (x,y): x>0 and y>0, shouldn't be the cases of x=0 and y=0 be non-issues?
 
TranscendArcu said:
But given the constraint (x,y): x>0 and y>0, shouldn't be the cases of x=0 and y=0 be non-issues?

Suppose that at x=0.0001 your function would have a higher value than your "maximum"?
 
TranscendArcu said:

Homework Statement


Let g(x,y) = x2 + 4y2. What is the maximum value of F(x,y) = ln(x4y5) on the intersection of the level set g(x,y) = 9 with the quadrant {(x,y): x>0 and y>0}

The Attempt at a Solution


It seems I'm having a lot of difficulty with Lagrange multipliers, but here I go.

Fx = 4/x = gx = 2x * λ
Fy = 5/y = gy = 8y * λ

Then clearly, x2 = 2/λ
and, y2 = 5/(8λ)

Plugging these into the constraint gives,

g(2/λ,5/(8λ)) = 4/λ2 + 4 * (25/(64 * λ2)) = 9.

Attempting to solve for λ gives,

(4/λ2) (1 + 25/64) = 9
4 + 25/16 = 9λ2
λ = ± √(4/9 + 25/144). But I reject the negative because it will yield answers outside the boundary

x = sqrt(2/λ) = sqrt(2/(sqrt((4/9 + 25/144))) ≈ 1.594990568
y = sqrt(5/(8λ) = sqrt(5/(8sqrt((4/9 + 25/144))) ≈ 0.89162683338

So I get an extremum at F(1.594990568,0.89162683338), whatever that is...

Pretty sure this isn't right. Ideas?

F_x is not equal to 4/x , and F_x is not equal to g_x, although later you set it equal to \lambda g_x, which is OK. Start again, with correct derivatives for F, and be sure to write the Lagrange equations correctly.

RGV
 
I like Serena said:
Suppose that at x=0.0001 your function would have a higher value than your "maximum"?

Alright, so let me test the boundaries of the quadrant:

Suppose x = 0 and y ≥ 0, then ln(x4y5) goes to -∞. Right?

Suppose y = 0 and x ≥ 0, then ln(x4y5) also goes to -∞.

Hmm... Maybe I just don't know how to check a boundary. How do you check a boundary?
 
  • #10
Ray Vickson said:
F_x is not equal to 4/x , and F_x is not equal to g_x, although later you set it equal to \lambda g_x, which is OK. Start again, with correct derivatives for F, and be sure to write the Lagrange equations correctly.

RGV
I checked Fx with Wolfram Alpha: http://www.wolframalpha.com/input/?i=d/dx+ln(x^4y^5)

What am I doing wrong?
 
  • #11
TranscendArcu said:
Alright, so let me test the boundaries of the quadrant:

Suppose x = 0 and y ≥ 0, then ln(x4y5) goes to -∞. Right?

Suppose y = 0 and x ≥ 0, then ln(x4y5) also goes to -∞.

Hmm... Maybe I just don't know how to check a boundary. How do you check a boundary?

You just did.
Note that your function won't have a global minimum, since for x or y close to zero it approaches minus infinity.
But the extremum that you did find, has to be a maximum now.
 
  • #12
TranscendArcu said:
I checked Fx with Wolfram Alpha: http://www.wolframalpha.com/input/?i=d/dx+ln(x^4y^5)

What am I doing wrong?

Sorry: your F_x is correct. I was thinking about using x^4*y^5, rather than its logarithm.

Anyway, your major error (besides saying F_x = g_x---which is FALSE) is that you have x^2 = 2/lambda, etc., so when you substitute these into g you should NOT get 1/lambda^2. You are substituting x^4 and y^4 into g, which is incorrect.

RGV
 
Back
Top