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

Optimization - find point by minimising squared distance

  1. Sep 21, 2007 #1
    Find the point in the plane 3x+2y+z=1 that is the closest to the origin by minimising squared distance. (I hope I translated this ok..)

    I was thinking I would need to isolate a variable in the equation for the plane above then substitute it into the distance formula then do a partial derivative.

    Something like... D=(x^2+y^2+z^2)^(1/2). Since it is squared I could just have (x^2+y^2+z^2).


    D = x^2+y^2+(1-2y-3x)^2

    = x^2+y^2+1-4y-6x+12xy+9x^2

    f_x = 20x-6+12y = 0
    y = (6-20x)/12

    f_y = 2y-4+12x
    y = (4-12x)/2

    etc....x=1/4, y=1/2, z=-3/4

    It seems ok because it works in the given equation(3x+2y+z=1) but I've never done a problem like this so if its wrong, I do hope I'm atleast on the right track. Hope someone can't let me know.

  2. jcsd
  3. Sep 21, 2007 #2


    User Avatar
    Science Advisor
    Gold Member

    You made an error in your calculation of D. In squaring the expression for z, you omitted 4y^2. Therefore D should have 5y^2 not y^2. You should be able to get the right answer after that. It'll be (3,2,1)/14.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?