3
$\begingroup$

I'm trying to find the minimal distance between the surfaces described by $z=x^2+y^2$ and $x+y-2z=8$. I would imagine there are several approaches including the use of Lagrange multipliers. I attempted to find the spot when their normal vectors are parallel ( since i believe if these vectors are not parallel there is a direction that will bring the distance lower). So if $U(x,y,z)=x^2+y^2$ and $V(x,y,z)=x+y-2z$ are functions describing these surfaces then their normal vectors are $(2x,2y,-1)$ and $(1,1-2)$ respectively. Then I want their cross product to be zero; this is at $(1/4,1/4,z)$. But when i solve for $z$ and I cannot simultaneously satisfy both equations. What gives?! Am I along the right line of thinking?

  • 0
    Define $D(x,y,z)=x^2+y^2+z^2$ as the distance function. You do not have to use the square root in its definition, since its critical points are the same of the usual distance function. As you already did, define some auxiliary functions $U,V$. Now use lagrange multpiliers with two constraints to solve the system:2017-01-09
  • 2
    That doesn't seem right. I'm not trying to minimize the distance from the origin but the distance between the surfaces.2017-01-09
  • 0
    you are actually right, i'm sorry.2017-01-09
  • 0
    Maybe consider the function $\mathbb{R}^2\times\mathbb{R}^2=\mathbb{R}^4\to\mathbb{R}$ that sends $$(x,y,a,b)\to(x-a)^2+(y-b)^2+(x^2+y^2-\frac{x+y-8}{2})^2$$ You want the minima of this function.2017-01-09

5 Answers 5

3

You won't be able to solve for $z $ on both equations if the surfaces dont intersect. You have to find the $z $ coordinate of the point of each surface with $x = y = \frac14$ and then find the distance between the two points.

  • 0
    Duh, duh, duh. Lol. Thanks2017-01-09
  • 0
    But my approach is otherwise correct, right?2017-01-09
  • 0
    I would believe so, but won't swear on it.2017-01-09
  • 0
    I'm doubting this now because it could be that non parallel normal vectors mean the surfaces are getting closer to one another2017-01-09
  • 1
    Intersecting planes don't have parallel normal vectors ever, but their minimal distance is zero.2017-01-09
  • 0
    You can check for intersection first and separately as that gives you a trivial answer of minimal distance = 0. If they do not intersect, however, then I believe your thoughts are right.2017-01-09
  • 0
    Let $f=1$ for negative $x$ and equal to $e^{-x}$ for nonnegative $x$ and $g=0$ for all $x$. Then the normal vectors are parallel when these functions are furthest apart. The minimum distance is found as $x\to \infty$2017-01-09
  • 0
    @Clclstdnt very well put. Maybe the normal vectors are parallel at the extrema of the distance? At the points of further distance and at the points of minimal distance.2017-01-09
  • 0
    This looks wrong to me. The point $(\frac14, \frac14, \frac18)$ is on the top surface, yes. However, the nearest point in the bottom surface is not $(\frac14, \frac14, \frac{-15}4)$.2017-02-03
2

Define,

$$F(x,y,z)=z-x^2-y^2$$

$$G(x,y,z)=x+y-2z$$

Now because gradients are perpendicular to level curves we wish to find when $\nabla F=\lambda \nabla G$.

So we have,

$$\langle -2x,-2y,1 \rangle = \lambda \langle 1,1,-2 \rangle$$

$$z-x^2-y^2=0$$

And we proceed. Finding the closest point on $z=x^2+y^2$ to the plane. And then using the formula for the distance from a point to the plane to proceed.

The closest point as you found is $(1/4,1/4,z)$. As we are on the surface $z=x^2+y^2$ then we have $z=(1/4)^2+(1/4)^2=1/8$. Then the distance is:

$$d=\frac{|1(1/4)+1(1/4)-2(1/8)-8|}{\sqrt{1^2+1^2+2^2}}$$

  • 0
    Can you tease out the statement "Now because ... $G$" In other words, why do we care to find when normals to level curves are parallel. It seems intuitive to me... that's why I made the argument I did. Also, couldn't this be the same as computing when $(-2x,-2x,1)\times (1,1,-2)=0$ under the assumption that $x=y$ (as explained early in the other answer)?2017-01-28
  • 0
    In a rectangular room we measure the (min) distance by lining up the measuring tape so that is both perpendicular to the ceiling and floor. So that the direction vectors of the measuring tape is parallel to both the normal of the ceiling and floor. Here $z=x^2+y^2$ is the ceiling and $x+y-2z=8$ is our floor. We apply the same idea.2017-01-29
1

By visualizing the shape of the surfaces you should realize that the shortest distance will be between some point on the surface when $x=y$ (a parabola) and the plane when $x=y$ (a line).
There are at least two methods for solving this. First, there is a general fact that if $L$ is a line with vector equation $r(t)=(a,b,c)+t(\alpha,\beta,\gamma)$ where $(\alpha,\beta,\gamma)$ is a unit vector and $P=(x_0,y_0,z_0)$ a point in $\mathbb{R}^3$ and if $d$ is the distance from $P$ to $L$, then $$d^2=(x_0-a)^2+(y_0-b)^2+(z_0-c)^2-[\alpha(x_0-a)+\beta(y_0-b)+\gamma(z_0-c)]^2$$

Under this fact we can simply solve the problem by fixing the line $x+x-2z=8$ and varying $x$ along the curve $z=x^2+x^2$. To this end, let $(a,b,c)=(0,0,-4)$ and the unit direction vector is $\frac{1}{\sqrt{3}}(1,1,1)$. Then our problem becomes minimizing the function $f(x)=d^2(P(x),L)$ where $P(x)$ is any point along the parabola.

$$f(x)= 2x^2+(2x^2+4)^2-\frac{1}{3}(2x+2x^2+4)$$ $$f'(x)=\frac{1}{3}(32x^3 -24x^2 + 68x-16)=0$$ now use whatever method you want to solve this (the cubic formula, rational root test, or bisection method starting at $0$ and $1$). You'll find that $f'(\frac{1}{4})=0$ and consequently $d=\frac{31}{4\sqrt{6}}$.

Alternatively, you could do the more obvious but less elegant method of simply using the normal distance function between the surfaces and minimizing it. To this end, let $(x,y,z)$ describe the surface of the parabola and $(u,v,w)$ describe the plane. As before, $x=y$ and $u=v$ and $w=\frac{1}{2}(u+u-8)$ and $z=x^2+x^2$.

Then the function we want to minimize is $$f((x,y,z),(u,v,w))=f(x,u)=2(x-u)^2 + (u-4-2x^2)^2$$ The minimum occurs at $$\nabla f(x,u)=(-8ux-4u+16x^3+36x,6u-4x^2-4x-8)=(0,0)$$

solve for $u$ in terms8 of $x$ from the second equation. That is $u=\frac{1}{6}(4x^2+4x+8)$ then plug this into the other equation and you'll end up with a multiple of the cubic equation we found in the first method. The solution for this is as before.

  • 0
    where the full form of the distance function $f$ in the second part is $f((x,y,z),(u,v,w))=\sqrt{(x-u)^2+(y-v)^2+(z-w)^2}$ but minimizing the distance squared is equivalent to minimizing the distance and it is neater so we'll replace $f$ with $f^{1/2}$.2017-01-28
  • 0
    Thanks. Are you able to answer the question of the cross product being equal to zero in order to minimize the distance?2017-01-28
  • 0
    I chose this answer because of the quick response and it supplied two answers using interesting techniques. My second favorite answer was H. H. Rugh's2017-02-04
1

In general the cross-product method does not work. In this special case, it does, however. Suppose $A\in \Sigma_U = U^{-1}(0)$ and $B\in \Sigma_V=V^{-1}(0)$ verify: $$ (A-B,A-B)=|A-B|^2 = \inf \{|P-Q|^2: P\in \Sigma_U, Q\in \Sigma_V\}>0$$ Then $|A-B|^2$ is stationary under tangential variations of $A$ and $B$. So let $$U'_A(h)=(\nabla U(A),h)=0 \ \ \mbox{and} \ \ V'_B(k)=(\nabla V(B),k)=0$$ describe such tangential variations. Then $(h,A-B)=(k,A-B)=0$ meaning that $h$ and $k$ are any vectors orthogonal to $A-B$. But as they are also orthogonal to the gradients we must have: $$ \nabla U(A)\ \parallel \nabla V(B) \parallel A-B .$$ That the first two are parallel is equivalent to their cross product being zero. But you also need that they should be parallel to $A-B$. In general for two curved surfaces, there is a phletora of (irrelevant) couples of points for which this cross product vanishes, just imagine e.g. two non-intersecting spheres. For any point on one of them there are two points on the other for which this cross product vanishes.

Now in your case the situation is very special as one surface is a plane for which the gradient $n=(1,1,-2)$ is constant. As there is only one point on $U$ for which the gradient is parallel to $n$ the method just happens to work in this case and gives the point $A$. To find the point $B$ you look at the line passing through $A$ in the direction $n$ and find its intersection with the plane. I omit the explicit solution which is given in other answers to this post.

In order to see that you really get a minimum for the couple $(A,B)$ you should also show that the surfaces don't intersect. Furthermore, that when $P\in\Sigma_U$ and $Q\in \Sigma_V$ go to infinity then so does their distance (not so difficult, simply show that $\Sigma_U$ does not intersect a ball $B(Q,r)$, $Q\in \Sigma_V$ with $r$ going to infinity as $Q$ goes to infinity). A compactness argument then shows that the (strictly positive) minimum is attained in some bounded region.

In the general (curved surface) case, a part from the compactness problem which may be difficult to show you may look at two Lagrange multipliers and look for extremal values of the function $$F(A,B,\lambda,\mu)=(A-B,A-B)+\lambda U(A) + \lambda V(B).$$ This gives rise to the two equations: $$A-B = \lambda \nabla U(A) \ \ , \ \ A-B = \mu \nabla V(B) $$ which should be solved under the constraints $U(A)=0$ and $U(B)=0$. As explained above this happens (because of $\Sigma_V$ being a plane) to be the same as finding the zero of the cross-product etc...

  • 0
    This seems like a very sophisticated answer.... I'm sure in time I'll be able to appreciate it more. Thank you for your input.2017-02-04
-1

You have correctly identified that the normal to the bottom surface is $(1, 1, -2)$. You have correctly identified that the only point on the top surface with the same normal (up to scaling) is $(\frac14, \frac14, \frac18)$, which I will call $P$. It remains to find the point on the bottom surface that is closest to $P$.

We can rewrite the formula for the bottom surface as $z = \frac12(x+y-8)$. As we vary $x$ and $y$, the point $Q = (x, y, \frac12(x+y-8))$ explores the whole surface. The distance we need to minimise is

$$|PQ| = \sqrt{(x-\frac14)^2 + (y-\frac14)^2 + (\frac12(x+y-8)-\frac18)^2}$$

For the sake of an easy life, let's minimise $|PQ|^2$ instead.

$$\begin{eqnarray} \text{d}|PQ|^2 &=& 2(x-\frac14)\text{d}x + 2(y-\frac14)\text{d}y + 2(\frac12(x+y-8)-\frac18)(\text{d}x + \text{d}y) \\ &=& (2x-\frac12+x+y-8+\frac14)\text{d}x + (2x-\frac12+x+y-8+\frac14)\text{d}y \\ &=& (3x+y-\frac{33}4)\text{d}x + (x+3y-\frac{33}4)\text{d}y \end{eqnarray}$$

This is zero when $3x+y = x+3y = \frac{33}4$, i.e. when $x = y = \frac{33}{16}$. Plugging this into the formula above gives:

$$\begin{eqnarray} |PQ| &=& \sqrt{(\frac{33}{16}-\frac14)^2 + (\frac{33}{16}-\frac14)^2 + (\frac12(\frac{33}{16}+\frac{33}{16}-8)-\frac18)^2} \\ &=& \sqrt{\frac{29^2}{16^2} + \frac{29^2}{16^2} + \frac{33^2}{16^2}} \\ &=& \frac{\sqrt{2771}}{16} \approx 3.290018047062964 \end{eqnarray}$$

  • 1
    This doesn't quite seem correct. I'm also not sure what the $dx$ and $dy$ terms are referring to? Compare your result to Squirtle's and Ahmed S. Attaalla's answers ... both of which are $\frac{31}{4\sqrt{6}} < 3.29\ldots$2017-02-04
  • 0
    Oh dear, I must have slipped up somewhere.2017-02-07