Lagrangian mechanics
Energy

Given a Lagrangian L, {\displaystyle L,} the Hamiltonian of the corresponding mechanical system is, by definition, H = (∑ i = 1 n q ˙ i ∂ L ∂ q ˙ i) − L. {\displaystyle H={\biggl (}\sum _{i=1}^{n}{\dot {q}}_{i}{\frac {\partial L}{\partial {\dot {q}}_{i}}}{\biggr)}-L.} This quantity will be equivalent to energy if the generalized coordinates are natural coordinates, i.e., they have no explicit time dependence when expressing position vector: r = r (q 1, ⋯, q n) {\displaystyle \mathbf {r} =\mathbf {r} (q_{1},\cdots,q_{n})}. From: T = m 2 v 2 = m 2 ∑ i, j (∂ r → ∂ q i q ˙ i) ⋅ (∂ r → ∂ q j q ˙ j) = m 2 ∑ i, j a i j q ˙ i q ˙ j {\displaystyle T={\frac {m}{2}}v^{2}={\frac {m}{2}}\sum _{i,j}\left({\frac {\partial {\vec {r}}}{\partial q_{i}}}{\dot {q}}_{i}\right)\cdot \left({\frac {\partial {\vec {r}}}{\partial q_{j}}}{\dot {q}}_{j}\right)={\frac {m}{2}}\sum _{i,j}a_{ij}{\dot {q}}_{i}{\dot {q}}_{j}} ∑ k = 1 n q ˙ k ∂ L ∂ q ˙ k = ∑ k = 1 n q ˙ k ∂ T ∂ q ˙ k = m 2 (2 ∑ i, j a i j q ˙ i q ˙ j) = 2 T {\displaystyle \sum _{k=1}^{n}{\dot {q}}_{k}{\frac {\partial L}{\partial {\dot {q}}_{k}}}=\sum _{k=1}^{n}{\dot {q}}_{k}{\frac {\partial T}{\partial {\dot {q}}_{k}}}={\frac {m}{2}}\left(2\sum _{i,j}a_{ij}{\dot {q}}_{i}{\dot {q}}_{j}\right)=2T} H = (∑ i = 1 n q ˙ i ∂ L ∂ q ˙ i) − L = 2 T − (T − V) = T + V = E {\displaystyle H=\left(\sum _{i=1}^{n}{\dot {q}}_{i}{\frac {\partial L}{\partial {\dot {q}}_{i}}}\right)-L=2T-(T-V)=T+V=E} where a i j = ∂ r ∂ q i ⋅ ∂ r ∂ q j {\displaystyle a_{ij}={\frac {\partial \mathbf {r} }{\partial q_{i}}}\cdot {\frac {\partial \mathbf {r} }{\partial q_{j}}}} is a symmetric matrix that is defined for the derivation.
length_constraints:number_words[300]