Code Not Working Solving Euler Lagrange Equations R Mathematica

Code Not Working Solving Euler Lagrange Equations R Mathematica