Differential inequalities and maximum principles for second order differential equations