1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Max and Min of a function of four variables

  1. Oct 14, 2012 #1
    1. The problem statement, all variables and given/known data
    Find the maximum and minimum values of the function f(x,y,z,t)=x+y+z+t subject to the constraint x^2+y^2+z^2+t^2=400.

    2. Relevant equations
    I think the Lagrange multiplers can be used ∇f=λ∇g

    3. The attempt at a solution
    So I found ∇f=<1,1,1,1> and ∇g=<2x,2y,2z,2t>
    and when i set each component equal to each other I get x=y=z=t. I don't know where to go from here, or if this was even the right path to take in the first place
     
  2. jcsd
  3. Oct 14, 2012 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

  4. Oct 14, 2012 #3
    Sorry, I forgot that there was a designated spot for homework questions. But yes I've looked all over the internet for how to do this problem. So what is the next step?
    I know how to use Lagrange multipliers for just two variables, f(x,y), but I dont understand how to use it for four.
     
  5. Oct 14, 2012 #4

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    The next step is to construct the Lagrange equation.

    The method is supposed to be useful for any number of independent variables.
    http://www.karlscalculus.org/pdf/lagrange.pdf [Broken]
     
    Last edited by a moderator: May 6, 2017
  6. Oct 14, 2012 #5
    okay so, for each component:
    1=λ2x
    1=λ2y
    1=λ2z
    1=λ2t
     
  7. Oct 14, 2012 #6

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    That's 4 equations and five unknowns.
    You are missing one.
     
  8. Oct 14, 2012 #7
    are you talking about lambda?
    if so, i don't know an equation for that which doesnt include atleast one other variable
     
  9. Oct 14, 2012 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You can solve for the 4 variables x,y,z,t in terms of λ. So, if you know λ you are done. You still need to satisfy the constraint equation. Try substituting your expressions for x,y,z,t in the constraint to see what you get.

    That is more-or-less the standard solution method for Lagrange multiplier problems, whether you have 2 variables or 2000 variables.

    RGV
     
  10. Oct 14, 2012 #9

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    ... in that method, you'd end up using three relations wouldn't you? Did you go look at either of the links I gave you? The second explicitly deals with the case of more than two variables.
     
  11. Oct 15, 2012 #10
    Okay I think I got it!
    Since all of the components are equal to 1, you can set them equal to each other. And you end up with x=y=z=t. So you plug that into the constraint function g(x,y,z,t)=400, substituting x for all the other values. And you get (x^2)+(x^2)+(x^2)+(x^2)=400. And from there you get x=+/-10. Which means that y,z, and t also equal +/-10. So you plug these values back into the function f(x,y,z,t) and you get a max value of 40 occuring at the point (10,10,10,10) and a min value of -40 occurring at the point (-10,-10,-10,-10)
    Right?
     
  12. Oct 15, 2012 #11
    Okay I think I got it!
    Since all of the components are equal to 1, you can set them equal to each other. And you end up with x=y=z=t. So you plug that into the constraint function g(x,y,z,t)=400, substituting x for all the other values. And you get (x^2)+(x^2)+(x^2)+(x^2)=400. And from there you get x=+/-10. Which means that y,z, and t also equal +/-10. So you plug these values back into the function f(x,y,z,t) and you get a max value of 40 occuring at the point (10,10,10,10) and a min value of -40 occurring at the point (-10,-10,-10,-10)
    Right?
     
  13. Oct 15, 2012 #12
    Okay I think I got it!
    Since all of the components are equal to 1, you can set them equal to each other. And you end up with x=y=z=t. So you plug that into the constraint function g(x,y,z,t)=400, substituting x for all the other values. And you get (x^2)+(x^2)+(x^2)+(x^2)=400. And from there you get x=+/-10. Which means that y,z, and t also equal +/-10. So you plug these values back into the function f(x,y,z,t) and you get a max value of 40 occuring at the point (10,10,10,10) and a min value of -40 occurring at the point (-10,-10,-10,-10)
    Right?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook