Solutions, invariants and applications of some classes of second order nonlinear differential equations