# Analytical solution of Liouville's equation for classic harmonic oscillator

I'm interested in the analytical solution of the simple PDE:

$$\frac{\partial f}{\partial t} - m\omega^2x\frac{\partial f}{\partial p}+ \frac{p}{m} \frac{\partial f}{\partial x} ~=~ 0.\tag{1}$$

With: $$f(x,p;t\!=\!0)~=~f_0(x,p) \quad \mbox{arbitrary smooth},\tag{2}$$ $$x(t)~=~x_0 \cos(\omega t) + \frac{p_0}{m\omega}\sin(\omega t),\tag{3}$$ $$p(t)~=~p_0 \cos(\omega t) - m\omega x_0 \sin(\omega t).\tag{4}$$

And $$x_0, p_0$$ constants.

1. OP's eq. (1) is the equation for a constant of motion $\frac{df}{dt}=\{f,H\}_{PB}+\frac{\partial f}{\partial t}=0$ of a harmonic oscillator $H=\frac{p^2}{2m}+\frac{1}{2}m\omega^2 x^2$.
2. Let us assume for simplicity that $m\omega=1$, and leave it to the reader to generalize to arbitrary $m$ and $\omega$.
3. Complexify $z=x+ip\in\mathbb{C}$. Then the solutions (3) and (4) read $z(t)=e^{i\omega t}z_0$.
4. The solution $f(z,t)$ to eq. (1) with initial condition (2) is then $f(z,t)=f_0(e^{-i\omega t}z)$.
• Also, if $f$ is a constant of the motion, then why on earth does it depend on time? If I have $\frac{df}{dt} = 0$ then what is stopping me from concluding $f(x,p,t)=C=const$? Nov 8, 2014 at 20:22