1 Introduction and preliminaries

The following inequality is given in the well-known book by Hardy, Littlewood, and Pólya [6, Theorem 134]:

Theorem 1.1

If ϑ is a convex and continuous function defined on \([0,\infty )\) and \(a_{i}\), \(i \in \mathbb{N}\), are nonnegative and nonincreasing, then

$$ \vartheta \Biggl( \sum_{i=1}^{m}a_{i} \Biggr) - \vartheta ( 0 ) -\sum_{i=1}^{m} \bigl[ \vartheta ( ia_{i} ) - \vartheta \bigl( ( i-1 ) a_{i} \bigr) \bigr]\geq 0. $$
(1.1)

If \(\vartheta '\) is a strictly increasing function, there is an equality only when \(a_{i}\) are equal up to a certain point and then zero.

A weighted case of inequality (1.1) was proved by Bennett [1] for power functions \(\vartheta ( x ) =x^{p}\) in the following way: if \(a_{i} \in [0,\infty )\) and \(a_{i}\) (\(1\leq i\leq m \)) are nonincreasing and \(q_{i} \in [0,\infty )\) for all \(i\in \{1,\ldots ,m\}\) such that \(Q_{i} =\sum_{k=1}^{i}q_{k}\) (\(1\leq i\leq m \)), then for \(p\in (1,\infty )\) the inequality

$$ \Biggl( \sum_{i=1}^{m}q_{i}a_{i} \Biggr)^{p}- ( {q_{1}}a_{1} ) ^{p}-\sum_{i=2}^{m}{a_{i}^{p}} \bigl[ Q_{i}^{p}-Q_{i-1}^{p} \bigr] \geq 0 $$
(1.2)

holds. If \(p\in (0,1 )\), then (1.2) holds in the reversed direction (see [1]).

In our work we use nonincreasing (↘) sequence in weighted mean (WM) and nondecreasing (↗) sequence in WM (see [11]) defined as follows.

Definition 1.2

A sequence \(\{a_{i}\}_{i\in \mathbb{N}}\subset \mathbb{R}\) is ↘ in WM if

$$ \frac{1}{Q_{m+1}}\sum_{i=1}^{m+1}{q_{i}}a_{i} \leq \frac{1}{Q_{m}}\sum_{i=1}^{m}{q_{i}}a_{i}, \quad m\in \mathbb{N}, $$
(1.3)

where \(a_{i}\), \(q_{i} \in \mathbb{R}\) (\(i\in \mathbb{N} \)) such that \(q_{k}>0\) (\(1\leq k\leq i \)) and \(Q_{i}:=\sum_{k=1}^{i}{q_{k}}\) (\(i\in \mathbb{N} \)) .

If (1.3) holds in the reversed direction, then the sequence \(\{a_{i}\}_{i\in \mathbb{N}}\subset \mathbb{R}\) is called ↗ in WM.

A generalization of inequality (1.2) is presented in [11].

Theorem 1.3

Let \(a_{i}\), \(q_{i} \in \mathbb{R}\) (\(1\leq i\leq m \)) such that \(a_{i}\geq 0\) and \(q_{i}>0\). Let \({q_{1}}a_{1}\), \(\sum_{i=1}^{m}q{_{i}}a_{i}\), \(Q_{i}a_{i}\), \(Q_{i-1}a_{i} \in [ s,t ] \) for all \(i\in \{ 2,\ldots ,m \} \), and let \(\vartheta : [ s,t ] \rightarrow \mathbb{R}\) be a convex function.

  1. (i)

    If \(\{a_{i}\}_{i=1}^{m}\) isin WM, then

    $$ \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) - \vartheta ( {q_{1}}a_{1} ) -\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \geq 0. $$
    (1.4)
  2. (ii)

    If \(\{a_{i}\}_{i=1}^{m}\) isin WM, then

    $$ \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) - \vartheta ( {q_{1}}a_{1} ) -\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( Q_{i-1}a_{i} ) \bigr] \leq 0 . $$
    (1.5)

If ϑ is concave, then (1.4) and (1.5) hold in the reversed direction.

Definition 1.4

Let \(\mathbf{q}= ( q_{1},\ldots ,q_{m} ) \) be a positive probability distribution. Then the Shannon entropy (see [8, 9], and [22]) of q is defined by \({S} ( \mathbf{q} ) :=\sum_{i=1}^{m}q_{i}\log \left( {\frac{1}{q_{i}}} \right) \).

Khalid, Pečarić, and Pečarić presented the following interesting result associated with the Shannon entropy in [8].

Theorem 1.5

Let \(q_{i}\in \mathbb{R}\) such that \(q_{i}>0\) (\(1\leq i\leq m \)), and let \(\vartheta : [ s,t ] \rightarrow \mathbb{R}\) be a convex function.

  1. (a)

    Let \(0< q_{i}<1\) (\(1\leq i\leq m \)), and let \({S} ( \mathbf{q} ) \), \({q_{1}}\log \left( {\frac{1}{q_{1}}} \right) \), \(Q_{i}\log \left( {\frac{1}{q_{i}}} \right) \), \(Q_{i-1}\log \left( {\frac{1}{q_{i}}} \right) \in [ s,t ] \) for all \(i\in \{ 2,\ldots ,m \} \).

    1. (i)

      If \(\{q_{i}\}_{i=1}^{m}\) is ↘, then

      $$ \begin{aligned}[b] &\vartheta \bigl( {S} ( \mathbf{q} ) \bigr) -\vartheta \biggl( {q_{1}}\log \biggl( {\frac{1}{q_{1}}} \biggr) \biggr)\\ &\quad {}-\sum _{i=2}^{m} \biggl[ \vartheta \biggl( {Q_{i}} \log \biggl( {\frac{1}{q_{i}}} \biggr) \biggr) -\vartheta \biggl( {Q_{i-1}}\log \biggl( { \frac{1}{q_{i}}} \biggr) \biggr) \biggr]\leq 0. \end{aligned} $$
      (1.6)
    2. (ii)

      If \(\{q_{i}\}_{i=1}^{m}\) is ↗, then

      $$ \begin{aligned}[b] &\vartheta \bigl( {S} ( \mathbf{q} ) \bigr) - \vartheta \biggl( {q_{1}}\log \biggl( {\frac{1}{q_{1}}} \biggr) \biggr) \\ &\quad {}-\sum _{i=2}^{m} \biggl[ \vartheta \biggl( {Q_{i}}\log \biggl( {\frac{1}{q_{i}}} \biggr) \biggr) -\vartheta \biggl( Q_{i-1}\log \biggl( { \frac{1}{q_{i}}} \biggr) \biggr) \biggr] \geq 0. \end{aligned} $$
      (1.7)
  2. (b)

    Let \(q_{i}\geq 1\) (\(1\leq i\leq m \)) and let \(-{S} ( \mathbf{q} ) \), \({q_{1}}\log q_{1}\), \(Q_{i}\log q_{i}\), \(Q_{i-1}\log q_{i} \in [ s,t ] \) for all \(i\in \{ 2,\ldots ,m \} \).

    1. (i)

      If \(\{q_{i}\}_{i=1}^{m}\) is ↘, then

      $$ \vartheta \bigl( -{S} ( \mathbf{q} ) \bigr) - \vartheta ( {q_{1}}\log q_{1} ) -\sum_{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}\log q_{i} ) -\vartheta ( {Q_{i-1}} \log q_{i} ) \bigr]\geq 0. $$
      (1.8)
    2. (ii)

      If \(\{q_{i}\}_{i=1}^{m}\) is ↗, then

      $$ \vartheta \bigl( -{S} ( \mathbf{q} ) \bigr) - \vartheta ( {q_{1}}\log q_{1} ) -\sum_{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}\log q_{i} ) -\vartheta ( Q_{i-1} \log q_{i} ) \bigr]\leq 0. $$
      (1.9)

If ϑ is concave, then (1.6)(1.9) hold in the reversed direction.

In the second section, we generalize inequalities (1.4), (1.7), and (1.8) for r-convex functions, and we also present refinements of these inequalities.

Consider the Green’s functions \(G_{\delta }: [ s,t ] \times [ s,t ] \rightarrow \mathbb{R} \) (\(\delta \in \{1,\ldots ,5\}\)) defined as follows (see [4, 7, 13, 14], and [1619]):

$$\begin{aligned}& G_{1} (x,\tilde{u} ) = \textstyle\begin{cases} \frac{ ( x-t ) ( \tilde{u}-s ) }{t-s}, & s \leq {\tilde{u}}\leq {x}, \\ \frac{ ( \tilde{u}-t ) ( x-s ) }{t-s}, & x \leq {\tilde{u}}\leq {t}, \end{cases}\displaystyle \end{aligned}$$
(1.10)
$$\begin{aligned}& G_{2} (x,\tilde{u} ) = \textstyle\begin{cases} s-\tilde{u}, & s\leq {\tilde{u}}\leq {x}, \\ s-x, & x< {\tilde{u}}\leq {t}, \end{cases}\displaystyle \end{aligned}$$
(1.11)
$$\begin{aligned}& G_{3} (x,\tilde{u} ) = \textstyle\begin{cases} x-t, & s\leq {\tilde{u}}\leq {x}, \\ \tilde{u}-t, & x< {\tilde{u}}\leq {t}, \end{cases}\displaystyle \end{aligned}$$
(1.12)
$$\begin{aligned}& G_{4} (x,\tilde{u} ) = \textstyle\begin{cases} x-s, & s\leq {\tilde{u}}\leq {x}, \\ \tilde{u}-s, & x< {\tilde{u}}\leq {t,} \end{cases}\displaystyle \end{aligned}$$
(1.13)

and

$$ G_{5} (x,\tilde{u} ) = \textstyle\begin{cases} t-\tilde{u}, & s\leq {\tilde{u}}\leq {x}, \\ t-x, & x< {\tilde{u}}\leq {t}. \end{cases} $$
(1.14)

Remark 1.6

  1. (i)

    It is easy to see that the functions \(G_{\delta } (x,\tilde{u} )\) (\(\delta \in \{1,\ldots ,5\}\)) defined in (1.10)–(1.14) are continuous, symmetric, and convex with respect to both the variables x and ũ.

  2. (ii)

    Throughout this paper, for \(G_{\delta }\), we consider \(\delta \in \{1,\ldots ,5\}\).

For \(G_{\delta } ( x,\tilde{u} )\) defined in (1.10)–(1.14) and for a twice differentiable function ϑ defined on \([ s,t ]\), we can consider the following expression:

$$ \int _{s}^{t} G_{\delta } ( x,\tilde{u} ) { \vartheta }^{ \prime \prime } ( \tilde{u} ) \,d\tilde{u} = \int _{s}^{x} G_{ \delta } ( x,\tilde{u} ) { \vartheta }^{\prime \prime } ( \tilde{u} ) \,d\tilde{u}+ \int _{x}^{t} G_{\delta } ( x, \tilde{u} ) { \vartheta }^{\prime \prime } ( \tilde{u} ) \,d\tilde{u}. $$

Now if we use the values of \(G_{\delta } ( x,\tilde{u} )\) over the intervals \([s,x ]\) and \([x,t ]\), then the following result is valid (see [4] and [13]).

Lemma 1.7

Let \(\vartheta : [ s,t ] \rightarrow \mathbb{R}\) be a function such that \(\vartheta \in C^{2} ( [ s,t ] )\), and let \(G_{\delta }\) be the Green’s functions defined in (1.10)(1.14). Then

$$\begin{aligned}& \vartheta ( x ) =\frac{t-x}{t-s}\vartheta ( s ) + \frac{x-s}{t-s}\vartheta ( t ) + \int _{s}^{t}G_{1} ( x,\tilde{u} ) \vartheta ^{\prime \prime } ( \tilde{u} ) \,d\tilde{u}, \end{aligned}$$
(1.15)
$$\begin{aligned}& \vartheta ( x ) =\vartheta (s)+(x-s){\vartheta }'(t)+ \int _{s}^{t} G_{2} ( x,\tilde{u} ) \vartheta ^{\prime \prime } ( \tilde{u} ) \,d\tilde{u}, \end{aligned}$$
(1.16)
$$\begin{aligned}& \vartheta ( x ) =\vartheta (t)-(t-x){\vartheta }'(s)+ \int _{s}^{t} G_{3} ( x,\tilde{u} ) \vartheta ^{\prime \prime } ( \tilde{u} ) \,d\tilde{u}, \end{aligned}$$
(1.17)
$$\begin{aligned}& \vartheta ( x ) =\vartheta (t)-(t-s){\vartheta }'(t)+(x-s){ \vartheta }'(s)+ \int _{s}^{t} G_{4} ( x,\tilde{u} ) { \vartheta }^{\prime \prime } ( \tilde{u} ) \,d\tilde{u}, \end{aligned}$$
(1.18)

and

$$ \vartheta ( x ) =\vartheta (s)+(t-s){\vartheta }'(s)-(t-x){ \vartheta }'(t)+ \int _{s}^{t} G_{5} ( x,\tilde{u} ) { \vartheta }^{\prime \prime } ( \tilde{u} ) \,d\tilde{u}. $$
(1.19)

In the second section, we prove some interesting identities and inequalities for r-convex functions by using Lemma 1.7 and the following Fink’s identity (see [5, 10], and [12]).

Theorem 1.8

Let \(s,t \in \mathbb{R}\), \(\vartheta : [s,t ]\rightarrow \mathbb{R}\), \(r\geq 1\) and \(\vartheta ^{ (r-1 )}\) be absolutely continuous on \([s,t ]\). Then

$$\begin{aligned} \vartheta (x ) =&\frac{r}{t-s} \int _{s}^{t}\vartheta (u )\,du+ \frac{1}{ ( r-1 ) ! (t-s )} \int _{s}^{t} (x-u )^{r-1}k (u,x )\vartheta ^{ (r )} (u )\,du \\ &{}-\frac{1}{{t-s}}\sum_{n=1}^{r-1} \frac{r-n}{n!} \bigl[ (x-s )^{n} \vartheta ^{ (n-1 )} (s )- (x-t )^{n} \vartheta ^{ (n-1 )} (t ) \bigr], \end{aligned}$$
(1.20)

where

$$ k (u,x )= \textstyle\begin{cases} u-s, & s\leq {u}\leq {x}\leq {t}, \\ u-t, & s\leq {x}< {u}\leq {t}.\end{cases} $$
(1.21)

Let ϑ be a real-valued function defined on \([s,t ]\). A criterion to check the r-convexity (\(r\geq 0 \)) of a function ϑ is the following:

Theorem 1.9

If \(\vartheta ^{ (r )}\) exists, then ϑ is r-convex if and only if \(\vartheta ^{ (r )}\geq 0\).

In the third section, we present some interesting results by using the following Čebyšev functional and Grüss type inequalities (see [2] and [3]):

Let \(L_{p} [s, t ]\) (\(1 \leq p < \infty \)) and \(L_{\infty } [s, t ]\) denote the space of p-power integrable functions and the space of essentially bounded functions defined on \([s, t ]\) respectively together with the norms

$$ \|\zeta \|_{p} = \biggl( \int _{s}^{t} \bigl\vert \zeta ( u ) \bigr\vert ^{p}\,du \biggr) ^{\frac{1}{p}} \quad \text{and} \quad \|\zeta \|_{\infty } = \operatorname{ess} \sup_{u \in [s,t ]} \bigl\vert \zeta (u) \bigr\vert $$

respectively.

Suppose that \(\zeta _{1},\zeta _{2} : [s,t ]\rightarrow \mathbb{R}\) are two Lebesgue integrable functions. The Čebyšev functional is defined by

$$ \Lambda (\zeta _{1},\zeta _{2} ):= \frac{1}{t-s} \int _{s}^{t} \zeta _{1} (u )\zeta _{2} (u )\,du-\frac{1}{t-s} \int _{s}^{t}\zeta _{1} (u )\,du\cdot \frac{1}{t-s} \int _{s}^{t} \zeta _{2} (u )\,du. $$
(1.22)

Cerone and Dragomir proved the next two results related to Grüss type inequalities in [2].

Theorem 1.10

Suppose that \(\zeta _{1}: [s,t ]\rightarrow \mathbb{R}\) is a Lebesgue integrable function and \(\zeta _{2}: [s,t ]\rightarrow \mathbb{R}\) is an absolutely continuous function such that \(( \cdot -s ) ( t-\cdot ) (\zeta _{2}' )^{2}\in L_{1} [s,t ]\). Then

$$ \bigl\vert \Lambda (\zeta _{1},\zeta _{2} ) \bigr\vert \leq \sqrt{ \frac{\Lambda (\zeta _{1},\zeta _{1} )}{2(t-s)}} \cdot \sqrt{ \int _{s}^{t} ( u-s ) (t-u ) \bigl( \zeta _{2}' (u ) \bigr) ^{2}\,du}. $$
(1.23)

Theorem 1.11

Suppose that \(\zeta _{1}: [s,t ]\rightarrow \mathbb{R}\) is absolutely continuous such that \(\zeta _{1}'\in L_{\infty } [s,t ]\) and \(\zeta _{2}: [s,t ]\rightarrow \mathbb{R}\) is monotonically ↗. Then

$$ \bigl\vert \Lambda (\zeta _{1},\zeta _{2} ) \bigr\vert \leq \frac{1}{2 ( t-s ) } \bigl\Vert \zeta _{1}' \bigr\Vert _{\infty } \int _{s}^{t} (u-s ) ( t-u ) \,d\zeta _{2} ( u ) . $$
(1.24)

The constants \(\frac{1}{\sqrt{2}}\) and \(\frac{1}{2}\) are the best possible in (1.23) and (1.24) respectively.

The organization of this paper is as follows: in the second section, we obtain some interesting identities related to Green’s functions and Fink’s result. Further, we use these identities and generalize inequalities of kind (1.4), (1.7), and (1.8) for r-convex functions. In addition, we also present refinements of these inequalities and give an application to the Shannon entropy. In the third section, we use the Čebyšev functional and Grüss type inequalities and find the new bounds for the remainder in the obtained identities. In the fourth section, we use the identities from section two together with Hölder’s inequality for integrals and obtain Ostrowski type inequalities (see [20] and [21]).

2 Refinements of some Hardy–Littlewood–Pólya type inequalities and an application to the Shannon entropy

The first main theorem is related to the following identity which will play an important role in our paper.

Theorem 2.1

Let \(\vartheta : [ s,t ] \rightarrow \mathbb{R}\) and \(\vartheta ^{ ( r-1 ) }\) be absolutely continuous for \(r\geq 3\). Let \(a_{i}\), \(q_{i} \in \mathbb{R}\) (\(1\leq i\leq m \)), and let \({q_{1}}a_{1}\), \(\sum_{i=1}^{m}q{_{i}}a_{i}\), \(Q_{i}a_{i}\), \(Q_{i-1}a_{i} \in [ s,t ] \) for all \(i\in \{ 2,\ldots ,m \} \). Let \(G_{\delta } (x,\tilde{u} )\) and \(k (u,x ) \) be defined in (1.10)(1.14) and (1.21) respectively. Then

$$\begin{aligned}& \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) -\vartheta ( {q_{1}}a_{1} )-\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \\& \quad = \frac{1}{t-s}\sum_{n=0}^{r-3} \frac{r-n-2}{n!} \int _{s}^{t} \Biggl[ {G_{ \delta } \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{\delta } ( q_{1}a_{1}, \tilde{u} ) } \\& \qquad {} -\sum_{i=2}^{m}{ \bigl[ G_{\delta } ( Q_{i}a_{i}, \tilde{u} ) -G_{\delta } ( Q_{i-1}a_{i},\tilde{u} ) \bigr] } \Biggr] \\& \qquad {}\times \bigl[ ( \tilde{u}-t ) ^{n}\vartheta ^{ ( n+1 ) } ( t )- ( \tilde{u}-s ) ^{n}\vartheta ^{ ( n+1 ) } ( s ) \bigr]\,d\tilde{u} \\& \qquad {}+\frac{1}{ ( t-s ) ( r-3 ) ! } \int _{s}^{t} \vartheta ^{ ( r ) } ( u ) \Biggl[ \int _{s}^{t} \Biggl[{G_{\delta } \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{ \delta } (q_{1}a_{1},\tilde{u} )} \\& \qquad {} -\sum_{i=2}^{m} \bigl[G_{\delta } (Q_{i}a_{i}, \tilde{u} )-G_{\delta } (Q_{i-1}a_{i},\tilde{u} ) \bigr] \Biggr] ( \tilde{u}-u ) ^{r-3}k ( u,\tilde{u} )\,d \tilde{u} \Biggr] \,du. \end{aligned}$$
(2.1)

Proof

Let \(\delta =1\). Using (1.15) in the L.H.S of (1.4), we have

$$\begin{aligned}& \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) -\vartheta ( {q_{1}}a_{1} )-\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \\& \quad = \frac{\vartheta ( t ) -\vartheta ( s ) }{t-s} \Biggl[ \sum_{i=1}^{m}q_{i}a_{i}-q_{1}a_{1}- \sum_{i=2}^{m} [ {Q_{i}}a_{i}-{Q_{i-1}}a_{i} ] \Biggr] \\& \qquad {}+ \int _{s}^{t} \Biggl[ {G_{1} \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{1} ( q_{1}a_{1},\tilde{u} ) } \\& \qquad {}-\sum_{i=2}^{m}{ \bigl[ G_{1} ( Q_{i}a_{i}, \tilde{u} ) -G_{1} ( Q_{i-1}a_{i},\tilde{u} ) \bigr] } \Biggr] \vartheta ^{{\prime \prime }} ( \tilde{u} ) \,d\tilde{u}, \end{aligned}$$

equivalent to

$$\begin{aligned}& \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) -\vartheta ( {q_{1}}a_{1} )-\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \\& \quad = \int _{s}^{t} \Biggl[ {G_{1} \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{1} ( q_{1}a_{1},\tilde{u} ) } \\& \qquad{} -\sum_{i=2}^{m}{ \bigl[ G_{1} ( Q_{i}a_{i}, \tilde{u} ) -G_{1} ( Q_{i-1}a_{i},\tilde{u} ) \bigr] } \Biggr] \vartheta ^{{\prime \prime }} ( \tilde{u} ) \,d\tilde{u}. \end{aligned}$$
(2.2)

By taking Fink’s identity (1.20), it is obvious that

$$\begin{aligned} \vartheta ^{{\prime \prime }} ( x ) =&\frac{1}{t-s} \sum_{n=0}^{r-3}\frac{r-n-2}{n!} \bigl[ ( x-t ) ^{n}\vartheta ^{ ( n+1 ) } ( t )- ( x-s ) ^{n} \vartheta ^{ ( n+1 ) } ( s ) \bigr] \\ &{}+\frac{1}{ ( t-s ) ( r-3 ) ! } \int _{s}^{t} ( x-u ) ^{r-3}k ( u,x ) \vartheta ^{ ( r ) } ( u ) \,du. \end{aligned}$$
(2.3)

Using (2.3) in (2.2), we have

$$\begin{aligned}& \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) -\vartheta ( {q_{1}}a_{1} )-\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \\& \quad = \frac{1}{t-s} \int _{s}^{t} \Biggl[ {G_{1} \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{1} ( q_{1}a_{1},\tilde{u} ) } \\& \qquad {}-\sum_{i=2}^{m} \bigl[ G_{1} ( Q_{i}a_{i},\tilde{u} )-G_{1} ( Q_{i-1}a_{i},\tilde{u} ) \bigr] \Biggr] \\& \qquad {}\times \sum_{n=0}^{r-3} \frac{r-n-2}{n!} \bigl[ ( \tilde{u}-t ) ^{n}\vartheta ^{ ( n+1 ) } ( t )- ( \tilde{u}-s ) ^{n}\vartheta ^{ ( n+1 ) } ( s ) \bigr] \,d\tilde{u} \\& \qquad {}+\frac{1}{ ( t-s ) ( r-3 ) ! } \int _{s}^{t} \Biggl[ {G_{1} \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{1} ( q_{1}a_{1},\tilde{u} ) } \\& \qquad {}-\sum_{i=2}^{m} \bigl[ G_{1} ( Q_{i}a_{i},\tilde{u} )-G_{1} ( Q_{i-1}a_{i},\tilde{u} ) \bigr] \Biggr] \\& \qquad {}\times \biggl[ \int _{s}^{t} ( \tilde{u}-u ) ^{r-3}k ( u, \tilde{u} ) \vartheta ^{ ( r ) } ( u ) \,du \biggr] \,d\tilde{u}. \end{aligned}$$

Now interchange the integral and summation in the first term and apply Fubini’s theorem in the second term, identity (2.1) is immediate for \(\delta =1\).

Furthermore, using identities (1.16)–(1.19) in the LHS of inequality (1.4) and following the proof as given for the case \(\delta =1\), we obtain identity (2.1) for \(\delta \in \{ 2,\ldots ,5 \} \). □

We present inequality (1.4) for r-convex functions as follows.

Theorem 2.2

Let all the assumptions of Theorem 2.1be satisfied, and let for \(r\geq 3\), ϑ be r-convex. If

$$\begin{aligned}& \int _{s}^{t} \Biggl[ {G_{\delta } \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{\delta } ( q_{1}a_{1},\tilde{u} ) }-\sum_{i=2}^{m} \bigl[G_{\delta } ( Q_{i}a_{i},\tilde{u} ) - G_{\delta } ( Q_{i-1}a_{i},\tilde{u} ) \bigr] \Biggr] \\& \quad {} \times (\tilde{u}-u ) ^{r-3}k ( u,\tilde{u} ) \,d\tilde{u} \geq 0 \end{aligned}$$
(2.4)

holds, then

$$\begin{aligned}& \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) -\vartheta ( {q_{1}}a_{1} )-\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \\& \quad \geq \frac{1}{t-s}\sum_{n=0}^{r-3} \frac{r-n-2}{n!} \int _{s}^{t} \Biggl[ {G_{\delta } \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) - G_{\delta } ( q_{1}a_{1}, \tilde{u} ) } \\& \qquad {} -\sum_{i=2}^{m}{ \bigl[ G_{\delta } ( Q_{i}a_{i}, \tilde{u} ) -G_{\delta } ( Q_{i-1}a_{i},\tilde{u} ) \bigr] } \Biggr] \\& \qquad {}\times \bigl[ ( \tilde{u}-t ) ^{n}\vartheta ^{ ( n+1 ) } ( t )- ( \tilde{u}-s ) ^{n}\vartheta ^{ ( n+1 ) } ( s ) \bigr]\,d\tilde{u}. \end{aligned}$$
(2.5)

If the reversed inequality holds in (2.4), then (2.5) holds in the reversed direction.

Proof

The absolute continuity of \({\vartheta }^{ (r-1 )}\) defined on \([s,t ]\) implies the existence of \(\vartheta ^{ (r )}\) almost everywhere. We use the r-convexity of ϑ, and from Theorem 1.9 we have \(\vartheta ^{ (r )} (x )\geq 0\) for all \(x\in [s,t ]\). Use the nonnegativity of \(\vartheta ^{ (r )}\) together with inequality (2.4) in (2.1), inequality (2.5) is immediate. □

Theorem 2.3

Let \(\vartheta : [s,t ] \rightarrow \mathbb{R}\) be continuous and convex, and let \(G_{\delta }\) be the Green’s functions defined in (1.10)(1.14). Let \(a_{i}\), \(q_{i} \in \mathbb{R}\) (\(1\leq i\leq m \)), and let \({q_{1}}a_{1}\), \(\sum_{i=1}^{m}q{_{i}}a_{i}\), \(Q_{i}a_{i}\), \(Q_{i-1}a_{i} \in [ s,t ] \) for all \(i\in \{ 2,\ldots ,m \} \). Then the following statements are equivalent:

  1. (i)

    For every continuous convex function ϑ, inequality (1.4) holds.

  2. (ii)

    For the Green’s functions \(G_{\delta }\) and for all \(\tilde{u}\in [s,t ]\), we have

    $$ G_{\delta } \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i}, \tilde{u} \Biggr)-G_{\delta } ( {q_{1}}a_{1},\tilde{u} ) - \sum_{i=2}^{m} \bigl[ G_{\delta } ( {Q_{i}}a_{i},\tilde{u} ) -G_{\delta } ( {Q_{i-1}}a_{i},\tilde{u} ) \bigr]\geq 0. $$
    (2.6)

If the reversed inequalities hold in (1.4) and (2.6), then statements (i) and (ii) are also equivalent.

Proof

The idea of the proof is the same as given in [15].

Let statement (i) be satisfied. As the functions \(G_{\delta } (\cdot,\tilde{u} )\) are continuous and convex for all \(\delta \in \{1,\ldots ,5\}\) such that \(\tilde{u}\in [s,t ]\), inequality (1.4) also holds for these functions \(G_{\delta } (\cdot,\tilde{u} )\) for every fixed δ and inequality (2.6) is immediate.

Let statement (ii) be satisfied, and let ϑ be a twice differentiable convex function. As from Lemma 1.7 the function ϑ can be represented in the forms (1.15)–(1.19), it is easy to see that

$$\begin{aligned}& \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) -\vartheta ( {q_{1}}a_{1} )-\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \\& \quad = \int _{s}^{t} \Biggl[G_{\delta } \Biggl( \sum _{i=1}^{m}{q_{i}}a_{i}, \tilde{u} \Biggr)- G_{\delta } ( {q_{1}}a_{1},\tilde{u} )- \sum_{i=2}^{m} \bigl[G_{\delta } ( Q_{i}a_{i},\tilde{u} ) - G_{\delta } ( Q_{i-1}a_{i},\tilde{u} ) \bigr] \Biggr] \\& \qquad {}\times \vartheta ^{\prime \prime } (\tilde{u} )\,d \tilde{u}. \end{aligned}$$
(2.7)

Now use inequality (2.6) together with \(\vartheta ^{\prime \prime } (\tilde{u} )\geq 0\) for all \(\tilde{u}\in [s,t ]\) in (2.7), inequality (1.4) is immediate.

The differentiability condition can be eliminated here as it is possible to approximate uniformly a continuous convex function by convex polynomials (see [23, p. 172]). □

We present refinement of inequality (1.4) as follows.

Theorem 2.4

Let all the assumptions of Theorem 2.1be satisfied, and let r be even such that \(r > 3\). Let \(a_{i}\), \(q_{i} \in \mathbb{R}\) (\(1\leq i\leq m \)) such that \(a_{i}\geq 0\) and \(q_{i}>0\), and let the sequence \(\{a_{i}\}_{i=1}^{m}\) bein WM.

  1. (i)

    If \(\vartheta : [s,t ]\rightarrow \mathbb{R}\) is r-convex, then (2.5) holds.

  2. (ii)

    Let (2.5) be satisfied, and let \(\Gamma : [s,t ]\rightarrow \mathbb{R}\) be a function defined by

    $$\begin{aligned} \Gamma (x ) =&{\frac{1}{t-s}} \int _{s}^{t}G_{\delta } (x, \tilde{u} )\sum _{n=0}^{r-3} \frac{r-n-2}{n! } \\ &{}\times \bigl[ (\tilde{u}-t )^{n}\vartheta ^{ (n+1 )} (t )- ( \tilde{u}-s )^{n}\vartheta ^{ (n+1 )} (s ) \bigr]\,d\tilde{u}. \end{aligned}$$

    If Γ is convex, then the RHS of (2.5) is nonnegative and we have

    $$ \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) -\vartheta ( {q_{1}}a_{1} ) \geq \sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr]. $$
    (2.8)

Proof

Using the convex functions \(G_{\delta }\) in (1.4), we have

$$ G_{\delta } \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i}, \tilde{u} \Biggr) - G_{\delta } ( {q_{1}}a_{1}, \tilde{u} ) -\sum_{i=2}^{m} \bigl[ G_{\delta } ( {Q_{i}}a_{i},\tilde{u} ) -G_{\delta } ( {Q_{i-1}}a_{i},\tilde{u} ) \bigr] \geq 0. $$

For \(s \leq \tilde{u} \leq u\), the inequalities

$$ \begin{aligned} & \int _{s}^{u} \Biggl[ {G_{\delta } \Biggl( \sum_{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{\delta } ( q_{1}a_{1},\tilde{u} ) }- \sum_{i=2}^{m} \bigl[G_{\delta } ( Q_{i}a_{i},\tilde{u} ) - G_{\delta } ( Q_{i-1}a_{i},\tilde{u} ) \bigr] \Biggr] \\ &\quad \times ( \tilde{u}-u ) ^{r-3}k ( u, \tilde{u} ) \,d\tilde{u} \geq 0 \end{aligned} $$
(2.9)

and

$$ \begin{aligned} & \int _{s}^{u} \Biggl[ {G_{\delta } \Biggl( \sum_{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{\delta } ( q_{1}a_{1},\tilde{u} ) }- \sum_{i=2}^{m} \bigl[G_{\delta } ( Q_{i}a_{i},\tilde{u} )-G_{\delta } ( Q_{i-1}a_{i},\tilde{u} ) \bigr] \Biggr] \\ &\quad \times ( \tilde{u}-u )^{r-3}k ( u, \tilde{u} ) \,d\tilde{u} \leq 0 \end{aligned} $$

hold for even r such that \(r>3\) and for odd r such that \(r\geq 3\) respectively. For \(u \leq \tilde{u} \leq t\), the inequality

$$ \begin{aligned} & \int _{u}^{t} \Biggl[ {G_{\delta } \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{\delta } ( q_{1}a_{1},\tilde{u} ) }- \sum_{i=2}^{m} \bigl[G_{\delta } ( Q_{i}a_{i},\tilde{u} )-G_{\delta } ( Q_{i-1}a_{i},\tilde{u} ) \bigr] \Biggr] \\ &\quad \times ( \tilde{u}-u ) ^{r-3}k ( u, \tilde{u} ) \,d\tilde{u} \geq 0 \end{aligned} $$
(2.10)

holds for \(r\geq 3\).

  1. (i)

    Inequality (2.9) together with inequality (2.10) yields inequality (2.4) for even r such that \(r > 3\). As ϑ is r-convex for even r such that \(r>3\), applying Theorem 2.2, we obtain (2.5).

  2. (ii)

    Clearly, inequality (2.5) can be written as

    $$\begin{aligned}& \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) -\vartheta ( {q_{1}}a_{1} )-\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \\& \quad \geq \Gamma \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) -\Gamma ( {q_{1}}a_{1} ) -\sum _{i=2}^{m} \bigl[ \Gamma ( {Q_{i}}a_{i} ) -\Gamma ( {Q_{i-1}}a_{i} ) \bigr]. \end{aligned}$$
    (2.11)

    As the sequence \(\{a_{i}\}_{i=1}^{m}\) is ↘ in WM, replace ϑ by Γ in Theorem 1.3 (i), the nonnegativity of the RHS of (2.11) is immediate, and we obtain (2.8). □

An application to the Shannon entropy is the following:

Corollary 2.5

Let all the assumptions of Theorem 2.1be satisfied, and let \(\mathbf{q}= ( q_{1},\ldots ,q_{m} ) \) be a positive probability distribution. Let r be even such that \(r > 3\), and let \(\vartheta : [s,t ]\rightarrow \mathbb{R}\) be r-convex.

  1. (i)

    Let \({S} ( \mathbf{q} ) \), \({q_{1}}\log \left( {\frac{1}{q_{1}}} \right) \), \(Q_{i}\log \left( {\frac{1}{q_{i}}} \right) \), \(Q_{i-1}\log \left ( {\frac{1}{q_{i}}} \right ) \in [ s,t ] \) for all \(i\in \{ 2,\ldots ,m \} \), where \(0< q_{i}<1\) (\(1\leq i\leq m \)). Then

    $$\begin{aligned}& \vartheta \bigl( {S} ( \mathbf{q} ) \bigr) -\vartheta \biggl( q_{1} \log \biggl( \frac{1}{q_{1}} \biggr) \biggr) \\& \qquad {} {}-\sum_{i=2}^{m} \biggl[ \vartheta \biggl( Q_{i}\log \biggl( \frac{1}{q_{i}} \biggr) \biggr) - \vartheta \biggl( Q_{i-1}\log \biggl( \frac{1}{q_{i}} \biggr) \biggr) \biggr] \\& \quad \geq \frac{1}{t-s}\sum_{n=0}^{r-3} \frac{r-n-2}{n!} \int _{s}^{t} \Biggl[ {G_{\delta } \bigl( {S} ( \mathbf{q} ) ,\tilde{u} \bigr) -G_{ \delta } \biggl( {q_{1}}\log \biggl( {\frac{1}{q_{1}}} \biggr) , \tilde{u} \biggr) } \\& \qquad {} -\sum_{i=2}^{m}{ \biggl[ G_{\delta } \biggl( {Q_{i}}\log \biggl( {\frac{1}{q_{i}}} \biggr) ,\tilde{u} \biggr) -G_{\delta } \biggl( Q_{i-1}\log \biggl( {\frac{1}{q_{i}}} \biggr) ,\tilde{u} \biggr) \biggr] } \Biggr] \\& \qquad {}\times \bigl[ ( \tilde{u}-t ) ^{n}\vartheta ^{ ( n+1 ) } ( t ) - ( \tilde{u}-s ) ^{n} \vartheta ^{ ( n+1 ) } ( s ) \bigr] \,d \tilde{u}. \end{aligned}$$
    (2.12)
  2. (ii)

    Let \(-{S} ( \mathbf{q} ) \), \({q_{1}}\log q_{1}\), \(Q_{i}\log q_{i}\), \(Q_{i-1}\log q_{i} \in [ s,t ] \) for all \(i\in \{ 2,\ldots ,m \} \), where \(q_{i}\geq 1\) (\(1\leq i\leq m \)). Then

    $$\begin{aligned}& \vartheta \bigl( -{S} ( \mathbf{q} ) \bigr) -\vartheta ( {q_{1}}\log q_{1} ) -\sum_{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}\log q_{i} ) -\vartheta ( Q_{i-1}\log q_{i} ) \bigr] \\& \quad \geq \frac{1}{t-s}\sum_{n=0}^{r-3} \frac{r-n-2}{n!} \int _{s}^{t} \Biggl[ {G_{\delta } \bigl( -{S} ( \mathbf{q} ) ,\tilde{u} \bigr) -G_{\delta } ( {q_{1}}\log q_{1},\tilde{u} ) } \\& \qquad {} -\sum_{i=2}^{m}{ \bigl[ G_{\delta } ( {Q_{i}}\log q_{i}, \tilde{u} ) -G_{\delta } ( Q_{i-1}\log q_{i},\tilde{u} ) \bigr] } \Biggr] \\& \qquad {}\times \bigl[ ( \tilde{u}-t ) ^{n}\vartheta ^{ ( n+1 ) } ( t )- ( \tilde{u}-s ) ^{n}\vartheta ^{ ( n+1 ) } ( s ) \bigr] \,d\tilde{u}. \end{aligned}$$
    (2.13)

Proof

  1. (i)

    Take \(a_{i} = \log \left( {\frac{1}{q_{i}}} \right)\) and use Theorem 2.4(i), (2.12) is immediate.

  2. (ii)

    Taking \(a_{i} = - \log \left( {\frac{1}{q_{i}}} \right)\) and following the proof of (i), we obtain (2.13). □

Remark 2.6

Special cases when \(\sum_{i=1}^{m}{q_{i}}a_{i} = \sum_{i=1}^{m}{q_{i}}\log \left( {\frac{1}{q_{i}}} \right ) = {S} ( \mathbf{q} )\), \(0< q_{i}<1\), and \(\sum_{i=1}^{m}{q_{i}}a_{i} = - \sum_{i=1}^{m}{q_{i}}\log \left( {\frac{1}{q_{i}}} \right ) = -{S} ( \mathbf{q} )\), \(q_{i}\geq 1\), also hold.

3 Grüss type inequality—upper bounds for the remainder in the obtained identity

In this section we present some new bounds for the remainder in the obtained identity. We denote

$$\begin{aligned} \varphi (u ) =& \int _{s}^{t} \Biggl[ {G_{\delta } \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{\delta } ( q_{1}a_{1}, \tilde{u} ) }-\sum_{i=2}^{m}G_{\delta } ( Q_{i}a_{i},\tilde{u} ) \\ &{} +\sum_{i=2}^{m}G_{\delta } ( Q_{i-1}a_{i}, \tilde{u} ) \Biggr] ( \tilde{u}-u ) ^{r-3}k ( u, \tilde{u} ) \,d\tilde{u}, \end{aligned}$$
(3.1)

where \({q_{1}}a_{1}\), \(\sum_{i=1}^{m}q{_{i}}a_{i}\), \(Q_{i}a_{i}\), \(Q_{i-1}a_{i} \in [ s,t ] \) for all \(i\in \{ 2,\ldots ,m \} \). In addition \(G_{\delta } (\cdot,\tilde{u} )\) and \(k (u,\tilde{u} )\), appearing in (3.1), are defined in (1.10)–(1.14) and (1.21) respectively.

Theorem 3.1

Let \(\vartheta : [s,t ]\rightarrow \mathbb{R}\), \(\vartheta ^{ (r )}\) be absolutely continuous for \(r\geq 3\) with \(( \cdot -s )\) \(( t-\cdot ) \) \((\vartheta ^{ (r+1 )} )^{2}\in L_{1} [s,t ]\), and let \(G_{\delta }\) and Λ be the same as defined in (1.10)(1.14) and (1.22) respectively. Let \({q_{1}}a_{1}\), \(\sum_{i=1}^{m}q{_{i}}a_{i}\), \(Q_{i}a_{i}\), \(Q_{i-1}a_{i} \in [ s,t ] \) for all \(i\in \{ 2,\ldots ,m \} \). If φ is defined in (3.1), then

$$\begin{aligned}& \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) -\vartheta ( {q_{1}}a_{1} )-\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \\& \quad =\frac{1}{t-s}\sum_{n=0}^{r-3} \frac{r-n-2}{n!} \int _{s}^{t} \Biggl[ {G_{\delta } \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{\delta } ( q_{1}a_{1}, \tilde{u} ) } \\& \qquad {} -\sum_{i=2}^{m}{ \bigl[ G_{\delta } ( Q_{i}a_{i}, \tilde{u} ) -G_{\delta } ( Q_{i-1}a_{i},\tilde{u} ) \bigr] } \Biggr] \\& \qquad {}\times \bigl[ ( \tilde{u}-t ) ^{n}\vartheta ^{ ( n+1 ) } ( t )- ( \tilde{u}-s ) ^{n}\vartheta ^{ ( n+1 ) } ( s ) \bigr]\,d\tilde{u} \\& \qquad {} + \frac{\vartheta ^{ ( r-1 ) }(t)-\vartheta ^{ ( r-1 ) } (s )}{ (t-s )^{2} ( r-3 ) !} \int _{s}^{t}\varphi (u )\,du+ {\Xi _{r}} (s,t; \vartheta ), \end{aligned}$$
(3.2)

where the remainder \({\Xi _{r}} (s,t;\vartheta )\) satisfies the estimation

$$\begin{aligned} \bigl\vert {\Xi _{r}} (s,t;\vartheta ) \bigr\vert \leq & \frac{1}{ ( r-3 ) !}\cdot \sqrt{ \frac{\Lambda (\varphi (u ),\varphi (u ) )}{2(t-s)}} \\ &{}\times \sqrt{ \int _{s}^{t} ( u-s ) ( t-u ) \bigl( \vartheta ^{ (r+1 )} (u ) \bigr) ^{2}\,du}. \end{aligned}$$
(3.3)

Proof

Applying Theorem 1.10 for \(\zeta _{1}\rightarrow \varphi \) and \(\zeta _{2}\rightarrow \vartheta ^{ (r )}\), we have

$$\begin{aligned}& \biggl\vert \frac{1}{t-s} \int _{s}^{t}\varphi (u )\vartheta ^{(r)} (u )\,du-\frac{1}{t-s}\int _{s}^{t}\varphi (u )\,du\cdot \frac{1}{t-s} \int _{s}^{t}\vartheta ^{(r)} (u )\,du \biggr\vert \\& \quad \leq \sqrt{ \frac{\Lambda (\varphi (u ),\varphi (u ) )}{2(t-s)}} \cdot \sqrt{ \int _{s}^{t} ( u-s ) ( t-u ) \bigl( \vartheta ^{ (r+1 )} (u ) \bigr) ^{2}\,du}. \end{aligned}$$
(3.4)

Divide both sides of (3.4) by \(( r-3 ) !\) and in the obtained expression denote

$$ {\Xi _{r}} (s,t;\vartheta )= \frac{1}{ ( t-s ) ( r-3 ) ! }\int _{s}^{t}\varphi (u ) \biggl[\vartheta ^{(r)} (u ) - \frac{\vartheta ^{ ( r-1 ) }(t)-\vartheta ^{ ( r-1 ) } (s )}{t-s } \biggr]\,du, $$
(3.5)

inequality (3.3) is immediate. Now, taking the value of \(\frac{1}{ ( t-s ) ( r-3 )! }\int _{s}^{t}\varphi (u )\vartheta ^{(r)}(u)\,du \) from (3.5) and substituting in identity (2.1), we have (3.2). □

Theorem 3.2

Let \(\vartheta : [s,t ]\rightarrow \mathbb{R}\), \(\vartheta ^{ (r )}\) be absolutely continuous for \(r\geq 3\), and let \(\vartheta ^{ (r+1 )} \geq 0\) on \([s,t ]\). Let \({\Xi _{r}} (s,t;\vartheta )\) be the same as defined in (3.5). If φ is the same as defined in (3.1), then we obtain (3.2) and the remainder \({\Xi _{r}} (s,t;\vartheta )\) satisfies

$$ \bigl\vert {\Xi _{r}} (s,t;\vartheta ) \bigr\vert \leq \frac{ \Vert \varphi ' ( u ) \Vert _{\infty }}{ ( r-3 ) !} \biggl[ \frac{\vartheta ^{ ( r-1 ) } ( s ) +\vartheta ^{ ( r-1 ) } ( t ) }{2}- \frac{\vartheta ^{ ( r-2 ) } ( t ) - \vartheta ^{ ( r-2 ) } ( s ) }{t-s} \biggr]. $$
(3.6)

Proof

Applying Theorem 1.11 for \(\zeta _{1}\rightarrow \varphi \) and \(\zeta _{2}\rightarrow \vartheta ^{ (r )}\), we have

$$\begin{aligned}& \biggl\vert \frac{1}{t-s} \int _{s}^{t}\varphi (u )\vartheta ^{ (r )} (u )\,du-\frac{1}{t-s}\int _{s}^{t}\varphi (u )\,du\cdot \frac{1}{t-s} \int _{s}^{t}\vartheta ^{(r)} (u )\,du \biggr\vert \\& \quad \leq \frac{1}{2 ( t-s ) } \bigl\Vert \varphi ' ( u ) \bigr\Vert _{\infty } \int _{s}^{t} ( u-s ) ( t-u ) \vartheta ^{(r+1)} (u )\,du. \end{aligned}$$
(3.7)

Dividing inequality (3.7) by \(( r-3 ) !\) and using the expression

$$\begin{aligned}& \int _{s}^{t} ( u-s ) ( t-u )\vartheta ^{(r+1)} (u )\,du \\& \quad = ( t-s ) \bigl( \vartheta ^{ ( r-1 ) } ( s ) +\vartheta ^{ ( r-1 ) } ( t ) \bigr)-2 \bigl( \vartheta ^{ ( r-2 ) } (t )- \vartheta ^{ ( r-2 ) } (s ) \bigr), \end{aligned}$$

we have

$$\begin{aligned} \bigl\vert {\Xi _{r}} (s,t;\vartheta ) \bigr\vert \leq & \frac{1}{2 ( t-s ) }\cdot \frac{ \Vert \varphi ' ( u ) \Vert _{\infty }}{ ( r-3 ) !} \bigl[ ( t-s ) \bigl( \vartheta ^{ ( r-1 ) } ( s ) +\vartheta ^{ ( r-1 ) } ( t ) \bigr) \\ &{}-2 \bigl( \vartheta ^{ ( r-2 ) } (t )- \vartheta ^{ ( r-2 ) } (s ) \bigr) \bigr]. \end{aligned}$$
(3.8)

After simplification, inequality (3.8) reduces to (3.6), and by taking the value of \(\frac{1}{ (t-s ) ( r-3 )! } \int _{s}^{t} \varphi (u )\vartheta ^{ (r )} (u )\,du \) from (3.5) and by inserting into (2.1), we have the representation (3.2). □

4 Ostrowski type inequality related to the obtained identity

Here we present the Ostrowski type inequality related to the identity given in the second section.

Theorem 4.1

Let all the assumptions of Theorem 2.1be satisfied, and let φ be the same as defined in (3.1). Let \(p,q\in [ 1,\infty ] \) such that \(\frac{1}{p}+\frac{1}{q}=1\), and let \(|\vartheta ^{ ( r ) }|^{p}: [ s,t ] \rightarrow \mathbb{R}\) be an \(\mathbb{R}\) integrable function for some \(r\geq 3\). Let \({q_{1}}a_{1}\), \(\sum_{i=1}^{m}q{_{i}}a_{i}\), \(Q_{i}a_{i}\), \(Q_{i-1}a_{i} \in [ s,t ] \) for all \(i\in \{ 2,\ldots ,m \} \). Then

$$\begin{aligned}& \Biggl\vert \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) - \vartheta ( {q_{1}}a_{1} ) -\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \\& \qquad {} {}-\frac{1}{t-s}\sum_{n=0}^{r-3} \frac{r-n-2}{n!} \int _{s}^{t} \Biggl[ {G_{\delta } \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr)- G_{\delta } ( q_{1}a_{1}, \tilde{u} ) } \\& \qquad {} -\sum_{i=2}^{m}{ \bigl[ G_{\delta } ( Q_{i}a_{i}, \tilde{u} ) -G_{\delta } ( Q_{i-1}a_{i},\tilde{u} ) \bigr] } \Biggr] \\& \qquad {} \times \bigl[ ( \tilde{u}-t ) ^{n} \vartheta ^{ ( n+1 ) } ( t )- ( \tilde{u}-s ) ^{n} \vartheta ^{ ( n+1 ) } ( s ) \bigr]\,d\tilde{u} \Biggr\vert \\& \quad \leq \biggl( \int _{s}^{t} \bigl\vert \vartheta ^{ ( r ) } ( u ) \bigr\vert ^{p}\,du \biggr) ^{\frac{1}{p}} \biggl( \int _{s}^{t} \bigl\vert {\dot{\varphi }} ( u ) \bigr\vert ^{q}\,du \biggr) ^{\frac{1}{q}}, \end{aligned}$$
(4.1)

where \({\dot{\varphi }} (u ):={ \frac{{\varphi } (u )}{ ( t-s ) ( r-3 ) !}}\). The constant \(( \int _{s}^{t} \vert {\dot{\varphi }} ( u ) \vert ^{q}\,du ) ^{\frac{1}{q}}\) in (4.1) is sharp for \(1< p\leq \infty \) and best possible for \(p=1\).

Proof

From identity (2.1), we have

$$\begin{aligned}& \Biggl\vert \vartheta \Biggl( \sum_{i=1}^{m}{q_{i}}a_{i} \Biggr) - \vartheta ( {q_{1}}a_{1} ) -\sum _{i=2}^{m} \bigl[ \vartheta ( {Q_{i}}a_{i} ) -\vartheta ( {Q_{i-1}}a_{i} ) \bigr] \\& \qquad {} {}-\frac{1}{t-s}\sum_{n=0}^{r-3} \frac{r-n-2}{n!} \int _{s}^{t} \Biggl[ {G_{\delta } \Biggl( \sum _{i=1}^{m}q_{i}a_{i}, \tilde{u} \Biggr) -G_{\delta } ( q_{1}a_{1}, \tilde{u} ) } \\& \qquad {} -\sum_{i=2}^{m}{ \bigl[ G_{\delta } ( Q_{i}a_{i}, \tilde{u} ) -G_{\delta } ( Q_{i-1}a_{i},\tilde{u} ) \bigr] } \Biggr] \\& \qquad {} \times \bigl[ ( \tilde{u}-t ) ^{n} \vartheta ^{ ( n+1 ) } ( t )- ( \tilde{u}-s ) ^{n} \vartheta ^{ ( n+1 ) } ( s ) \bigr]\,d\tilde{u} \Biggr\vert \\& \quad = \biggl\vert \int _{s}^{t}\vartheta ^{ ( r ) } ( u ) {\dot{ \varphi }} ( u ) \,du \biggr\vert . \end{aligned}$$
(4.2)

On the RHS of (4.2), we apply Hölder’s inequality for integrals as follows:

$$ \biggl\vert \int _{s}^{t}\vartheta ^{ ( r ) } ( u ) {\dot{ \varphi }} ( u ) \,du \biggr\vert \leq \biggl( \int _{s}^{t} \bigl\vert \vartheta ^{ ( r ) } ( u ) \bigr\vert ^{p}\,du \biggr) ^{\frac{1}{p}} \biggl( \int _{s}^{t} \bigl\vert {\dot{\varphi }} ( u ) \bigr\vert ^{q}\,du \biggr) ^{\frac{1}{q}}, $$
(4.3)

and inequality (4.3) together with (4.2) implies (4.1).

For the proof of the sharpness of the constant \(( \int _{s}^{t} \vert {\dot{\varphi }} ( u ) \vert ^{q}\,du ) ^{\frac{1}{q}}\), we define

$$ \vartheta ^{(r)} ( u ) = \textstyle\begin{cases} \operatorname{sgn} {\dot{\varphi }} ( u ). \vert { \dot{\varphi }} ( u ) \vert ^{\frac{1}{p-1}}, & 1< p< \infty , \\ \operatorname{sgn} {\dot{\varphi }} ( u ) , & p=\infty \end{cases} $$

such that the equality in (4.3) holds.

For \(p=1\), we will prove that the following inequality

$$ \biggl\vert \int _{s}^{t}\vartheta ^{ ( r ) } ( u ) {\dot{ \varphi }} ( u ) \,du \biggr\vert \leq \max_{u \in [s,t ]} \bigl\vert { \dot{\varphi }} ( u ) \bigr\vert . \int _{s}^{t} \bigl\vert \vartheta ^{ (r )} ( u ) \bigr\vert \,du $$
(4.4)

is the best possible inequality.

Let \(\vert {\dot{\varphi }} ( u ) \vert \) attain its maximum at \(u_{0}\in [ s,t ] \).

  1. Case 1.

    When \({\dot{\varphi }} ( u_{0} ) >0\). For small enough ϵ, we define

    $$ \vartheta _{\epsilon } ( u ) = \textstyle\begin{cases} 0, & s\leq u\leq u_{0}, \\ \frac{1}{\epsilon r!} ( u-u_{0} ) ^{r}, & u_{0}\leq u\leq u_{0}+ \epsilon , \\ \frac{1}{(r-1)!} ( u-u_{0} ) ^{r-1}, & u_{0}+\epsilon \leq u\leq t.\end{cases} $$

    Clearly,

    $$ \biggl\vert \int _{s}^{t}\vartheta _{\epsilon }^{ ( r ) } ( u ) {\dot{\varphi }} ( u ) \,du \biggr\vert = \frac{1}{\epsilon }\int _{u_{0}}^{u_{0}+\epsilon }{\dot{\varphi }} ( u ) \,du $$
    (4.5)

    and

    $$ \int _{s}^{t} \bigl\vert \vartheta _{\epsilon }^{ ( r ) } ( u ) \bigr\vert \,du =\frac{1}{\epsilon } \int _{u_{0}}^{u_{0}+ \epsilon }\,du=1. $$
    (4.6)

    Now, using (4.5) and (4.6) in (4.4) and also using the fact that \(\vert {\dot{\varphi }} ( u ) \vert \) attains its maximum at \(u_{0}\in [ s,t ] \), we have

    $$ \frac{1}{\epsilon } \int _{u_{0}}^{u_{0}+\epsilon }{\dot{\varphi }} ( u ) \,du\leq {\dot{ \varphi }} ( u_{0} )\cdot 1= { \dot{\varphi }} ( u_{0} ) . $$

    As \(\lim_{\epsilon \to 0} \frac{1}{\epsilon }\int _{u_{0}}^{u_{0}+ \epsilon }{\dot{\varphi }} ( u ) \,du = {\dot{\varphi }} ( u_{0} )\), the statement follows.

  2. Case 2.

    When \({\dot{\varphi }} ( u_{0} ) <0\), we define

    $$ \vartheta _{\epsilon } ( u ) = \textstyle\begin{cases} \frac{1}{(r-1)!} ( u-u_{0}-\epsilon ) ^{r-1}, & s\leq u \leq u_{0}, \\ -\frac{1}{\epsilon r!} ( u-u_{0}-\epsilon ) ^{r}, & u_{0} \leq u\leq u_{0}+\epsilon , \\ 0, & u_{0}+\epsilon \leq u\leq t, \end{cases} $$

    and the remaining part is the same as above.

 □

Remark 4.2

Remark 2.6 is also valid for Sects. 3 and 4.