The system is placed on a vertical plane and composed of a homogeneous bar of mass m and length l which can only rotate about its baricenter at the origin. A particle P of mass m can move along the bar. Two springs are shown with constant $k>0$ The spring at B stays always vertical. The other spring connects the particle with the origin $O$. Using as lagrangian coordinates the angle $\theta$ and the distance $OP=s$ along the bar. $-l/2 \leq s \leq l/2$
Determine the Lagrange equations

MY SOLUTION:
The potential of the system is: $ U(\theta, s) = mgs \cos \theta − \frac 18kl^2 \cos^2 \theta − \frac 12 ks^2 + C$
(Note :in my course the relation between potential and force is with a + sign, for instance $\dfrac {\partial U}{\partial \theta} =F_{\theta}$, so the Langrangian is L=T+U)
The kinetic energy of the system is
$T= \dfrac 1{24}ml^2 \dot\theta^2 +\dfrac 12m(\dot s^2+s^2\dot \theta^2)$
The Lagrange equations I found are:
$\dfrac 1{12}ml^2 \ddot \theta+2ms\dot\theta\dot s +m s^2\ddot \theta=-mgs\sin \theta -\dfrac 14 kl^2\sin\theta\cos \theta$
$m\ddot s -ms\dot\theta^2=mg\cos\theta-ks$
Instead the answer from my lecture notes is the one in the picture below. Did I make some mistake or is the lecture notes' answer wrong? ( I found the same answer as the notes for $U $ and $T$ )
