# A ping-pong ball lying inside a wine glass

Show that a ping-pong ball with radius $r$, lying inside a wine glass described by the function $x^2$, has its center at $r^2+\frac{1}{4}$ units above the bottom of the glass.

Here is a visualization of the problem My best attempt is trying to find the derivative of the circle and the function to find some relationship at the point where they meet. The problem looked very simple at first, but I can't figure it out now.

• This should be fun with the geometric definition of a parabola - just an idea. Sep 25 '16 at 18:30
• This is not actually true if the ping-pong ball is very small--imagine a ball the size of a grain of sand inside of a real wine glass. If $r$ is small enough, then the ball will only touch the parabola at a single point (the parabola's vertex, or in other words the origin), and the center will be at $(0, r)$. We change from one situation to the other exactly where $r = r^2 + \frac{1}{4}$--that is, at $r = \frac{1}{2}$. Sep 25 '16 at 20:13
• Next question: If $x^2$ is a wine glass, what value $k$ in $x^{2k}$ creates the perfect whiskey glass?
– null
Sep 26 '16 at 22:29

Solution: Let the circle's equation be $$(x)^2+(y-k)^2=r^2$$ and the Parabola's equation be $$y=x^2$$ Then due to the symmetry of the Parabola both the curves will meet at the points $(a,b)$ and $(-a,b)$. Consequently, $b=a^2$ and $a^2+(b-k)^2=r^2$.Substituting for $a^2$ in the second equation, we get: $$b+(b-k)^2=r^2$$ Moreover, since the Parabola is tangent to the circle, the gradient at these points is the same. This implies that $2a=\frac{a}{k-b}$, which further implies that $k-b=1/2$ as $a\neq0$. Now, using the two results we can conclude that $b=r^2-1/4$ which implies that $k=r^2+1/4$. The value of $k$ gives you how high the circle is above the x-axis.

We can prove this result by invoking the geometrical properties of a parabola, with resort to minimal calculation. Specifically, I will use two well known properties:

1. Any point on a parabola is equidistant from its focus and directrix. (Follows from the definition of parabola.)

2. Let $$A$$ lie on a parabola with focus $$F$$ and directrix $$\ell$$. Then the tangent to the parabola at $$A$$ bisects $$\angle FAA'$$,where $$A'$$ is the projection of $$A$$ on $$\ell$$. (Well-known, see this page at cut-the-knot for a proof.) Now suppose $$C$$ is the center of the circle (the ping-pong ball) and $$A$$ is the point where it touches the parabola in the 2nd quadrant. Now let $$X,Y$$ be the projections of $$A$$ onto $$\ell$$ (the directrix of the parabola) and the axis of the parabola respectively. Also, let $$F$$ be the focus of the parabola. From the parabola $$y=x^2$$, we'll just take the fact that $$FF'=\frac12$$ and that $$O$$ bisects $$FF'$$, and then forget the axes.

Now let $$AX=x$$, then from property $$1$$, $$AF=x$$. Also, the dashed line $$t$$, the tangent to $$\odot(C)$$ and the parabola at $$A$$, bisects $$\angle FAX$$ (property $$2$$), and is perpendicular to the radius $$AC$$, so $$AC$$ is the external bisector of $$\angle FAX$$. (Note that this also follows from the optical property of parabola.) Therefore $$\angle FAC=\angle PAC=\angle ACF$$ (since $$AP||CF$$)$$\implies FC=FA=x$$.

Now we are ready to begin the few computations. $$FY=YF'-FF'=AX-FF'=x-\frac12$$, $$CY=CF-FY=x-\left(x-\frac12\right)=\frac12$$. Now from Pythagoras' theorem, \begin{align*}AY^2=&AF^2-FY^2=AC^2-CY^2\\ \implies & AC^2-CY^2=AF^2-FY^2\\ \implies &r^2-\left(\frac12\right)^2=x^2-\left(x-\frac12\right)^2\\ \implies &r^2=x.\end{align*}

Therefore the desired distance $$CO=CF+FO=x+\frac14=r^2+\frac14$$. $$\blacksquare$$

In alternative, without using calculus, starting as in the answer by Shrey Aryan $$\left\{ \begin{gathered} x^2 + \left( {y - k} \right)^2 = r^2 \hfill \\ y = x^2 \hfill \\ \end{gathered} \right.$$ replace $x^2$ with $y$ $$y + \left( {y - k} \right)^2 = r^2 \quad \Rightarrow \quad y^2 + \left( {1 - 2k} \right)y + k^2 - r^2 = 0$$ this gives you the two values of the ordinate of the crossing points. Impose that they be coincident, i.e. that the discriminant be null $$\left( {1 - 2k} \right)^2 - 4\left( {k^2 - r^2 } \right) = 0\quad \Rightarrow \quad k = \frac{1} {4} + r^2$$

Note
To take into consideration the comment by mathmandan, note that the solutions to the quadric equation in $y$ are: $$y = \frac{{2k - 1 \pm \sqrt {\left( {2k - 1} \right)^2 - 4\left( {k^2 - r^2 } \right)} }} {2}$$ and for $k<1/2$ , and discriminant positive, one of them is negative, which therefore is to be discarded. So, either you have no common points (negative discriminant) , or two coincident at $y=0$ and $k=r$, or two crossing points when $k<r$.
Since the radius of curvature at the vertex of the parabola is $1/2$, for values of $r$ lower than that, you will have only one contact point.

The point on a parabola is $\left(x,x^2\right)$, the normal at this point has direction $(-2x,1)$. That is, the normal is parametrized by $$\left(x-2xt,x^2+t\right)$$ The point on the axis of the parabola ($x=0$) is at $t=\frac12$: $$\left(0,x^2+\tfrac12\right)$$ The distance from $\left(0,x^2+\tfrac12\right)$ to $\left(x,x^2\right)$ is $r=\sqrt{x^2+\frac14}$ . This is the radius of a ball that would be tangent to the parabola at $\left(x,x^2\right)$. The center of this ball would be at $$\left(0,r^2+\tfrac14\right)$$ as long as $r\ge\frac12$. When $r\lt\frac12$, then $x=\sqrt{r^2-\frac14}$ is not real. Then the ball sits on the bottom of the glass; its center at $$(0,r)$$ Here is a plot of the glass and balls of radius $\left\{\frac14,\frac12,1,2\right\}$: The general circle of the form $x^2 + (y-b)^2 = r^2$ with center on the $y$-axis intersects the general parabola $y = a x^2$ at four points (allowing for repeated intersections, complex intersections, and infinite intersections).

It's pretty easy to solve for them: we can rewrite the circle equation as

$$\frac{1}{a} y + (y-b)^2 = r^2$$ $$y^2 + \left( \frac{1}{a} - 2b \right) y + (b^2 - r^2) = 0$$

which lets us solve for the $y$ coordinates. Then $y=ax^2$ lets us solve for the $x$ coordinates.

The configuration you're looking for has the circle tangent to the parabola: that means each intersection is a double point — all four intersection points must have the same $y$ coordinate. By the quadratic formula, the two solutions we get for $y$ are the same when

$$\left(\frac{1}{a} - 2b \right)^2 - 4 (b^2 - r^2) = 0$$

I'll leave it to you to plug in the knowns and solve for the unknowns.

There is a solution using the concept of envelope. Indeed, parabola $$P$$ with equation $$y=x^2$$ can be considered as the envelope of all possible ping-pong balls with generic equation:

$$x^2+(y-f(r))^2=r^2$$

where we have to check that $$f(r)=r^2+\frac14$$.

The classical method for the determination of envelopes is obtained by working with a system of 2 equations, the initial one (1) and the equation obtained by differentiating it with respect to the parameter, here $$r$$, which is :

$$-2(y-f(r))f'(r)=2r\tag{2}$$

Extracting

$$y-f(r)=-\ \dfrac{r}{f'(r)}\tag{3}$$

and plugging this expression into (1), we get

$$x^2=r^2-\left(\dfrac{r}{f'(r)}\right)^2\tag{4}$$

Replacing now $$y$$ in the LHS of (3) by $$x^2$$ in (4), we get:

$$r^2-\left(\dfrac{r}{f'(r)}\right)^2-f(r)=-\ \dfrac{r}{f'(r)}$$

which is equivalent to:

$$r^2f'(r)^2-r^2-f(r)f'(r)^2=-rf'(r)$$

We will not solve this differential equation.

It is sufficient to check that $$f(r):=r^2+\tfrac14$$ is a solution.