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!

Minimizing a multivariable function

  1. Feb 16, 2014 #1
    1. The problem statement, all variables and given/known data

    Find the shortest distance from the origin to the surface x=yz+10

    2. Relevant equations



    3. The attempt at a solution

    So I said that my main function, f(x,y,z) = x^2 + y^2 + z^2 (the function I want to minimize)
    Then I said that g(x,y,z) is my constraint function where g(x,y,z) is yz-x=-10. I took the partial derivative with respect to each variable of both g and f. I got fx=2x, fy=2y, fz=2z, gx=-1, gy=z, and gz=y. Once I did this, set fx = λ gx etc. (same format for each partial). This is where I am confused.

    My final equations are:
    2x + λ = 0 (1)
    2y - λz = 0 (2)
    2z - λy = 0 (3)
    yz - x = 10 (4)

    Once I have these, I am confused as to how to solve them properly. What I did so far was solve equation 2 for z. Once I solved for z in terms of y and λ, I substituted it back in to equation 3 and got 4y/λ - λy = 0. Multiplying lambda across, I get 4y = λ2y. This shows me that either λ=2 or y=0. Once I get these, for each case I solved and when y = 0, plugging back in to equation 2, I get z = 0, and this means that x=10 (equation 4). However, if λ = 2, then by equation 1, x=-1.

    My question is:
    What should I be looking for here? What do I solve for to answer the question properly?
     
  2. jcsd
  3. Feb 16, 2014 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    You want all of the possible sets of three values x, y and z that solve all of those equations. You've got one x=10, y=0, z=0. Now just keep following all of the possibilities. And be careful, ##\lambda^2=4## has two solutions. And you've got a typo in equation (4). It should be yz-x=(-10).
     
    Last edited: Feb 16, 2014
  4. Feb 16, 2014 #3
    Okay, so I continued with what I was doing before and fixed lambda = 2 to lambda = +/- 2. Doing this, I got three points:
    1). (10,0,0)
    2). (-1,-1,11)
    3). (1,1-9)

    Now that I have these points, the question confuses me. The question asks for the shortest distance from the origin to the plane. All of these points are on the plane, so do I use the distance formula to calculate the magnitude of the distance from the point on the plane to the origin?
     
  5. Feb 16, 2014 #4

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    It's not a plane, but yes, you would check those points to find out which minimizes distance. If they were correct. But they aren't. I think you went a little too fast. If ##\lambda=2## can't you conclude ##y=z##?
     
  6. Feb 16, 2014 #5
    Oh, yes I see that. So if y=z, I can change the last equation to y^2-x=-10 when lambda = 2. After that, however, I seem to hit a wall of sorts. So I used equation 1 and lambda = 2 to solve for x. That gives me: 2x+2=0, so x=-1. However, when I plug that back in to the equation, it cannot work out correctly. That means I have y^2+1=-10, or y^2=-11, which cannot be right. Any ideas where I'm going wrong?
     
  7. Feb 16, 2014 #6

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    You aren't doing anything wrong. You hit a correct wall. ##\lambda=2## doesn't lead to any solutions. What about ##\lambda=-2##?
     
  8. Feb 16, 2014 #7
    Okay, so after looking at the points again, I have 3 points. When lambda is 2, y=z, but it doesn't work. However, when lambda = -2, y=-z. Doing some substitutions, I get the points (1,3,-3) and (1,-3,3,). Testing the points (10,0,0) and (1,+/-3,+/-3) I get sqrt (19) and 10 (using the distance formula). This shows that the shortest distance between yz-x=-10 and the origin is sqrt(19), or about 4.36. Does this sound correct?
     
  9. Feb 16, 2014 #8

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Sounds correct.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Minimizing a multivariable function
  1. Minimizing a Function (Replies: 2)

  2. Multivariable Function (Replies: 1)

  3. Minimizing a function (Replies: 7)

Loading...