The principle of the conservation of mechanical energy and its application