# Some generalizations of the Hermite–Hadamard integral inequality

## Abstract

In this article we give two possible generalizations of the Hermite–Hadamard integral inequality for the class of twice differentiable functions, where the convexity property of the target function is not assumed in advance. They represent a refinement of this inequality in the case of convex/concave functions with numerous applications.

## Introduction

A function $$f: I\subset \mathbb{R}\to \mathbb{R}$$ is said to be convex on an nonempty interval I if the inequality

$$f\biggl(\frac{x+y}{2}\biggr)\le \frac{f(x)+f(y)}{2}$$
(1.1)

holds for all $$x,y\in I$$.

If inequality (1.1) reverses, then f is said to be concave on I .

Let $$f: I\subset \mathbb{R}\to \mathbb{R}$$ be a convex function on an interval I and $$a,b\in I$$.

Then

$$f\biggl(\frac{a+b}{2}\biggr)\le \frac{1}{b-a} \int _{a}^{b} f(t)\,dt\le \frac{f(a)+f(b)}{2}.$$
(1.2)

This double inequality is known in the literature as the Hermite–Hadamard (HH) integral inequality for convex functions.

It has plenty of applications in most different areas of pure and applied mathematics (see  and the references therein).

If f is a concave function, then both inequalities in (1.2) hold in the reverse direction, i.e.,

$$\frac{f(a)+f(b)}{2}\le \frac{1}{b-a} \int _{a}^{b} f(t)\,dt\le f\biggl( \frac{a+b}{2} \biggr).$$
(1.3)

During 130 years of its existence, this inequality has been intensely studied, extended, and generalized by many authors. Some recent trends can be found in  and .

As an example we quote an improvement by arbitrary means given in .

Let $$f: I\subset \mathbb{R}^{+}\to \mathbb{R}$$ be a convex function and $$S=S(a,b)$$, $$T=T(a,b)$$ be some means of positive numbers $$a, b\in I$$.

Then

$$\frac{1}{b-a} \int _{a}^{b} f(t)\,dt\le \frac{1}{2} f(S)+ \frac{1}{2(b-a)}\bigl[(S-a)f(a)+(b-S)f(b)\bigr];$$
(1.4)

and

$$\frac{1}{b-a} \int _{a}^{b} f(t)\,dt\ge \frac{1}{b-a} \biggl[(T-a)f\biggl( \frac{a+T}{2}\biggr)+(b-T)f\biggl(\frac{T+b}{2} \biggr)\biggr].$$
(1.5)

For any means S and T, approximations (1.4) and (1.5) are better than original (1.2).

In this article we investigate the possibility of a form of the Hermite-Hadamard inequality for functions that are not necessarily convex/concave on I. This has already been attempted in  where the convexity/concavity of the second derivative was shown to be crucial in managing improvements of the HH inequality as a linear combination of its endpoints.

We derive here two forms of the Hermite-Hadamard inequality under the sole condition that the second derivative of the target function f exists locally on an interval I. Thus, $$f\in C^{(2)}(I)$$ and, because $$f''$$ is continuous on a closed interval $$E:=[a,b]\subset I$$, it follows that the quantities $$m=m_{f}(a,b):=\min_{t\in E}f''(t)$$ and $$M=M_{f}(a,b):=\max_{t\in E}f''(t)$$ exist.

These numbers will play an important role in the sequel.

## Results and proofs

We begin with an improved variant of the Hermite–Hadamard inequality.

### Lemma 2.1

Let $$f: I\subset \mathbb{R}\to \mathbb{R}$$ be a convex function on an interval I and $$a,b\in I$$.

Then

$$f\biggl(\frac{a+b}{2}\biggr)\le \frac{1}{b-a} \int _{a}^{b} f(t)\,dt\le \frac{1}{2}\biggl[ \frac{f(a)+f(b)}{2}+f\biggl(\frac{a+b}{2}\biggr)\biggr].$$
(2.1)

It is shown in  that this improvement is best possible of the form

$$p \frac{f(a)+f(b)}{2}+ q f\biggl(\frac{a+b}{2}\biggr);\quad p,q\ge 0, p+q=1.$$

Our first main result is the following.

### Theorem 2.2

Let $$g\in C^{(2)}(E)$$ and $$p+q=r+s=1$$, $$0\le p$$, $$r\le 1/2$$.

Then

\begin{aligned}& r \frac{g(a)+g(b)}{2} + s g\biggl(\frac{a+b}{2}\biggr)+\bigl(sm-r(m+M)\bigr) \frac{(b-a)^{2}}{24} \\& \quad \le \frac{1}{b-a} \int _{a}^{b} g(t)\,dt \\& \quad \le p \frac{g(a)+g(b)}{2} + q g\biggl(\frac{a+b}{2}\biggr)+\bigl(q M-p(m+M)\bigr) \frac{(b-a)^{2}}{24}, \end{aligned}

with $$m:=\min_{x\in [a,b]}g''(x)$$, $$M:=\max_{x\in [a,b]}g''(x)$$, and $$E:=[a,b]$$.

### Proof

For given $$g\in C^{(2)}(E)$$, define an auxiliary function f by $$f(t):= g(t)-m t^{2}/2$$. Since $$f''(t)=g''(t)-m\ge 0$$, we find out that f is a convex function on E. Therefore, applying the form of Hermite–Hadamard inequality given by (2.1), we obtain

\begin{aligned}& g\biggl(\frac{a+b}{2}\biggr)-\frac{m}{2}\biggl(\frac{a+b}{2} \biggr)^{2} \\& \quad \le \frac{1}{b-a} \int _{a}^{b} g(t)\,dt -\frac{m}{2} \frac{b^{3}-a^{3}}{3(b-a)} \\& \quad \le\frac{1}{2}\biggl[\frac{g(a)+g(b)}{2}-\frac{m}{2}\biggl( \frac{a^{2}+b^{2}}{2}\biggr)+g\biggl( \frac{a+b}{2}\biggr)-\frac{m}{2} \biggl(\frac{a+b}{2}\biggr)^{2}\biggr], \end{aligned}

that is,

\begin{aligned} g\biggl(\frac{a+b}{2}\biggr)+\frac{m}{24}(b-a)^{2} &\le \frac{1}{b-a} \int _{a}^{b} g(t)\,dt \\ &\le \frac{1}{2}\biggl[ \frac{g(a)+g(b)}{2}+g\biggl(\frac{a+b}{2}\biggr)\biggr]-\frac{m}{48}(b-a)^{2}. \end{aligned}
(2.2)

On the other hand, taking the auxiliary function f as $$f(t)=Mt^{2}/2-g(t)$$, we see that it is also convex on E.

Applying Lemma 2.1 again, we obtain

\begin{aligned} \frac{1}{2}\biggl[\frac{g(a)+g(b)}{2}+g\biggl( \frac{a+b}{2}\biggr)\biggr]-\frac{M}{48}(b-a)^{2} &\le \frac{1}{b-a} \int _{a}^{b} g(t)\,dt \\ &\le g\biggl(\frac{a+b}{2} \biggr)+ \frac{M}{24}(b-a)^{2}. \end{aligned}
(2.3)

Now, for arbitrary $$\alpha , \beta \ge 0$$, $$\alpha +\beta =1$$, multiplying the right-hand sides of inequalities (2.2) and (2.3) with α and β respectively, we get

\begin{aligned} \frac{1}{b-a} \int _{a}^{b} g(t)\,dt &\le \frac{\alpha }{2} \biggl[ \frac{g(a)+g(b)}{2}+g\biggl(\frac{a+b}{2}\biggr)\biggr]- \frac{m}{24}(b-a)^{2}]\\ &\quad {}+\beta \biggl[g\biggl( \frac{a+b}{2} \biggr)+\frac{M}{24}(b-a)^{2}\biggr] \\ &=\frac{\alpha }{2}\biggl(\frac{g(a)+g(b)}{2}\biggr)+(\beta +\alpha /2)g\biggl( \frac{a+b}{2}\biggr)+(\beta M-\alpha m/2)\frac{(b-a)^{2}}{24}. \end{aligned}

Similar treating of the left-hand sides of (2.2) and (2.3) involving numbers $$\gamma , \delta \ge 0$$, $$\gamma +\delta =1$$, gives

$$\frac{1}{b-a} \int _{a}^{b} g(t)\,dt\ge \frac{\gamma }{2}\biggl( \frac{g(a)+g(b)}{2}\biggr)+(\delta +\gamma /2)g\biggl(\frac{a+b}{2}\biggr)+( \delta m- \gamma M/2)\frac{(b-a)^{2}}{24}.$$

Denoting $$\gamma /2=r$$, $$\delta +\gamma /2=s$$; $$\alpha /2=p$$, $$\beta +\alpha /2=q$$, we obtain the required result. □

There are plenty of applications of Theorem 2.2. For instance, an improvement of the assertion from Lemma 2.1 is given in the following.

### Corollary 2.3

Let $$f\in C^{(2)}(E)$$. Then

$$f\biggl(\frac{a+b}{2}\biggr)+m\frac{(b-a)^{2}}{24}\le \frac{1}{b-a} \int _{a}^{b} f(t)\,dt \le \frac{1}{2}\biggl[ \frac{f(a)+f(b)}{2}+f\biggl(\frac{a+b}{2}\biggr)\biggr]-m \frac{(b-a)^{2}}{48}.$$

### Proof

Putting $$r=0$$, $$s=1$$; $$p=q=1/2$$, we get the desired result. Note that $$m\ge 0$$ if f is a convex function on E. □

Of great importance in the theory of numerical integration is the so-called Simpson’s rule (cf. ).

### Lemma 2.4

Let $$f\in C^{(4)}(E)$$. Then

$$\frac{f(a)+f(b)}{6}+\frac{2}{3}f\biggl(\frac{a+b}{2}\biggr)- \frac{1}{b-a} \int _{a}^{b} f(t)\,dt=\frac{f^{(4)}(\xi )}{2880}(b-a)^{4}, \quad a< \xi < b.$$

Therefore, we obtain at once an estimation

$$\frac{n}{2880}(b-a)^{4}\le \frac{f(a)+f(b)}{6}+\frac{2}{3}f \biggl( \frac{a+b}{2}\biggr)-\frac{1}{b-a} \int _{a}^{b} f(t)\,dt\le \frac{N}{2880}(b-a)^{4},$$

where $$n=n_{f}(a,b):=\min_{t\in E}f^{(4)}(t)$$ and $$N=N_{f}(a,b):=\max_{t\in E}f^{(4)}(t)$$.

There is a problem how to apply Simpson’s rule if $$f\notin C^{(4)}(E)$$. A possible answer for twice differentiable functions is given in the following.

### Corollary 2.5

Let $$f\in C^{(2)}(E)$$. Then

$$\biggl\vert \frac{f(a)+f(b)}{6}+\frac{2}{3}f\biggl(\frac{a+b}{2} \biggr)-\frac{1}{b-a} \int _{a}^{b} f(t)\,dt \biggr\vert \le \frac{1}{72}(M-m) (b-a)^{2}.$$

### Proof

Putting in Theorem 2.2$$r=p=1/3$$; $$s=q=2/3$$, we obtain

$$-(M-m)\frac{(b-a)^{2}}{72}\le \frac{f(a)+f(b)}{6}+\frac{2}{3}f\biggl( \frac{a+b}{2}\biggr)-\frac{1}{b-a} \int _{a}^{b} f(t)\,dt\le (M-m) \frac{(b-a)^{2}}{72},$$

and the proof follows. □

Another refinement of the Hermite–Hadamard inequality is given in the following.

### Corollary 2.6

For $$f\in C^{(2)}(E)$$, denote $$M/m=t\ge 1$$. Then

\begin{aligned} \frac{1}{t+2}\frac{f(a)+f(b)}{2}+\frac{t+1}{t+2}f\biggl(\frac{a+b}{2} \biggr)&\le \frac{1}{b-a} \int _{a}^{b} f(t)\,dt\\ &\le \frac{t}{2t+1} \frac{f(a)+f(b)}{2}+\frac{t+1}{2t+1}f\biggl(\frac{a+b}{2}\biggr). \end{aligned}

### Proof

Applying Theorem 2.2 with $$r=1/(t+2)$$, $$s=(t+1)/(t+2)$$; $$p=t/(2t+1)$$, $$q=(t+1)/(2t+1)$$, we obtain the proof since in this case

$$sm-r(m+M)=qM-p(m+M)=0.$$

□

The restriction $$0\le r$$, $$p\le 1/2$$ is unavoidable in the proof of Theorem 2.2. Nevertheless, the following assertion gives an integral representation which absolutely enlarges the range of p, q.

### Lemma 2.7

For $$\phi \in C^{(2)}(E)$$ and arbitrary p, q; $$p+q=1$$, we have the identity

$$p \frac{\phi (a)+\phi (b)}{2}+ q \phi \biggl(\frac{a+b}{2}\biggr)-\frac{1}{b-a} \int _{a}^{b} \phi (t)\,dt= \frac{(b-a)^{2}}{16} \int _{0}^{1} t(2p-t) \bigl( \phi ''(x)+\phi ''(y)\bigr)\,dt,$$

where $$x:=a\frac{t}{2}+b(1-\frac{t}{2})$$, $$y:=b\frac{t}{2}+a(1-\frac{t}{2})$$.

It is not difficult to prove the above relation by a double partial integration of its right-hand side.

Hence, our second main result is given in the following.

### Theorem 2.8

Let $$\phi \in C^{(2)}(E)$$ and, for $$p\in \mathbb{R}$$, denote

$$p \frac{\phi (a)+\phi (b)}{2}+ (1-p) \phi \biggl(\frac{a+b}{2}\biggr)- \frac{1}{b-a} \int _{a}^{b} \phi (t)\,dt:=T_{\phi }(a,b;p).$$

Then

$$1. \quad (3p-1)\frac{(b-a)^{2}}{24}m\le T_{\phi }(a,b;p)\le (3p-1) \frac{(b-a)^{2}}{24}M$$

for $$p\ge \frac{1}{2}$$;

$$2. \quad \bigl(A(p) m-B(p) M\bigr)\frac{(b-a)^{2}}{6}\le T_{\phi }(a,b;p) \le \bigl(A(p) M-B(p)m\bigr)\frac{(b-a)^{2}}{6},$$

with $$A(p)=p^{3}$$, $$B(p)=(p+1)(p-1/2)^{2}$$, and $$0< p <\frac{1}{2}$$;

$$3. \quad (3p-1)\frac{(b-a)^{2}}{24}M\le T_{\phi }(a,b;p)\le (3p-1) \frac{(b-a)^{2}}{24}m$$

for $$p \le 0$$.

### Proof

We prove only the right-hand side inequalities. The other proofs are analogous.

1. In the case $$p\ge 1/2$$, $$0\le t\le 1$$, note that $$2p-t\ge 0$$; $$\phi ''(x)$$, $$\phi ''(y)\le M$$. Hence, by Lemma 2.7, we get

\begin{aligned} T_{\phi }(a,b;p)&=\frac{(b-a)^{2}}{16} \int _{0}^{1} t(2p-t) \bigl(\phi ''(x)+ \phi ''(y)\bigr)\,dt \le 2M\frac{(b-a)^{2}}{16} \int _{0}^{1} t(2p-t)\,dt \\ &= M\biggl(p-\frac{1}{3}\biggr)\frac{(b-a)^{2}}{8}. \end{aligned}

2. For $$0< p<1/2$$, write

\begin{aligned} T_{\phi }(a,b;p)&=\frac{(b-a)^{2}}{16} \int _{0}^{2p} t(2p-t) \bigl(\phi ''(x)+ \phi ''(y)\bigr)\,dt\\ &\quad {}- \frac{(b-a)^{2}}{16} \int _{2p}^{1} t(t-2p) \bigl(\phi ''(x)+ \phi ''(y)\bigr)\,dt \\ &\le 2M \frac{(b-a)^{2}}{16} \int _{0}^{2p} t(2p-t)\,dt-2m \frac{(b-a)^{2}}{16} \int _{2p}^{1} t(t-2p)\,dt\\ &=\frac{(b-a)^{2}}{8}\biggl[ \frac{4p^{3}}{3}M-\biggl(\frac{1}{3}-p +\frac{4p^{3}}{3}\biggr)m \biggr], \end{aligned}

which is equivalent to statement 2.

3. In the case $$p\le 0$$, we have $$2p-t\le 0$$; $$\phi ''(x)$$, $$\phi ''(y)\ge m$$. Therefore,

\begin{aligned} T_{\phi }(a,b;p)&\le 2m\frac{(b-a)^{2}}{16} \int _{0}^{1} t(2p-t)\,dt \\ &= m\biggl(p-\frac{1}{3}\biggr)\frac{(b-a)^{2}}{8}. \end{aligned}

□

### Remark 2.9

The approximations from Theorems 2.2 and 2.8 can be compared if $$r=p$$, $$s=q$$; $$0\le p\le 1/2$$. It is not difficult to see that they coincide for $$p=0$$ and $$p=1/2$$. In other cases the second approximation is better.

For example, if $$p=1/3$$, we obtain an improvement of Corollary 2.5, i.e., another estimation of Simpson’s rule for twice differentiable functions.

### Corollary 2.10

Let $$f\in C^{(2)}(E)$$. Then

$$\biggl\vert \frac{f(a)+f(b)}{6}+\frac{2}{3}f\biggl(\frac{a+b}{2} \biggr)-\frac{1}{b-a} \int _{a}^{b} f(t)\,dt \biggr\vert \le \frac{1}{162}(M-m) (b-a)^{2}.$$

We conjecture that the constant $$1/162$$ is best possible.

Not applicable.

## References

1. Hardy, G.H., Littlewood, J.E., Polya, G.: Inequalities. Cambridge University Press, Cambridge (1978)

2. Niculescu, C.P., Persson, L.E.: Old and new on the Hermite-Hadamard inequality. Real Anal. Exch. 29(2), 663–685 (2003/4)

3. Rostamian Delavar, M., Dragomir, S.S., De La Sen, M.: Hermite-Hadamard’s trapezoid and mid-point type inequalities on a disk. J. Inequal. Appl. 2019, Article ID 105 (2019)

4. Simić, S.: Some refinements of Hermite-Hadamard inequality and an open problem. Kragujev. J. Math. 42(3), 349–356 (2018)

5. Khan, M.A., Iqbal, A., Suleman, M., Chu, Y.M.: Hermite-Hadamard type inequalities for fractional integrals via Green’s function. J. Inequal. Appl. 2018, Article ID 161 (2018)

6. Khan, M.A., Mohammad, N., Nwaeze, E.R., Chu, Y.M.: Quantum Hermite-Hadamard inequality by means of a Green function. Adv. Differ. Equ. 2020, Article ID 99 (2020). https://doi.org/10.1186/s13662-020-02559-3

7. Awan, M.U., Akhtar, N., Iftikhar, S., Noor, M.A., Chu, Y.M.: New Hermite-Hadamard type inequalities for n-polynomial harmonically convex functions. J. Inequal. Appl. 2020, Article 125, 12 pages (2020)

8. Awan, M.U., Talib, S., Chu, Y.M., Noor, M.A., Noor, K.I.: Some new refinements of Hermite-Hadamard-type inequalities involving $$\Psi _{k}$$-Riemann-Liouville fractional integrals and applications. Math. Probl. Eng. 2020, Article ID 3051920 (2020)

9. Iqbal, A., Khan, M.A., Ullah, S., Chu, Y.M.: Some new Hermite-Hadamard-type inequalities associated with conformable fractional integrals and their applications. J. Funct. Spaces 2020, Article ID 9845407 (2020)

10. Khurshid, Y., Khan, M.A., Chu, Y.M.: Conformable integral version of Hermite-Hadamard-Fejér inequalities via η-convex functions. AIMS Math. 5(5), 5106–5120 (2020)

11. Latif, M.A., Rashid, S., Dragomir, S.S., Chu, Y.M.: Hermite-Hadamard type inequalities for co-ordinated convex and quasi-convex functions and their applications. J. Inequal. Appl. 2019, Article ID 317 (2019). https://doi.org/10.1186/s13660-019-2272-7

12. Rasid, S., Noor, M.A., Noor, K.I., Safdar, F., Chu, Y.M.: Hermite-Hadamard type inequalities for the class of convex functions on time scale. Mathematics 7(10), Article ID 956 (2019). https://doi.org/10.3390/math7100956

13. Hengxiao, Q., Yussouf, M., Mehmood, S., Chu, Y.M., Farid, G.: Fractional integral versions of Hermite-Hadamard type inequality for generalized exponentially convexity. AIMS Math. 5(6), 6030–6042 (2020)

14. Iqbal, A., Khan, M.A., Mohammad, N., Nwaeze, E.R., Chu, Y.-M.: Revisiting the Hermite-Hadamard integral inequality via a Green function. AIMS Math. 5(6), 6087–6107 (2020)

15. Yung, C.Y., Yussouf, M., Chu, Y.M., Farid, G.: Fractional generalized Hadamard and Fejér-Hadamard inequalities for m-convex function. AIMS Math. 5(6), 6325–6340 (2020). https://doi.org/10.3934/math.2020407

16. Guo, S., Chu, Y.M., Farid, G., Mehmood, S., Nazeer, W.: Fractional Hadamard and Fejér-Hadamard inequalities associated with exponentially $$(s, m)$$-convex functions. J. Funct. Spaces 2020, Article ID 2410385 (2020). https://doi.org/10.1155/2020/2410385

17. Zhou, S.-S., Rashid, S., Noor, M.A., Noor, K.I., Safdar, F., Chu, Y.-M.: New Hermite-Hadamard type inequalities for exponentially convex functions and applications. AIMS Math. 5(6), 6874–6901 (2020)

18. Feng, B., Ghafoor, M., Chu, Y.M., Qureshi, M.I., Feng, X., Yao, C., Qiao, X.: Hermite-Hadamard and Jensen’s type inequalities for modified $$(p, h)$$-convex functions. AIMS Math. 5(6), 6959–6971 (2020)

19. Khan, Z.A.: Hadamard type fractional differential equations for the system of integral inequalities on time scales. Integral Transforms Spec. Funct. 31(5), 412–423 (2020)

20. Khurshid, Y., Khan, M.A., Chu, Y.M., Khan, Z.A.: Hermite-Hadamard Fejeér inequalities for conformal fractional integrals via preinvex functions. J. Funct. Spaces 2019, Article ID 3146210, 1–10 (2019)

21. Khan, M.A., Hanif, M., Khan, Z.A.H., Ahmad, K., Chu, Y.M.: Association of Jensen’s inequality for s-convex function with Csiszaár divergence. J. Inequal. Appl. 2019, 162 (2019) 1–14

22. Khan, Z.A.: Further nonlinear version of inequalities and their applications. Filomat 33(18), 6005–6014 (2019)

23. Ullah, S.Z., Khan, M.A., Khan, Z.A., Chu, Y.M.: Integral majorization type inequalities for the functions in the sense of strong convexity. J. Funct. Spaces 2019, 1–12 (2019)

24. Simić, S.: Further improvements of Hermite-Hadamard integral inequality. Kragujev. J. Math. 43(2), 259–265 (2019)

25. Simić, S., Bandar, B.M.: Some improvements of the Hermite-Hadamard integral inequality. Symmetry 12, Article ID 117 (2020)

26. Ueberhuber, C.W.: Numerical Computation 2. Springer, Berlin (1997)

## Acknowledgements

The authors are grateful to the referees for their valuable comments.

## Funding

This project was supported by King Saud University, Deanship of Scientific Research, College of Science Research Center.

## Author information

Authors

### Contributions

Theoretical part, SS; numerical part with examples, BB-M. All authors read and approved the final manuscript.

### Corresponding author

Correspondence to Slavko Simić.

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

## Rights and permissions 