Solution (source code)

= Solution

For fixed endpoint variations, the <Euler-Lagrange equations> are
$$
\boxed{\frac{d}{dt}\frac{\partial L}{\partial\dot q_i}-\frac{\partial L}{\partial q_i}=0,\qquad i=1,\ldots,n.}
$$
Indeed the <first variation> is $\int\sum_i(L_{q_i}\delta q_i+L_{\dot q_i}\delta\dot q_i)dt$. <Integration by parts> removes the <derivatives> from the variations; their zero endpoint values remove the boundary term. The fundamental lemma then makes every remaining coefficient vanish.