1 Introduction

In 1948, the American mathematician Shannon founded information theory with a well-known paper, “A Mathematical Theory of Communication”. The entropy of a variable means “amount of information” for the variable. In information theory, the Shannon entropy is a central source used to measure uncertainty. In recent years, many investigators have studied the topic of Shannon entropy. It helps to estimate bits based on the frequency and alphabet size of the symbols.

In [12] Horváth et al. have provided the following definition.

Shannon entropy

For positive probability distribution \(\mathbf{l}=(l_{1},l_{2},\ldots ,l_{m})\), the Shannon entropy is given by

$$ S(\mathbf{l})= - \sum_{j=1}^{m}l_{j} \log (l_{j}). $$

In [18], authors gave the following inequality concerning the notion of Shannon entropy:

$$ \sum_{k=1}^{j}l_{k} \log \frac{1}{l_{k}} \leq \sum_{k=1}^{j}l_{k} \log \frac{1}{f_{k}}, $$
(1)

for all \(l_{k}, f_{k} > 0\) with

$$ \sum_{k=1}^{j}l_{k} = \sum _{k=1}^{j}f_{k} = 1. $$

If \(l_{k} =f_{k}\) for all k, then equality holds in (1).

Some refinements of discrete and integral Shannon’s inequalities are discussed by Matić et al. in [17]. Sadia et al. [14] have used sequences of real numbers to estimate bounds of Shannon entropy. In [15], authors have discussed new findings for the Shannon entropies. Recently, Zipf-Mandelbrot law and Shannon entropy have been studied extensively, e.g., in [1316] for convex functions and in [1] for 3-convex functions. However, all these results involve classical integrals.

S. Hilger presented the theory of time scales, providing a platform to deal with discrete and continuous cases. The suggested books are [7, 8] to look at time-scale calculus. Recently, several mathematicians have worked on this subject and constituted many results, see [1, 3, 5]. In [21], authors established Hölder’s inequality in the two-dimensional case via delta integrals.

Agarwal et al. [2] established Jensen’s inequality using delta integrals. In [22], Wong et al. extended Jensen’s inequality via delta integrals for arbitrary time scales. Ansari et al. [3] provided the differential entropy via delta integrals and proved some Shannon-type inequalities. In [6], Martin Bohner and Thomas Matthews provided Grüss-type inequalities via diamond-α integrals (a convex combination of delta and nabla integrals). In [10], Brito et al. had defined diamond integral, which combines nabla and delta integrals. Recently, Bilal et al. [5] extended Jensen’s inequality via multiple diamond integrals on time-scale calculus.

The main motivation behind this work is to generalize the results using approximate symmetric integrals (called diamond integrals). These results extend the results obtained in [3, 17]. For this purpose, the Shannon entropy is reformulated by diamond integrals, and its bounds are derived with the help of Jensen’s inequality involving diamond–integral formalism. By choosing a set of real numbers as a time scale in the obtained results, we get classical results already proved in literature [17]. Moreover, by choosing a set of natural numbers, including zero, as the time scale in the proved results, existing discrete classical results are obtained [12].

In this study, the flow of work is given as follows: In Sect. 2, some definitions and results of time-scale calculus are recalled. Next, in Sects. 3, Shannon-type inequalities and Grüss-type inequalities are generalized for diamond integrals. To illustrate the theoretical results, some examples are given in discrete and q-calculus. Finally, in Sect. 4, some results related to the entropy of continuous random variable via diamond integrals are proved.

2 Preliminaries of time scales

In this section, few definitions of time-scale calculus are recalled.

Time Scale \(\mathbb{T}\) is a non-empty closed subset of real numbers. The examples include \([0,1]\), set of integers and \(q^{\mathbb{N}_{0}}\) (\(q>1\)).

In [19], authors have defined diamond-alpha integral given as follows:

Consider \(l : \mathbb{T}\rightarrow \mathbb{R}\) to be a continuous mapping and \(c_{1}, c_{2} \in \mathbb{T}\) (\(c_{1} < c_{2}\)). The diamond-alpha integral of l from \(c_{1}\) to \(c_{2}\) is given as

$$ \int _{c_{1}}^{c_{2}}l(\vartheta )\diamondsuit _{\alpha} \vartheta := \int _{c_{1}}^{c_{2}} \alpha l(\vartheta )\triangle \vartheta + \int _{c_{1}}^{c_{2}}(1- \alpha )l(\vartheta )\nabla \vartheta ,\quad 0\leq \alpha \leq 1, $$
(2)

if γl is △, and \((1-\gamma )l\) is ∇ integrable on \([c_{1},c_{2}]_{\mathbb{T}}\).

In case \(\alpha = 0\), we have nabla-integral, and for \(\alpha = 1\), we have delta-integral.

In [9], Brito et al. defined the real function γ given as follows:

$$ \gamma (r)=\lim_{s\rightarrow r} \frac{\sigma (r)-s}{\sigma (r)+2r-2s-\rho (r)}. $$
(3)

Obviously,

$$ \gamma (r)=\textstyle\begin{cases} \frac{1}{2}, & \text{if }r\text{ is dense;} \\ \frac{\sigma (r)-r}{\sigma (r)- \rho (r)}, & \text{if }r\text{ is not dense.} \end{cases} $$

In general, \(0\leq \gamma (r)\leq 1\).

Now we recall diamond integral that was proposed to provide a genuine symmetric integral on time scales. This integral provides better approximation than delta, nabla, and diamond-alpha integrals. In [10], an “approximate” symmetric integral on time scales, which is called diamond integral, defined as follows:

Consider \(l : \mathbb{T}\rightarrow \mathbb{R}\) to be a continuous mapping and \(c_{1}, c_{2} \in \mathbb{T}\) (\(c_{1} < c_{2}\)). The diamond integral of l from \(c_{1}\) to \(c_{2}\) is given as

$$ \int _{c_{1}}^{c_{2}}l(\vartheta )\diamondsuit \vartheta := \int _{c_{1}}^{c_{2}} \gamma (\vartheta )l(\vartheta ) \triangle \vartheta + \int _{c_{1}}^{c_{2}}\bigl(1- \gamma (\vartheta )\bigr)l( \vartheta )\nabla \vartheta ,\quad 0\leq \gamma (\vartheta ) \leq 1, $$
(4)

if γl is △, and \((1-\gamma )l\) is ∇ integrable on \([c_{1},c_{2}]_{\mathbb{T}}\).

Remark 1

If \(\mathbb{T}= \mathbb{R}\), then \(\int _{c}^{d} l(\vartheta )\diamondsuit \vartheta =\int _{c}^{d} l( \vartheta )\,d\vartheta \).

See [10], for more properties of diamond integrals.

In [4], authors had provided Jensen’s inequality via diamond integrals, given as follows:

Consider that \(K \subset \mathbb{R}\) and \(\phi \in C(K,\mathbb{R})\) is convex. Suppose h is ♢-integrable on Λ, such that \(h(\Lambda )\subset K\). If \(l:\Lambda \rightarrow \mathbb{R}\) is ♢-integrable, and \(\int _{\Lambda }l(\vartheta )\diamondsuit \vartheta \) is positive, then

$$ \phi \biggl( \frac{\int _{\Upsilon}{l(\vartheta ){h}(\vartheta )\diamondsuit \vartheta}}{\int _{\Upsilon}{l(\vartheta )\diamondsuit \vartheta}} \biggr)\leq \frac{\int _{\Upsilon}{l(\vartheta )\phi ({h}(\vartheta ))\diamondsuit \vartheta}}{\int _{\Upsilon}{l(\vartheta )\diamondsuit \vartheta}}. $$
(5)

3 Main results

First, in this section, some results are proved using weighted Jensen’s inequality for diamond integral. Second, some auxiliary inequalities for diamond integral are established. Examples of some proved results, in discrete and q-Calculus, are also given in this section.

Hypothesis

  1. H1:

    \(\Upsilon := [c_{1},c_{2}]_{\mathbb{T}}\), with \(c_{1},c_{2} \in \mathbb{T}\) and \(c_{1}< c_{2}\).

  2. H2:

    The base of ‘log’ is for some fixed \(\bar{c} > 1\).

  3. H3:

    The set of all probability densities \(E=:\{l|l : \Upsilon \rightarrow \mathbb{R}, l(\vartheta )>0, \int _{ \Upsilon}l(\vartheta ) \diamondsuit \vartheta =1 \}\).

Throughout the paper, we assume that H1 to H3 hold.

The following result is established using weighted diamond Jensen’s inequality.

Theorem 1

Assume that \(l,\xi , \frac{1}{\xi}:{\Upsilon}\rightarrow \mathbb{R}^{+}\) are ♢-integrable functions such that

$$ \int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta > 0 $$

on ϒ. If \(\int _{\Upsilon}\xi (\vartheta )l(\vartheta )\diamondsuit \vartheta < \infty \) and \(\int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta < \infty \), then

$$\begin{aligned} 0 \leq & \log \biggl[ \frac{\int _{\Upsilon}\xi (\vartheta )l(\vartheta )\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \biggr]- \frac{\int _{\Upsilon}l(\vartheta )\log \xi (\vartheta )\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \end{aligned}$$
(6)
$$\begin{aligned} \leq & \log \biggl[ \frac{\int _{\Upsilon}\xi (\vartheta )l(\vartheta )\diamondsuit \vartheta \int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{ (\int _{\Upsilon}{l(\vartheta )}\diamondsuit \vartheta )^{2}} \biggr] \end{aligned}$$
(7)
$$\begin{aligned} \leq & \frac{1}{\ln \bar{c}} \biggl[ \frac{\int _{\Upsilon}\xi (\vartheta )l(\vartheta )\diamondsuit \vartheta \int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{ (\int _{\Upsilon}{l(\vartheta )}\diamondsuit \vartheta )^{2}}-1 \biggr]. \end{aligned}$$
(8)

Proof

Use \(\phi (\vartheta )=-\log \vartheta \) in (5) to get

$$ 0 \leq \log \biggl[ \frac{\int _{\Upsilon}\xi (\vartheta )l(\vartheta )\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \biggr]- \frac{\int _{\Upsilon}l(\vartheta )\log [\xi (\vartheta )]\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta}. $$

Therefore, (6) is proved. Replace ξ by \(\frac{1}{\xi}\) in (6), which implies

$$ - \frac{\int _{\Upsilon}l(\vartheta )\log [\xi (\vartheta )]\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta } \leq \log \biggl[ \frac{\int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \biggr]. $$
(9)

Now, by adding \(\log [ \frac{\int _{\Upsilon}{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} ]\) to both sides of (9), one gets

$$\begin{aligned} \log \biggl[ \frac{\int _{\Upsilon}{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \biggr] - \frac{\int _{\Upsilon}l(\vartheta )\log [\xi (\vartheta )]\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta } \leq & \log \biggl[ \frac{\int _{\Upsilon}\xi (\vartheta )l(\vartheta )\diamondsuit \vartheta \int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{ (\int _{\Upsilon}{l(\vartheta )}\diamondsuit \vartheta )^{2}} \biggr], \end{aligned}$$

which is (7). The following relation is given in [17].

$$ \log y \leq \frac{1}{\ln \bar{c}}(y-1),\quad y>0. $$
(10)

Use \(y= \frac{\int _{\Upsilon}\xi (\vartheta )l(\vartheta )\diamondsuit \vartheta \int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{ (\int _{\Upsilon}{l(\vartheta )}\diamondsuit \vartheta )^{2}}\) in (10) to get (8). □

Remark 2

If \(\gamma (\vartheta )=1\) for all \(\vartheta \in \Upsilon \), then Theorem 1 coincides with [3, Theorem 3].

Example 1

Choose \(\mathbb{T}=\mathbb{R}\), then from Theorem 1, we get

$$\begin{aligned} 0 \leq & \log \biggl[ \frac{\int _{\Upsilon}\xi (\vartheta )l(\vartheta )\,d\vartheta}{\int _{\Upsilon}l(\vartheta )\,d\vartheta} \biggr]- \frac{\int _{\Upsilon}l(\vartheta )\log \xi (\vartheta )\,d\vartheta}{\int _{\Upsilon}l(\vartheta )\,d\vartheta} \\ \leq & \log \biggl[ \frac{\int _{\Upsilon}\xi (\vartheta )l(\vartheta )\,d\vartheta \int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\,d\vartheta}{ (\int _{\Upsilon}{l(\vartheta )}\,d\vartheta )^{2}} \biggr] \\ \leq & \frac{1}{\ln \bar{c}} \biggl[ \frac{\int _{\Upsilon}\xi (\vartheta )l(\vartheta )\,d\vartheta \int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\,d\vartheta}{ (\int _{\Upsilon}{l(\vartheta )}\,d\vartheta )^{2}}-1 \biggr]. \end{aligned}$$

Example 2

Choose set of integers as time scale, then from Theorem 1, we obtain

$$\begin{aligned} 0 \leq & \log \biggl[ \frac{\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}{ \xi (\vartheta )l(\vartheta )}+\sum_{\vartheta ={c_{1}}+1}^{{c_{2}}}{ \xi (\vartheta )l(\vartheta )}}{\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}{ l(\vartheta )}+\sum_{\vartheta ={c_{1}}+1}^{{c_{2}}}{ l(\vartheta )}} \biggr] \\ &{}- \frac{\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}{ l(\vartheta )\log \xi (\vartheta )}+\sum_{\vartheta ={c_{1}}+1}^{{c_{2}}}{ l(\vartheta )\log \xi (\vartheta )}}{\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}{ l(\vartheta )}+\sum_{\vartheta ={c_{1}}+1}^{{c_{2}}}{ l(\vartheta )}} \\ \leq & \log \biggl[ \frac{ (\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}{ \xi (\vartheta )l(\vartheta )}+\sum_{\vartheta ={c_{1}}+1}^{{c_{2}}}{ {l(\vartheta )}{\xi (\vartheta )}} ) (\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}\frac{l(\vartheta )}{\xi (\vartheta )}+\sum_{\vartheta ={c_{1}}+1}^{{c_{2}}}{ \frac{l(\vartheta )}{\xi (\vartheta )}} )}{ (\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}{l(\vartheta )}+\sum_{\vartheta ={c_{1}}+1}^{{c_{2}}}{ {l(\vartheta )}} )^{2}} \biggr] \\ \leq & \frac{1}{\ln \bar{c}} \biggl[ \frac{ (\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}{ \xi (\vartheta )l(\vartheta )}+\sum_{\vartheta ={c_{1}}+1}^{{c_{2}}}{ {l(\vartheta )}{\xi (\vartheta )}} ) (\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}\frac{l(\vartheta )}{\xi (\vartheta )}+\sum_{\vartheta ={c_{1}}+1}^{{c_{2}}}{ \frac{l(\vartheta )}{\xi (\vartheta )}} )}{ (\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}{l(\vartheta )}+\sum_{\vartheta ={c_{1}}+1}^{{c_{2}}}{ {l(\vartheta )}} )^{2}}-1 \biggr]. \end{aligned}$$

Example 3

Choose set \(q^{\mathbb{N}_{0}}\), \(q > 1\) as time scale, then \(\vartheta = q^{y} \in q^{\mathbb{N}_{0}}\),

$$ \gamma (\vartheta )= \frac{\sigma (\vartheta )-\vartheta}{\sigma (\vartheta )-\rho (\vartheta )} =\frac{q^{y+1}-q^{y}}{q^{y+1}-q^{y-1}} =\frac{q^{2}-q}{q^{2}-1}= \frac{q}{q+1}, $$

and

$$ 1-\gamma (\vartheta )=1-\frac{q}{q+1}=\frac{1}{q+1}. $$

If we take \(c_{1}= q\) and \(c_{2}=q^{n}\), then from Theorem 1, we obtain

$$\begin{aligned} 0 \leq & \log \biggl[ \frac{\sum_{m=1}^{n-1}{ q^{m+1}\xi (q^{m})l(q^{m})}+\sum_{m=2}^{n}{q^{m-1} \xi (q^{m})l(q^{m})}}{\sum_{m=1}^{n-1}{q^{m+1} l(q^{m})}+\sum_{m=2}^{n}{ q^{m-1}l(q^{m})}} \biggr] \\ &{}- \frac{\sum_{m=1}^{n-1}{q^{m+1} l(q^{m})\log \xi (q^{m})}+\sum_{m=2}^{n}{q^{m-1} l(q^{m})\log \xi (q^{m})}}{\sum_{m=1}^{n-1}{q^{m+1} l(q^{m})}+\sum_{m=2}^{n}{ q^{m-1}l(q^{m})}} \\ \leq & \log \Biggl[ \Biggl(\sum_{m=1}^{n-1}{ q^{m+1}\xi \bigl(q^{m}\bigr)l\bigl(q^{m}\bigr)}+ \sum_{m=2}^{n}{ {q^{m-1}l \bigl(q^{m}\bigr)} {\xi \bigl(q^{m}\bigr)}} \Biggr) \\ &{}\times \frac{ (\sum_{m=1}^{n-1}q^{m+1}\frac{l(q^{m})}{\xi (q^{m})}+\sum_{m=2}^{n}{ \frac{q^{m-1}l(q^{m})}{\xi (q^{m})}} )}{ (\sum_{m=1}^{n-1}{q^{m+1}l(q^{m})}+\sum_{m=2}^{n}{ {q^{m-1}l(q^{m})}} )^{2}} \Biggr] \\ \leq & \frac{1}{\ln \bar{c}} \Biggl[ \Biggl\{ \Biggl(\sum _{m=1}^{n-1}{ q^{m+1} \xi \bigl(q^{m}\bigr)l\bigl(q^{m}\bigr)}+\sum _{m=2}^{n}{q^{m-1} {l\bigl(q^{m} \bigr)} {\xi \bigl(q^{m}\bigr)}} \Biggr) \\ &{}\times \frac{ (\sum_{m=1}^{n-1}\frac{q^{m+1}l(q^{m})}{\xi (q^{m})}+\sum_{m=2}^{n}{ \frac{q^{m-1}l(q^{m})}{\xi (q^{m})}} )}{ (\sum_{m=1}^{n-1}{q^{m+1}l(q^{m})}+\sum_{m=2}^{n}{ {q^{m-1}l(q^{m})}} )^{2}} \Biggr\} -1 \Biggr] . \end{aligned}$$

3.1 Differential entropy via diamond integrals

Definition 1

The differential entropy of random variable Z for diamond integral can be defined as follows:

$$ h_{\bar{c}}(Z):= \int _{\Upsilon}l(z)\log \frac{1}{l(z)}\diamondsuit z, $$
(11)

where \(l(z)\) is a nonnegative density function on time scales and \(\int _{\Upsilon}l(z)\diamondsuit z = 1\).

The next theorem is a generalization of the integral Shannon inequality [17, Theorem 18] using the diamond integral. Moreover, by choosing \(\mathbb{T}=\mathbb{Z}\) in the following theorem, result concerning with the discrete Shannon entropy is obtained.

Theorem 2

Assume that \(l, f :{\Upsilon}\rightarrow \mathbb{R}^{+}\) are ♢-integrable functions with \(\int _{\Upsilon} l(\vartheta )\diamondsuit \vartheta > 0\). Define \(\varrho := \int _{\Upsilon} f(\vartheta )\diamondsuit \vartheta < \infty \) and for \(\bar{c} > 1\), one of the following ♢-integrals is finite:

$$ \begin{aligned} &Q_{l}:= \int _{\Upsilon}l(\vartheta )\log \frac{1}{l(\vartheta )} \diamondsuit \vartheta \quad \textit{and}\\ & Q_{f}:= \int _{\Upsilon}l( \vartheta )\log \frac{1}{f(\vartheta )}\diamondsuit \vartheta . \end{aligned}$$
(12)

If \(\int _{\Upsilon} \frac{l^{2}(\vartheta )}{f(\vartheta )} \diamondsuit \vartheta < \infty \), then

$$\begin{aligned} 0 \leq & \log \biggl[ \frac{\varrho}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \biggr]- \frac{(Q_{f}-Q_{r})}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \\ \leq & \log \biggl[ \frac{\varrho \int _{\Upsilon}\frac{l^{2}(\vartheta )}{f(\vartheta )}\diamondsuit \vartheta}{ (\int _{\Upsilon}{l(\vartheta )}\diamondsuit \vartheta )^{2}} \biggr] \\ \leq & \frac{1}{\ln \bar{c}} \biggl[ \frac{\varrho \int _{\Upsilon}\frac{l^{2}(\vartheta )}{f(\vartheta )}\diamondsuit \vartheta}{ (\int _{\Upsilon}{l(\vartheta )}\diamondsuit \vartheta )^{2}}-1 \biggr]. \end{aligned}$$
(13)

Proof

Use \(\xi (\vartheta )=\frac{f(\vartheta )}{l(\vartheta )}\) and \(\varrho = \int _{\Upsilon} f(\vartheta )\diamondsuit \vartheta = \int _{\Upsilon} \xi (\vartheta )l(\vartheta )\diamondsuit \vartheta < \infty \) in Theorem 1 to obtain

$$\begin{aligned} 0 \leq & \log \biggl[ \frac{\varrho}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \biggr]- \frac{\int _{\Upsilon}l(\vartheta )\log \frac{f(\vartheta )}{l(\vartheta )}\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \\ \leq & \frac{1}{\ln \bar{c}} \biggl[ \frac{\varrho \int _{\Upsilon}\frac{l^{2}(\vartheta )}{f(\vartheta )}\diamondsuit \vartheta}{ (\int _{\Upsilon}{l(\vartheta )}\diamondsuit \vartheta )^{2}}-1 \biggr]. \end{aligned}$$

Since

$$\begin{aligned} - \int _{\Upsilon}l(\vartheta )\log \frac{f(\vartheta )}{l(\vartheta )}\diamondsuit \vartheta =& Q_{f}-Q_{l}. \end{aligned}$$

Therefore, the result is proved. □

Remark 3

If \(\gamma (\vartheta )=1\) for all \(\vartheta \in \Upsilon \), then Theorem 2 coincides with [3, Theorem 4].

Corollary 1

Assume that \(l, f :{\Upsilon}\rightarrow \mathbb{R}^{+}\) are ♢-integrable functions. Define \(\varrho := \int _{\Upsilon} f(\vartheta )\diamondsuit \vartheta < \infty \). If \(\int _{\Upsilon} \frac{l^{2}(\vartheta )}{f(\vartheta )} \diamondsuit \vartheta < \infty \) and for \(\bar{c} > 1\) at least one of \(Q_{f}\) or \(Q_{l}\) is finite then

$$\begin{aligned} 0 \leq & \log \varrho +(Q_{f}-Q_{l}) \\ \leq & \frac{1}{\ln \bar{c}} \biggl[{\varrho \int _{\Upsilon} \frac{l^{2}(\vartheta )}{f(\vartheta )}\diamondsuit \vartheta}-1 \biggr]. \end{aligned}$$

Proof

In Theorem 2, use \(\int _{\Upsilon}{l(\vartheta )}\diamondsuit \vartheta = 1\). □

Remark 4

If \(\gamma (\vartheta )=1\) for all \(\vartheta \in \Upsilon \), then Corollary 1 coincides with [3, Corollary 1].

Example 4

For \(\mathbb{T}=\mathbb{R}\), Corollary 1 takes the form

$$\begin{aligned} 0 \leq & \log \int _{\Upsilon} f(\vartheta )\,d\vartheta + \biggl( \int _{ \Upsilon}l(\vartheta )\log \frac{1}{f(\vartheta )}\,d\vartheta - \int _{ \Upsilon}l(\vartheta )\log \frac{1}{l(\vartheta )}\,d\vartheta \biggr) \\ \leq & \log \biggl[ \int _{\Upsilon} f(\vartheta )\,d\vartheta \int _{ \Upsilon}\frac{l^{2}(\vartheta )}{f(\vartheta )}\,d\vartheta \biggr] \\ \leq & \frac{1}{\ln \bar{c}} \biggl[{ \int _{\Upsilon} f(\vartheta )\,d\vartheta \int _{\Upsilon}\frac{l^{2}(\vartheta )}{f(\vartheta )}\,d\vartheta}-1 \biggr]. \end{aligned}$$
(14)

Remark 5

Inequality (14) is the same as [17, Theorem 18].

Example 5

Choose set of integers as time scale, then from Corollary 1, we obtain

$$\begin{aligned} 0 \leq & \log (\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1} f \Biggl( \vartheta +\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}}f(\vartheta ) \Biggr) \\ &{}+ \Biggl(\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}l(\vartheta )\log \frac{1}{f(\vartheta )} +\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}}l( \vartheta )\log \frac{1}{f(\vartheta )} -\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}l( \vartheta )\log \frac{1}{l(\vartheta )} \\ &{}-\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}}l( \vartheta )\log \frac{1}{l(\vartheta )} \Biggr) \\ \leq & \log \Biggl[ \Biggl(\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1} f( \vartheta )+\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}} f(\vartheta ) \Biggr) \Biggl(\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1} \frac{l^{2}(\vartheta )}{f(\vartheta )} +\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}} \frac{l^{2}(\vartheta )}{f(\vartheta )} \Biggr) \Biggr] \\ \leq & \frac{1}{\ln \bar{c}} \Biggl[ \Biggl({\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1} f(\vartheta ) +{\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}} f(\vartheta ) \Biggr) \Biggl(\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1} \frac{l^{2}(\vartheta )}{f(\vartheta )}} +\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}} \frac{l^{2}(\vartheta )}{f(\vartheta )}} \Biggr)-1 \Biggr]. \end{aligned}$$

Now we proved the following two-dimensional Hölder’s inequality and Cauchy–Schwartz’s inequality, which help prove Grüss’s inequality for diamond integrals.

Theorem 3

(Two-dimensional diamond Hölder’s inequality)

Assume that \(f_{1}, g_{1}, h : \Upsilon \times \Upsilon \rightarrow \mathbb{R}\) are ♢-integrable functions. If \(\frac{1}{p}+\frac{1}{q}=1\) and \(p>1\), then

$$\begin{aligned}& \int _{\Upsilon} \int _{\Upsilon} \bigl\vert f_{1}(\vartheta ,w)g_{1}(\vartheta ,w)h( \vartheta ,w) \bigr\vert \diamondsuit \vartheta \diamondsuit w \\& \quad \leq \biggl( \int _{\Upsilon} \int _{\Upsilon} \bigl\vert h(\vartheta ,w) \bigr\vert \bigl\vert f_{1}( \vartheta ,w) \bigr\vert ^{p}\diamondsuit \vartheta \diamondsuit w \biggr)^{ \frac{1}{p}} \\& \qquad {}\times \biggl( \int _{\Upsilon} \int _{\Upsilon} \bigl\vert h(\vartheta ,w) \bigr\vert \bigl\vert g_{1}( \vartheta ,w) \bigr\vert ^{q}\diamondsuit \vartheta \diamondsuit w \biggr)^{ \frac{1}{q}}. \end{aligned}$$
(15)

Proof

If one of \(f_{1}\), \(g_{1}\) or h is identically zero, (15) is trivially true. Assume that

$$ \biggl( \int _{\Upsilon} \int _{\Upsilon} \bigl\vert h(\vartheta ,w) \bigr\vert \bigl\vert f_{1}( \vartheta ,w) \bigr\vert ^{p}\diamondsuit w \diamondsuit \vartheta \biggr) \biggl( \int _{\Upsilon} \int _{\Upsilon} \bigl\vert h(\vartheta ,w) \bigr\vert \bigl\vert g_{1}(\vartheta ,w) \bigr\vert ^{q} \diamondsuit w \diamondsuit \vartheta \biggr) \neq 0. $$

Define

$$ I_{1}(\vartheta ,w)= \frac{ \vert h^{\frac{1}{p}}(\vartheta ,w) \vert \vert f_{1}(\vartheta ,w) \vert }{ ( \int _{\Upsilon}\int _{\Upsilon} \vert h(\vartheta ,w) \vert \vert f_{1}(\vartheta ,w) \vert ^{p}\diamondsuit \vartheta \diamondsuit w )^{\frac{1}{p}}} $$

and

$$ I_{2}(\vartheta ,w)= \frac{ \vert h^{\frac{1}{q}}(\vartheta ,w) \vert \vert g_{1}(\vartheta ,w) \vert }{ ( \int _{\Upsilon}\int _{\Upsilon} \vert h(\vartheta ,w) \vert \vert g_{1}(\vartheta ,w) \vert ^{q}\diamondsuit \vartheta \diamondsuit w )^{\frac{1}{q}}}. $$

From the well-known Young’s inequality \(\eta \xi \leq \frac{\eta ^{p}}{p}+\frac{\xi ^{q}}{q}\), where \(\eta , \xi > 0\), we have

$$\begin{aligned}& \int _{\Upsilon} \int _{\Upsilon}I_{1}(\vartheta ,w)I_{2}( \vartheta ,w) \diamondsuit \vartheta \diamondsuit w \\& \quad \leq \int _{\Upsilon} \int _{\Upsilon} \biggl[ \frac{I_{1}^{p}(\vartheta ,w)}{p}+\frac{I_{2}^{q}(\vartheta ,w)}{q} \biggr]\diamondsuit \vartheta \diamondsuit w \\& \quad = \frac{1}{p}+\frac{1}{q}=1. \end{aligned}$$

Consequently, (15) is proved. □

Example 6

Choose \(\mathbb{T}=\mathbb{R}\), then from Theorem 3, we get

$$\begin{aligned}& \int _{\Upsilon} \int _{\Upsilon} \bigl\vert f_{1}(\vartheta ,w)g_{1}( \vartheta ,w)h(\vartheta ,w) \bigr\vert \,d \vartheta \,d w \\& \quad \leq \biggl( \int _{\Upsilon} \int _{\Upsilon} \bigl\vert h(\vartheta ,w) \bigr\vert \bigl\vert f_{1}( \vartheta ,w) \bigr\vert ^{p}\,d\vartheta \,d w \biggr)^{\frac{1}{p}} \biggl( \int _{ \Upsilon} \int _{\Upsilon} \bigl\vert h(\vartheta ,w) \bigr\vert \bigl\vert g_{1}(\vartheta ,w) \bigr\vert ^{q}\,d\vartheta \,d w \biggr)^{\frac{1}{q}}. \end{aligned}$$

Theorem 4

(Two-dimensional diamond Cauchy–Schwartz’s inequality)

If \(f_{1}, g_{1}, h : \Upsilon \times \Upsilon \rightarrow \mathbb{R}\) are ♢-integrable functions then

$$\begin{aligned}& \int _{\Upsilon} \int _{\Upsilon} \bigl\vert h(\vartheta ,w)f_{1}( \vartheta ,w)g_{1}( \vartheta ,w) \bigr\vert \diamondsuit \vartheta \diamondsuit w \\& \quad \leq \biggl( \int _{\Upsilon} \int _{\Upsilon} \bigl\vert h(\vartheta ,w) \bigr\vert \bigl\vert f_{1}( \vartheta ,w) \bigr\vert ^{2}\diamondsuit \vartheta \diamondsuit w \biggr)^{ \frac{1}{2}} \biggl( \int _{\Upsilon} \int _{\Upsilon} \bigl\vert h(\vartheta ,w) \bigr\vert \bigl\vert g_{1}( \vartheta ,w) \bigr\vert ^{2}\diamondsuit \vartheta \diamondsuit w \biggr)^{ \frac{1}{2}}. \end{aligned}$$
(16)

Proof

Use \(p = q = 2\) in Theorem 3. □

Now we prove the weighted Grüss-type inequality for diamond integrals, which is key to proving our next result.

Theorem 5

(The weighted diamond Grüss inequality)

Let \(l, f, g:\mathbb{T}\rightarrow (-\infty ,\infty )\) be ♢-integrable functions and \(\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta >0\). If \(\beta \leq g(\vartheta )\leq C\) and \(\varphi \leq f(\vartheta )\leq \Phi \) for all \(\vartheta \in \mathbb{T}\cap \Upsilon \), then

$$\begin{aligned}& \biggl\vert \frac{\int _{\Upsilon}l(\vartheta )f(\vartheta )g(\vartheta )\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} - \frac{\int _{\Upsilon}g(\vartheta )l(\vartheta )\diamondsuit \vartheta \int _{\Upsilon}f(\vartheta )l(\vartheta )\diamondsuit \vartheta}{ (\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta )^{2}} \biggr\vert \\& \quad \leq \frac{(C-\beta )(\Phi -\varphi )}{4}. \end{aligned}$$
(17)

Proof

Since

$$\begin{aligned}& \frac{\int _{\Upsilon}l(\vartheta )f(\vartheta )g(\vartheta )\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} - \frac{\int _{\Upsilon}l(\vartheta )g(\vartheta )\diamondsuit \vartheta \int _{\Upsilon}l(\vartheta )f(\vartheta )\diamondsuit \vartheta}{ (\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta )^{2}} \\& \quad = \frac{\int _{\Upsilon}\int _{\Upsilon}l(\vartheta )l(w)(g(\vartheta )-g(w))(f(\vartheta )-f(w))\diamondsuit \vartheta \diamondsuit w}{2 (\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta )^{2}} . \end{aligned}$$
(18)

Use \(h(\vartheta ,w)=l(\vartheta )l(w)\), \(g_{1}(\vartheta ,w)=g(\vartheta )-g(w)\) and \(f_{1}(\vartheta ,w)=f(\vartheta )-f(w)\) in (16) to obtain

$$\begin{aligned}& \biggl[ \frac{\int _{\Upsilon}\int _{\Upsilon}l(\vartheta )l(w)(g(\vartheta )-g(w))(f(\vartheta )-f(w))\diamondsuit \vartheta \diamondsuit w}{2 (\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta )^{2}} \biggr]^{2} \\& \quad \leq \biggl[ \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}l(\vartheta )f^{2}(\vartheta )\diamondsuit \vartheta - \biggl( \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}f(\vartheta )l(\vartheta )\diamondsuit \vartheta \biggr)^{2} \biggr] \\& \qquad {}\times \biggl[ \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}l(\vartheta )g^{2}(\vartheta )\diamondsuit \vartheta - \biggl( \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}g(\vartheta )l(\vartheta )\diamondsuit \vartheta \biggr)^{2} \biggr]. \end{aligned}$$
(19)

Consider,

$$\begin{aligned}& \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}l(\vartheta )g^{2}(\vartheta )\diamondsuit \vartheta - \biggl( \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}g(\vartheta )l(\vartheta )\diamondsuit \vartheta \biggr)^{2} \\& \quad \leq \biggl(C- \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}g(\vartheta )l(\vartheta )\diamondsuit \vartheta \biggr) \biggl(\frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{\Upsilon}g(\vartheta )l(\vartheta )\diamondsuit \vartheta - \beta \biggr). \end{aligned}$$
(20)

Similarly,

$$\begin{aligned}& \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}l(\vartheta )f^{2}(\vartheta )\diamondsuit \vartheta - \biggl( \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}l(\vartheta )f(\vartheta )\diamondsuit \vartheta \biggr)^{2} \\& \quad \leq \biggl(\Phi - \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}f(\vartheta )l(\vartheta )\diamondsuit \vartheta \biggr) \biggl(\frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{\Upsilon}f(\vartheta )l(\vartheta )\diamondsuit \vartheta - \varphi \biggr). \end{aligned}$$
(21)

Use (20) and (21) in (19), then use of (19) in (18) gives

$$\begin{aligned}& \biggl\vert \frac{\int _{\Upsilon}l(\vartheta )f(\vartheta )g(\vartheta )\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} - \frac{\int _{\Upsilon}g(\vartheta )l(\vartheta )\diamondsuit \vartheta \int _{\Upsilon}f(\vartheta )l(\vartheta )\diamondsuit \vartheta}{ (\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta )^{2}} \biggr\vert \\& \quad \leq \biggl(\Phi - \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}f(\vartheta )l(\vartheta )\diamondsuit \vartheta \biggr)^{ \frac{1}{2}} \biggl( \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}f(\vartheta )l(\vartheta )\diamondsuit \vartheta - \varphi \biggr)^{\frac{1}{2}} \\& \quad \quad {} \times \biggl(C- \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}g(\vartheta )l(\vartheta )\diamondsuit \vartheta \biggr)^{ \frac{1}{2}} \\& \qquad {}\times \biggl( \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}g(\vartheta )l(\vartheta )\diamondsuit \vartheta - \beta \biggr)^{\frac{1}{2}}. \end{aligned}$$
(22)

Since \(4 \vartheta \eta \leq (\vartheta +\eta )^{2}\) for all \(\vartheta ,\eta \in \mathbb{R}\), therefore

$$\begin{aligned}& 4 \biggl(\Phi - \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}f(\vartheta )l(\vartheta )\diamondsuit \vartheta \biggr) \biggl(\frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{\Upsilon}f(\vartheta )l(\vartheta )\diamondsuit \vartheta - \varphi \biggr) \\& \quad \leq (\Phi -\varphi )^{2} \end{aligned}$$
(23)

and

$$\begin{aligned}& 4 \biggl(C- \frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{ \Upsilon}g(\vartheta )l(\vartheta )\diamondsuit \vartheta \biggr) \biggl(\frac{1}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \int _{\Upsilon}g(\vartheta )l(\vartheta )\diamondsuit \vartheta - \beta \biggr) \\& \quad \leq (C-\beta )^{2}. \end{aligned}$$
(24)

Combine (22) with (23) and (24) to get the desired result. □

Remark 6

If γ is constant function, then inequality (17) is proved in [6, Theorem 3.1].

Remark 7

For \(\gamma =1\), Theorem 5 is same as [3, Theorem 5] (see also [20]).

Example 7

Restrict time scale to set of real numbers, then (17), takes the form

$$\begin{aligned}& \biggl\vert \frac{\int _{\Upsilon}l(\vartheta )f(\vartheta )g(\vartheta )\,d\vartheta}{\int _{\Upsilon}l(\vartheta )\,d\vartheta} - \frac{\int _{\Upsilon}g(\vartheta )l(\vartheta )\,d\vartheta \int _{\Upsilon}f(\vartheta )l(\vartheta )\,d\vartheta}{ (\int _{\Upsilon}l(\vartheta )\,d\vartheta )^{2}} \biggr\vert \\& \quad \leq \frac{(C-\beta )(\Phi -\varphi )}{4}. \end{aligned}$$
(25)

Remark 8

Inequality (25) is proved in [11].

Example 8

Restrict time scale to set of integers, then (17), takes the form

$$\begin{aligned}& \biggl\vert \frac{\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}l(\vartheta )f(\vartheta )g(\vartheta ) +\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}}l(\vartheta )f(\vartheta )g(\vartheta )}{ \sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}l(\vartheta ) +\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}}l(\vartheta )} \\& \qquad {} - \frac{ (\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}g(\vartheta )l(\vartheta ) +\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}}g(\vartheta )l(\vartheta ) ) (\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}f(\vartheta )l(\vartheta ) +\sum_{\vartheta ={c_{1}+1}}^{{c_{2}}}f(\vartheta )l(\vartheta ) )}{ (\sum_{\vartheta ={c_{1}}}^{{c_{2}}-1}l(\vartheta )+ \sum_{\vartheta ={c_{1}+1}}^{{c_{2}}}l(\vartheta ) )^{2}} \biggr\vert \\& \quad \leq \frac{(C-\beta )(\Phi -\varphi )}{4}. \end{aligned}$$

Example 9

Choose set \(q^{\mathbb{N}_{0}}\), \(q > 1\) as time scale, then \(\vartheta = q^{y}\) for some \(y \in \mathbb{N}_{0}\). If we take \(c_{1}= q\) and \(c_{2}=q^{n}\), then from (17), we get

$$\begin{aligned}& \Biggl\vert \frac{\sum_{m=1}^{n-1}q^{m+1}l(q^{m})f(q^{m})g(q^{m}) +\sum_{m=2}^{n}q^{m-1}l(q^{m})f(q^{m})g(q^{m})}{ \sum_{m=1}^{n-1}q^{m+1}l(q^{m}) +\sum_{m=2}^{n}q^{m-1}l(q^{m})} \\& \qquad {}- \Biggl(\sum_{m=1}^{n-1}q^{m+1}g \bigl(q^{m}\bigr)l\bigl(q^{m}\bigr) +\sum _{m=2}^{n}q^{m-1}g\bigl(q^{m} \bigr)l\bigl(q^{m}\bigr) \Biggr) \\& \qquad {}\times \frac{ (\sum_{m=1}^{n-1}q^{m+1}f(q^{m})l(q^{m}) +\sum_{m=2}^{n}q^{m-1}f(q^{m})l(q^{m}) )}{ (\sum_{m=1}^{n-1}q^{m+1}l(q^{m})+ \sum_{m=2}^{n}q^{m-1}l(q^{m}) )^{2}} \Biggr\vert \\& \quad \leq \frac{(C-\beta )(\Phi -\varphi )}{4}. \end{aligned}$$

Lemma 1

Let assumptions of Theorem 1be true, if

$$ 0< n \leq \xi (\vartheta )\leq N\quad \forall \vartheta \in { \Upsilon}. $$
(26)

then

$$\begin{aligned} 0 \leq & \log \biggl[ \frac{\int _{\Upsilon}l(\vartheta )\xi (\vartheta )\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \biggr]- \frac{\int _{\Upsilon}l(\vartheta )\log \xi (\vartheta )\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \end{aligned}$$
(27)
$$\begin{aligned} \leq & \log \biggl[\frac{1}{4} \biggl(\sqrt{\tau}+ \frac{1}{\sqrt{\tau}} \biggr)^{2} \biggr] \end{aligned}$$
(28)
$$\begin{aligned} \leq & \frac{1}{\ln \bar{c}}\log \biggl[\frac{1}{4} \biggl( \sqrt{\tau}- \frac{1}{\sqrt{\tau}} \biggr)^{2} \biggr] , \end{aligned}$$
(29)

where \(\tau =\frac{N}{n}\). Moreover, if

$$ \tau \leq \Psi (\delta ):=2 \bar{c}^{\delta}-1+2 \sqrt{ \bar{c}^{ \delta}\bigl(\bar{c}^{\delta}-1\bigr)} $$
(30)

for \(\delta > 0\), then

$$ 0 \leq \log \biggl[ \frac{\int _{\Upsilon}l(\vartheta )\xi (\vartheta )\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \biggr]- \frac{\int _{\Upsilon}l(\vartheta )\log \xi (\vartheta )\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \leq \delta . $$
(31)

Proof

From (26), we have

$$ 0< \frac{1}{N} \leq \frac{1}{\xi (\vartheta )}\leq \frac{1}{n}, $$

Use \(C=N\), \(\beta =n\), \(\Phi =\frac{1}{n}\), \(\varphi =\frac{1}{N}\), \(g=\frac{1}{\xi}\) and \(f= \xi \) in (17) to get

$$ \frac{\int _{\Upsilon}l(\vartheta )\xi (\vartheta )\diamondsuit \vartheta \int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{ (\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta )^{2}} - 1 \leq \frac{(N- n)(\frac{1}{n}-\frac{1}{N})}{4}, $$

implies that

$$\begin{aligned} \frac{\int _{\Upsilon}l(\vartheta )\xi (\vartheta )\diamondsuit \vartheta \int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{ (\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta )^{2}} \leq & \frac{1}{4} \biggl(\sqrt{\tau}+ \frac{1}{\sqrt{\tau}} \biggr)^{2}. \end{aligned}$$

Since \(\log (u)\leq \log (\vartheta )\) for all \(u \leq \vartheta \), therefore

$$\begin{aligned} \log \biggl[ \frac{\int _{\Upsilon}l(\vartheta )\xi (\vartheta )\diamondsuit \vartheta \int _{\Upsilon}\frac{l(\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{ (\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta )^{2}} \biggr] \leq & \log \biggl[ \frac{1}{4} \biggl(\sqrt{\tau}+ \frac{1}{\sqrt{\tau}} \biggr)^{2} \biggr]. \end{aligned}$$
(32)

From (32) and (7), we get (28). Inequality (29) is a straightforward outcome of (10). Moreover, suppose that

$$ \log \biggl[\frac{1}{4} \biggl(\sqrt{\tau}+\frac{1}{\sqrt{\tau}} \biggr)^{2} \biggr] \leq \delta , $$

implying

$$ \frac{1}{4} \biggl(\sqrt{\tau}+\frac{1}{\sqrt{\tau}} \biggr)^{2} \leq \bar{c}^{\delta}, $$

therefore

$$ \tau ^{2}+2\tau \bigl(1-2\bar{c}^{\delta}\bigr)+1 \leq 0. $$

Hence

$$ 2\bar{c}^{\delta}-1-2\sqrt{\bar{c}^{\delta}\bigl( \bar{c}^{\delta}-1\bigr)} \leq \tau \leq 2\bar{c}^{\delta}-1+2\sqrt{ \bar{c}^{\delta}\bigl(\bar{c}^{ \delta}-1\bigr)}. $$

Consider

$$\begin{aligned} \bigl[2\bar{c}^{\delta}-1-2\sqrt{\bar{c}^{\delta}\bigl( \bar{c}^{\delta}-1\bigr)} \bigr]^{-1} =& \frac{1}{2\bar{c}^{\delta}-1-2\sqrt{\bar{c}^{\delta}(\bar{c}^{\delta}-1)}} \\ =& 2\bar{c}^{\delta}-1+2\sqrt{\bar{c}^{\delta}\bigl( \bar{c}^{\delta}-1\bigr)}. \end{aligned}$$

Hence (31) can be derived from (27). □

Remark 9

For \(\gamma =1\), Lemma 1 is same as [3, Lemma 1].

Remark 10

Take \(l\in E\) and choose a set of real numbers as time scale in Lemma 1 to obtain [17, Lemma 2].

Theorem 6

Let the assumptions of Theorem 1be true. If

$$ 0< n \leq \frac{l(\vartheta )}{f(\vartheta )}\leq N \quad \forall \vartheta \in { \Upsilon}. $$
(33)

then

$$\begin{aligned} 0 \leq & \frac{\int _{\Upsilon}l(\vartheta )\log \frac{1}{f(\vartheta )}\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta}- \frac{\int _{\Upsilon}l(\vartheta )\log \frac{1}{l(\vartheta )}\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta}+ \log \biggl( \frac{\varrho}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \biggr) \\ \leq & \frac{1}{\ln \bar{c}}\frac{ (N-n )^{2}}{4Nn}. \end{aligned}$$

Moreover, if

$$ \tau \leq \Psi (\delta ):=2 \bar{c}^{\delta}-1+2 \sqrt{ \bar{c}^{ \delta}\bigl(\bar{c}^{\delta}-1\bigr)} $$

for \(\delta > 0\), then

$$\begin{aligned} 0 \leq \frac{\int _{\Upsilon}l(\vartheta )\log \frac{1}{f(\vartheta )}\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta}- \frac{\int _{\Upsilon}l(\vartheta )\log \frac{1}{l(\vartheta )}\diamondsuit \vartheta}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta}+ \log \biggl( \frac{\varrho}{\int _{\Upsilon}l(\vartheta )\diamondsuit \vartheta} \biggr) \leq \delta . \end{aligned}$$

Proof

Use \(\xi =\frac{f}{l}\) and \(0 < \frac{1}{N}\leq \xi \leq \frac{1}{n} \) in Lemma 1 to get desired results. □

Remark 11

For \(\gamma =1\), Theorem 6 is same as [3, Theorem 6].

Remark 12

Use a set of real numbers as time scale and \(l \in E\) in Theorem 6 to obtain [17, Theorem 19].

Corollary 2

If assumptions of Theorem 6are true, then

$$\begin{aligned} 0 \leq & Q_{f}-Q_{l} +\log \varrho \\ \leq & \log \frac{(N+n)^{2}}{4nN} \\ \leq & \frac{(N-n)^{2}}{\ln (\bar{c})4nN}. \end{aligned}$$

Proof

Use \(l\in E\) in Theorem 6, for all \(\vartheta \in \mathbb{T}\). □

4 Entropy of continuous random variable via diamond integrals

Hypothesis

  1. A1:

    Y is continuous random variable;

  2. A2:

    The variance of Y is given by \(\eta ^{2} = \int _{\Upsilon} (\vartheta -\mu _{n})^{2} \diamondsuit \vartheta \);

  3. A3:

    The mean of Y is given by \(\mu _{n}= \int _{\Upsilon} \vartheta l(\vartheta ) \diamondsuit \vartheta \). In this section, we assume that A1 to A3 hold.

Theorem 7

Let \(l(\vartheta )\) be a density function of Y, where \(\vartheta \in \mathbb{T}\).

(a) If \(\mu _{n}\) and \(\vartheta ^{2}\) are finite with

$$ \int _{\Upsilon} l^{2}(\vartheta )\exp \biggl( \frac{(\vartheta -\mu _{n})^{2}}{2\eta ^{2}} \biggr)\diamondsuit \vartheta \leq \infty , $$

then \(h_{\bar{c}}(Y)\) is finite, and

$$\begin{aligned} 0 \leq & \log (\eta \sqrt{2\pi e})- h_{\bar{c}}(Y)+\log (\varrho ) \\ \leq & \log \biggl[\eta \varrho \sqrt{2\pi} \int _{\Upsilon} l^{2}( \vartheta )\exp \biggl( \frac{(\vartheta -\mu _{n})^{2}}{2\eta ^{2}} \biggr)\diamondsuit \vartheta \biggr] \\ \leq & \frac{1}{\ln \bar{c}} \biggl[\eta \varrho \sqrt{2\pi} \int _{ \Upsilon} l^{2}(\vartheta )\exp \biggl( \frac{(\vartheta -\mu _{n})^{2}}{2\eta ^{2}} \biggr)\diamondsuit \vartheta -1 \biggr], \end{aligned}$$

where \(\varrho =\int _{\Upsilon}\frac{1}{\vartheta \sqrt{2\pi}}\exp [ \frac{-(\vartheta -\mu _{n})^{2}}{2\vartheta ^{2}} ]> 0\).

(b) Let \(\mu _{n}\) be finite and \(l(\vartheta )=0\) for all \(\vartheta <0\). If

$$ \int _{0}^{\infty}l^{2}(\vartheta )\exp \biggl(\frac{\vartheta}{\mu _{n}} \biggr)\diamondsuit \vartheta < \infty , $$

then \(h_{\bar{c}}(Y)\) is finite, and

$$\begin{aligned} 0 \leq & \log (\mu _{n} e)- h_{\bar{c}}(Y)+\log (\varrho ) \\ \leq & \log \biggl[\mu _{n}\varrho \int _{0}^{\infty} l^{2}( \vartheta )\exp \biggl(\frac{\vartheta}{\mu _{n}} \biggr)\diamondsuit \vartheta \biggr] \\ \leq & \frac{1}{\ln \bar{c}} \biggl[\mu _{n}\varrho \int _{0}^{\infty} l^{2}( \vartheta )\exp \biggl(\frac{\vartheta}{\mu _{n}} \biggr)\diamondsuit \vartheta -1 \biggr], \end{aligned}$$

where \(\varrho =\int _{0}^{\infty}\frac{1}{\mu _{n}}\exp [ \frac{-\vartheta}{\mu _{n}} ]\diamondsuit \vartheta > 0\).

Proof

(a) Since variance and mean of Y are finite, therefore use \(f(\vartheta )=1/\eta \sqrt{2\pi}\exp (-(\vartheta -\mu _{n})^{2}/2 \eta ^{2} )>0\) for all \(\vartheta \in \mathbb{T}\) to obtain \(\varrho =\int _{\Upsilon}f(\vartheta )\diamondsuit \vartheta \) and

$$\begin{aligned} \int _{\Upsilon}l(\vartheta )\log \frac{1}{f(\vartheta )} \diamondsuit \vartheta =& \frac{1}{\ln \bar{c}} \int _{\Upsilon}l( \vartheta )\ln \frac{1}{f(\vartheta )}\diamondsuit \vartheta \\ =& \log (\eta \sqrt{2\pi e}). \end{aligned}$$

Further Corollary 1 gives the desired result.

(b) Since \(\mu _{n}>0\), therefore define \(f(\vartheta )=(1/\mu _{n})\exp (-\vartheta /\mu _{n})\), where \(\vartheta \in [0,\infty )_{\mathbb{T}}\), \(\varrho =\int _{0}^{\infty}f(\vartheta )\diamondsuit \vartheta \) and

$$\begin{aligned} \int _{0}^{\infty}l(\vartheta )\log \frac{1}{f(\vartheta )} \diamondsuit \vartheta =& \log (\mu _{n} e). \end{aligned}$$

Further, Corollary 1 gives the desired result. □

Remark 13

For \(\gamma =1\), Theorem 7 is same as [3, Theorem 7].

Remark 14

Use a set of real numbers as time scale in Theorem 7 to obtain [17, Theorem 21].

Remark 15

(a) If distribution of Y is close to the Gaussian distribution, then Theorem 7 shows \(h_{\bar{c}}(Y)\approx \log (\varrho \eta \sqrt{2 \pi e})\).

(b) If distribution is closely equal to the exponential distribution, then \(h_{\bar{c}}(Y)\approx \log (\varrho \mu _{n} e)\).

Theorem 8

(a) Let the suppositions of Theorem 7(a) be true. If

$$ 0 < p \leq l(\vartheta )\exp \biggl( \frac{(\vartheta -\mu _{n})^{2}}{2\eta ^{2}} \biggr)\leq P , $$

then

$$\begin{aligned} 0 \leq & \log (\eta \sqrt{2\pi e})-h_{\bar{c}}(Y)+\log (\varrho ) \\ \leq & \biggl(\frac{(p-P)^{2}}{4\ln \bar{c}pP} \biggr), \end{aligned}$$

where \(p, P \in (0, \infty )\) and \(\varrho =\int _{\Upsilon}(1/\eta \sqrt{2 pi})\exp [-(\vartheta -\mu _{n})^{2}/2 \eta ^{2}]\diamondsuit \vartheta >0\) for all \(\vartheta \in \mathbb{T}\).

(b) Let the suppositions of Theorem 7(b) be true. If

$$ 0 < p \leq l(\vartheta )\exp (\vartheta /\mu _{n})\leq P , $$

then

$$\begin{aligned} 0 \leq & \log (\mu _{n} e)-h_{\bar{c}}(Y)+\log (\varrho ) \\ \leq & \log \biggl(\frac{(p+P)^{2}}{4pP} \biggr) \\ \leq & \biggl(\frac{(p-P)^{2}}{4\ln \bar{c}pP} \biggr), \end{aligned}$$

where \(p, P \in (0, \infty )\) and \(\varrho = \int _{0}^{\infty}(1/\mu _{n})\exp [-\vartheta /\mu _{n}] \diamondsuit \vartheta >0\) for all \(\vartheta \in \mathbb{T}\).

Proof

(a) Replace n with \(\eta \sqrt{2 \pi p}\), N with \(\eta \sqrt{2 \pi P}\) in Corollary 2, and use \(f(\vartheta )=1/\vartheta \sqrt{2\pi}\exp (-(\vartheta -\mu _{n})^{2}/2 \vartheta ^{2} )\).

(b) Replace n with \(\mu _{n} p\), N with \(\mu _{n} P\) in Corollary 2, and use \(f(\vartheta )=(1/\mu _{n})\exp (-\eta /\mu _{n})\) to obtain the desired result. □

Remark 16

For \(\gamma =1\), Theorem 8 is same as [3, Theorem 8].

Remark 17

In Theorem 8, take a set of real numbers as time scale to obtain [17, Theorem 22].

Bilal et al. [5] provide the extended form of Jensen’s inequality for diamond integrals given as follows:

Theorem 9

Assume that \(K \subset \mathbb{R}^{m}\) is an interval, and \(\phi \in C(K,\mathbb{R})\) is convex. Suppose f is ♢-integrable on Λ such that \(f(\Lambda )\subset K\), where \(\Lambda \subset ((c_{1},d_{1})\cap \mathbb{T}_{1} \times \cdots \times (c_{m},d_{m})\cap \mathbb{T}_{m})\) for time scales \(\mathbb{T}_{1}, \mathbb{T}_{2},\ldots , \mathbb{T}_{m}\). If \(l:\Lambda \rightarrow \mathbb{R}\) is ♢-integrable on Λ and \(\int _{\Lambda }l(\vartheta )\diamondsuit \vartheta \) is positive, then

$$ \phi \biggl( \frac{\int _{\Lambda}{l(\vartheta ){f}(\vartheta )\diamondsuit \vartheta}}{\int _{\Lambda}{l(\vartheta )\diamondsuit \vartheta}} \biggr)\leq \frac{\int _{\Lambda}{l(\vartheta )\phi ({f}(\vartheta ))\diamondsuit \vartheta}}{\int _{\Lambda}{l(\vartheta )\diamondsuit \vartheta}}. $$
(34)

In the following proposition, Theorem 1 is generalized.

Proposition 1

Suppose \(\mathbb{T}_{1}, \mathbb{T}_{2},\ldots , \mathbb{T}_{m}\) are time scales and \(c_{j}< d_{j}\) where \(c_{j},d_{j} \in \mathbb{T}_{j}\) for \(1\leq j \leq m\). Assume that \(\Lambda \subset ((c_{1},d_{1})\cap \mathbb{T}_{1} \times \cdots \times (c_{m},d_{m})\cap \mathbb{T}_{m})\) is Lebesgue ♢-measurable, \(\varsigma ,\xi ,\frac{1}{\xi}:\Lambda \rightarrow (0,\infty )\) are ♢-integrable, and \(\int _{\Lambda }|\varsigma (\vartheta )|\diamondsuit \vartheta \) is positive. If

$$ \int _{\Lambda } \bigl\vert \varsigma (\vartheta )\xi (\vartheta ) \bigr\vert \diamondsuit \vartheta < \infty \quad \textit{and}\quad \int _{\Lambda } \biggl\vert \frac{\varsigma (\vartheta )}{\xi (\vartheta )} \biggr\vert \diamondsuit \vartheta < \infty , $$

then

$$\begin{aligned} 0 \leq & \log \biggl[ \frac{\int _{\Lambda}\varsigma (\vartheta )\xi (\vartheta )\diamondsuit \vartheta}{\int _{\Lambda}\varsigma (\vartheta )\diamondsuit \vartheta} \biggr]- \frac{\int _{\Lambda}\varsigma (\vartheta )\log \xi (\vartheta )\diamondsuit \vartheta}{\int _{\Lambda}\varsigma (\vartheta )\diamondsuit \vartheta} \\ \leq & \log \biggl[ \frac{\int _{\Lambda}\varsigma (\vartheta )\xi (\vartheta )\diamondsuit \vartheta \int _{\Lambda}\frac{\varsigma (\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{ (\int _{\Lambda}{\varsigma (\vartheta )}\diamondsuit \vartheta )^{2}} \biggr] \\ \leq & \frac{1}{\ln \bar{c}} \biggl[ \frac{\int _{\Lambda}\varsigma (\vartheta )\xi (\vartheta )\diamondsuit \vartheta \int _{\Lambda}\frac{\varsigma (\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}{ (\int _{\Lambda}{\varsigma (\vartheta )}\diamondsuit \vartheta )^{2}}-1 \biggr]. \end{aligned}$$
(35)

Proof

Follow the steps as in the proof of Theorem 1 and use (34) to complete the proof. □

Corollary 3

If assumptions of Proposition 1are true and \(\int _{\Lambda}{\varsigma (\vartheta )}\diamondsuit \vartheta =1\), then

$$\begin{aligned} 0 \leq & \log \biggl[ { \int _{\Lambda}\varsigma (\vartheta )\xi ( \vartheta )\diamondsuit \vartheta} \biggr]-{ \int _{\Lambda}\varsigma ( \vartheta )\log \xi (\vartheta ) \diamondsuit \vartheta} \\ \leq & \frac{1}{\ln \bar{c}} \biggl[{ \int _{\Lambda}\varsigma ( \vartheta )\xi (\vartheta )\diamondsuit \vartheta \int _{\Lambda} \frac{\varsigma (\vartheta )}{\xi (\vartheta )}\diamondsuit \vartheta}-1 \biggr]. \end{aligned}$$

Remark 18

For \(\gamma =1\), Proposition 1 is same as [3, Proposition 1].

Remark 19

If we take \(\mathbb{T} = \mathbb{R}\) and \(\varsigma \in E\), then Proposition 1 is same as [17, Proposition 1].

Assume two random variables U and W with density functions \(l(u)\) and \(l(w)\), respectively. Suppose that \(l(u, w)\) is the joint density function for \((U,W)\). Define

$$ D_{U}:=\bigl\{ u \in U : l(u)>0\bigr\} ,\qquad D_{W}:=\bigl\{ w \in W : l(w)>0\bigr\} $$
(36)

and

$$ D_{U|W}:=\bigl\{ (u,w) \in U\times W : l(u,w)>0\bigr\} . $$
(37)

Differential conditional -entropy is stated as follows.

Definition 2

The differential conditional entropy of U given W via diamond integral is given by

$$ h_{\bar{c}}(U|W):= \int \int _{D_{U|W}}l(u,w)\log \frac{1}{l(u,w)} \diamondsuit u \diamondsuit w. $$
(38)

Theorem 10

Assume that \(l(u)\) and \(l(w)\) are density functions of U and W, respectively, and for \((U,W)\), \(l(u, w)\) is the joint density function. If

$$ A:= \int \int _{D_{U|W}}l(w)\diamondsuit u \diamondsuit w < \infty \quad \textit{and}\quad \int \int _{D_{U|W}}l(w)l^{2}(u|w)\diamondsuit u \diamondsuit w < \infty , $$

then \(h_{\bar{c}}(G|W)\) exists and

$$\begin{aligned} 0 \leq & \log A-h_{\bar{c}}(U|W) \\ \leq & \log \biggl[A \int \int _{D_{U|W}}l(w)l^{2}(u|w)\diamondsuit u \diamondsuit w \biggr] \\ \leq & \frac{1}{\ln \bar{c}} \biggl[A \int \int _{D_{U|W}}l(w)l^{2}(u|w) \diamondsuit u \diamondsuit w-1 \biggr]. \end{aligned}$$

Proof

Use \(m=2\), \(\varsigma (\vartheta )=l(u,w)\) and

$$ \xi (\vartheta )=\frac{1}{l(u|y)}=\frac{l(u)}{l(u,w)} , $$

in Corollary 3 to obtain

$$\begin{aligned} 0 \leq & \log A-h_{\bar{c}}(U|W) \\ \leq &\frac{1}{\ln \bar{c}} \biggl[A \int \int _{D_{U|W}}l(w)l^{2}(g|w) \diamondsuit u \diamondsuit w-1 \biggr]. \end{aligned}$$

 □

Using (37) and (38), define differential mutual information between G and Y for diamond integral by

$$\begin{aligned} i_{\bar{c}}(U,W) :=&h_{\bar{c}}(U)-h_{\bar{c}}(U|W) \\ =& \int \int _{D_{U|W}}l(u,w)\log \frac{l(u,w)}{l(u)l(w)} \diamondsuit u \diamondsuit w. \end{aligned}$$

Theorem 11

Let the suppositions of Theorem 10be true. If

$$ B:= \int \int _{D_{U|W}}l(u)l(w)\diamondsuit u \diamondsuit w < \infty \quad \textit{and}\quad \int \int _{D_{U|W}} \frac{l^{2}(u,w)}{l(u)l(w)}\diamondsuit u \diamondsuit w < \infty , $$

then \(i_{\bar{c}}(U|W)\) exists and

$$\begin{aligned} 0 \leq & \log B+i_{\bar{c}}(U,W) \\ \leq & \log \biggl[B \int \int _{D_{U|W}}\frac{l^{2}(u,w)}{l(u)l(w)} \diamondsuit u \diamondsuit w \biggr] \\ \leq & \frac{1}{\ln \bar{c}} \biggl[B \int \int _{D_{U|W}} \frac{l^{2}(u,w)}{l(u)l(w)}\diamondsuit u \diamondsuit w-1 \biggr]. \end{aligned}$$

Proof

Use \(m=2\), \(\varsigma (\vartheta )=l(u,w)\) and

$$ \xi (\vartheta )=\frac{1}{l(g|w)}=\frac{l(u)}{l(u,w)} , $$

in Corollary 3 to obtain

$$\begin{aligned} 0 \leq & \log \biggl[ \int \int _{D_{U|W}}l(u,w) \frac{l(u)l(w)}{l(u,w)}\diamondsuit u \diamondsuit w \biggr]- \int \int _{D_{U|W}}l(u,w) \log \frac{l(u)l(w)}{l(u,w)}\diamondsuit u \diamondsuit w \\ =& \log B-i_{\bar{c}}(U,W) \\ \leq & \log \biggl[B \int \int _{D_{U|W}}l(u,w) \frac{l(u,w)}{l(u)l(w)}\diamondsuit u \diamondsuit w \biggr] \\ \leq & \frac{1}{\ln \bar{c}} \biggl[B \int \int _{D_{U|W}} \frac{l^{2}(u,w)}{l(u)l(w)}\diamondsuit u \diamondsuit w-1 \biggr]. \end{aligned}$$

 □

5 Conclusion

In this work, Shannon-type inequalities for diamond integrals have been proved with the help of diamond Jensen’s inequality. Differential entropy for diamond integral is presented, and its bounds are discussed for some specific distributions. To illustrate generalized Shannon-type inequalities and Grüss-type inequalities for diamond integrals, some examples are established in discrete and q-calculus. The newly established results are the improvements of results in [3, 12, 17]. If one chooses \(\gamma =1\), all proved results coincide with results obtained in [3]. Furthermore, by fixing time scale, continuous and discrete bounds of the Shannon entropy are obtained, which already exist in literature [12, 17]. Possible future work includes the study of the Rényi entropy using diamond–integral formalism.