A small ball moves at a constant velocity $v$ along a horizontal surface and at point $A$ falls into a vertical well of depth $H$ and radius $r$. the velocity of the ball forms an angle $\theta$ with the diameter of the well drawn through point $A$. Determine the relation between $v,H,r,\theta$ for which ball can "get out" of the well after elastic impacts with walls (friction losses should be neglected)
The answer is $\dfrac{nr\cos\theta}{v}=k\sqrt{\frac{2H}{g}}$, where $n,k$ are integers and mutually prime numbers
My question is :
Since collisions are elastic, velocity while falling should get conserved and help the ball to come out and even there is no force changing velocity in horizontal direction, so the ball should come out of the well/ditch without any mathematical condition, but this does not happen in my book--a particular condition is given.
I want PSE to tell me why is there a particular condition for ball to come out. Why can't the ball come out if it is thrown at any angle, at any velocity in the well?
EDIT
I got a beautiful answer from you guys but still want to ask:
Why do we need a condition for the ball to come out of the well? The vertical component of velocity after the ball hits the ground of the well gets turned and that will bring the ball back up, and I don't see any kind of force stopping the ball from getting out of the well.