Euler-Lagrange for constrained system Suppose we have Euler-Lagrange system with generalized coordinate $r_1$ and $r_2$, and input $u_1$ and $u_2$. I know how to prove this system is indeed Euler-Lagrange system.
Suppose now if we have a constraint equation so $r_1=f_1(q)$ and $r_2=f_2(q)$. How would I approach in proving that this constrained system is also Euler-Lagrange?
 A: Try doing direct substitution, if you have $L=L(r_1,r_2,\dot{r}_1,\dot{r}_2;t)$, do the substitution $r_i \rightarrow f_i(q)$ so you have:
$$
L'= L(f_1(q),f_2(q),\dot{f}_1(q),\dot{f}_2(q);t)
$$
and $\frac{df_i}{dt} =\frac{\partial f_i}{\partial q} \frac{dq}{dt} = \frac{\partial f_i}{\partial q} \dot{q}$ assuming $f_i$ doesn't depend explicitly on $t$ and it's continuous derivative, then if you apply the Euler-Lagrange equations, with dependence only in $q$.
So you have then:
$$
\frac{\partial L'}{\partial q} =\frac{\partial L}{\partial r_1}\frac{\partial f_1}{\partial q} + \frac{\partial L}{\partial r_2}\frac{\partial f_1}{\partial q} 
$$
The dependence on $\dot{q}$ is only on the time derivative of $f_i$ and considering $f_i$ has no explicit time dependence:
$$
\frac{d}{dt}\frac{\partial L'}{\partial \dot{q}} = \frac{d}{dt}\left(\frac{\partial L}{\partial \dot{r_1}}\frac{\partial f_1}{\partial q} + \frac{\partial L}{\partial \dot{r_2}}\frac{\partial f_2}{\partial q}\right)  = 
\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{r_1}}\right)\frac{\partial f_1}{\partial q} + \frac{d}{dt}\left(\frac{\partial L}{\partial \dot{r_2}}\right)\frac{\partial f_2}{\partial q}$$
If we unite everything, and factoring:
$$
\frac{\partial L'}{\partial q}-\frac{d}{dt}\frac{\partial L'}{\partial \dot{q}} = \left(\frac{\partial L}{\partial r_1}-\frac{d}{dt}\frac{\partial L}{\partial \dot{r_1}}  \right)\frac{\partial f_1}{\partial q} + \left(\frac{\partial L}{\partial r_2}   -\frac{d}{dt}\frac{\partial L}{\partial \dot{r_2}}\right)\frac{\partial f_2}{\partial q} = 0
$$
As $L$ is a good lagrangian for $r_1$ and $r_2$.
