On solving classes of differential equations with applications