[Math] Smallest possible distance between two functions

functionsgeometry

Find the smallest distance between the parabolas $P_1$ and $P_2$:

$$
\displaystyle P_1:y=x^2-1\\
P_2:y=2x^2
$$
That is, find the smallest possible distance between a point on $P_1$ and a point on $P_2$.


Here's what I got so far:
Let a point on $P_1$ be ($x_1, x_1^2-1$) and a point on $P_2$ be ($x_2, 2x_2^2$).
Applying the distance formula,
$$
\begin{align}
d &= \sqrt{(x_1-x_2)^2+(x_1^2-1-2x_2^2)^2}\\
&= 4x^4_2+5x_2^2-4x_1^2x^2_2-2x_1x_2
\end{align}
$$
After this, I don't know how to minimize this expression, any help would be appreciated.

Best Answer

Are you sure that your expression for $d^2$ is correct? I get $(x_1)^4+4(x_2)^4-4(x_1)^2(x_2)^2-(x_1)^2+5(x_2)^2-2x_1x_2+1$, but I may have made a mistake.

Assuming your $d^2$ is correct (though I'm pretty sure it's not): consider the square of the distance formula as a function of $x_1$ and $x_2$ (which you've already got): $f(x_1, x_2) = 4(x_2)^4 + 5(x_2)^2-4(x_1)^2(x_2)^2-2x_1x_2$.

Now use $\frac{\partial f}{\partial{x_1}}$ and $\frac{\partial f}{\partial{x_2}}$ to find where the critical points of the function are (i.e., set both partial derivatives equal to $0$ and solve the system of equations). So, we have $2(8(x_2)^3-4x_2(x_1)^2+5x_2-x_1) = 0$ and $2(-x_2 - 4x_1(x_2)^2) = 0$.

Solving that system of equations will yield values of $x_1$ and $x_2$ that minimize $f(x_1, x_2)$, which minimizes $d^2$. From there you can get $d$.

Even if your expression for $d^2$ is incorrect, it's still the same idea to find the critical points.

Edit: your expression for $d^2$ is definitely incorrect. Going through this process with your expression gives the correct values ($x_1 = 0$ and $x_2 = 0$) but it also yields $d = 0$, which is obviously wrong as you can show very easily that these parabolas never meet (try to set them equal to each other and solve for $x$).