Hermite–Hadamard inequalities and their applications