I'm trying to work out some of the details for this system. A particle with mass $\mu$, initial velocity $v_0$ at $x_0$ and moving freely between two walls located at $\pm L/2$, with which it bounces elastically. Heuristically, I've got the equations of motion:
$$\begin{align}x(t) &= \frac{L}{\pi} \arcsin \{\sin\left[\frac{\pi}{L}\left(v_0 t + x_0\right)\right]\} \\ \dot x(t) &= v_0 \mathrm{sgn}\{\cos\left[\frac{\pi}{L}\left(v_0 t + x_0\right)\right]\}\end{align}$$
But I'm wondering if there's a way to get there from the Hamiltonian:
$$\frac{\mu \dot x^2}{2}+\alpha \mathrm{\theta}\left(x^2-\frac{L^2}{4}\right)=\frac{\mu v_0^2}{2}$$
Where $\theta(x)$ is the Heaviside function and $\alpha > \frac{\mu v_0^2}{2}$. Or from Newton's second law:
$$\mu\ddot x=-2\alpha x\delta\left(x^2-\frac{L^2}{4}\right)$$
My attempts so far:
1) solving for the velocity from the energy equation (assuming the motion starts at $t=0$):
$$\begin{align} \mathrm{sgn}(v_0)\sqrt{\frac{2}{\mu}}t&=\int_{x_0}^{x(t)}\frac{dx}{\sqrt{\frac{\mu v_0^2}{2}-\alpha\theta\left(x^2-\frac{L^2}{2}\right)}}\\ v_0t&=\int_{x_0}^{x(t)}\frac{dx}{\sqrt{1-\frac{2\alpha}{\mu v_0^2}\theta\left(x^2-\frac{L^2}{2}\right)}} \\ v_0t+x_0&=\mathrm{sgn}(v_0)\frac{L}{2}+\mathrm{sgn}(v_0)L\sum_{n=1}^{\lfloor\frac{v_0t+x_0}{L}\rfloor} (-1)^n +x(t)-(-1)^{\lfloor\frac{v_0t+x_0}{L}\rfloor}\mathrm{sgn}(v_0)\frac{L}{2}\\ \therefore x(t)&=v_0t+x_0-\mathrm{sgn}(v_0)L\left(\frac{1-(-1)^{\lfloor\frac{v_0t+x_0}{L}\rfloor}}{2}+\sum_{n=1}^{\lfloor\frac{v_0t+x_0}{L}\rfloor} (-1)^n\right)\end{align}$$
This can't be true since clearly the rhs is allowed to be greater than $L/2$
2) working with Laplace transform
$$\begin{align}\mathcal{L}[\mu\ddot x &=-2\alpha x\delta\left(x^2-\frac{L^2}{4}\right)]\\ s^2\tilde{x}-sv_0-x_0 &=-2\frac{\alpha} {\mu} \int_0^\infty x\delta\left(x^2-\frac{L^2}{4}\right)\mathrm{e}^{st}dt\\ &=-\frac{2\alpha}{\mu L}\int_0^\infty \left(\sum_n\frac{\delta\left[t-x^{-1}_n(L/2)\right]}{|\dot x[x^{-1}_n(L/2)]|}+\sum_m\frac{\delta\left[t-x^{-1}_m(-L/2)\right]}{|\dot x[x^{-1}_m(-L/2)]|}\right)x\mathrm{e}^{st}dt\\ &= \frac{\alpha} {\mu} \left(\sum_n\frac{\exp\left[sx^{-1}_m(-L/2)\right]}{|\dot x[x^{-1}_m(-L/2)]|}-\sum_m\frac{\exp\left[sx^{-1}_n(L/2)\right]}{|\dot x[x^{-1}_n(L/2)]|}\right)\end{align} $$ $$\therefore x(t)=v_0t+x_0+ \frac{\alpha} {\mu} \left(\sum_n\frac{\left[t-x^{-1}_m(-L/2)\right]\theta\left[t-x^{-1}_m(-L/2)\right]}{|\dot x[x^{-1}_m(-L/2)]|}\\-\sum_m\frac{\left[t-x^{-1}_n(L/2)\right]\theta\left[t-x^{-1}_n(L/2)\right]}{|\dot x[x^{-1}_n(L/2)]|}\right)$$ Here $x_n^{-1}[x(t)]=t$ $\forall n$.
I don't have any idea on how to work out the inverse functions.
3) working with the Fourier transform:
In a similar way as the previous case, the final result is:
$$x(t)= \frac{\alpha} {\mu} \left(\sum_n\frac{|t-x^{-1}_m(-L/2)|}{|\dot x[x^{-1}_m(-L/2)]|}\\-\sum_m\frac{|t-x^{-1}_n(L/2)|}{|\dot x[x^{-1}_n(L/2)]|}\right)$$
Any input is really appreciated.