1 Introduction and Preliminaries

Let us start with Jensen’s inequality for convex functions, one of the most celebrated inequalities in mathematics and statistics (for detailed discussion and history, see [7] and [12]). Throughout the paper we assume that J and [ab] are intervals in \(\mathbb {R}\).

Proposition 1

Let \(x_1,x_2,\ldots ,x_n\in [a,b]\), and let \(w_1,w_2,\ldots ,w_n\) be positive real numbers such that \(W_n=\sum _{i=1}^nw_i=1\). If \(\varphi : [a,b]\rightarrow \mathbb {R}\) is a convex function, then the inequality

$$\begin{aligned} \varphi \left( \sum _{i=1}^nw_ix_i\right) \le \sum _{i=1}^nw_i\varphi (x_i) \end{aligned}$$

holds.

In paper [8], A. McD. Mercer proved the following variant of Jensen’s inequality, which we will refer to as Mercer’s inequality.

Proposition 2

Let \(x_1,x_2,\ldots ,x_n\in [a,b]\), and let \(w_1,w_2,\ldots ,w_n\) be positive real numbers such that \(W_n=\sum _{i=1}^nw_i=1\). If \(\varphi : [a,b]\rightarrow \mathbb {R}\) is a convex function, then the inequality

$$\begin{aligned} \varphi \left( m_1+m_2-\sum _{i=1}^nw_ix_i\right) \le \varphi (m_1)+\varphi (m_2)-\sum _{i=1}^nw_i\varphi (x_i) \end{aligned}$$
(1)

holds, where

$$\begin{aligned} m_1=\min _{1\le i \le n}\{x_i\}\;\;\;\;\text {and}\quad m_2=\max _{1\le i \le n}\{x_i\}. \end{aligned}$$

There are many versions, variants and generalizations of Proposition 1 and Proposition 2, see, e.g., [1], [3, 9] and [10]. Here we state few integral versions of Jensen’s inequality from [12, pp. 58–59] which will be needed in the main theorems of our paper.

Proposition 3

Let \(f:[a,b]\rightarrow J\) be a continuous function. If the function \(H:[a,b]\rightarrow \mathbb {R}\) is nondecreasing, bounded and \(H(a)\not =H(b)\), then for every continuous convex function \(\varphi :J\rightarrow \mathbb {R}\) the inequality

$$\begin{aligned} \varphi \left( \frac{ \int ^b_a f(t)dH(t)}{\int ^b_a dH(t)}\right) \le \frac{\int ^b_a \varphi (f(t))dH(t)}{\int ^b_a dH(t)} \end{aligned}$$
(2)

holds.

Inequality (2) can hold under different set of assumptions. For example, for a monotonic f, assumptions on H can be relaxed. The following proposition gives Jensen–Steffensen’s inequality.

Proposition 4

If \(f:[a,b] \rightarrow J\) is continuous and monotonic (either nonincreasing or nondecreasing) and \(H:[a,b]\rightarrow \mathbb {R}\) is either continuous or of bounded variation satisfying

$$\begin{aligned} H(a) \le H(t) \le H(b) \quad \hbox { for all } t\in [a,b], \qquad H(b) > H (a), \end{aligned}$$

then (2) holds.

If we replace the assumption of monotonicity of f over the whole interval [ab] in Proposition 4 with monotonicity over subintervals, we obtain the following, Jensen–Boas inequality.

Proposition 5

If \(H:[a,b]\rightarrow \mathbb {R}\) is continuous or of bounded variation satisfying

$$\begin{aligned} H(a) \le H (x_1) \le H(y_1) \le H(x_2) \le \cdots \le H(y_{k-1}) \le H (x_k) \le H(b) \end{aligned}$$

for all \(x_i \in (y_{i-1}, y_i )\) (\(y_0 = a\), \(y_k = b\)), and \(H(b) > H (a)\), and if f is continuous and monotonic (either nonincreasing or nondecreasing) in each of the k intervals \((y_{i-1}, y_i)\), then inequality (2) holds.

In our construction for next proposition, we recall the definitions of majorization:

For fixed \( n\ge 2\),

$$\begin{aligned} \mathbf {x} = \left( x_{1}, \ldots , x_{n}\right) ,\quad \mathbf {y} = \left( y_{1}, \ldots , y_{n} \right) \end{aligned}$$

denote two real n-tuples and

$$\begin{aligned} x_{[1]}\,\ge \, x_{[2]}\,\ge \cdots \ge \, x_{[n]},\,\,\,\,\, y_{[1]}\,\ge \, y_{[2]}\,\ge \cdots \ge \, y_{[n]} \end{aligned}$$

be their ordered components.

Definition 1

For \(\mathbf {x},\, \mathbf {y} \,\in \mathbb {R}^n\),

$$\begin{aligned} \mathbf {x}\prec \mathbf {y}\quad \text {if}\quad \left\{ \begin{array}{ll} \sum _{i=1}^k x_{[i]}\le \sum _{i=1}^k y_{[i]}&{},\quad k\in \{1,\ldots ,n-1\},\\ \sum _{i=1}^n x_{[i]}=\sum _{i=1}^n y_{[i]}&{}, \end{array} \right. \end{aligned}$$

when \(\mathbf {x}\prec \mathbf {y}\), \(\mathbf {x}\) is said to be majorized by \(\mathbf {y}\) or \(\mathbf {y}\) majorizes \(\mathbf {x}\).

This notion and notation of majorization was introduced by Hardy et al. in [4]. The following extension of (1) is given by M. Niezgoda in [9] which we will refer to as Niezgoda’s inequality.

Proposition 6

Let \(\varphi : [a,b]\rightarrow \mathbb {R}\) be a continuous convex function. Suppose that \(\mathbf {\alpha }=(\alpha _1,\ldots ,\alpha _m)\) with \(\alpha _j\in J\), and \(\mathbf X =(x_{ij})\) is a real \(n\times m\) matrix such that \(x_{ij}\in J\) for all \( i\in \{1,\dots ,n\}, \,\,j\in \{1,\dots ,m\}\).

If \(\mathbf {\alpha }\) majorizes each row of \(\mathbf X \), i.e.,

$$\begin{aligned} \mathbf x _{i.}=(x_{i1},\ldots ,x_{im})\prec (\alpha _1,\ldots ,\alpha _m)=\mathbf {\alpha } \text{ for } \text{ each } i\in \{1,\dots ,n\}, \end{aligned}$$

then we have the inequality

$$\begin{aligned} \varphi \left( \sum _{j=1}^{m}\alpha _j-\sum _{j=1}^{m-1}\sum _{i=1}^nw_ix_{ij}\right) \le \sum _{j=1}^{m}\varphi (\alpha _j)-\sum _{j=1}^{m-1}\sum _{i=1}^nw_i\varphi (x_{ij}), \end{aligned}$$
(3)

where \(\sum _{i=1}^{n}w_i=1\) with \(w_{i}\ge 0\).

The paper is organized as follows: In Sect. 2 we will give an integral generalization of Niezgoda’s inequality. In the process we will use an integral majorization result of Pečarić [11] and prove a lemma which gives the Jensen–Boas inequality on disjoint set of subintervals. In Sect. 3 we will give a refinement of the inequality obtained in Sect. 2.

2 Generalized Mercer’s Inequalities

Here we state some results needed in the main theorems of this section. The following proposition is a consequence of Theorem 1 in [11] (see also [12, p. 328]) and represents an integral majorization result.

Proposition 7

Let \( f,\,g : [a,b]\rightarrow J\) be two nonincreasing continuous functions, and let \(H:[a,b]\rightarrow \mathbb {R}\) be a function of bounded variation. If

$$\begin{aligned} \int _a^x f(t)\, dH(t)\,\le & {} \,\int _a^x g(t)\,dH(t),\quad \text {for each} \quad x\in (a,b),\\ \text {and} \quad \int _a^b f(t)\,dH(t)\,= & {} \,\int _a^b g(t)\,dH(t), \end{aligned}$$

hold, then for every continuous convex function \(\varphi :J\rightarrow \mathbb {R}\) the following inequality holds

$$\begin{aligned} \int _a^b\varphi (f(t))\,dH(t)\le \int _a^b\varphi (g(t))\,dH(t). \end{aligned}$$
(4)

Remark 1

If \( f,\,g : [a,b]\rightarrow J\) are two nondecreasing continuous functions such that

$$\begin{aligned} \int _x^b f(t)\, dH(t)\,\le & {} \,\int _x^b g(t)\,dH(t),\quad \text {for each} \quad \;x\in (a, b),\\ \text {and} \quad \int _a^b f(t)\,dH(t)\,= & {} \,\int _a^b g(t)\,dH(t), \end{aligned}$$

then again inequality (4) holds. In this paper we will state our results for nonincreasing f and g satisfying the assumption of Proposition 7, but they are still valid for nondecreasing f and g satisfying the above condition, see, for example, [6, p. 584].

The following lemma shows that the subintervals in the Jensen–Boas inequality (see Proposition 5) can be disjoint for the inequality of type (2) to hold.

Lemma 1

Let \(H:[a,b] \rightarrow \mathbb {R}\) be continuous or a function of bounded variation, and let \(a \le a_1 \le b_1 \le a_2 \le \cdots \le a_k \le b_k \le b\) be a partition of the interval [ab], \(I=\bigcup ^k_{i=1} [a_i,b_i]\) and \(L = \int _I dH(t)\). If

$$\begin{aligned} H(a_i ) \le H(t) \le H(b_i) \quad \hbox { for all } t\in (a_i, b_i) \hbox { and } 1\le i \le k \end{aligned}$$
(5)

and \(L>0\), then for every function \(f:[a,b] \rightarrow J\) which is continuous and monotonic (either nonincreasing or nondecreasing) in each of the k intervals \((a_i, b_i)\) and every convex and continuous function \(\varphi :J \rightarrow \mathbb {R}\), the following inequality holds

$$\begin{aligned} \varphi \left( \frac{1}{L} \int _I f(t) \, dH(t) \right) \le \frac{1}{L} \int _I \varphi (f(t)) \, dH(t). \end{aligned}$$

Proof

Denote \(w_i = \int _{a_i}^{b_i} dH(t)\). Due to (5), if \(H(a_i) = H(b_i)\) then dH is a null-measure on \([a_i, b_i]\) and \(w_i=0\), while otherwise \(w_i >0\). Denote \(S =\{ i : w_i >0 \}\) and

$$\begin{aligned} x_i = \frac{1}{w_i} \int _{a_i}^{b_i} f(t) \, dH(t), \quad \text { for } i\in S. \end{aligned}$$

Notice that

$$\begin{aligned} L= & {} \int _I dH(t) = \sum _{i\in S} w_i >0, \quad \int _I \varphi (f(t)) \, dH(t) = \sum _{i\in S} \int _{a_i}^{b_i} \varphi (f(t)) \, dH(t) \end{aligned}$$

and, due to Proposition 4,

$$\begin{aligned} w_i \varphi (x_i) \le \int _{a_i}^{b_i} \varphi (f(t)) \, dH(t), \quad \hbox { for } i\in S. \end{aligned}$$

Therefore, taking into account the discrete Jensen’s inequality,

$$\begin{aligned}&\varphi \left( \frac{1}{L} \int _I f(t) \, dH(t) \right) = \varphi \left( \frac{1}{L} \sum _{i\in S} w_i x_i \right) \le \frac{1}{L} \sum _{i\in S} w_i \varphi (x_i) \\&\quad \le \frac{1}{L} \sum _{i\in S} \int _{a_i}^{b_i} \varphi (f(t)) \, dH(t) = \frac{1}{L} \int _I \varphi (f(t)) \, dH(t). \end{aligned}$$

The following theorem is our main result of this section, and it gives a generalization of Proposition 6.

Theorem 1

Let \(a=b_0\le a_1< b_1< a_2< b_2<\cdots< a_k< b_k\le a_{k+1}=b\), \(I=\bigcup ^k_{i=1} (a_i,b_i)\), \(I^c= [a,b]\backslash I=\bigcup ^{k+1}_{i=1}[b_{i-1},a_i]\) and \(H:[a,b] \rightarrow \mathbb {R}\) be a function of bounded variation such that \(H(b_{i-1} ) \le H(t) \le H(a_i)\) for all \(t\in (b_{i-1}, a_i)\) and \(1\le i \le k+1\) and \(L = \int _{I^c} dH(t)>0\).

Furthermore, let \((X,\Sigma ,\mu )\) be a measure space with positive finite measure \(\mu \), let \(g:[a,b]\rightarrow J\) be a nonincreasing continuous function, and let \(f:X\times [a,b]\rightarrow J\) be a measurable function such that the mapping \(t\mapsto f(s,t)\) is nonincreasing and continuous for each \(s\in X\),

$$\begin{aligned} \int _a^x f(s,t)\, dH(t)\,\le & {} \,\int _a^x g(t)dH(t),\quad \text {for each} \quad x\in (a,b), \nonumber \\ \text {and} \quad \int _a^b f(s,t)\,dH(t)\,= & {} \,\int _a^b g(t)\,dH(t). \end{aligned}$$
(6)

Then, for a continuous convex function \(\varphi : J\rightarrow \mathbb {R}\) the following inequality holds

$$\begin{aligned}&\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (X)}\int _{I}\int _X f(s,t)d\mu (s)dH(t)\right) \right) \nonumber \\&\qquad \le \frac{1}{L}\left( \int ^b_{a}\varphi (g(t))dH(t)-\frac{1}{\mu (X)}\int _{I}\int _X\varphi (f(s,t))d\mu (s)dH(t)\right) . \end{aligned}$$
(7)

Proof

Using Fubini’s theorem, equality (6) and the integral Jensen’s inequality (2) we get

$$\begin{aligned}&\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (X)}\int _{I}\int _X f(s,t)d\mu (s)dH(t)\right) \right) \nonumber \\&\quad =\varphi \left( \frac{1}{\mu (X)}\int _X\left[ \frac{1}{L}\int _{I^c}f(s,t)dH(t)\right] d\mu (s)\right) \nonumber \\&\quad \le \frac{1}{\mu (X)}\int _X\varphi \left( \frac{1}{L}\int _{I^c}f(s,t)dH(t)\right) d\mu (s). \end{aligned}$$
(8)

Applying Lemma 1 and Proposition 7, respectively, we have

$$\begin{aligned} \varphi \left( \frac{1}{L}\int _{I^c}f(s,t)dH(t)\right)&\le \frac{1}{L} \int _{I^c}\varphi (f(s,t))dH(t) \nonumber \\&\le \frac{1}{L} \left( \int ^b_{a}\varphi ( g(t))dH(t)-\int _{I}\varphi (f(s,t))dH(t)\right) . \end{aligned}$$
(9)

Finally, combining (8) and (9) we obtain inequality (7).

Corollary 1

Let \(\mathbf {\alpha }=(\alpha _1,\ldots ,\alpha _m)\) with \(\alpha _j\in J\) and \(\mathbf {X}=(x_{ij})\) be a real \(n\times m\) matrix such that \(x_{ij}\in J\) for all \(i \in \{1,\ldots , n\}, \,j \in \{1,\ldots ,m\}\), and let \(\mathbf {\alpha }\) majorize each row of \(\mathbf {X}\), that is

$$\begin{aligned} \mathbf {x}_{i.}=(x_{i1},\ldots ,x_{im})\prec (\alpha _1,\ldots ,\alpha _m)=\mathbf {\alpha } \text{ for } \text{ each } i\in \{1,\dots ,n\}. \end{aligned}$$

Moreover, let \(a_l,b_l \in \mathbb {N}\), \(l \in 1,\ldots ,k\), be such that \(1=b_0\le a_1< b_1< a_2< b_2<\cdots< a_k< b_k\le a_{k+1}=m+1\) and denote \(L=\sum ^{k+1}_{l=1}(a_l-b_{l-1})\). Then, for every continuous convex function \(\varphi : J\rightarrow \mathbb {R}\) the inequality

$$\begin{aligned}&\varphi \left( \frac{1}{L}\left( \sum _{j=1}^{m}a_j-\frac{1}{W_n}\sum _{l=1}^{k} \sum ^{b_{l}-1}_{j=a_l}\sum _{i=1}^nw_ix_{ij}\right) \right) \\&\quad \le \frac{1}{L}\left( \sum _{j=1}^{m}\varphi (a_j)-\frac{1}{W_n}\sum _{l=1}^{k}\sum ^{b_{l}-1}_{j=a_l}\sum _{i=1}^nw_i\varphi (x_{ij})\right) \end{aligned}$$

holds, where \(W_n=\sum _{i=1}^{n}w_i>0\) with \(w_{i}\ge 0\).

Proof

The proof of this corollary follows from Theorem 1 by taking step functions. More concretely, for \(a=b_0=1\), \(b=a_{k+1}=m+1\), \(f(s,t)=\sum ^n_{i=1}\sum ^m_{j=1}x_{ij}\,\chi _{[i,i+1)}(s)\chi _{[j,j+1)}(t)\), \(g(t)=\sum ^m_{j=1}\alpha _j\,\chi _{[j,j+1)}(t)\), \(X=[1,n+1)\), \(d\mu (s) = \sum _{i=1}^n w_i\chi _{[i,i+1)}(s) \mathrm{{d}}s\) and \(H(t)=t\).

Remark 2

If in Corollary 1 we take \(k=1\), \(a_1=1\) and \(b_1=m\) and assume \(W_n=\sum _{i=1}^{n}w_i=1\), then we get Niezgoda’s inequality (3).

Remark 3

For some similar results involving generalized convex functions, see [5].

3 Refinements

Throughout this section we assume that \(E\subset X\) with \(\mu (E),\mu (E^c)>0\) and we use the following notations

$$\begin{aligned} W_{E}=\frac{\mu (E)}{\mu (X)},\quad W_{E^c}=\frac{\mu (E^c)}{\mu (X)}=1-W_{E}. \end{aligned}$$

The following refinement of (7) is valid.

Theorem 2

Let \(a=b_0\le a_1< b_1< a_2< b_2<\cdots< a_k< b_k\le a_{k+1}=b\), \(I=\bigcup ^k_{i=1} (a_i,b_i)\), \(I^c= [a,b]\backslash I=\bigcup ^{k+1}_{i=1}[b_{i-1},a_i]\) and \(H:[a,b] \rightarrow \mathbb {R}\) be a function of bounded variation such that \(H(b_{i-1} ) \le H(t) \le H(a_i)\) for all \(t\in (b_{i-1}, a_i)\) and \(1\le i \le k+1\) and \(L = \int _{I^c} dH(t)>0\).

Furthermore, let \((X,\Sigma ,\mu )\) be a measure space with positive finite measure \(\mu \), let \(g:[a,b]\rightarrow J\) be a nonincreasing continuous function, and let \(f:X\times [a,b]\rightarrow J\) be a measurable function such that the mapping \(t\mapsto f(s,t)\) is nonincreasing and continuous for each \(s\in X\),

$$\begin{aligned} \int _a^x f(s,t)\, dH(t)\,\le & {} \,\int _a^x g(t)dH(t),\quad \text {for each} \quad x\in (a,b),\\ \text {and} \quad \int _a^b f(s,t)\,dH(t)\,= & {} \,\int _a^b g(t)\,dH(t). \end{aligned}$$

Then, for a continuous convex function \(\varphi : J\rightarrow \mathbb {R}\), the inequalities

$$\begin{aligned}&\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (X)}\int _{I}\int _X f(s,t)d\mu (s)dH(t)\right) \right) \le F(f,g,\varphi ;E) \le \nonumber \\&\frac{1}{L}\left( \int ^b_{a}\varphi (g(t))dH(t)-\frac{1}{\mu (X)}\int _{I}\int _X\varphi (f(s,t))d\mu (s)dH(t)\right) \end{aligned}$$
(10)

hold, where

$$\begin{aligned}&F(f,g,\varphi ;E) = W_{E}\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (E)}\int _{I}\int _{E}f(s,t)d\mu (s)dH(t)\right) \right) \\&\quad +\,W_{E^c}\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (E^c)}\int _{I}\int _{E^c}f(s,t)d\mu (s)dH(t)\right) \right) . \end{aligned}$$

Proof

Following the proof of Theorem 3 of [2], by using convexity of the function \(\varphi \), we have

$$\begin{aligned}&\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (X)}\int _{I}\int _Xf(s,t)d\mu (s)dH(t)\right) \right) \\&\quad =\varphi \left( W_{E}\left[ \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (E)}\int _{E}\int _{I}f(s,t)dH(t)\right) d\mu (s)\right] \right. \\&\qquad +\,\left. W_{E^c}\left[ \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (E^c)}\int _{E^c}\int _{I}f(s,t)dH(t)\right) d\mu (s)\right] \right) \\&\quad \le W_{E}\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (E)}\int _{E}\int _{I}f(s,t)dH(t)\right) d\mu (s)\right) \\&\qquad +\,W_{E^c}\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (E^c)}\int _{E^c}\int _{I}f(s,t)dH(t)\right) d\mu (s)\right) \\&\quad =F(f,g,\varphi ;E) \end{aligned}$$

for any E, which proves the first inequality in (10).

By inequality (7) we also have

$$\begin{aligned}&F(f,g,\varphi ;E) =W_{E}\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (E)}\int _{I}\int _{E}f(s,t)d\mu (s)dH(t)\right) \right) \\&\qquad +\,W_{E^c}\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (E^c)}\int _{I}\int _{E^c}f(s,t)d\mu (s)dH(t)\right) \right) \\&\quad \le W_{E}\left[ \frac{1}{L}\left( \int ^b_{a} \varphi (g(t))dH(t)-\frac{1}{\mu (E)}\int _{I}\int _{E}\varphi (f(s,t))d\mu (s)dH(t)\right) \right] \\&\qquad +\,W_{E^c}\left[ \frac{1}{L}\left( \int ^b_{a} \varphi (g(t))dH(t)-\frac{1}{\mu (E^c)}\int _{I}\int _{E^c}\varphi (f(s,t))d\mu (s)dH(t)\right) \right] \\&\quad =\frac{1}{L}\left( \int ^b_{a}\varphi (g(t))dH(t)-\frac{1}{\mu (X)}\int _{I}\int _X\varphi (f(s,t))d\mu (s)dH(t)\right) \end{aligned}$$

for any E, which proves the second inequality in (10).

Remark 4

Direct consequences of the previous theorem are the following two inequalities

$$\begin{aligned}&\varphi \left( \frac{1}{L}\left( \int ^b_{a} g(t)dH(t)-\frac{1}{\mu (X)}\int _{I}\int _Xf(s,t)d\mu (s)dH(t)\right) \right) \\&\quad \le \inf \limits _{\{E:0<\mu (E)<\mu (X)\}}F(f,g,\varphi ;E) \end{aligned}$$

and

$$\begin{aligned}&\sup \limits _{\{E:0<\mu (E)<\mu (X)\}}F(f,g,\varphi ;E)\\&\quad \le \frac{1}{L}\left( \int ^b_{a}\varphi (g(t))dH(t)-\frac{1}{\mu (X)}\int _{I}\int _X\varphi (f(s,t))d\mu (s)dH(t)\right) . \end{aligned}$$