Results 1 to 6 of 6

Math Help - maxima and minima of f(x,y,z)

  1. #1
    Newbie
    Joined
    Nov 2006
    Posts
    3

    maxima and minima of f(x,y,z)

    The question: find the point on the plane x-y+z=4 that is closest to the point (1,2,3).

    So I guess in math terms the problem is to find min(d) where

    d=\sqrt{(x-1)^{2}+(y-2)^{2}+(z-3)^{2}}

    It's clear that

    d_{x}=\frac{x-1}{\sqrt{(x-1)^{2}+(y-2)^{2}+(z-3)^{2}}}
    d_{y}=\frac{y-2}{\sqrt{(x-1)^{2}+(y-2)^{2}+(z-3)^{2}}}
    d_{z}=\frac{z-3}{\sqrt{(x-1)^{2}+(y-2)^{2}+(z-3)^{2}}}

    And of course, what you're supposed to do is set them equal to zero and solve. Only problem is, I have no clue how to do that. Any help appreciated. Thanks in advance.

    Edit: Never mind, is it as stupid as I think it is?

    d_{x}=0\ \Rightarrow\ x-1=0\ \Rightarrow\ x=1

    Is that the solution? If so, I think I should bash my head against a wall.
    Last edited by markholden; November 21st 2006 at 10:20 PM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Nov 2006
    Posts
    3
    P.S. Apologies in advance if this was the wrong forum for this question.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    TD!
    TD! is offline
    Senior Member
    Joined
    Jan 2006
    From
    Brussels, Belgium
    Posts
    405
    Thanks
    3
    What you are doing now is finding the distance between some arbitrary point (x,y,z) and the point (1,2,3).
    If you're going to minimize that, then you'll find x = 1 indeed, and y = 2 and z = 3, since the closest point will be the point itself

    What you're forgetting is to implement the fact that your point isn't arbitrary, it has to satisfy x-y+z=4.
    You could do this with Lagrange multipliers, or substitute (for example) y by x+z-4 in your expression, leaving a two-variable problem.

    Another hint: since you're only asked to find the closest point, you might as well minimize dē, the square distance.
    This way you'll lose the annoying square root, but your solution will be the same since minimal distance implies minimal quadratic distance.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,830
    Thanks
    123
    Quote Originally Posted by markholden View Post
    The question: find the point on the plane x-y+z=4 that is closest to the point (1,2,3).
    ...
    Hello, Markholden,

    Your equation describes a plane in \mathbb{R}^3 in normal form. That means you know the perpendicular direction to this plane: \vec{n}=[1, -1, 1].

    If you use this direction and the given point you can construct a straight line which intercept the plane in the point you are looking for:

    Plane: [1, -1, 1] \cdot [x, y, z]=4
    Line: [x, y, z]=[1, 2, 3]+r \cdot [1, -1, 1]

    Calculating the intercept: [1, -1, 1] \cdot \left( [1, 2, 3]+r \cdot [1, -1, 1] \right)=4
    Calculate the scalar products: 2 + 3r=4\ \Longleftrightarrow\ r=\frac{2}{3}

    Plug in this value into the equation of the line: [x, y, z]=[1, 2, 3]+\frac{2}{3} \cdot [1, -1, 1]=\left[\frac{5}{3},\frac{4}{3},\frac{11}{3} \right]

    The distance between this point and the given point is:
    d=\left|[1, 2, 3] - \left[\frac{5}{3},\frac{4}{3},\frac{11}{3} \right] \right|

    d=\sqrt{\left(-\frac{2}{3}  \right)^2+\left( \frac{2}{3} \right)^2+\left(-\frac{2}{3}  \right)^2}=\frac{2}{3}\cdot \sqrt{3} \approx 1.1547

    EB
    Last edited by earboth; November 22nd 2006 at 11:51 PM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    [quote=markholden;28463]The question: find the point on the plane x-y+z=4 that is closest to the point (1,2,3).

    So I guess in math terms the problem is to find min(d) where

    d=\sqrt{(x-1)^{2}+(y-2)^{2}+(z-3)^{2}}
    quote]

    One way of doing this is to write:

    <br />
D=d^2=(x-1)^{2}+(y-2)^{2}+(z-3)^{2}<br />
=(x-1)^2+(y-2)^2+(1-x+y)^2<br />

    Then you want to find (x,y) which minimised D which is a point at which:

    <br />
\frac{\partial D}{\partial x}=0<br />
, and \frac{\partial D}{\partial y}=0

    These give a pair of linear simultaneous equations which can be solved for x and y, then z can be found by plugging these into the equation of the plane.

    RonL
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,914
    Thanks
    778
    Hello, Mark!

    Find the point on the plane x-y+z=4 that is closest to the point (1,2,3)

    I would take TD's advice and use Lagrangian multipliers.

    We want to minimize: . D\:=\:(x-1)^2 + (y-2)^2 + (z-3)^2
    . . with the constraint: g(x) \:=\:x - y + z - 4 \:=\:0

    We have: . f(x,y,z,\lambda) \;=\;(x-1)^2 + (y-2)^2 + (z-3)^2 + \lambda(x - y + z - 4)


    Then: / \begin{Bmatrix}(1) &\frac{\partial f}{\partial x} \:=\:2(x-1) + \lambda\:=\:0 \\ \\ (2) &\frac{\partial f}{\partial y} \:=\:2(y -2) - \lambda\:=\:0 \\ \\ (3) & \frac{\partial f}{\partial z} \:=\:2(z-3) + \lambda\:=\:0 \\ \\ (4) &\frac{\partial f}{\partial \lambda} \:=\:x - y + z - 4 \:=\:0\end{Bmatrix}


    \begin{array}{ccc}\text{From }(1):\;x \:=\:\text{-}\frac{1}{2}\lambda + 1 \\ \text{From }(2):\;y \;\,=\;\,\frac{1}{2}\lambda + 2 \\ \text{From }(3):\;z\:=\:\text{-}\frac{1}{2}\lambda + 3\end{array} \begin{array}{ccc}(4)\\(5)\\(6)\end{array}

    Substitute into (4): . \left(\text{-}\frac{1}{2}\lambda + 1\right) - \left(\frac{1}{2}\lambda + 2\right) + \left(\text{-}\frac{1}{2}\lambda + 3\right) - 4 \:= \:0
    . . and we have: . \lambda\,=\,-\frac{4}{3}
    Substitute into (4), (5), (6): . \begin{array}{ccccc}x\:= \\ \\ y\:= \\ \\ z\:=\:\end{array}<br />
\begin{array}{ccccc}\text{-}\frac{1}{2}\left(\text{-}\frac{4}{3}\right) + 1 \\ \\ \frac{1}{2}\left(\text{-}\frac{4}{3}\right) + 2 \\ \\ \text{-}\frac{1}{2}\left(\text{-}\frac{4}{3}\right) + 3\end{array}<br />
\begin{array}{ccccc}=\:\frac{5}{3}\\ \\ =\:\frac{4}{3} \\ \\ =\:\frac{11}{3}\end{array}


    Therefore, the closest point is: . \left(\frac{5}{3},\:\frac{4}{3},\:\frac{11}{3}\rig  ht)

    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Maxima and Minima
    Posted in the Calculus Forum
    Replies: 3
    Last Post: June 8th 2010, 04:59 PM
  2. Maxima and Minima
    Posted in the Calculus Forum
    Replies: 2
    Last Post: June 4th 2009, 12:10 PM
  3. Maxima and Minima
    Posted in the Calculus Forum
    Replies: 3
    Last Post: May 30th 2009, 05:06 AM
  4. Maxima and minima 3
    Posted in the Calculus Forum
    Replies: 3
    Last Post: March 28th 2009, 09:30 AM
  5. maxima and minima
    Posted in the Calculus Forum
    Replies: 2
    Last Post: February 25th 2008, 11:28 AM

Search Tags


/mathhelpforum @mathhelpforum