I'm trying to solve the following problem:
A non-relativistic electron is moving in elliptical motion inside a positively charged cylinder of homogenous charge density $\rho$. The initial radius vector and velocity of the electron are $\mathbf r_0$ and $\mathbf v_0$. Find the energy radiated due to dipole radiation during one period of motion of the electron.
Solution: $\;\;\;\;\;E_{radiated}=\frac{2\pi e^2 \omega}{3c^3}(\omega^2r_0^2+v_0^2),\;\;\;\omega^2=\frac{4\pi\rho|e|}{3m}$
My attempt and where I'm stuck
The law of dipole radiation states that
$$\frac{d E_{radiated}}{dt}=\frac{1}{6\pi\epsilon_0 c^3}|\mathbf{\ddot{p}}|^2,$$ so the energy radiated during one revolution of the electron is
$$E_{radiated} = \frac{1}{6\pi\epsilon_0 c^3}\int_0^\tau|\mathbf{\ddot{p}}|^2 dt,\tag{1}$$ where $\tau$ is the period of rotation.
To find the dipole moment of the electron, $\mathbf{p} = e\mathbf r$, I decided so solve for $\mathbf r $ via second Newton's law, $m\mathbf{\ddot{r}} = \mathbf F$, where via Gauss law I found the field inside the cylinder to be $\mathbf E = \frac{\rho}{2\epsilon_0}r_c\mathbf e_{r_c}$, so finally $$m\mathbf{\ddot{r}} = \frac{e\rho}{2\epsilon_0}r_c\mathbf e_{r_c}\tag{2}$$
Solving (2), I found that the $x$ and $y$ component of the electron are obeying simple harmonic motion, while in the $z$ direction the electron in moving uniformly:
$x(t) = A_x\cos(\omega t)+ B_x\sin(\omega t),\tag{3}$ $y(t) = A_y\cos(\omega t)+ B_y\sin(\omega t),\tag{4}$ $z(t) = A_z + B_z t,\tag{5}$
where $\omega^2 = \frac{\rho |e|}{2m \epsilon_0}$.
Following the condition stated in the problem that the motion is elliptical, I assume $A_z = B_z = 0$. Also, following the initial conditions for radius vector and velocity, it is obvious that $A_x^2 + A_y^2 = r_0^2$ and $B_x^2 + B_y^2 = \frac{v_0^2}{\omega^2}$.
This is as far as I got. To solve the integral in (1), I would need to find the period $\tau$, or to find $r(\varphi)$ and integrate from 0 to $2\pi$, and I don't know how to do either of those two things.
Any help would be appriciated.