Ball rolling in a cylindrical trough I am trying to understand an interesting effect I observed while playing with my  kids' toys (video). The energy in this system seems to slosh back and forth between the trough and the ball, with the ball periodically almost coming to rest. I'm hoping to get a better understanding by developing the dynamics equations describing the system.
The problem can be reduced to two dimensions since the center of mass of the ball and the trough move in the same plane (assuming the ball starts in the center of the trough).

The equations for the motion of the trough alone are relatively easy to compute (equations). I extended the Lagrangian approach to include the ball. This is also relatively straightforward since potential and kinetic energies are just the sums of the corresponding energies for the ball and the trough.
$$
T_t=\frac 12\,{\dot\varphi }^{2} \left( M{R}^{2}-2\,M\,R\,c\cos \left( \varphi 
 \right) +M{c}^{2}+I_{{C}} \right)
$$
$$
U_t=M\,g \left( R-c\cos \left( \varphi  \right)  \right) 
$$
where $\phi$ is the angle between the vertical and radius through the center of mass, $M$ is the mass of the trough, $R$ is its radius, $c$ is the distance of the center of mass from the cylinder's (encompassing the trough) axis of symmetry and $I_C$ is the moment of inertia of the trough about its center of gravity.
For the ball I'm getting
$$
T_b=\frac 12\, Ib \left(\frac{\dot{\psi} R}{2 \pi  r}\right)^2+\frac{1}{2} m \left((\sin (\phi+\psi) (\dot{\phi} R+\dot{\psi} (R-r)))^2+(\cos (\phi+\psi) (\dot{\phi} R+\dot{\psi} (R-r))-\dot{\phi} R)^2\right)
$$
$$
U_b=m\, g\, R (1 - \cos(\phi + \psi))
$$
where $\psi$ is the angle between the radii through the center of mass of the ball and through the center of mass of the trough, $m$ is the mass of the ball, $r$ is its radius, $Ib$ is its moment of inertia. The complicated bit seems to be getting the kinetic energy right since the velocity of the ball is the combination of the ball's center of mass due to the rolling motion of the ball and the velocity of the point of contact between the ball and the trough wall. Well, and the kinetic energy due to the ball's rotation.
Forming the Lagrangian
$$
L=T_t+T_b-(U_t+U_b)
$$
and solving the system of resulting equations
$$
\frac{\partial L}{\partial q}-\frac{d}{dt}\frac{\partial L}{\partial \dot{q}}=0
$$
where $q=(\phi,\psi)$, I get a system of second order ODEs. Solving the equations numerically (using Mathematica), I get solution plots for $q$ that look like:

This, however, does not match observed experiments in which the amplitudes of the oscillations of the ball and the trough grow and decay out of phase. It seems unlikely (though perhaps possible) that these changes in amplitude are caused by friction, which is not modeled in the above equations. If the amplitude modulation is not due to friction there must be a bug in my energy equations that I'm failing to spot.

Energy plot looks constant within the numerical precision:

 A: $\def \b {\mathbf}$

starting with the position vector $~\b R_b~$ to the cylinder  CM
$$\b R_b=\b R_p+\b R_c+\b R_r=
 \left[ \begin {array}{c} R\varphi -\sin \left( \psi \right) R+\sin
 \left( \psi \right) r\\  R-\cos \left( \psi \right) 
R+\cos \left( \psi \right) r\end {array}
 \right] 
$$
where
(equations)
$$\b R_p= \left[ \begin {array}{c} R\,\varphi-c\sin \left( \varphi  \right) 
\\ R-c\cos \left( \varphi  \right) \end {array}
 \right]\\
\b R_c=\left[ \begin {array}{c} c\sin \left( \varphi  \right) 
\\  c\cos \left( \varphi  \right) \end {array}
 \right] 
\\
\b R_r= \left[ \begin {array}{c} - \left( R-r \right) \sin \left( \psi
 \right) \\ - \left( R-r \right) \cos \left( \psi
 \right) \end {array} \right] 
 $$
thus the kinetic energy $~T_b~$ and the potential energy $~U_b~$ are:
$$T_b=\frac 12 \,m\b v_b\cdot\b v_b+\frac 12 I_b\dot\phi^2\\
U_b=m\,g\,\left(R_b\right)_y$$
where
$$\b v_b=\frac{\partial \b R_b}{\partial \varphi}\,\dot\varphi+
\frac{\partial \b R_b}{\partial \psi}\,\dot\psi$$
additional from the rolling condition you obtain
$$|\b v_b|-r\,\dot\phi=0\quad,\dot\phi=\frac 1r\,|\b v_b|$$
with
$$T_p=\frac 12\,{p\varphi }^{2} \left( M{R}^{2}-2\,MRc\cos \left( \varphi 
 \right) +M{c}^{2}+{\it Ic} \right) +\tau p\,\varphi 
\\
U_p=Mg \left( R-c\cos \left( \varphi  \right)  \right)$$
you obtain the Lagrange $~\mathcal L=~T_b+T_p-(U_p+U_b)~$ and the equations of motion $~\ddot\varphi=\ldots~,\ddot\psi=\ldots~$
The numerical  simulation
Initial conditions
$$[\varphi  \left( 0 \right) = 0.5,\mbox {D} \left( \varphi  \right) 
 \left( 0 \right) =0,\psi \left( 0 \right) = 0.0,\mbox {D} \left( \psi
 \right)  \left( 0 \right) =0]
$$
Center of mass Position (Vector $~\b R_p~$)

Center of mass Position (Vector $~\b R_b~$)

the generalize coordinates $~\varphi(t)~\psi(t)~$

