Elementary course in Lagranges equations and their applicat