Solution of Differential Equations in Mechanics of Granular Materials: Mathematical Methods and Applications