I have a mechanical system as shown in the figure. I have extracted the kinetic and potential energy of the system. Using variational package I can able to get only the governing differential equations. But I am also interested in extracting the Boundary terms. Is there any ways to get the boundary terms using the variational package.enter image description here

<< VariationalMethods`
a[1] = (D[u1[x1, t], {t, 1}])^2;
a[2] = (D[v1[x1, t], {t, 1}])^2;
a[3] = (D[w1[x1, t], {t, 1}])^2;
a[4] = (D[\[Phi]1[x1, t], {t, 1}])^2;

a[5] = (D[u2[x1, t], {t, 1}])^2;
a[6] = (D[v2[x1, t], {t, 1}])^2;
a[7] = (D[w2[x1, t], {t, 1}])^2;
a[8] = (D[\[Phi]2[x1, t], {t, 1}])^2;

b[1] = (D[u1[x1, t], {x1, 1}])^2;
b[2] = (D[v1[x1, t], {x1, 2}])^2;
b[3] = (D[w1[x1, t], {x1, 2}])^2;
b[4] = (D[\[Phi]1[x1, t], {x1, 1}])^2;

b[5] = (D[u2[x1, t], {x1, 1}])^2;
b[6] = (D[v2[x1, t], {x1, 2}])^2;
b[7] = (D[w2[x1, t], {x1, 2}])^2;
b[8] = (D[\[Phi]2[x1, t], {x1, 1}])^2;

T = Total[Table[a[i], {i, 1, 8}]];(*Kineatic energy*)
V = Total[Table[b[i], {i, 1, 8}]];(*Potential energy*)
Lg = T - V;(*Lagrangian*)
e1 = EulerEquations[
  Lg, {u1[x1, t], v1[x1, t], w1[x1, t], \[Phi]1[x1, t], u2[x1, t], 
   v2[x1, t], w2[x1, t], \[Phi]2[x1, t]}, {x1, t}];
e2 = FullSimplify[e1[[1]]]
e3 = FullSimplify[e1[[2]]]
e4 = FullSimplify[e1[[3]]]
e5 = FullSimplify[e1[[4]]]
e6 = FullSimplify[e1[[5]]]
e7 = FullSimplify[e1[[6]]]
e8 = FullSimplify[e1[[7]]]
e9 = FullSimplify[e1[[8]]]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.