1 Introduction

The most common applications of inequalities in science and engineering occur when there is incomplete information about a system, yet we can utilize an inequality to estimate a certain quantity. It is obvious that the closer the two sides of an inequality are to each other, the more accurate our estimation becomes. This is why refining inequalities is advantageous. Up to the present date, numerous generalizations and refinements for the Cauchy–Schwartz and Cauchy–Bunyakovsky inequalities have been extensively studied [110].

The integral form of Cauchy–Schwartz inequality known as Cauchy–Bunyakovsky inequality for two real functions \(f ( x )\) and \(g ( x )\) states that [11, Ch. 1]

$$ \biggl( \int _{a}^{b} f ( x ) g ( x ) \,dx \biggr)^{2} \leqslant \biggl( \int _{a}^{b} f^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr). $$
(1)

Accordingly, it is obvious that for a set of n functions \(\{ f_{i} ( x ) \}_{i=1}^{n}\), we have:

$$ \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i} ( x ) g ( x ) \,dx \biggr)^{2} \leqslant \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr), $$
(2)

where \(\{ p_{i} \}_{i=1}^{n} >0\) and \(P= \sum_{i=1}^{n} p_{i}\). In this paper, it is proved that Inequality (2) can be refined into the following two forms:

$$ \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i} ( x ) g ( x ) \,dx \biggr)^{2} + \begin{Bmatrix} q_{1}^{2} \\ q_{2}^{2} \end{Bmatrix} \leqslant \sum _{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr), $$
(3)

where \(q_{1}^{2}\) and \(q_{2}^{2}\) are functions of \(f_{i} ( x )\), \(p_{i}\) and \(g ( x )\).

2 Main results

The main result of this paper is contained in the following theorem.

Theorem

Consider a set of n Cauchy–Bunyakovsky inequalities applied to functions \(\{ f_{i} ( x ) \}_{i=1}^{n} \in R\) and \(g ( x ) \in R\) as follows:

$$ \biggl( \int _{a}^{b} f_{i} ( x ) g ( x ) \,dx \biggr)^{2} \leqslant \biggl( \int _{a}^{b} f_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr), \quad i=1,\dots ,n. $$
(4)

Then, there are two refinements for the weighted sum of n Cauchy–Bunyakovsky inequalities, as follows:

$$ \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i} ( x ) g ( x ) \,dx \biggr)^{2} + \begin{Bmatrix} q_{1}^{2} \\ q_{2}^{2} \end{Bmatrix} \leqslant \sum _{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr), $$
(5)

where \(\{ p_{i} \}_{i=1}^{n} >0\), \(P= \sum_{i=1}^{n} p_{i}\) and

$$\begin{aligned}& q_{1}^{2} = \int _{a}^{b} F^{2} ( x ) \,dx \int _{a}^{b} g^{2} ( x ) \,dx - \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr)^{2}, \end{aligned}$$
(6)
$$\begin{aligned}& q_{2}^{2} = \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} r_{i}^{2} ( x ) \,dx \int _{a}^{b} g^{2} ( x ) \,dx - \biggl( \int _{a}^{b} r_{i} ( x ) g ( x ) \,dx \biggr)^{2} \biggr), \end{aligned}$$
(7)
$$\begin{aligned}& F ( x ) = \frac{\sum_{i=1}^{n} f_{i} ( x ) p_{i}}{ P}, \end{aligned}$$
(8)
$$\begin{aligned}& r_{i} ( x ) = f_{i} ( x ) -F ( x ). \end{aligned}$$
(9)

Proof

The theorem is proved through a three-step process. In the first and second steps, the right and left sides of Inequality (2) are obtained, respectively. In the third step, the obtained values are subtracted from each other.

Step 1: Obtaining the right side of the Inequality.

Let \(S_{1}\) be equal to the right side of Inequality (2) as follows:

$$ S_{1} = \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr). $$
(10)

Substituting \(f_{i} ( x )\) from Equation (9) into Equation (10) gives:

$$\begin{aligned} S_{1} &= \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} F^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) \\ &\quad {}+2 \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} r_{i} ( x ) F ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) \\ &\quad {}+ \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} r_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr). \end{aligned}$$
(11)

The first summation in Equation (11) can be simplified as:

$$ \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} F^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) = \biggl( \int _{a}^{b} F^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr). $$
(12)

The second summation in Equation (11) is obtained as follows:

$$\begin{aligned}& 2 \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} r_{i} ( x ) F ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) \\& \quad =2 \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) \sum_{i=1}^{n} \frac{p_{i}}{P} \int _{a}^{b} F ( x ) r_{i} ( x ) \,dx \\& \quad = 2 \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) \int _{a}^{b} \sum_{i=1}^{n} \frac{p_{i}}{P} F ( x ) r_{i} ( x ) \,dx \\& \quad =2 \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) \int _{a}^{b} \frac{F ( x )}{P} \sum _{i=1}^{n} p_{i} r_{i} ( x ) \,dx . \end{aligned}$$
(13)

From Equations (8) and (9), it is obvious that \(\sum_{i=1}^{n} p_{i} r_{i} ( x ) =0\). Hence,

$$ 2 \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} r_{i} ( x ) F ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) =0. $$
(14)

Therefore, the value \(S_{1}\) in Equation (11) can be rewritten as follows:

$$ S_{1} = \biggl( \int _{a}^{b} F^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) + \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} r_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr). $$
(15)

Step 2: Obtaining the left side of the Inequality.

Let \(S_{2}\) be equal to the left side of Inequality (2) as follows:

$$ S_{2} = \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i} ( x ) g ( x ) \,dx \biggr)^{2}. $$
(16)

Substituting \(f_{i} ( x )\) from Equation (9) into Equation (16) gives:

$$\begin{aligned} S_{2} &= \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx + \int _{a}^{b} r_{i} ( x ) g ( x ) \,dx \biggr)^{2} \\ &=\sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr)^{2} +2 \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr) \biggl( \int _{a}^{b} r_{i} ( x ) g ( x ) \,dx \biggr) \\ &\quad {}+ \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} r_{i} ( x ) g ( x ) \,dx \biggr)^{2}. \end{aligned}$$
(17)

The first summation in Equation (17) can be simplified as:

$$ \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr)^{2} = \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr)^{2}. $$
(18)

The second summation in Equation (17) can be obtained as follows:

$$\begin{aligned}& 2 \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr) \biggl( \int _{a}^{b} r_{i} ( x ) g ( x ) \,dx \biggr) \\& \quad =2 \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr) \sum _{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} r_{i} ( x ) g ( x ) \,dx \biggr) \\& \quad = 2 \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr) \int _{a}^{b} \sum_{i=1}^{n} \frac{p_{i}}{P} r_{i} ( x ) g ( x ) \,dx \\& \quad =2 \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr) \int _{a}^{b} \frac{g ( x )}{P} \sum _{i=1}^{n} p_{i} r_{i} ( x ) \,dx . \end{aligned}$$
(19)

We know that \(\sum_{i=1}^{n} p_{i} r_{i} ( x ) =0\). Thus, the second summation in the right side of Equation (17) is equal to zero similar to step 1. Therefore, the value \(S_{2}\) in Equation (17) can be rewritten as follows:

$$ S_{2} = \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr)^{2} + \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} r_{i} ( x ) g ( x ) \,dx \biggr)^{2}. $$
(20)

Step 3:

In this step, the value of \(S_{1} - S_{2}\) is obtained. From Equations (15) and (20), we can write:

$$\begin{aligned} S_{1} - S_{2} ={}& \biggl( \biggl( \int _{a}^{b} F^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) - \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr)^{2} \biggr) \\ &{}+ \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \biggl( \int _{a}^{b} r_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) - \biggl( \int _{a}^{b} r_{i} ( x ) g ( x ) \,dx \biggr)^{2} \biggr). \end{aligned}$$
(21)

Equation (21) is the sum of two positive parts, according to the Cauchy–Bunyakovsky inequality. We can name them \(q_{1}^{2}\) and \(q_{2}^{2}\) as follows:

$$ q_{1}^{2} = \biggl( \biggl( \int _{a}^{b} F^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) - \biggl( \int _{a}^{b} F ( x ) g ( x ) \,dx \biggr)^{2} \biggr), $$
(22)

and

$$ q_{2}^{2} = \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \biggl( \int _{a}^{b} r_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) - \biggl( \int _{a}^{b} r_{i} ( x ) g ( x ) \,dx \biggr)^{2} \biggr). $$
(23)

Given that values of \(S_{1}\) and \(S_{2}\) are respectively right and left side of Inequality (2), the inequality can be refined into two following forms:

$$ S_{1} - S_{2} = \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) - \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i} ( x ) g ( x ) \,dx \biggr)^{2} \geqslant q_{1}^{2}, $$
(24)

or

$$ S_{1} - S_{2} = \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i}^{2} ( x ) \,dx \biggr) \biggl( \int _{a}^{b} g^{2} ( x ) \,dx \biggr) - \sum_{i=1}^{n} \frac{p_{i}}{P} \biggl( \int _{a}^{b} f_{i} ( x ) g ( x ) \,dx \biggr)^{2} \geqslant q_{2}^{2}. $$
(25)

The proof is complete. □

3 Conclusion

It is obvious that a weighted sum of a set of Cauchy–Bunyakovsky inequalities results in a new Cauchy–Bunyakovsky inequality. The theorem presented in this paper demonstrates that there exist two distinct refinement forms for the inequality obtained from a weighted sum of n Cauchy–Bunyakovsky inequalities.