p>
<p>Substituting \ref{eq:tractorvelangular} and \ref{eq:tractorveltranslation} in \ref{eq:kineticenergy} </p>
<p>
    \begin{equation}T = \frac{1}{2} m_{\rm T} \left( \dot{x}^2 + \dot{y}^2 \right) + \frac{1}{2} I_{\rm T} \dot{\psi}^2,\end{equation}
</p>
</p><pre class="codeinput">T = 1/2*mT*(VTdiff*VTdiff.') + 1/2*IT*dPSI^2;
</pre><h2 id="15">Euler-Lagrange</h2><p>
<p>The Euler-Lagrange formulation for this system is</p>
<p>
    \begin{equation}
    \frac{d}{dt} \left( \frac{\partial T}{\partial \dot{q}_k