Inequalities for differentiable mappings and applications to special means of real numbers and to midpoint formula