5.1 If the Lagrangian \( L=L_{o}+L_{1}+L_{2}+\cdots \), where \( L_{r} \) is a homogeneous function of degree \( r \) in \( \dot{q}_{i} \) with coefficients as any function of \( q_{i} \), prove that
(a) the Hamiltonian is given by
\[
H=-L_{o}+L_{2}+2 L_{3}+\cdots
\]
(b) \( H=0 \), for \( L=L_{1} \)