• Support PF! Buy your school textbooks, materials and every day products Here!

Finding Max/Min Values on Functions of 2 Variables

  • #1

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:

Answers and Replies

  • #2
I like Serena
Homework Helper
6,577
176
Hi TranscendArcu! :smile:

When you plugged your values into the constraint, you took the square again, when you already had a square...
 
  • #3
HallsofIvy
Science Advisor
Homework Helper
41,808
933
I find that it is often simplest to eliminate [itex]\lambda[/itex] (which is not necessary for the solultion) first by dividing one equation by another.\
Here, you have [itex]4/x= 2\lambda x[/itex] and [itex]5/y= 8\lambda y=[/itex]. dividing the first by the second gives (4/5)(y/x)= x/(4y) or 16y^2= 5x^2. [itex]y= \pm (\
sqrt{5}/4)x[/itex]. Substitute that into the constraint and solve for x.
 
  • #4
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?
 
  • #5
I like Serena
Homework Helper
6,577
176
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.
 
  • #6
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?
 
  • #7
I like Serena
Homework Helper
6,577
176
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"?
 
  • #8
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728

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?
[itex] F_x [/itex] is not equal to [itex] 4/x [/itex] , and [itex] F_x [/itex] is not equal to [itex] g_x [/itex], although later you set it equal to [itex] \lambda g_x, [/itex] which is OK. Start again, with correct derivatives for F, and be sure to write the Lagrange equations correctly.

RGV
 
  • #9
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
[itex] F_x [/itex] is not equal to [itex] 4/x [/itex] , and [itex] F_x [/itex] is not equal to [itex] g_x [/itex], although later you set it equal to [itex] \lambda g_x, [/itex] 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
I like Serena
Homework Helper
6,577
176
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
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728
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
 

Related Threads on Finding Max/Min Values on Functions of 2 Variables

Replies
11
Views
863
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
3
Views
843
Replies
6
Views
1K
Replies
10
Views
2K
  • Last Post
Replies
3
Views
789
Replies
3
Views
5K
Replies
3
Views
10K
Replies
11
Views
1K
Top