Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Finding Max/Min Values on Functions of 2 Variables

  1. Nov 12, 2011 #1
    1. The problem statement, all variables and given/known data
    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}

    3. 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: Nov 12, 2011
  2. jcsd
  3. Nov 13, 2011 #2

    I like Serena

    User Avatar
    Homework Helper

    Hi TranscendArcu! :smile:

    When you plugged your values into the constraint, you took the square again, when you already had a square...
     
  4. Nov 13, 2011 #3

    HallsofIvy

    User Avatar
    Science Advisor

    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.
     
  5. Nov 13, 2011 #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?
     
  6. Nov 13, 2011 #5

    I like Serena

    User Avatar
    Homework Helper

    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.
     
  7. Nov 13, 2011 #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?
     
  8. Nov 13, 2011 #7

    I like Serena

    User Avatar
    Homework Helper

    Suppose that at x=0.0001 your function would have a higher value than your "maximum"?
     
  9. Nov 13, 2011 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    [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
     
  10. Nov 13, 2011 #9
    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?
     
  11. Nov 13, 2011 #10
    I checked Fx with Wolfram Alpha: http://www.wolframalpha.com/input/?i=d/dx+ln(x^4y^5)

    What am I doing wrong?
     
  12. Nov 13, 2011 #11

    I like Serena

    User Avatar
    Homework Helper

    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.
     
  13. Nov 13, 2011 #12

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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
     
  14. Nov 13, 2011 #13

    I like Serena

    User Avatar
    Homework Helper

    Last edited by a moderator: Apr 26, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook