1 Introduction

Integration with weight functions is used in countless mathematical problems such as approximation theory and spectral analysis, statistical analysis and the theory of distributions. Grüss developed an integral inequality [1] in 1935. In 1938, Ostrowski [2] established an interesting integral inequality associated with differentiable mappings which has powerful applications in numerical integration, probability and optimization theory, stochastic, statistics, information and integral operator theory. During the last few years, many researchers focused their attention on the study and generalizations of the above two inequalities [35]. Recently, Qayyum and Hussain [6] established a new inequality using the weighted Peano kernel, which is more generalized as compared to previous inequalities developed and discussed in [35]. Moreover, results investigated [6] were in weighted form instead of previous results [35] which were in non-weighted form. This approach not only generalized the results of [3], but also gave some other interesting inequalities as special cases. In this paper, we establish another generalization of the Ostrowski-Grüss type inequality using the weighted Grüss inequality for bounded differentiable mappings which generalizes the previous inequalities developed and discussed in [35]. Perturbed midpoint and trapezoid inequalities are also obtained. In Section 4, we give some applications in different weights. This inequality is extended to account for applications in numerical integration in Section 5.

2 Preliminaries

The classical Ostrowski integral inequality ([2] see also [[1], p.468]) in one dimension stipulates a bound between a function evaluated at an interior point x and the average of the function f over an interval. That is,

$|f\left(x\right)-\frac{1}{b-a}{\int }_{a}^{b}f\left(t\right)\phantom{\rule{0.2em}{0ex}}dt|\le \left[\frac{1}{4}+{\left(\frac{x-\frac{a+b}{2}}{b-a}\right)}^{2}\right]\left(b-a\right){\parallel {f}^{\mathrm{\prime }}\parallel }_{\mathrm{\infty }}$
(1)

for all $x\in \left[a,b\right]$, where ${f}^{\mathrm{\prime }}\in {L}_{\mathrm{\infty }}\left(a,b\right)$ and $f:\left[a,b\right]\to \mathbb{R}$ is a differentiable mapping on $\left(a,b\right)$.

The constant $\frac{1}{4}$ is sharp in the sense that it cannot be replaced by a smaller one. We also observe that the tightest bound is obtained at $x=\frac{a+b}{2}$, resulting in the well-known mid-point inequality.

The integral inequality that establishes a connection between the integral of the product of two functions and the product of the integrals is known in the literature as the Grüss inequality. The inequality is as follows.

Theorem 1 Let $f,g:\left[a,b\right]\to \mathbb{R}$ be integrable functions such that $\phi \le f\left(x\right)\le \mathrm{\Phi }$ and $\gamma \le g\left(x\right)\le \mathrm{\Gamma }$ for all $x\in \left[a,b\right]$, where φ, Φ, γ, Γ are constants. Then

(2)

where the constant$\frac{1}{4}$ is sharp.

During the past few years, many researchers [710] have given considerable attention to the inequality (1).

In [4], Dragomir and Wang improved the above inequality and proved the following Ostrowski type inequality in terms of the lower and upper bounds of the first derivative.

Theorem 2 Let $f:\left[a,b\right]\to \mathbb{R}$ be continuous on $\left[a,b\right]$ and differentiable on $\left(a,b\right)$, and its derivative satisfy the condition $\gamma \le {f}^{\mathrm{\prime }}\left(x\right)\le \mathrm{\Gamma }$ for all $x\in \left[a,b\right]$. Then we have the inequality

(3)

for all $x\in \left[a,b\right]$.

In [3], Barnett et al. pointed out a similar result to the above for twice differentiable mappings in terms of the upper and lower bounds of the second derivative.

Theorem 3 Let $f:\left[a,b\right]\to \mathbb{R}$ be continuous on $\left[a,b\right]$ and twice differentiable on $\left(a,b\right)$, and assume that the second derivative ${f}^{\mathrm{\prime }\mathrm{\prime }}:\left(a,b\right)\to \mathbb{R}$ satisfies the condition: $\gamma \le {f}^{\mathrm{\prime }\mathrm{\prime }}\left(x\right)\le \mathrm{\Gamma }$ for all $x\in \left[a,b\right]$.

Then, for all $x\in \left[a,b\right]$, we have the inequality

(4)

In the recent years, some authors (see, for example, [5, 6, 11]) also generalized the above inequality.

3 Some new results

We assume the weight function (or density) $w:\left(a,b\right)⟶\left[0,\mathrm{\infty }\right)$ to be non-negative and integrable over its entire domain and consider ${\int }_{a}^{b}w\left(t\right)\phantom{\rule{0.2em}{0ex}}dt<\mathrm{\infty }$. We denote the moments to be m, M and σ and define them as follows: $m\left(a,b\right)={\int }_{a}^{b}w\left(t\right)\phantom{\rule{0.2em}{0ex}}dt$, $M\left(a,b\right)={\int }_{a}^{b}tw\left(t\right)\phantom{\rule{0.2em}{0ex}}dt$ and $\sigma \left(a,b\right)=\frac{M\left(a,b\right)}{m\left(a,b\right)}$. We start with the following weighted Grüss inequality [12].

Theorem 4 Let $f,g:\left[a,b\right]\to \mathbb{R}$ be two integrable functions such that $\theta \le f\left(x\right)\le \varphi$ and $\gamma \le g\left(x\right)\le \mathrm{\Gamma }$ for all $x\in \left[a,b\right]$, and let ϕ, θ, Γ, γ be constants. Then we have $|\frac{1}{m\left(a,b\right)}{\int }_{a}^{b}w\left(x\right)f\left(x\right)g\left(x\right)\phantom{\rule{0.2em}{0ex}}dx-\frac{1}{m\left(a,b\right)}{\int }_{a}^{b}w\left(x\right)f\left(x\right)\phantom{\rule{0.2em}{0ex}}dx×\frac{1}{m\left(a,b\right)}{\int }_{a}^{b}w\left(x\right)g\left(x\right)\phantom{\rule{0.2em}{0ex}}dx|\le \frac{1}{4}\left(\varphi -\theta \right)\left(\mathrm{\Gamma }-\gamma \right)$, the constant $\frac{1}{4}$ is sharp.

Now, we give our main result.

Theorem 5 Let $f:\left[a,b\right]\to \mathbb{R}$ be continuous on $\left[a,b\right]$ and differentiable on $\left(a,b\right)$ and ${f}^{\mathrm{\prime }}\in {\mathbf{L}}_{1}\left(a,b\right)$. Then, for all $x\in \left[a,b\right]$, we have the inequality

(5)

Proof The following weighted integral inequality for all $x\in \left[a,b\right]$ is proved in [13].

$f\left(x\right)=\frac{1}{m\left(a,b\right)}{\int }_{a}^{b}P\left(x,t\right){f}^{\mathrm{\prime }}\left(t\right)\phantom{\rule{0.2em}{0ex}}dt+\frac{1}{m\left(a,b\right)}{\int }_{a}^{b}f\left(t\right)w\left(t\right)\phantom{\rule{0.2em}{0ex}}dt,$
(6)

where the weighted Peano kernel, $P\left(\cdot ,\cdot \right):{\left[a,b\right]}^{2}⟶\mathbb{R}$, is given by

(7)

We observe that the mapping $P\left(\cdot ,\cdot \right):\left[a,b\right]⟶\mathbb{R}$ satisfies the estimation

(8)

Consider, $f\left(x\right)=\frac{p\left(x,t\right)}{w\left(x\right)}$ and $g\left(x\right)={f}^{\mathrm{\prime }}\left(x\right)$. Applying the weighted Grüss inequality to $\frac{P\left(x,t\right)}{w\left(x\right)}$ and ${f}^{\mathrm{\prime }}\left(x\right)$, we get

(9)

Now, from (7), it can be easily seen that ${\int }_{a}^{b}P\left(x,t\right)=m\left(a,b\right)\left(x-\sigma \left(a,b\right)\right)$. Thus, (13) gives

(10)

Using (6), the inequality (10) gives

(11)

Further, we observe that

(12)

Using (12) in (11), we get our main result (5). □

Corollary 6 Under the assumptions of Theorem 5 and choosing $x=\frac{a+b}{2}$, we have the perturbed midpoint inequality

(13)

Proof This follows by inequality (5). □

Corollary 7 Under the assumptions of Theorem 5, we have the perturbed trapezoidal inequality

(14)

Proof Put $x=a$ and $x=b$ in (5) and sum up the obtained inequalities. Using the triangle inequality and dividing by two, we get the required inequality. □

4 Some weighted integral inequalities

Integration with weight functions is used in countless mathematical problems. Two main areas are: (i) approximation theory and spectral analysis and (ii) statistical analysis and the theory of distributions. In this section, inequality (5) is evaluated for the more popular weight functions.

Uniform (Legender) Substituting $w\left(t\right)=1$ into the moment $\sigma \left(a,b\right)=\frac{M\left(a,b\right)}{m\left(a,b\right)}$ gives $\sigma \left(a,b\right)=\frac{a+b}{2}$. Substituting it into (5) gives

(15)

Note that the interval mean $\sigma \left(a,b\right)$ is simply the midpoint.

Logarithm This weight is present in many physical problems, the main body of which exhibits some axial symmetry.

Putting $w\left(t\right)=ln\frac{1}{t}$, $a=0$, $b=1$, the moment $\sigma \left(a,b\right)=\frac{M\left(a,b\right)}{m\left(a,b\right)}$ and (5) imply

(16)
(17)

The optimal point $\sigma \left(0,1\right)=\frac{1}{4}$ is closer to the origin than the midpoint $\sigma \left(a,b\right)=\frac{a+b}{2}$, reflecting the strength of the log singularity.

Jacobi Substituting $w\left(t\right)=\frac{1}{\sqrt{t}}$, $a=0$, $b=1$, into the moment $\sigma \left(a,b\right)=\frac{M\left(a,b\right)}{m\left(a,b\right)}$ gives

$\sigma \left(0,1\right)=\frac{{\int }_{0}^{1}t\frac{1}{\sqrt{t}}\phantom{\rule{0.2em}{0ex}}dt}{{\int }_{0}^{1}\frac{1}{\sqrt{t}}\phantom{\rule{0.2em}{0ex}}dt}=\frac{1}{3}.$
(18)

Inequality (5) gives $|f\left(x\right)-\frac{1}{2}{\int }_{0}^{1}f\left(t\right)\frac{1}{\sqrt{t}}\phantom{\rule{0.2em}{0ex}}dt-\left(x-\frac{1}{3}\right){f}^{\mathrm{\prime }}\left(x\right)|\le \frac{1}{4}\left(\varphi -\theta \right)\left(1+\frac{1}{2}|{\int }_{0}^{1}sgn\left(t-x\right)\frac{1}{\sqrt{t}}\phantom{\rule{0.2em}{0ex}}dt|\right)$.

The optimal point $\sigma \left(0,1\right)=\frac{1}{3}$ is again shifted to the left of the midpoint due to the $\frac{1}{\sqrt{t}}$ singularity at the origin.

Chebyshev Substituting $w\left(t\right)=\frac{1}{\sqrt{1-{t}^{2}}}$, $a=-1$, $b=1$, into the moment $\sigma \left(a,b\right)=\frac{M\left(a,b\right)}{m\left(a,b\right)}$ gives $\sigma \left(-1,1\right)=\frac{{\int }_{-1}^{1}t\frac{1}{\sqrt{1-{t}^{2}}}\phantom{\rule{0.2em}{0ex}}dt}{{\int }_{-1}^{1}\frac{1}{\sqrt{1-{t}^{2}}}\phantom{\rule{0.2em}{0ex}}dt}=0$.

Hence, the inequality corresponding to the Chebyshev weight is $|f\left(x\right)-\frac{1}{m\left(a,b\right)}{\int }_{-1}^{1}f\left(t\right)×\frac{1}{\sqrt{1-{t}^{2}}}\phantom{\rule{0.2em}{0ex}}dt-x{f}^{\mathrm{\prime }}\left(x\right)|\le \frac{1}{4}\left(\varphi -\theta \right)\left(\frac{\pi }{2}+\frac{1}{2}|{\int }_{-1}^{1}sgn\left(t-x\right)\frac{1}{\sqrt{1-{t}^{2}}}\phantom{\rule{0.2em}{0ex}}dt|\right)$.

The optimal point is at the midpoint of the interval reflecting the symmetry of the Chebyshev weight over its interval.

Laguerre The Laguerre weight $w\left(t\right)={e}^{-t}$, is defined for positive values, $t\in \left[0,\mathrm{\infty }\right)$. From the moment $\sigma \left(a,b\right)=\frac{M\left(a,b\right)}{m\left(a,b\right)}$, we have $\sigma \left(0,\mathrm{\infty }\right)=\frac{{\int }_{0}^{\mathrm{\infty }}t{e}^{-t}\phantom{\rule{0.2em}{0ex}}dt}{{\int }_{0}^{\mathrm{\infty }}{e}^{-t}\phantom{\rule{0.2em}{0ex}}dt}=1$.

The appropriate inequality is $|f\left(x\right)-{\int }_{0}^{\mathrm{\infty }}f\left(t\right){e}^{-t}\phantom{\rule{0.2em}{0ex}}dt-\left(x-1\right){f}^{\mathrm{\prime }}\left(x\right)|\le \frac{1}{4}\left(\varphi -\theta \right)\left(\frac{1}{2}+\frac{1}{2}|{\int }_{0}^{\mathrm{\infty }}sgn\left(t-x\right){e}^{-t}\phantom{\rule{0.2em}{0ex}}dt|\right)$, from which the optimal sample point of $x=1$ may be deduced.

Hermite Finally, the Hermite weight is $w\left(t\right)={e}^{-{t}^{2}}$ defined over the entire real line $\sigma \left(-\mathrm{\infty },\mathrm{\infty }\right)=\frac{{\int }_{-\mathrm{\infty }}^{\mathrm{\infty }}t{e}^{-{t}^{2}}\phantom{\rule{0.2em}{0ex}}dt}{{\int }_{-\mathrm{\infty }}^{\mathrm{\infty }}{e}^{-{t}^{2}}\phantom{\rule{0.2em}{0ex}}dt}=0$. The inequality (5) with the Hermite weight function is thus $|f\left(x\right)-\frac{1}{\pi }{\int }_{-\mathrm{\infty }}^{\mathrm{\infty }}f\left(t\right){e}^{-{t}^{2}}\phantom{\rule{0.2em}{0ex}}dt-x{f}^{\mathrm{\prime }}\left(x\right)|\le \frac{1}{4}\left(\varphi -\theta \right)\left(\frac{\pi }{2}+\frac{1}{2}|{\int }_{-\mathrm{\infty }}^{\mathrm{\infty }}sgn\left(t-x\right){e}^{-{t}^{2}}\phantom{\rule{0.2em}{0ex}}dt|\right)$, which results in an optimal sampling point of $x=0$.

5 Application in numerical integration

Let ${I}_{n}:a={x}_{0}<{x}_{1}<{x}_{2}<\cdots <{x}_{n-1}<{x}_{n}=b$ be a division of the interval $\left[a,b\right],{\xi }_{i}\in \left[{x}_{i},{x}_{i+1}\right]$ ($i=1,2,\dots ,n-1$). We have the following quadrature formula.

Theorem 8 Let $f:\left[a,b\right]\to \mathbb{R}$ be continuous on $\left[a,b\right]$ and differentiable on $\left(a,b\right)$, and ${f}^{\mathrm{\prime }}:\left(a,b\right)\to \mathbb{R}$ satisfy the condition $\phi \le {f}^{\mathrm{\prime }}\left(x\right)\le \mathrm{\Phi }$ for all $x\in \left(a,b\right)$. Then we have the following perturbed Riemann type quadrature formula: ${\int }_{a}^{b}f\left(t\right)w\left(t\right)\phantom{\rule{0.2em}{0ex}}dt=A\left(f,{f}^{\mathrm{\prime }},\xi ,{I}_{n}\right)+R\left(f,{f}^{\mathrm{\prime }},\xi ,{I}_{n}\right)$, where $A\left(f,{f}^{\mathrm{\prime }},\xi ,{I}_{n}\right)={\sum }_{i=0}^{n-1}m\left({x}_{i},{x}_{i+1}\right)f\left({\xi }_{i}\right)-{\sum }_{i=0}^{n-1}m\left({x}_{i},{x}_{i+1}\right)\left(x-\sigma \left({x}_{i},{x}_{i+1}\right)\right){f}^{\mathrm{\prime }}\left({\xi }_{i}\right)$ and the remainder satisfies the estimation

$\begin{array}{rcl}R\left(f,\xi ,{I}_{n}\right)& \le & \frac{1}{8}\left(\varphi -\theta \right)\sum _{i=0}^{n-1}m\left({x}_{i},{x}_{i+1}\right)\\ ×\left(m\left({x}_{i},{x}_{i+1}\right)+{\int }_{{x}_{i}}^{{x}_{i+1}}sgn\left(t-{\xi }_{i}\right)w\left(t\right)\phantom{\rule{0.2em}{0ex}}dt\right),\end{array}$
(19)

for all ${\xi }_{i}\in \left[{x}_{i},{x}_{i+1}\right]$, where ${h}_{i}:={x}_{i+1}-{x}_{i}$ ($i=1,2,\dots ,n-1$).

Proof Apply Theorem 5 to the interval $\left[{x}_{i},{x}_{i+1}\right]$, ${\xi }_{i}\in \left[{x}_{i},{x}_{i+1}\right]$, where ${h}_{i}:={x}_{i+1}-{x}_{i}$ ($i=1,2,\dots ,n-1$), to get $|{\int }_{{x}_{i}}^{{x}_{i+1}}f\left(t\right)w\left(t\right)\phantom{\rule{0.2em}{0ex}}dt+m\left({x}_{i},{x}_{i+1}\right)\left({\xi }_{i}-\sigma \left({x}_{i},{x}_{i+1}\right)\right){f}^{\mathrm{\prime }}\left({\xi }_{i}\right)-m\left({x}_{i},{x}_{i+1}\right)f\left({\xi }_{i}\right)|\le$ $\frac{1}{8}\left(\varphi -\theta \right)m\left({x}_{i},{x}_{i+1}\right)\left(m\left({x}_{i},{x}_{i+1}\right)+{\int }_{{x}_{i}}^{{x}_{i+1}}sgn\left(t-{\xi }_{i}\right)w\left(t\right)\phantom{\rule{0.2em}{0ex}}dt\right)$.

Summing over i from 0 to $n-1$ and using the generalized triangular inequality, we deduce the desired estimation (19). □

Corollary 9 Under the assumption of Theorem 5, by choosing ${\xi }_{i}=\frac{{x}_{i}+{x}_{i+1}}{2}$ in the above theorem, we recapture the midpoint like quadrature formula: ${\int }_{{x}_{i}}^{{x}_{i+1}}f\left(t\right)w\left(t\right)\phantom{\rule{0.2em}{0ex}}dt={A}_{M}\left(f,{f}^{\mathrm{\prime }},\xi ,{I}_{n}\right)+{R}_{M}\left(f,{f}^{\mathrm{\prime }},\xi ,{I}_{n}\right)$, where ${A}_{M}\left(f,{f}^{\mathrm{\prime }},\xi ,{I}_{n}\right)={\sum }_{i=0}^{n-1}m\left({x}_{i},{x}_{i+1}\right)f\left(\frac{{x}_{i}+{x}_{i+1}}{2}\right)-{\sum }_{i=0}^{n-1}m\left({x}_{i},{x}_{i+1}\right)\left(\frac{{x}_{i}+{x}_{i+1}}{2}\right)-\sigma \left({x}_{i},{x}_{i+1}\right){f}^{\mathrm{\prime }}\left(\frac{{x}_{i}+{x}_{i+1}}{2}\right)$, and the remainder term satisfies the estimation ${R}_{M}\left(f,{f}^{\mathrm{\prime }},\xi ,{I}_{n}\right)\le \frac{1}{8}\left(\mathrm{\Phi }-\phi \right){\sum }_{i=0}^{n-1}\left(m\left({x}_{i},{x}_{i+1}\right)+|{\int }_{{x}_{i}}^{{x}_{i+1}}sgn\left(t-\frac{{x}_{i}+{x}_{i+1}}{2}\right)w\left(t\right)\phantom{\rule{0.2em}{0ex}}dt|\right)$.

6 Conclusion

We established another generalization of the Ostrowski-Grüss type inequality using the weighted Grüss inequality for bounded differentiable mappings which generalizes the previous inequalities developed and discussed in [35]. Perturbed midpoint and trapezoid inequalities are also obtained. This inequality is extended to account for applications in different weights and numerical integration. This generalized inequality will be useful for the researchers working in the field of the numerical analysis to solve their problems in engineering and in practical life.