# Could not able to set up a differential equations using EulerEquations command

I have a constructed the Lagrangian of a mechanical system by finding the kinetic and potential energy of the system. Then I tried using EulerEquations to set up a differential equation by taking the variation but seem like it is not working. How to carry out this?

ClearAll["Global*"];
<< VariationalMethods
e1 = 0.5*\[Rho]*a*Integrate[(D[W[x, t], {t, 1}])^2, {x, 0, L1}]
e2 = 0.5*Y*Iyy*Integrate[(D[W[x, t], {x, 2}])^2, {x, 0, L1}]
e3 = 0.5*\[Rho]*a*Integrate[(D[U[y, t], {t, 1}])^2, {y, 0, L2}]
e4 = 0.5*Y*a*Integrate[(D[U[y, t], {y, 1}])^2, {y, 0, L2}]
T = e1 + e3;
V = e2 + e4;
Lg = T - V;
EulerEquations[Lg, {W[x, t], U[y, t]}, {x, y, t}]

• Lagrangian is written incorrectly. – Alex Trounev Jun 3 at 17:53

If I understand correctly, here should be a system of equations describing the oscillations of the beam. Then Lagrangian and equations have the form

<< VariationalMethods
e1 = 0.5*\[Rho]*a*(D[W[x, t], {t, 1}])^2;
e2 = 0.5*Y*Iyy*(D[W[x, t], {x, 2}])^2;
e3 = 0.5*\[Rho]*a*(D[U[x, t], {t, 1}])^2;
e4 = 0.5*Y*a*(D[U[x, t], {x, 1}])^2;
T = e1 + e3;
V = e2 + e4;
Lg = T - V;
EulerEquations[Lg, {W[x, t], U[x, t]}, {x, t}]
` 