Solved Problems on Hamiltonian and Lagrangian