1 Symmetric three-point quadratures

The object of our investigation is the family of all symmetric (at-most) three-point quadratures on \([-1,1]\) of the general form \(Q_z[f]=A_zf(0)+B_z\bigl (f(z)+f(-z)\bigr )\) for some \(z\in (0,1]\), which are exact on \(\Pi _3\) (the space of all polynomials of order \(3\)),i.e.

$$\begin{aligned} Q[p]=\int \limits _{-1}^1 p(x)\,\mathrm {d}x\end{aligned}$$

for any \(p\in \Pi _3\). We additionally require the operator \(Q_z\) to be positive, which means that the weights \(A_z,B_z\) are nonnegative. To determine them it is enough to check the above equation for monomials \(1,x,x^2,x^3\). Then we simply arrive at

$$\begin{aligned} Q_z[f]=2\left( 1-\frac{1}{3z^2}\right) f(0)+\frac{1}{3z^2}\bigl (f(-z)+f(z)\bigr ),\quad z\in \biggl [\frac{\sqrt{3}}{3},1\biggr ]. \end{aligned}$$

The classical quadratures are members of this family:

$$\begin{aligned} Q_{\frac{\sqrt{3}}{3}}[f]&=f\biggl (-\frac{\sqrt{3}}{3}\biggr )+f\biggl (\frac{\sqrt{3}}{3}\biggr )\\&\quad \text {(the two-point Gauss-Legendre quadrature ),}\\ Q_{\frac{\sqrt{2}}{2}}[f]&=\frac{2}{3}\Biggl (f(0)+f\biggl (-\frac{\sqrt{2}}{2}\biggr )+f\biggl (\frac{\sqrt{2}}{2}\biggr )\Biggr )\quad \text {(the Chebyshev quadrature ),}\\ Q_{\frac{\sqrt{15}}{5}}[f]&=\frac{8}{9}f(0)+\frac{5}{9}\Biggl (f\biggl (-\frac{\sqrt{15}}{5}\biggr )+f\biggl (\frac{\sqrt{15}}{5}\biggr )\Biggr )\\&\quad \text {(the three-point Gauss-Legendre quadrature ),}\\ Q_1[f]&=\frac{4}{3}f(0)+\frac{1}{3}\bigl (f(-1)+f(1)\bigr )\quad \text {(the simple Simpson's Rule ).} \end{aligned}$$

Our first goal is to find all possible inequalities of the form

$$\begin{aligned} Q_{z_1}[f]\leqslant \int \limits _{-1}^1 f(x)\,\mathrm {d}x\leqslant Q_{z_2}[f] \end{aligned}$$
(1)

in the class of all 3-convex functions \(f:[-1,1]\rightarrow \mathbb {R}\), i.e. the functions satisfying the inequality

$$\begin{aligned}{}[x_0,x_1,x_2,x_3,x_4;f]:= \frac{ \begin{vmatrix} 1&1&1&1&1\\ x_0&x_1&x_2&x_3&x_4\\ x_0^2&x_1^2&x_2^2&x_3^2&x_4^2\\ x_0^3&x_1^3&x_2^3&x_3^3&x_4^3\\ f(x_0)&f(x_1)&f(x_2)&f(x_3)&f(x_4) \end{vmatrix}}{ \begin{vmatrix} 1&1&1&1&1\\ x_0&x_1&x_2&x_3&x_4\\ x_0^2&x_1^2&x_2^2&x_3^2&x_4^2\\ x_0^3&x_1^3&x_2^3&x_3^3&x_4^3\\ x_0^4&x_1^4&x_2^4&x_3^4&x_4^4 \end{vmatrix}} \geqslant 0 \end{aligned}$$

for all distinct points \(x_0,x_1,x_2,x_3,x_4\in [-1,1]\). Of course the 3-convexity of a function defined on any interval \(\mathcal {I}\subset \mathbb {R}\) is defined analogously, by replacing \([-1,1]\) with \(\mathcal {I}\). If \(f\) is four times differentiable on \(\mathcal {I}\), then \(f\) is 3-convex on \(\mathcal {I}\) if and only if \(f^{(4)}\geqslant 0\) on \(\mathcal {I}\). Nevertheless, there exist 3-convex functions which are not differentiable enough, e.g. \(f(x)=x_+^3\) (where \(x_+=\max \{x,0\}\)) is 3-convex and \(f'''(0)\) does not exist. A function \(f\) is 3-concave, if \(-f\) is 3-convex. Recall that the concept of higher-order convexity was introduced by Hopf [2] and further investigated by Popoviciu [5]. A nice exposition can be found in Kuczma’s book [4], which is easily available.

It follows from Bojanić and Roulier’s result ([1], see also [7]) that any 3-convex function could be uniformly approximated by (3-convex) splines of the form

$$\begin{aligned} x\mapsto ax^3+bx^2+cx+d+\sum _{i=1}^na_i(x-x_i)_+^3 \end{aligned}$$

with \(a,b,c,d\in \mathbb {R}\) and \(a_i>0\), \(i=1,\dots ,n\). Hence to prove the inequality of the form (1) it is enough to check it for any spline \(x\mapsto (x-u)_+^3\) for any \(u\in (-1,1).\)

In the next lemmas we record the basic properties of the quadratures \(Q_z\).

Lemma 1

Let \(f:[-1,1]\rightarrow \mathbb {R}\) be a 3-convex function, \(z\in \Bigl [\frac{\sqrt{3}}{3},1\Bigr ]\). The function

$$\begin{aligned}{}[-1,1]\ni a\mapsto Q_z\bigl [(\cdot -a)_+^3\bigr ]-\int \limits _{-1}^1(x-a)_+^3\,\mathrm {d}x\end{aligned}$$

is even.

Proof

Because the quadrature \(Q_z\) is symmetric, the lemma follows directly from our recent result [3, Lemma 2]). For the sake of completeness we give the proof here. Let \(f_a(x)=(x-a)_+^3\) and \(g_a(x)=(a-x)_+^3.\) It is easy to see that \(f_a(x)-g_a(x)=(x-a)^3\) and \(g_a(x)=f_{-a}(-x).\) Therefore

$$\begin{aligned} Q_z[f_a]-\int \limits _{-1}^1f_a(x)\,\mathrm {d}x&=\Biggl (Q_z[f_a-g_a]-\int \limits _{-1}^1 (f_a-g_a)(x)\,\mathrm {d}x\Biggr )\\&\quad +Q_z[g_a]-\int \limits _{-1}^1g_a(x)\,\mathrm {d}x. \end{aligned}$$

The term in the bracket vanishes, since \(Q_z\) is exact on \(\Pi _3\). Because \(Q_z\) as well as the integral over \([-1,1]\) are symmetric functionals, we have

$$\begin{aligned} Q_z[f_a]-\int \limits _{-1}^1f_a(x)\,\mathrm {d}x=Q_z[g_a]-\int \limits _{-1}^1g_a(x)\,\mathrm {d}x=Q_z[f_{-a}]-\int \limits _{-1}^1f_{-a}(x)\,\mathrm {d}x, \end{aligned}$$

which completes the proof. \(\square \)

Lemma 2

Let \(f:[-1,1]\rightarrow \mathbb {R}\) be a 3-convex function. The function

$$\begin{aligned} \biggl [\frac{\sqrt{3}}{3},1\biggr ]\ni z\mapsto Q_z[f] \end{aligned}$$

is nondecreasing.

Proof

Having Bojanić and Roulier’s result in mind it is enough to check our assertion only for the functions \((\cdot -a)_+^3\) for all \(a\in (-1,1).\) Observe that \(z\mapsto Q_z\bigl [(\cdot -a)_+^3\bigr ]\) is nondecreasing if and only if the function

$$\begin{aligned} z\mapsto Q_z\bigl [(\cdot -a)_+^3\bigr ]-\int \limits _{-1}^1(x-a)_+^3\,\mathrm {d}x\end{aligned}$$

is nondecreasing. Indeed, the integral above does not depend on \(z\). By Lemma 1 we should only show that the function \(z\mapsto Q_z\bigl [(\cdot -a)_+^3\bigr ]\), where \(a\in [0,1)\), is nondecreasing. This is obviously true because

$$\begin{aligned} \Bigl (Q_z\bigl [(\cdot -a)_+^3\bigr ]\Bigr )'_z=\biggl (\frac{(z-a)_+^3}{3z^2}\biggr )'_z=\frac{3(z-a)_+^2\cdot 3z^2-(z-a)_+^3\cdot 6z}{9z^4}\\= \frac{(z-a)_+^2\bigl (3z-2(z-a)_+\bigr )}{3z^3}\geqslant 0. \end{aligned}$$

\(\square \)

Lemma 3

The inequality

$$\begin{aligned} \int \limits _{-1}^1 f(x)\,\mathrm {d}x\leqslant Q_z[f] \end{aligned}$$

holds for all 3-convex functions \(f:[-1,1]\rightarrow \mathbb {R}\) if and only if \(z=1\).

Proof

If \(z<1\), then for a 3-convex function \(f(x)=(x-z)_+^3\) we have

$$\begin{aligned} \int \limits _{-1}^1 f(x)\,\mathrm {d}x>0=Q_z[f] \end{aligned}$$

and the inequality in question does not hold for all 3-convex functions. Take now \(z=1\). Due to Lemma 1 it is enough to check the inequality

$$\begin{aligned} \int \limits _{-1}^1(x-a)_+^3\,\mathrm {d}x\leqslant Q_1\bigl [(\cdot -a)_+^3\bigr ] \end{aligned}$$

for \(a\in [0,1).\) In this case the above inequality is trivial because it reduces to

$$\begin{aligned} \frac{(1-a)^4}{4}\leqslant \frac{(1-a)^3}{3}. \end{aligned}$$

\(\square \)

Lemma 4

The inequality

$$\begin{aligned} Q_z[f]\leqslant \int \limits _{-1}^1 f(x)\,\mathrm {d}x\end{aligned}$$

holds for all 3-convex functions \(f:[-1,1]\rightarrow \mathbb {R}\) if and only if \(\frac{\sqrt{3}}{3}\leqslant z\leqslant \frac{3}{4}\).

Proof

By taking \(f(x)=x_+^3\) we get the necesssity (we omit an easy computation). Now let \(\frac{\sqrt{3}}{3}\leqslant z\leqslant \frac{3}{4}\). As in the previous proofs, it is enough to check the inequality

$$\begin{aligned} Q_z\bigl [(\cdot -a)_+^3\bigr ]\leqslant \int \limits _{-1}^1(x-a)_+^3\,\mathrm {d}x\end{aligned}$$

for all \(a\in [0,1).\) If \(a\geqslant \frac{3}{4}\), then

$$\begin{aligned} Q_z\bigl [(\cdot -a)_+^3\bigr ]=0\leqslant \int \limits _{-1}^1(x-a)_+^3\,\mathrm {d}x. \end{aligned}$$

If \(0\leqslant a<\frac{3}{4}\), then

$$\begin{aligned} \int \limits _{-1}^1(x-a)_+^3\,\mathrm {d}x= & {} \frac{(1-a)^4}{4}=\frac{16}{27}\biggl (\frac{3}{4}-a\biggr )^3+\biggl (\frac{a^2}{2}-\frac{11}{27}a\biggr )^2\\&+\frac{a^2}{2\cdot 27^2}\geqslant \frac{16}{27}\biggl (\frac{3}{4}-a\biggr )^3\\= & {} \frac{1}{3\cdot \bigl (\frac{3}{4}\bigr )^2}\biggl (\frac{3}{4}-a\biggr )^3=Q_{\frac{3}{4}}\bigl [(\cdot -a)_+^3\bigr ]\geqslant Q_z\bigl [(\cdot -a)_+^3\bigr ] \end{aligned}$$

because we have \(z\leqslant \frac{3}{4}\) and Lemma 2. \(\square \)

Lemmas 2, 3, 4 lead us to the following conclusions.

Corollary 5

The inequality

$$\begin{aligned} Q_{z_1}[f]\leqslant \int \limits _{-1}^1 f(x)\,\mathrm {d}x\leqslant Q_{z_2}[f] \end{aligned}$$

is valid for any 3-convex function \(f:[-1,1]\rightarrow \mathbb {R}\) if and only if \(\frac{\sqrt{3}}{3}\leqslant z_1\leqslant \frac{3}{4}\) and \(z_2=1\).

Corollary 6

The inequality

$$\begin{aligned} Q_{\frac{3}{4}}[f]\leqslant \int \limits _{-1}^1 f(x)\,\mathrm {d}x\leqslant Q_1[f] \end{aligned}$$

is the best lower bound and the best upper bound of the integral of a 3-convex function \(f:[-1,1]\rightarrow \mathbb {R}\) in the class of the quadratures \(Q_z\), where \(\frac{\sqrt{3}}{3}\leqslant z\leqslant 1.\)

Corollary 7

Let \(\frac{\sqrt{3}}{3}\leqslant z\leqslant 1.\) Then the inequality

$$\begin{aligned} Q_{\frac{\sqrt{3}}{3}}[f]\leqslant Q_z[f]\leqslant Q_1[f] \end{aligned}$$

holds for any 3-convex function \(f:[-1,1]\rightarrow \mathbb {R}\).

The second-named author proved in [8] (see Theorem 14) that if \(\mathcal {T}\) is a positive linear functional defined (at least) on a linear subspace of \(\mathbb {R}^{[-1,1]}\) generated by a cone of 3-convex functions, which coincides with the integral functional on \(\Pi _3\), then the inequality

$$\begin{aligned} Q_{\frac{\sqrt{3}}{3}}[f]\leqslant \mathcal {T}[f]\leqslant Q_1[f] \end{aligned}$$

holds for any 3-convex function \(f:[-1,1]\rightarrow \mathbb {R}\). This result is considerably more general than our Corollary 7, however we are convinced that the present results do agree with our earlier research.

2 Improving the inequalities between quadratures \(Q_z\)

Let \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ].\) Corollary 5 gives us the inequality

$$\begin{aligned} Q_z[f]\leqslant \int \limits _{-1}^1 f(x)\,\mathrm {d}x\leqslant Q_1[f] \end{aligned}$$
(2)

for any 3-convex function \(f:[-1,1]\rightarrow \mathbb {R}.\) In the class of all quadratures \(Q_z\) it could be improved only by taking \(Q_{\frac{3}{4}}\) instead of \(Q_z\). Another possible direction for further improvement seems to be taking the convex combinations of \(Q_z\) and \(Q_1\). Then fix \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\) and consider the quadrature \(tQ_z+(1-t)Q_1\) with \(t\in [0,1]\). In this section we will try to compare it with the integral functional in the class of 3-convex functions. First we show that it is impossible to improve the lower bound.

Theorem 8

Let \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\) and \(t\in [0,1]\). If the inequality

$$\begin{aligned} tQ_z[f]+(1-t)Q_1[f]\leqslant \int \limits _{-1}^1 f(x)\,\mathrm {d}x\end{aligned}$$

holds for any 3-convex function \(f:[-1,1]\rightarrow \mathbb {R}\), then \(t=1\).

Proof

We have

$$\begin{aligned} \frac{1-t}{3}= & {} \lim _{a\rightarrow 1^-}\frac{t\cdot 0+(1-t)\cdot \frac{(1-a)^3}{3}}{(1-a)^3}\\= & {} \lim _{a\rightarrow 1^-}\frac{t\cdot Q_z\bigl [(\cdot -a)_+^3\bigr ]+(1-t)\cdot Q_1\bigl [(\cdot -a)_+^3\bigr ]}{(1-a)^3}\\\leqslant & {} \lim _{a\rightarrow 1^-}\frac{1}{(1-a)^3}\int \limits _{-1}^1(x-a)_+^3\,\mathrm {d}x=\lim _{a\rightarrow 1^-}\frac{(1-a)^4}{4(1-a)^3}=0. \end{aligned}$$

Hence \(t\geqslant 1,\) so, by \(t\in [0,1]\), we arrive at \(t=1.\) \(\square \)

Then we could only expect the inequalities of the form

$$\begin{aligned} Q_z[f]\leqslant \int \limits _{-1}^1 f(x)\,\mathrm {d}x\leqslant tQ_z[f]+(1-t)Q_1[f]. \end{aligned}$$

If \(t=0\), we have \(Q_1\) on the right and the inequality holds. Then, with fixed \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\), we will increase \(t\) to the optimal value \(t_z\), above which the right inequality is not valid.

Theorem 9

Let \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ].\) There exists \(t_z\in [0,1)\) satisfying the following condition: the inequality

$$\begin{aligned} Q_z[f]\leqslant \int \limits _{-1}^1 f(x)\,\mathrm {d}x\leqslant tQ_z[f]+(1-t)Q_1[f] \end{aligned}$$

holds for all 3-convex functions \(f:[-1,1]\rightarrow \mathbb {R}\) if and only if \(0\leqslant t\leqslant t_z\). Moreover, the polynomial \(s\mapsto 4z^2s^3-4zs^2+(1-z)s+(1-z)\) admits in \([0,1]\) only one zero \(s_z\) and

$$\begin{aligned} t_z=\frac{1+3z-4zs_z}{4(1-zs_z)(1-zs_z^3)}. \end{aligned}$$

Proof

We infer by Lemma 4 that the inequality

$$\begin{aligned} Q_z[f]\leqslant \int \limits _{-1}^1 f(x)\,\mathrm {d}x\end{aligned}$$

holds for any 3-convex function \(f:[-1,1]\rightarrow \mathbb {R}.\) We ask for which \(t\in [0,1]\) the inequality

$$\begin{aligned} \int \limits _{-1}^1 f(x)\,\mathrm {d}x\leqslant tQ_z[f]+(1-t)Q_1[f] \end{aligned}$$

is fulfilled by any 3-convex function \(f:[-1,1]\rightarrow \mathbb {R}.\) To find the desired condition for \(t\) it is enough to restrict ourselves to the functions \((\cdot -a)_+^3\), where \(a\in [0,1)\) (see Lemma 1 and the result of Bojanić and Roulier discussed just above the formulation of this lemma. Examining the proof of Lemma 2 we observe that \(\Bigl (Q_z\bigl [(\cdot -a)_+^3\bigr ]\Bigr )'_z>0\) for \(z\in (a,1]\), so the function \(\Bigl [\frac{\sqrt{3}}{3},1\Bigr ]\ni z\mapsto Q_z[f]\) (nondecresaing by Lemma 2) is in fact strictly increasing on \((a,1]\), whence \(Q_z\bigl [(\cdot -a)_+^3\bigr ]<Q_1\bigl [(\cdot -a)_+^3\bigr ]\). Then the inequality

$$\begin{aligned} \int \limits _{-1}^1 f(x)\,\mathrm {d}x\leqslant tQ_z\bigl [(\cdot -a)_+^3\bigr ]+(1-t)Q_1\bigl [(\cdot -a)_+^3\bigr ] \end{aligned}$$
(3)

holds for any \(a\in [0,1)\) if and only if

$$\begin{aligned} t\leqslant \inf \limits _{a\in [0,1)}\frac{Q_1\bigl [(\cdot -a)_+^3\bigr ]-\displaystyle \int \limits _{-1}^1(x-a)_+^3\,\mathrm {d}x}{Q_1\bigl [(\cdot -a)_+^3\bigr ]-Q_z\bigl [(\cdot -a)_+^3\bigr ]}=\inf \limits _{a\in [0,1)}F_z(a), \end{aligned}$$

where

$$\begin{aligned} F_z(a)=\frac{z^2}{4}\cdot \frac{(1-a)^3(1+3a)}{z^2(1-a)^3-(z-a)_+^3}. \end{aligned}$$

Then \(t_z=\inf \limits _{a\in [0,1)}F_z(a)\). We get by (2) that \(F_z(a)\in [0,1],\) whenever \(a\in [0,1).\) Moreover, \(t_z\in [0,1)\), because (3) holds for \(t=0\) (cf. Lemma 3) and it fails for \(t=1\) (cf. Lemma 4).

Observe that if \(a\geqslant z\), we have

$$\begin{aligned} F_z(a)=\frac{1+3a}{4}\geqslant \frac{1+3z}{4}=F_z(z), \end{aligned}$$

hence \(t_z=\inf \limits _{a\in [0,z]}F_z(a).\) The homography

$$\begin{aligned} a(s)=\frac{z(1-s)}{1-zs} \end{aligned}$$

is a decreasing bijection between \([0,1]\) and \([0,z]\). This implies that

$$\begin{aligned} t_z=\inf \limits _{s\in [0,1]}F_z\bigl (a(s)\bigr )=\inf \limits _{s\in [0,1]}\frac{1+3z-4zs}{4(1-zs)(1-zs^3)} \end{aligned}$$

(we omit the long computations). For \(s\in [0,1]\) the sign of a derivative \(\bigl (F_z\bigl (a(s)\bigr )\bigr )'_s\) is the same as the sign of the polynomial

$$\begin{aligned} P_z(s)= & {} \bigl (1+3z-4zs\bigr )'_s\bigl (4(1-zs)(1-zs^3)\bigr )\\&-\bigl (1+3z-4zs\bigr )\bigl (4(1-zs)(1-zs^3)\bigr )'_s\\= & {} -4z^2s^3+4zs^2+(z-1)s+(z-1). \end{aligned}$$

Furthermore,

$$\begin{aligned} \lim \limits _{s\rightarrow -\infty }P_z(s)&=+\infty ,\\ P_z(0)&=z-1<0,\\ P_z(1)&=2(1-2z)(z-1)>0,\\ \lim \limits _{s\rightarrow +\infty }P_z(s)&=-\infty . \end{aligned}$$

Therefore the polynomial \(P_z\) admits in \((0,1)\) exactly one zero (denote it by \(s_z\)) and the function \([0,1]\ni s\mapsto F_z\bigl (a(s)\bigr )\) reaches the minimum at \(s_z.\) Thus

$$\begin{aligned} t_z=\inf \limits _{s\in [0,1]}F_z\bigl (a(s)\bigr )=F_z(s_z)=\frac{1+3z-4zs_z}{4(1-zs_z)(1-zs_z^3)} \end{aligned}$$

and the proof is finished. \(\square \)

The Theorem 9 asserts that if \(f:[-1,1]\rightarrow \mathbb {R}\) is 3-convex, then

$$\begin{aligned} \int \limits _{-1}^1 f(x)\,\mathrm {d}x\in \Bigl [Q_z[f],t_zQ_z[f]+(1-t_z)Q_1[f]\Bigr ]. \end{aligned}$$

Now we show that for a fixed 3-convex function \(f\) the length of this interval, i.e. the function

$$\Bigl [\tfrac{\sqrt{3}}{3},\tfrac{3}{4}\Bigr ]\ni z\mapsto (1-t_z)\bigl (Q_1[f]-Q_z[f]\bigr ),$$

is nonincreasing. This tells us that the thinnest interval is obtained for \(z=\frac{3}{4}\) and the best approximation of the integral is achieved by its midpoint, i.e. by the quadrature

$$\begin{aligned} \frac{1+t_{\frac{3}{4}}}{2}Q_{\frac{3}{4}}[f]+\frac{1-t_{\frac{3}{4}}}{2}Q_1[f]. \end{aligned}$$

Lemma 10

The function \(\Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\ni z\mapsto t_z\) is strictly increasing (the notation of Theorem 9).

Proof

We use the notation of the proof of Theorem 9. We showed there that for any \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\) the polynomial \(F(z,s)=4z^2s^3-4zs^2+(1-z)s+(1-z)\) has exactly one root \(s_z\in [0,1]\). Then the equation \(F(z,s)=0\) uniquely determines the function \(\Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\ni z\mapsto s_z\). For a fixed \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\) the point \((z,s_z)\) fulfils the assumptions of the implicit function theorem. Of course \(F(z,s_z)=0.\) If \(\frac{\partial F(z,s)}{\partial s}\Bigr |_{s=s_z}=0,\) then \(s_z\) would be the multiple root of a polynomial \(s\mapsto F(z,s)\), which is impossible, because (as it was shown in the proof of Theorem 9) this polynomial has three distinct real roots. Thus the function \(z\mapsto s_z\) is differentiable at any \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ].\) This implies that the function

$$\begin{aligned} \Bigl [\tfrac{\sqrt{3}}{3},\tfrac{3}{4}\Bigr ]\ni z\mapsto t_z=\frac{1+3z-4zs_z}{4(1-zs_z)(1-zs_z^3)}, \end{aligned}$$

is also differentiable. By the chain rule

$$\begin{aligned} \frac{\,\mathrm {d}t_z}{\,\mathrm {d}z}=\frac{\partial t_z}{\partial z}\biggr |_{s=s_z}+\frac{\partial t_z}{\partial s}\biggr |_{s=s_z}\cdot \frac{\,\mathrm {d}s_z}{\,\mathrm {d}z}. \end{aligned}$$

But in the proof of Theorem 9 we showed that the function \(s\mapsto F_z\bigl (a(s)\bigr )\) takes the minimum at \(s=s_z\), whence \(\frac{\partial t_z}{\partial s}\bigr |_{s=s_z}=0.\) Thus

$$\begin{aligned} \frac{\,\mathrm {d}t_z}{\,\mathrm {d}z}=\frac{\partial t_z}{\partial z}\biggr |_{s=s_z}. \end{aligned}$$

The sign of this derivative is the same as the sign of the expression

$$\begin{aligned} 16z^2s_z^5-(12z^2+8z)s_z^4+4s_z^3-12s_z+12, \end{aligned}$$

which is the same (by subtracting \(F(z,s_z)(4s_z^2-3s_z)=0\)) as the sign of

$$\begin{aligned} zs_z(8s_z^3-8s_z^2+s_z-3)-s_z^2-9s_z+12. \end{aligned}$$
(4)

Consider this as an affine function of \(z\). Since \(\Bigl [z\in \frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\subset (0,1)\) and \(s_z\in [0,1],\) the value of (4) lies between

$$\begin{aligned} 0\cdot s_z(8s_z^3-8s_z^2+s_z-3)-s_z^2-9s_z+12=-s_z^2-9s_z+12\geqslant 2 \end{aligned}$$

and

$$\begin{aligned}&1\cdot s_z(8s_z^3-8s_z^2+s_z-3)-s_z^2-9s_z+12\\&\quad =8s_z^4-8s_z^3-12s_z+12=(1-s_z)(12-8s_z^3)\geqslant 0. \end{aligned}$$

This shows that \(\dfrac{\,\mathrm {d}t_z}{\,\mathrm {d}z}>0\) and the proof is finished. \(\square \)

Corollary 11

If \(f:[-1,1]\rightarrow \mathbb {R}\) is 3-convex then the function

$$\begin{aligned} \Bigl [\tfrac{\sqrt{3}}{3},\tfrac{3}{4}\Bigr ]\ni z\mapsto (1-t_z)\bigl (Q_1[f]-Q_z[f]\bigr ) \end{aligned}$$

is nonincreasing (the notation of Theorem 9).

Proof

The Corollary follows immediately by Lemmas 2 and 10, because the functions \(z\mapsto 1-t_z\) and \(z\mapsto Q_1[f]-Q_z[f]\) are positive and nondecreasing. \(\square \)

Remark 12

Let \(f:[-1,1]\rightarrow \mathbb {R}\) be 3-concave. Applying Corollary 11 to the 3-convex function \(-f\) we get that the function

$$\begin{aligned} \Bigl [\tfrac{\sqrt{3}}{3},\tfrac{3}{4}\Bigr ]\ni z\mapsto (1-t_z)\bigl (Q_1[-f]-Q_z[-f]\bigr )=(1-t_z)\bigl (Q_z[f]-Q_1[f]\bigr ) \end{aligned}$$

is nonincreasing. Then the function

$$\begin{aligned} \Bigl [\tfrac{\sqrt{3}}{3},\tfrac{3}{4}\Bigr ]\ni z\mapsto (1-t_z)\bigl |Q_1[f]-Q_z[f]\bigr | \end{aligned}$$

is nonincreasing, whenever \(f:[-1,1]\rightarrow \mathbb {R}\) is either 3-convex or 3-concave.

3 Inequalities between the quadratures on the interval [ab]

In this short section we transform the quadratures \(Q_z\) into the interval \([a,b]\). Let \(f:[a,b]\rightarrow \mathbb {R}\). The affine substitution

$$\begin{aligned}{}[-1,1]\ni x\mapsto \frac{a+b}{2}+\frac{b-a}{2}x=u\in [a,b] \end{aligned}$$

transforms \(f\) to a function \(g:[-1,1]\rightarrow \mathbb {R}\) given by \(g(u)=f(x)\). If \(f\) is 3-convex on \([a,b]\), then \(g\) is 3-convex on \([-1,1]\) (cf. [5, p.18]). Furthermore, the relations

$$\begin{aligned} \int \limits _{-1}^1g(x)\,\mathrm {d}x\begin{array}{c} \leqslant \\ =\\ \geqslant \end{array} Q_z[g]=2\left( 1-\frac{1}{3z^2}\right) g(0)+\frac{1}{3z^2}\bigl (g(-z)+g(z)\bigr ) \end{aligned}$$

lead us to

$$\begin{aligned} \int \limits _a^bf(x)\,\mathrm {d}x&\!\!\begin{array}{c} \leqslant \\ =\\ \geqslant \end{array} \frac{b-a}{2}\biggl [2\left( 1-\frac{1}{3z^2}\right) f\Bigl (\frac{a+b}{2}\Bigr )+\frac{1}{3z^2}\biggl (f\Bigl (\frac{a+b}{2}-\frac{b-a}{2}z\Bigr )\\&\quad +f\Bigl (\frac{a+b}{2}+\frac{b-a}{2}z\Bigr )\biggr )\biggr ]. \end{aligned}$$

Denote the quadrature on the right by \(Q_{z;a,b}[f].\) Then by Theorem 9 we get

Corollary 13

For any \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\) there exists \(t_z\in [0,1]\) (given by Theorem 9) satisfying the following condition: the inequality

$$\begin{aligned} Q_{z;a,b}[f]\leqslant \int \limits _{-1}^1 f(x)\,\mathrm {d}x\leqslant tQ_{z;a,b}[f]+(1-t)Q_{1;a,b}[f] \end{aligned}$$

holds for all 3-convex functions \(f:[a,b]\rightarrow \mathbb {R}\) if and only if \(0\leqslant t\leqslant t_z\).

In the context of the above inequality the best approximation of the integral is the arithmetic mean of its lower and upper bounds. The error bound is not greater than one half of the distance between these bounds. In this way we arrive at

Corollary 14

For any \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\) there exists \(t_z\in [0,1]\) (given by Theorem 9) satisfying the following condition: the inequality

$$\begin{aligned} \biggl |\frac{1+t}{2}Q_{z;a,b}[f]+\frac{1-t}{2}Q_{1;a,b}[f]-\int \limits _a^b f(x)\,\mathrm {d}x\biggr |\leqslant \frac{1-t}{2}\Bigl (Q_{1;a,b}[f]-Q_{z;a,b}[f]\Bigr )\nonumber \\ \end{aligned}$$
(5)

holds for all 3-convex functions \(f:[a,b]\rightarrow \mathbb {R}\) if and only if \(0\leqslant t\leqslant t_z\).

4 Adaptive integration

For \(n\in \mathbb {N}\) let \(a=x_0<x_1<\dots <x_n=b\) with

$$\begin{aligned} x_k=a+k\cdot \frac{b-a}{n},\quad k=0,1,\dots ,n \end{aligned}$$

be a partition of \([a,b]\) into \(n\) subintervals of equal lengths. Define the emphcomposite quadrature

$$\begin{aligned} Q^n_{z;a,b}[f]=\sum _{k=0}^{n-1}Q_{z;x_k,x_{k+1}}[f], \end{aligned}$$

where \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ].\) We will approximate the integral of a 3-convex (or a 3-concave) function \(f:[a,b]\rightarrow \mathbb {R}\) by the quadratures \(\frac{1+t}{2}Q^n_{z;a,b}+\frac{1-t}{2}Q^n_{1;a,b}\) (with \(0\leqslant t\leqslant t_z\), where \(t_z\) is given by Theorem 9) up to a given tolerance \(\varepsilon >0.\) For such an approach (i.e. adaptive integration, which is widely known in numerical analysis) one needs to choose \(n\) large enough. In this section we introduce the stopping inequality, which, as the name suggests, stops the integration algorithm and assures the goodness of approximation. One of the classical stopping inequalities in this spirit, given in 1972 by Rowland and Varol [6], concerns the composite Simpson’s Rule (in our terminology \(Q^n_{1;a,b}\)): if \(f\) is either 3-convex, or 3-concave on \([a,b]\), then

$$\begin{aligned} \Biggl |Q^{2n}_{1;a,b}[f]-\int \limits _a^bf(x)\,\mathrm {d}x\Biggr |\leqslant \bigl |Q^{2n}_{1;a,b}[f]-Q^n_{1;a,b}[f]\bigr |. \end{aligned}$$
(6)

Now, if the right hand side of (6) does not exceed \(\varepsilon \), then nor does the left hand side and the approximation of the integral by \(Q^{2n}_{1;a,b}\) is accurate enough. Recall that another well known approach to estimate the error bound is to use the derivative of some degree. This could cause some inconvenience because of difficulties in computing its supremum norm. The method presented in this paper needs only to compute the nodes (simple task for a computer since they form an arithmetic sequence) and the values of the integrand at these nodes. For a more extensive discussion on adaptive integration see the second-named author’s recent paper [9].

Theorem 15

Let \(n\in \mathbb {N}\), \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\) and \(0\leqslant t\leqslant t_z\), where \(t_z\) is given by Theorem 9. If \(f:[a,b]\rightarrow \mathbb {R}\) is either a 3-convex or a 3-concave function, then

$$\begin{aligned} \Biggl |\frac{1+t}{2}Q^n_{z;a,b}[f]+\frac{1-t}{2}Q^n_{1;a,b}[f]-\int \limits _a^b f(x)\,\mathrm {d}x\Biggr |\leqslant \frac{1-t}{2}\Bigl |Q^n_{1;a,b}[f]-Q^n_{z;a,b}[f]\Bigr | \end{aligned}$$

\(\square \)

Proof

The proof uses the triangle inequality and inequality (5) of Corollary 14. First assume that \(f\) is 3-convex. Then

$$\begin{aligned}&\Biggl |\frac{1+t}{2}Q^n_{z;a,b}[f]+\frac{1-t}{2}Q^n_{1;a,b}[f]-\int \limits _a^b f(x)\,\mathrm {d}x\Biggr |\\&\quad =\Biggl |\sum _{k=0}^{n-1}\biggl (\frac{1+t}{2}Q^n_{z;x_k,x_{k+1}}[f]+\frac{1-t}{2}Q^n_{1;x_k,x_{k+1}}[f]-\int \limits _{x_k}^{x_{k+1}} f(x)\,\mathrm {d}x\biggr )\Biggr |\\&\quad \leqslant \sum _{k=0}^{n-1}\Biggl |\biggl (\frac{1+t}{2}Q^n_{z;x_k,x_{k+1}}[f]+\frac{1-t}{2}Q^n_{1;x_k,x_{k+1}}[f]-\int \limits _{x_k}^{x_{k+1}} f(x)\,\mathrm {d}x\biggr )\Biggr |\\&\quad \leqslant \sum _{k=0}^{n-1}\frac{1-t}{2}\Bigl (Q^n_{1;x_k,x_{k+1}}[f]-Q^n_{z;x_k,x_{k+1}}[f]\Bigr )\\&\quad = \frac{1-t}{2}\Bigl (Q^n_{1;a,b}[f]-Q^n_{z;a,b}[f]\Bigr )=\frac{1-t}{2}\Bigl |Q^n_{1;a,b}[f]-Q^n_{z;a,b}[f]\Bigr |. \end{aligned}$$

If \(f\) is 3-concave, then we apply the above inequality to the 3-convex function \(-f\). Both sides remain unchanged. Thus the proof is finished. \(\square \)

Let us present our stopping inequality. The result below is of course an immediate consequence of Theorem 15.

Corollary 16

Let \(\varepsilon >0\), \(n\in \mathbb {N}\), \(z\in \Bigl [\frac{\sqrt{3}}{3},\frac{3}{4}\Bigr ]\) and \(0\leqslant t\leqslant t_z\), where \(t_z\) is given by Theorem 9. If \(f:[a,b]\rightarrow \mathbb {R}\) is either a 3-convex or a 3-concave function and

$$\begin{aligned} \Bigl |Q^n_{1;a,b}[f]-Q^n_{z;a,b}[f]\Bigr |<\frac{2\varepsilon }{1-t}, \end{aligned}$$
(7)

then

$$\begin{aligned} \Biggl |\frac{1+t}{2}Q^n_{z;a,b}[f]+\frac{1-t}{2}Q^n_{1;a,b}[f]-\int \limits _a^b f(x)\,\mathrm {d}x\Biggr |<\varepsilon . \end{aligned}$$
(8)

The adaptive method we develop goes by the following steps.

  1. 1.

    Take a function \(f:[a,b]\rightarrow \mathbb {R}\) which is either 3-convex, or 3-concave.

  2. 2.

    Fix a tolerance \(\varepsilon >0\) and take \(n=1\).

  3. 3.

    Increase \(n\) until the inequality (7) is fulfilled.

  4. 4.

    By Corollary 16 the inequality (8) is fulfilled, so we take

    $$\begin{aligned} \int \limits _a^b f(x)\,\mathrm {d}x\approx \frac{1+t}{2}Q^n_{z;a,b}[f]+\frac{1-t}{2}Q^n_{1;a,b}[f]. \end{aligned}$$

Then the inequality (7) constitutes the stopping criterion for our method. If \(\varepsilon >0\) is arbitrarily chosen, then this inequality is fulfilled for n large enough and the algorithm is stopped. Indeed, by a standard argument we have \(\lim \limits _{n\rightarrow \infty } \bigl |Q^n_{1;a,b}[f]-Q^n_{z;a,b}[f]\bigr |=0.\)

5 Numerical experiments

In the last section we present a few numerical experiments with the quadratures

$$\begin{aligned} \frac{1+t}{2}Q^n_{z;a,b}[f]+\frac{1-t}{2}Q^n_{1;a,b}[f]. \end{aligned}$$

We apply the adaptive method which we described above. Our aim is to compare their results with the results of the experiments with quadratures based on the Chebyshev quadrature and Simpson’s rule (in the notation of our paper this is the case of \(z=\frac{\sqrt{2}}{2}\) and \(t=\frac{1}{2}\)) performed in [9]. If for \(z=\frac{\sqrt{2}}{2}\) we apply the optimal \(t_z\) given by Theorem 9, the number of needed subdivisions of the interval of integration is less then the analogous number obtained for \(t=\frac{1}{2}.\) But the smallest number of subdivisions we achieve for \(z=\frac{3}{4}\) with the optimal \(t_{\frac{3}{4}}.\) This agrees with the comment given just before the formulation of Lemma 10 telling us that the best approximation of the integral of a 3-convex function \(f:[-1,1]\rightarrow \mathbb {R}\) is achieved by the quadrature

$$\begin{aligned} \frac{1+t_{\frac{3}{4}}}{2}Q_{\frac{3}{4};-1,1}[f]+\frac{1-t_{\frac{3}{4}}}{2}Q_{1;-1,1}[f]. \end{aligned}$$

We get a similar conclusion on any interval \([a,b].\) Then the results of the present paper improve on the results of [9].

In our experiments we use the same functions and intervals of integration as in [9]. We also use (in fact) the same computer program which we created in the Python programming language for the purposes of [9] (of course some slight modifications needed for the present paper were done).

We perform the experiments with some specially chosen values of \(z\) and \(t\).

  1. 1.

    For \(z=\frac{\sqrt{3}}{3}\) we get as \(Q^n_{z;a,b}\) the adaptive quadrature based on the 2-point Gauss quadrature. We apply the optimal value of \(t\), i.e. \(t_z=t_{\frac{\sqrt{3}}{3}}\approx 0.5829014\).

  2. 2.

    For \(z=\frac{\sqrt{2}}{2}\) we get as \(Q^n_{z;a,b}\) the adaptive quadrature based on the Chebyshev quadrature. Taking \(t=\frac{1}{2}\) we arrive at the quadrature which was investigated in [9], i.e. \(\frac{3}{4}Q^n_{\frac{\sqrt{2}}{2};a,b}+\frac{1}{4}Q^n_{1;a,b}\) (denoted in [9] by \(\frac{3}{4}\mathcal {C}+\frac{1}{4}\mathcal {S}\)). Here we recall the results.

  3. 3.

    Again we take \(z=\frac{\sqrt{2}}{2}\), but we apply the optimal \(t_z=t_{\frac{\sqrt{2}}{2}}\approx 0.7240841\).

  4. 4.

    Next we examine the highest possible \(z=\frac{3}{4}\) with \(t=\frac{3}{4}.\)

  5. 5.

    Then we take \(z=\frac{3}{4}\) with the optimal \(t_{\frac{3}{4}}\approx 0.7689878.\)

  6. 6.

    Finally we consider the method of Rowland and Varol with the stopping criterion given by (6). In fact it was done in [9], so we recall the results here.

Because the program is not too long, below we present its listing.

figure a

Experiment 1

We start with the integral \(\int \limits _1^2 \frac{\mathrm {d}x}{x}=\ln 2.\) The function \(f(x)=\frac{1}{x}\) is 3-convex as \(f^{(4)}(x)=\frac{24}{x^5}>0\) for \(x\in [1,2]\). In the table below we put the numbers of subdivisions of the interval [1, 2] needed to approximate the integral with the desired tolerance \(\varepsilon \in \{10^{-1}, 10^{-2},\dots ,10^{-16}\}\).

Tolerance

\(\begin{aligned}z&=\tfrac{\sqrt{3}}{3}\\&t_{\tfrac{\sqrt{3}}{3}}\approx \\&0.5829014&\end{aligned}\)

\(\begin{aligned}z&=\tfrac{\sqrt{2}}{2}\\t&=\tfrac{1}{2}\end{aligned}\)

\(\begin{aligned}z&=\tfrac{\sqrt{2}}{2}\\ {}&t_{\tfrac{\sqrt{2}}{2}}\approx \\&0.7240841&\end{aligned}\)

\(\begin{aligned}z&=\tfrac{3}{4}\\t&=\tfrac{3}{4}\end{aligned}\)

\(\begin{aligned}z&=\tfrac{3}{4}\\ {}&t_{\tfrac{3}{4}}\approx \\&0.7689878&\end{aligned}\)

Rowland and Varol [6]

\(10^{-1}\)

1

1

1

1

1

2

\(10^{-2}\)

1

1

1

1

1

2

\(10^{-3}\)

1

1

1

1

1

4

\(10^{-4}\)

2

2

2

2

2

4

\(10^{-5}\)

3

3

3

3

3

8

\(10^{-6}\)

6

5

5

5

4

14

\(10^{-7}\)

10

9

8

8

8

24

\(10^{-8}\)

17

16

14

13

13

42

\(10^{-9}\)

29

28

25

23

23

74

\(10^{-10}\)

52

50

43

41

40

132

\(10^{-11}\)

91

89

77

72

71

234

\(10^{-12}\)

162

158

136

128

126

414

\(10^{-13}\)

288

280

241

228

223

736

\(10^{-14}\)

511

498

429

405

397

1310

\(10^{-15}\)

908

884

762

719

705

2328

\(10^{-16}\)

1615

1572

1355

1279

1254

4138

Experiment 2

Next we experiment with the 3-convex function \(f(x)={{\,\mathrm{e}\,}}^x\) over the intervals [0, b] with \(b\in \{1,2,\dots ,10\}.\) We choose the tolerance \(\varepsilon =10^{-8}\).

The right endpoint b

\(\begin{aligned}z&=\tfrac{\sqrt{3}}{3}\\ {}&t_{\tfrac{\sqrt{3}}{3}}\approx \\&0.5829014&\end{aligned}\)

\(\begin{aligned}z&=\tfrac{\sqrt{2}}{2}\\t&=\tfrac{1}{2}\end{aligned}\)

\(\begin{aligned}z&=\tfrac{\sqrt{2}}{2}\\ {}&t_{\tfrac{\sqrt{2}}{2}}\approx \\&0.7240841&\end{aligned}\)

\(\begin{aligned}z&=\tfrac{3}{4}\\t&=\tfrac{3}{4}\end{aligned}\)

\(\begin{aligned}z&=\tfrac{3}{4}\\ {}&t_{\tfrac{3}{4}} \approx \\&0.7689878&\end{aligned}\)

Rowland and Varol [6]

1

12

12

11

10

10

32

2

34

33

28

27

26

86

3

66

64

56

53

52

170

4

114

111

96

90

89

292

5

183

178

154

145

142

470

6

282

275

237

224

219

722

7

423

412

355

335

328

1082

8

620

604

520

491

482

1588

9

895

872

752

709

695

2294

10

1277

1244

1072

1012

992

3274