I have a question regarding a problem which I was able to solve(I don't know the answer though!), but I'm not very clear with the method I've used. The problem goes like this- (x,y) is a pair of two real numbers which satisfies the equation $xy(x-3)(y+3) + 2(x^2+y^2-3x+3y) +4 = 0.$ Now I'm required to find the minimum value of $(x+1)^2 + (y-1)^2.$ This is my approach- Let us draw the first function $xy(x-3)(y+3)=0$ and the second function $x^2+y^2-3x+3y+2=0$,and then we look for the intersections of the two curves to get our required (x,y) pair(s). So, I get 4 such pairs, and regarding the minimum value of $(x+1)^2 + (y-1)^2,$ I use a pair (x,y) which is closest to (-1,1) and obtain an answer(equal to 5). The approach I have used has confused me somewhat- why should the solutions of two curves give me my (x,y) pair in this case? Can't there be any other solutions satisfying the original equation? Is my approach valid, and if not, how should I go about solving this problem?
-
What tools are available to you? Calculus for finding critical points of a function of a single variable? Lagrange multipliers? Something else? – Eric Towers May 21 '20 at 16:06
-
Sorry, I'm just a 12th grader. Can you please use relatively easier techniques? – Abhinav Tahlani May 21 '20 at 16:11
-
Critical points is ok, but I'm not familiar with Lagrange multipliers. – Abhinav Tahlani May 21 '20 at 16:12
1 Answers
First, your constraint equation factors. $$ x y(x-3)(y+3)+2(x^2+y^2-3x+3y)+4 = (x-1)(x-2)(y+1)(y+2) \text{,} $$ So you are required to find the distance to the point(s) on any of the four lines $x = 1$, $x = 2$, $y = -1$, or $y = -2$ which is closest to the point $(-1,1)$. Let's draw a picture.

The constraint is in blue and the point $(-1,1)$ is circled in green. Clearly, the distance from $(-1,1)$ to the blue lines is minimized when a circle centered at $(-1,1)$ has a radius which is perpendicular to at least one of the lines and has the circle meet the lines only tangentially. Setting the radius to $2$, we find two such points of intersection, $(1,1)$ and $(-1,-1)$ and the minimum value of $(x+1)^2 + (y-1)^2$ is $2^2 = 4$.

Now let's see what your procedure does. Your first constraint, $x y (x-3)(y+2)$, is already factored, so is the four lines $x = 0$, $x = 3$, $y = -2$, $y = 0$. Your second constraint is a circle centered at $(-3/2,-3/2)$ with radius $\sqrt{5/2}$. We're already in trouble. The lines $x = 0$ and $y = 0$ are closer to $(-1,1)$ than any of the four lines in the original formulation. You claim to find four points on the intersection of the two curves, but there are six, $(0,-2)$, $(0,-1)$, $(1,0)$, $(2,0)$, $(3,-2)$, and $(3,-1)$, and none of these is either of the two points in the original problem closest to the point $(-1,1)$, so none of these leads to a correct solution. Plotting the new largely unrelated problem you solved, we obtain

The blue lines are your first constraint. The orange circle is your second constraint, and the point $(-1,1)$ is again circled in green. The intersections of the blue lines and orange circle are the six points your constraints allow. I hope it is easy to see that none of the six points correspond to a correct solution of the given problem.
Your approach is not valid. Perhaps the easiest way to see this is that there are more ways than the way you picked for the constraint to be met. You required that two pieces of the constraint be simultaneously zero, but this need not be the case. What if \begin{align*} x y (x-3)(y+2) &= -1 \text{ and } \\ 2(x^2 + y^2-3x+3y)+4 &= 1 \text{?} \end{align*} Their sum, the original constraint, is still zero, but the two pieces that you have chosen to be zero need not be zero.
Is there an algebraic way to attack this problem that doesn't involve an invalid partition of the constraint? Yes.
We wish to minimize $(x+1)^2+(y-1)^2$ subject to $x y(x-3)(y+3)+2(x^2+y^2-3x+3y)+4 = 0$. If we can factor the constraint, we finish immediately.
Can factor constraint: We find the constraint is $(x-1)(x-2)(y+1)(y+2) = 0$. A product is only zero if one (or more) of its factors is zero, so we examine
- $x-1=0$, so $x = 1$. Putting this in the objective function, we obtain $(1+1)^2+(y-1)^2$, which is minimized when $y = 1$, giving the point $(1,1)$ of distance $2$ from $(-1,1)$. This is the minimum distance to one component of the constraint, but the minimum distance to another component could be smaller, so we check all the components.
- $x-2=0$, so $x = 2$. Putting this in the objective function, we obtain $(2+1)^2+(y-1)^2$, which is minimized when $y = 1$, giving the point $(2,1)$ of distance $3$ from $(-1,1)$. This is not less than the distance $2$ found previously.
- $y+1=0$, so $y = -1$. Putting this in the objective function, we obtain $(x+1)^2+(-1-1)^2$, which is minimized when $x = -1$, giving the point $(-1,-1)$ of distance $2$ from $(-1,1)$. This is not less than the distance $2$ found previously.
- $y+2=0$, so $y = -2$. Putting this in the objective function, we obtain $(x+1)^2+(-2-1)^2$, which is minimized when $x = -1$, giving the point $(-1,-2)$ of distance $3$ from $(-1,1)$. This is not less than the distance $2$ found previously.
So we find the minimum distance is $2$ and the minimum value of $(x+1)^2+(y-1)^2$ is the square of this, so is $4$.
Cannot factor the constraint: Reframe the question: "On the intersection of the cone $(x+1)^2+(y-1)^2 = z^2$ with the constraint $x y(x-3)(y+3)+2(x^2+y^2-3x+3y)+4 = 0$, what is the minimal value of $z^2$?" As a picture, standing a little off the $z$-axis and looking down at the $xy$-plane.

First, let's try $z^2 = 0$: Does $(-1,1)$ satisfy the constraint? $$ (-1)(1)(-1-3)(1+3)+2((-1)^2+(1)^2-3(-1)+3(1))+4 = 36 \neq 0 \text{,} $$ so $z^2 > 0$.
Let's take our constraint, which we know is zero, and divide out the objective, which we know is not zero, using polynomial division with respect to the variable $x$. (We can perform division with respect to $y$, but we get pretty much the same thing.) (This is a fairly common process, but it is described in various ways "recognizing combinations of the variables in the constraint that match the objectice", "(partially) matching coefficients", and other names describing manipulations that effectively determine how the objective appears in the constraint.) \begin{align*} 0 &= \frac{x y(x-3)(y+3)+2(x^2+y^2-3x+3y)+4}{(x+1)^2+(y-1)^2} \\ &= y^2 + 3y+2 + \frac{x \left(-5 y^2-15 y-10\right)-y^4-y^3+4 y^2+4 y}{(x+1)^2+(y-1)^2} \\ &= (y+2)(y+1) + \frac{-5x (y+2)(y+1) - y^3(y+1) + 4 y(y+1)}{(x+1)^2+(y-1)^2} \\ &= (y+2)(y+1) + \frac{(y+1) \left( -5x (y+2) - y^3 + 4 y \right)}{(x+1)^2+(y-1)^2} \\ &= (y+2)(y+1) + \frac{(y+1) \left( -5x (y+2) - (y^2-2y)(y+2) \right)}{(x+1)^2+(y-1)^2} \\ &= (y+2)(y+1) + \frac{(y+1)(y+2) ( -5x-y^2+2y)}{(x+1)^2+(y-1)^2} \\ &= (y+2)(y+1)\left( 1 + \frac{ -5x-y^2+2y}{(x+1)^2+(y-1)^2} \right) \text{.} \end{align*} This is zero when one (or more) of the three factors is zero. The factors $y+2$ and $y+1$ can be applied to the objective function to find the minimum exactly as we did in the "can factor constraint" case, above. But we need to check the third factor to ensure it doesn't give a smaller minimum. So, suppose, \begin{align*} 0 &= 1 + \frac{-5x-y^2+2y}{(x+1)^2+(y-1)^2} \text{,} \\ -1 &= \frac{-5x-y^2+2y}{(x+1)^2+(y-1)^2} \text{,} \\ 1 &= \frac{5x+y^2-2y}{(x+1)^2+(y-1)^2} \text{,} \\ (x+1)^2+(y-1)^2 &= 5x+y^2-2y \text{,} \end{align*} valid because $(x+1)^2+(y-1)^2 = z^2 > 0$. Continuing, \begin{align*} x^2+2x+1 + y^2-2y+1 &= 5x+y^2-2y \text{,} \\ x^2-3x+1 + 1 &= 0 \text{, and } \\ (x-2)(x-1) &= 0 \text{.} \end{align*} We check these two factors in the same manner as the "can factor constraint" case above.
- 67,037
-
1Thanks a lot! There was a lot of stuff to read, but it was worth it. It has helped me a lot to find out the problem with my approach, and how to tackle such problems in future. Thanks again! – Abhinav Tahlani May 22 '20 at 08:07