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

Distance from origin to a surface

  1. Jan 18, 2014 #1
    Had this question on a test today, Find the shortest distance from the origin to the surface

    xyz2=2

    I figured out by intuition that the shortest line between the origin to the surface will also be normal to the surface.

    I haven't done much of these functions in 3 variables, I read somewhere that the gradient at the point on the surface will denote the normal line.
     
    Last edited: Jan 18, 2014
  2. jcsd
  3. Jan 19, 2014 #2
    z²=2/(xy)
    d²=x²+y²+z²=x²+y²+2/(xy)
    Partial derivative relative to x :
    2x-2/(x²y)=0
    Partial derivative relative to y :
    2y-2/(xy²)=0
    Solving the equations y*(x^3)=x*(y^3)=1 leads to :
    x=y=1
    then z=sqrt(2)
    min.distance d=2
     
  4. Jan 19, 2014 #3
    I'm not that smart, you'll have to explain a bit more clearly.
    I'm guessing d is the distance.
    I guess you're using the distance formula in line 2. I guess x,y and z refer to the x,y and z coordinate of the point on the surface nearest the origin.

    I think you need some more brackets too. I think I see what you're doing though... Too bad 2 was the first number I guessed, should have just wrote it down!
     
  5. Jan 19, 2014 #4
    Write it yourself. So, it will be possible to correct you if there is something that you don't make correctly.
     
  6. Jan 21, 2014 #5

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Another way to do this: we want to minimize the distance from (0, 0, 0) to (x, y, z) subject to the condition that [itex]xyz^2= 2[/itex]. You say you know that "the shortest line between the origin to the surface will also be normal to the surface." Okay, the normal to that surface at any point will be in the direction of the vector [itex]\nabla (xyz^2)= yz^2\vec{i}+ xz^2\vec{j}+ 2xyz\vec{k}[/itex]. And any line through the origin to point (x, y, z) is in the direction [itex]x\vec{i}+ y\vec{j}+ z\vec{k}[/itex].

    In order that the line through the origin be normal to the surface, those two vectors must be parallel which means one is a multiple of the other. Calling that multiplier "[itex]\lambda[/itex]". Then we must have
    [itex]yz^2\vec{i}+ xz^2\vec{j}+ 2xyz\vec{k}= \lambda(x\vec{i}+ y\vec{j}+ z\vec{k})[/itex]
    (this is equivalent to the "Lagrange multiplier" method).

    So [itex]yz^2= \lambda x[/itex], [itex]xz^2= y[/itex], and [itex]2xyz= \lambda z[/itex] as well as the original equation of the surface, [itex]xyz^2= 2[/itex]. That gives four equations to solve for x, y, z, and [itex]\lambda[/itex].

    Since a value for [itex]\lambda[/itex] is not part of the solution, I find it typically best to eliminate [itex]\lambda[/itex] first by dividing one equation by another. Dividing the first equation by the second,
    [tex]\frac{yz^2}{xz^2}= \frac{\lambda x}{\lambda y}[/tex]
    [tex]\frac{y}{x}= \frac{x}{y}[/tex]
    so [tex]y^2= x^2[/tex] so y= x or y= -x.
    Similarly, dividing the second equation by the third
    [tex]\frac{xz^2}{2xyz}= \frac{\lambda y}{\lambda z}[/tex]
    [tex]\frac{z}{2y}= \frac{y}{z}[/tex]
    [itex]z^2=2y^2[/itex] so [itex]z= \sqrt{2}y[/itex] or [itex]z= -\sqrt{2}y[/itex].

    If [itex]x= y[/itex] and [itex]z= \sqrt{2}y= \sqrt{2}x[/itex] then [itex]xyz^2= x(x)(2x^2)= 2x^4= 2[/itex] so x= y= z= 1 or x= y= z= -1.

    Do the other possibilities, [itex]y= -x[/itex] and/or [itex]z= -\sqrt{2}y[/itex] in the same way.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook