Sharp unifying generalizations of Opial’s inequality

Opial’s inequality and its ramifications play an important role in the theory of differential and difference equations. A sharp unifying generalization of Opial’s inequality is presented that contains both its continuous and discrete versions. This generalization, based on distribution functions, is extended to the case of derivatives of arbitrary order. This extension optimizes and improves the constant given in the literature. The special case of derivatives of second order is studied in more detail. Two closely related Opial inequalities with a weight function are presented as well. The associated Wirtinger inequality is studied briefly.


Introduction
More than sixty years ago [Opial (1960)] published an inequality that happened to have an enormous influence in the field of differential and difference equations.For an early application see [Willett (1968)].Its complicated proof was simplified in the early 1960s by several authors; see Chapter 1 of [Agarwal and Pang (1995)], who present a comprehensive account of the state of the art in this field up to 1995.A more recent detailed description of the history of Opial's inequality is given in [Saker (2011)].The situation in 2015 is summarized in [Andrić et al. (2015)].The inequality has been extended and generalized in several directions.For an exposition of Opial's inequality for time scales we refer to [Osman, Saker and Anderson (2022)].
In the next section we present a very general, unifying version of the original Opial inequality in terms of integration via distribution functions.Observe that a distribution function may have its support in different time scales, like R, N and q N .In particular, our probability theoretic inequality incorporates also a discrete version, which is similar to the one presented by [Lasota (1968)].We also present the Opial inequality for n-th derivatives, with the optimal constant.Our inequality improves the constants as given in the literature, e.g.[Das (1968)]; see also [Wang, Sun and Yang (2014)].This is done in Section 3.However, this inequality is not sharp for distributions with atoms, in particular for the discrete case.An inequality for derivatives of second order that is sharp for these distributions as well, is proved in Section 4. Furthermore, we consider Opial inequalities with weights in Section 5. We study the related Wirtinger inequality briefly in Section 6.Our conclusions are presented in Section 7.
Actually, (1.3) is a consequence of the more fundamental inequality for differentiable functions x with just x(0) = 0 (cf.(3) of [Beesack (1962) where h/2 is the optimal constant; see also Remark 2.2.Often this inequality is also called Opial's inequality.It is this inequality we will focus on, but consequences such as (1.3) will be discussed as well.

A probability theoretic generalization of Opial's inequality
In this section we first generalize Opial's fundamental inequality (1.4) to integration via distribution functions.Subsequently, we will discuss a simple extension to an analog of (1.3).Opial-type inequalities are, for obvious reasons, presented in terms of a function x and its derivatives.To formulate our results we start with the derivative, which we call ψ, and integrate this function with respect to a distribution function F .
Here we define F (x) = P F (X ≤ x) at x ∈ R as the probability that a random variable under F equals at most x.Note that F is continuous from the right with left hand limits.To compensate for this asymmetry in the standard definition of a distribution function, we integrate a measurable function ψ with respect to such a distribution function in a special way, namely We will also consider Theorem 2.1.Opial's inequality Let X and Y be independent and identically distributed (i.i.d.) random variables with distribution function F on R, and let ψ : R → R be a measurable function.The inequalities hold with equalities if and only if ψ is constant F -almost everywhere.

Proof
Without loss of generality we assume E F (ψ 2 (X)) < ∞.Since the absolute value of a (conditional) expectation of a random variable is bounded from above by the expectation of the absolute value of the random variable itself, the left-hand side of (2.7) is bounded by the middle term (2.9) where the equality holds because X and Y are i.i.d.In view of and (2.9), the left-hand sides of (2.7) and (2.8) are bounded by The last inequality is valid by Cauchy-Schwarz, which also shows that equality can hold only if ψ(X) is constant F -almost everywhere.Indeed, for ψ = 1 the left-hand sides of (2.7) and (2.8) equal and the sum of these two terms equals The continuous Opial inequality has also been generalized to fractional integral operators; for a recent comprehensive paper on this topic, see, e.g.[Vivas-Cortez, Martínez, Nápoles Valdes and Hernández (2022)].For absolutely continuous distribution functions F with density f in (2.5) and (2.6) there is some similarity to fractional integral operators, in which f (y) is replaced by a function of (x − y), in the notation of (2.5) and (2.6).
Remark 2.2.If F has no point masses, i.e., if P (X = Y ) = 0 holds, then (2.7) simplifies to In particular, if X and Y have a uniform distribution on the interval [0, h], then this reduces to Opial's inequality (1.4) (2.10) In Opial's notation we have the absolutely continuous function x(t) = t 0 ψ(y) dy, which is Lebesgue almost everywhere differentiable with derivative x ′ (t) = ψ(t) and x(0 which combined with (2.10) itself yields inequality (1.3) of Opial, where h is replaced by 2h, namely Note that for continuity of x at h we need h 0 ψ(y) dy = 2h h ψ(y) dy.In a similar way as above, two inequalities as in (2.7) may be glued together; see Corollary 2.1 below.
Corollary 2.1.Let X and Y be i.i.d. with distribution function F and let c be a constant satisfying Then the inequalities hold with equalities if and only if ψ is F -almost everywhere constant on (−∞, c] and on (c, ∞) with possibly different constants.
In case F is continuous and c is a median of F , the inequalities become

Proof
Recall that X and Y are i.i.d.Consequently they are i.i.d.under the condition X > c, Y > c too.Therefore the first inequality of (2.13) holds; cf.(2.9).Applying Theorem 2.1 to both expectations on the right-hand side of the first inequality conditionally on X ≤ c, Y ≤ c and X > c, Y > c, respectively, we see that the left-hand sides of (2.13) are bounded from above by As in Theorem 2.1, equalities hold if and only if ψ is constant F -almost everywhere on (−∞, c] and on (c, ∞) with possibly different constants.
For the case where F is continuous and c is a median of F , we have P and similarly for the subsequent three terms.✷ Remark 2.5.With F uniform on {1, . . ., K, . . ., N}, c = K, p = K/N and ψ(i) = a i , i = 1, . . ., N, inequality (2.13) becomes This inequality is sharp as can be seen via the choices For odd N this inequality also holds as we will show next.Define b h = ψ(⌈h/2⌉) = a ⌈h/2⌉ , h = 1, . . ., 2N.
Discerning between odd and even h, we see that this inequality can be rewritten in terms of the a i as Since the absolute value function see also Theorem 5.2.1 of [Agarwal and Pang (1995)].Again, for even N = 2K equality holds for Note that the left-hand side of Lasota's inequality (2.16), N i=1 lacks the symmetry that the left-hand side of our inequality (2.15) has.
3 A generalization of Opial's inequality for the n-th derivative Let X be a random variable with distribution function F , let ψ be a measurable function and let n be a natural number.We define the n-th order integral Note that for n = 1, we have We generalize the n-th order derivative version of Opial's inequality, as given by [Das (1968)], and improve the constant in this generalization to its optimal value.
Theorem 3.1.With the above notation holds with equality if and only if F is continuous and ψ is a F -almost everywhere.

Proof
Without loss of generality we assume E F (ψ 2 (X)) < ∞.In terms of integrals, the left-hand side of (3.17) may be written as which is bounded from above by Let S n+1 be the set of permutations of {0, 1, . . ., n}.Consider the disjoint union Since each of the (n + 1)! permutations π ∈ S n+1 applied to (3.18) yields the same value, we obtain In view of the inequality sign in (3.19) the first inequality in (3.20) can be an equality if and only if F has no point masses, i.e., if and only if F is continuous.Because of the Cauchy-Schwarz inequality, the second inequality is an equality if and only if ψ is constant F -almost everywhere.✷ Remark 3.1.Let F be the uniform distribution function on [a, b] as in Theorem 1 of [Das (1968)].Then we have and we see that the n-th derivative of (b − a) n I F,n,ψ (x) equals ψ(x).We conclude that our Theorem 3.1 generalizes Theorem 1 of [Das (1968)] with its constant K = n/(2n − 1) /(2(n!)) replaced by the optimal 1/(n + 1)!. (We have K ≥ 1/(n + 1)! with equality only if n = 1.) Remark 3.2.For n = 1 and F continuous Theorem 3.1 yields (2.7) of Theorem 2.1.
4 A sharp inequality for n = 2 and distributions with atoms If F has point masses, then the probability P F (X 0 = X 1 ) is positive and hence P (X ∈ R n+1 \ U n+1 ) is.Therefore, in order to improve inequality (3.17) to a sharp inequality for distributions with point masses, we have to study the gap between U n+1 and R n+1 ; recall the inequality sign in (3.19).We do this for n = 2 as follows.Let is a partition of R 3 consisting of 13 sets.By analogy with (3.20), using the Tonelli-Fubini theorem, we have With the notation we have proved the inequality Theorem 4.1.Let X be a random variable with distribution function F on R, and let ψ : R → R be a measurable function.The inequality holds with equality if and only if ψ is constant F -almost everywhere.

Proof
The only inequality in (4.21) stems from Cauchy-Schwarz, which means that equality in (4.22) holds if and only ψ is constant F -almost everywhere.✷ If F is continuous, i.e. if F has no point masses, then inequality (4.22) reduces to inequality (3.17) with n = 2.

Opial inequalities with weights
Applying our approach of Theorem 2.1 we derive Opial inequalities with a weight function.
Theorem 5.1.Let X and Y be independent and identically distributed (i.i.d.) random variables with distribution function F on R, let ψ : R → R be a measurable function, and let χ : R → R be a nonnegative weight function.The inequalities hold with equality if ψ is constant F -almost everywhere.In case χ is nonincreasing or nondecreasing, the upperbounds in (5.23) and (5.24), respectively, are bounded from above by 1 2 E F (ψ 2 (X)χ(X)).Proof We focus on the second inequality in (5.23).Since X and Y are i.i.d.we have Again, since X and Y are i.i.d. the left-and right-hand side of (5.23) are equal for ψ = 1.

The Wirtinger inequality
Closely related to Opial's inequality is Wirtinger's inequality (1.2), which is an equality if and only if x(t) is a constant times sin(πx/h).We apply our approach with integration with respect to a distribution function and get the following result.
Theorem 6.1.Wirtinger's inequality Let X and Y be independent and identically distributed random variables with absolutely continuous distribution function F on R, and let ψ : R → R be a measurable function.With E F (ψ(X)) = 0 the inequality (6.27) holds with equality if and only if ψ is F -almost everywhere a constant times cos(πF ) .

Conclusion
There exist several versions of the Opial inequality.We discern two classes, namely the class of two-sided inequalities, as we will call them, with ψ dF = 0 and the one-sided ones without this condition.In Theorem 2.1 we have presented a generalization of the classic one-sided inequality that contains both the continuous and the discrete inequalities with the optimal constants.Our two-sided general inequality from Corollary 2.1 contains the classic continuous Opial inequality with the optimal constant, but the discrete version of it deviates a little from the one by [Lasota (1968)].However, our discrete inequality shows symmetry and Lasota's does not.Theorem 3.1 presents a general Opial inequality for derivatives of order n.For the continuous case it has the optimal constant, not known in the literature yet, as far as we can tell.The case with F having discontinuities, in particular the discrete case, is much more tricky, since one then has to partition R n+1 in a complicated way.Moreover, the resulting inequality will then contain derivatives/differences of several orders.In Section 4 this is illustrated for the case n = 2.
Furthermore, Theorem 5.1 generalizes our Opial inequalities from Theorem 2.1 by introducing a weight function.The inequalities obtained are sharp, but less elegant for a uniform distribution on an interval than the inequalities of [Troy (2001)], which are not sharp though.
Finally we presented our generalization of Wirtinger's inequality.It automatically includes a Wirtinger inequality with a weight function.
These results lead us to the conclusion that it might be worthwhile to study inequalities involving (Lebesgue) integrals of functions and their derivatives by our technique, i.e., by integration with respect to distribution functions.This approach is unifying in that the resulting inequalities often contain a discrete version of the inequality concerned as well.Typically, the continuous and discrete versions are obtained by choosing uniform distribution functions on either an interval (of reals) or on an integer interval.
N i=1