Solving Particle in a Box using Newtonian Mechanics so I'm trying to solve the one dimensional particle in a box problem known from quantum physics in a classical context. So according to Wikipedia (see picture on the right) we would get a particle that is just moving from one potential-wall to the other.
Usually, when solving such a problem, I just solve the differential equation
$$F=m\ddot{x} \tag{1}$$
Now, the particle in a box is given by
$$ V(x) = \begin{cases} 0, & 0 < x < L \\ \infty, & \text{else} \end{cases} \tag{2}$$
The energy of the particle is given by 
$$ E_{\text{tot}} = \frac{1}{2}mv^2 + V(x) $$
Now, if we place the particle in that box and it has no initial momentum, the total energy is zero and it won't ever move - no? So I guess, without external "help", the particle won't ever start oscillating between the wall. So let's assume it has some initial momentum $p_0=mv_0$
Further we have
$$ F=-\frac{d}{dx}V \tag{4}$$
I'm really to scared to derive infinity - how do I approach (4) mathematically? For now, let's just assume we get an force like:
$$ F=\begin{cases} 0, & 0 < x < L \\ -a, & \text{else} \end{cases} \tag{5} $$
so we get (for init. cond. $x_o, v_0$)
$$ m\ddot{x} = \begin{cases} 0, & 0 < x < L \\ -a, & \text{else} \end{cases} \tag{5}$$
$$ x = \begin{cases} v_0t + x_0, & 0 < x < L \\ \frac{-a}{m}t^2 + v_0t + x_0, & \text{else} \end{cases} \tag{6}$$
which somehow seems odd, doesn't it? The RHS depends on where the particle is... but that's what we actually want to know. So I must do something terribly wrong.
Let's quickly talk about what I expect/how I understand it. If we look at (5) we see $F(0)=-a$ and $F(L)=-a$. At $t=0$ we have $F=-\frac{d}{dt}p_0=0$ so when we hit the right wall, we experience a new for $F(L)=-a$, leading the particle to change the direction instantaneously. What I don't fully get now is: Since the potiential is infinite, won't our kinetic energy explode and won't the particle go to the left infinite fast?
How do I properly solve this classicaly using Newtonian Mechanics?
 A: The details of the acceleration when the ball hits the walls depends on how squishy the ball and walls are. If the ball and the walls are infinitely rigid then the bounce takes zero time and the acceleration is infinite. The trouble is that as you say you get the change in velocity is $\Delta v = \infty \times 0$ and that is undefined.
In practise the ball and walls won't be perfectly rigid and the acceleration will be some complicated function of time as the ball hits the wall, squishes and rebounds again. We will end up with the change in velocity being given by:
$$ \Delta v = \int_{t}^{t+\Delta t} a(t) dt $$
Where $t$ is the time the ball first touches the wall and $t+\Delta t$ is the time the ball leaves the wall again after the bounce.
In practice we generally wouldn't worry about the details. Conservation of energy means the ball has to have the same speed before and after the bounce so the magnitude of the velocity is constant and the direction is reversed. In most cases you can just assume the duration of the bounce is negligible and just take the velocity to be instantly reversed.
