On the equality problem of generalized Bajraktarevi\'c means

The purpose of this paper is to investigate the equality problem of generalized Bajraktarevi\'c means, i.e., to solve the functional equation \begin{equation}\label{E0}\tag{*} f^{(-1)}\bigg(\frac{p_1(x_1)f(x_1)+\dots+p_n(x_n)f(x_n)}{p_1(x_1)+\dots+p_n(x_n)}\bigg)=g^{(-1)}\bigg(\frac{q_1(x_1)g(x_1)+\dots+q_n(x_n)g(x_n)}{q_1(x_1)+\dots+q_n(x_n)}\bigg), \end{equation} which holds for all $x=(x_1,\dots,x_n)\in I^n$, where $n\geq 2$, $I$ is a nonempty open real interval, the unknown functions $f,g:I\to\mathbb{R}$ are strictly monotone, $f^{(-1)}$ and $g^{(-1)}$ denote their generalized left inverses, respectively, and $p=(p_1,\dots,p_n):I\to\mathbb{R}_{+}^n$ and $q=(q_1,\dots,q_n):I\to\mathbb{R}_{+}^n$ are also unknown functions. This equality problem in the symmetric two-variable (i.e., when $n=2$) case was already investigated and solved under sixth-order regularity assumptions by Losonczi in 1999. In the nonsymmetric two-variable case, assuming three times differentiability of $f$, $g$ and the existence of $i\in\{1,2\}$ such that either $p_i$ is twice continuously differentiable and $p_{3-i}$ is continuous on $I$, or $p_i$ is twice differentiable and $p_{3-i}$ is once differentiable on $I$, we prove that \eqref{E0} holds if and only if there exist four constants $a,b,c,d\in\mathbb{R}$ with $ad\neq bc$ such that \begin{equation*} cf+d>0,\qquad g=\frac{af+b}{cf+d},\qquad\mbox{and}\qquad q_\ell=(cf+d)p_\ell\qquad (\ell\in\{1,\dots,n\}). \end{equation*} In the case $n\geq 3$, we obtain the same conclusion with weaker regularity assumptions. Namely, we suppose that $f$ and $g$ are three times differentiable, $p$ is continuous and there exist $i,j,k\in\{1,\dots,n\}$ with $i\neq j\neq k\neq i$ such that $p_i,p_j,p_k$ are differentiable.

f (−1) p 1 (x 1 )f (x 1 ) + · · · + p n (x n )f (x n ) p 1 (x 1 ) + · · · + p n (x n ) = g (−1) q 1 (x 1 )g(x 1 ) + · · · + q n (x n )g(x n ) q 1 (x 1 ) + · · · + q n (x n ) , (*) which holds for all x = (x 1 , . . . , x n ) ∈ I n , where n ≥ 2, I is a nonempty open real interval, the unknown functions f, g : I → R are strictly monotone, f (−1) and g (−1) denote their generalized left inverses, respectively, and p = (p 1 , . . . , p n ) : I → R n + and q = (q 1 , . . . , q n ) : I → R n + are also unknown functions. This equality problem in the symmetric two-variable (i.e., when n = 2) case was already investigated and solved under sixth-order regularity assumptions by Losonczi in 1999. In the nonsymmetric two-variable case, assuming three times differentiability of f , g and the existence of i ∈ {1, 2} such that either p i is twice continuously differentiable and p 3−i is continuous on I, or p i is twice differentiable and p 3−i is once differentiable on I, we prove that (*) holds if and only if there exist four constants a, b, c, d ∈ R with ad = bc such that cf + d > 0, g = af + b cf + d , and q ℓ = (cf + d)p ℓ (ℓ ∈ {1, . . . , n}).
In the case n ≥ 3, we obtain the same conclusion with weaker regularity assumptions. Namely, we suppose that f and g are three times differentiable, p is continuous and there exist i, j, k ∈ {1, . . . , n} with i = j = k = i such that p i , p j , p k are differentiable.

Introduction
Throughout this paper, the symbols R and R + will stand for the sets of real and positive real numbers, respectively, and I will always denote a nonempty open real interval. In theory of quasi-arithmetic means the characterization of the equality of means with different generators is a basic problem which was completely solved in the book [7]. Using this characterization, the homogeneous quasi-arithmetic means can also be found: they are exactly the power means and the geometric mean. In [2] (cf. also [3]) Bajraktarević introduced a new generalization of quasi-arithmetic means by adding a weight function to the formula of quasi-arithmetic means. He also described the equality of such means (called Bajraktarević means since then) in the at least 3-variable setting assuming three times differentiability. Daróczy and Losonczi in [4], later Daróczy and Páles in [5] arrived at the same conlusion with first-order differentiability and without differentiability, respectively, but assuming the equality for all n ∈ N. As an application of the characterization of the equality, Aczél and Daróczy in [1] determined the homogeneous Bajraktarević means that include Gini means which were introduced by Gini in [6]. Losonczi in [8] described the equality of two-variable Bajraktarević means under sixth-order regularity assumptions and an algebraic condition which was later removed in [9]. Using these results, the homogeneous two-variable means were also determined by Losonczi [10], [11].
The purpose of this paper is to extend the definition of Bajraktarević means in a nonsymmetric way by replacing each appearance of the weight function by a possibly different one. We also take strictly monotone functions instead of strictly monotone and continuous ones.
Given a subset S ⊆ R, the smallest convex set containing S, which is identical to the smallest interval containing S, will be denoted by conv(S). For our definition of generalized Bajraktarević means, we shall need the following lemma about the existence and properties of the left inverse of strictly monotone (but not necessarily continuous) functions.
Lemma 1. Let f : I → R be a strictly monotone function. Then there exists a uniquely determined monotone function g : conv(f (I)) → I such that g is the left inverse of f , i.e., Furthermore, g is monotone in the same sense as f , continuous, and lim inf Thus, if f is lower (resp. upper) semicontinuous at g(y), then f • g(y) ≤ y (resp. y ≤ f • g(y)).
Proof. Without loss of generality, we may assume that f : I → R is a strictly increasing function. Then f : I → f (I) is a bijection. The interval I is open, therefore, f has a left and a right limit at every point x ∈ I, which will be denoted by f − (x) and f + (x), respectively. We introduce the notation J , where x ∈ I. Then, for all elements u < x < v ∈ I, we have that On the other hand, let u n ∈ I be an arbitrary sequence converging to x such that x < u n . Then y < f (u n ), whence we obtain The above inequalities imply that y ∈ J x , which completes the proof of the inclusion ⊆ in (4). Let y ∈ J = conv(f (I)) be an arbitrarily fixed element. Then there exists a uniquely determined element x ∈ I such that y ∈ J x , hence we define the function g : J → I by the prescription g(y) := x.
Therefore, if x ∈ I is an arbitrary element, then it is obvious that f (x) ∈ J x and hence g(f (x)) = x. Thus, equation (1) is valid for all x ∈ I.
To see that g is nondecreasing, let y 1 < y 2 be arbitrary elements of J. Then there exist elements x 1 , x 2 ∈ I such that y i ∈ J x i . If x 2 were strictly smaller than x 1 , then we would have This contradiction shows that g(y 1 ) = x 1 ≤ x 2 = g(y 2 ).
To prove that g is continuous, let y ∈ J and choose ε > 0 so that g(y) ± ε be in I. Define hence W ε is neighborhood of y. By the monotonicity of g, for w ∈ W ε , we have that which yields that g is continuous at y.
If y ∈ f (I), then there exists a uniquely determined element x ∈ I such that f (x) = y and hence, using (1), we get that which shows that (2) holds for all y ∈ f (I).
To see that (3) is valid, let y ∈ J. By the definition of g(y), there exists a unique element v ∈ I such that y ∈ J v and g(y) = v. Then, for all x < v = g(y), we have Therefore, upon taking the left limit which proves the left hand side inequality in (3). The verification of the right hand side inequality is completely analogous, therefore it is omitted.
Finally, we prove the uniqueness of g. Assume that h : J → I is a nondecreasing function which is the left inverse of f . We are going to show that h coincides with g on J. Let y ∈ J be arbitrary. Then there exists x ∈ I such that f − (x) ≤ y ≤ f + (x) and g(y) = x. Let (x n ) be a strictly increasing and (x ′ n ) be a strictly decreasing sequence converging to x. Then, for all n ∈ N, we have . By the monotonicity of h, it follows that Taking the limit n → ∞, we arrive at which proves that h(y) = x = g(y).
The function g described in the above lemma is called the generalized left inverse of the strictly monotone function f : I → R and is denoted by f (−1) . It is clear from (1) and (2) that the restriction of f (−1) to f (I) is the inverse of f in the standard sense. Therefore, f (−1) is the continuous and monotone extension of the inverse of f to the smallest interval containing the range of f . Given a strictly monotone function f : I → R and an n-tuple of positive valued functions p = (p 1 , . . . , p n ) : I → R n + , we introduce the n-variable generalized Bajraktarević mean A f,p : I n → I by the following formula: and, to simplify the notations, we will use the following definition: Theorem 2. Let f : I → R be strictly monotone and p = (p 1 , . . . , p n ) : I → R n + . Then the function A f,p : I n → I given by (5) is well-defined and it is a mean, that is, Proof. We may assume that f is strictly increasing (in the decreasing case the proof is completely similar). To show that, for all x = (x 1 , . . . , x n ) ∈ I n , the formula for A f,p (x) is well-defined and (7) holds, consider the ratio R f,p (x). Due to the positivity of the values of p i (x i ), we can see that R f,p (x) is a convex combination of the values f (x 1 ), . . . , f (x n ), therefore, This shows that R f,p (x) is an element of conv(f (I)), which is the domain of f (−1) and hence Furthermore, using that f (−1) is nondecreasing and is the left inverse of f , the inequalities in (8) yield This finally proves the mean value inequalities stated in (7).
Theorem 3. Let f : I → R be strictly increasing and p = (p 1 , . . . , p n ) : I → R n + . Then, for all x = (x 1 , . . . , x n ) ∈ I n , the equality y = A f,p (x) holds if and only if < 0 for z ∈ I, z < y, > 0 for z ∈ I, z > y.
If f is strictly decreasing, then the inequalities (9) hold with reversed inequality sign.
Proof. Assume that f : I → R is strictly increasing, let x = (x 1 , . . . , x n ) ∈ I n and y : In the case z > y, we get f (z) > R f,p (x), which implies the second inequality in (9).
Observe that the function is strictly increasing. Therefore, it changes sign at at most one point in I. If (9) holds for y, then ϕ changes sign at y. On the other hand, as we have seen it above, ϕ also changes sign at Corollary 4. Let f : I → R be continuous, strictly monotone, and p = (p 1 , . . . , p n ) : Proof. The function is strictly monotone and continuous. Therefore, it vanishes at most one point in I. Applying Theorem 3, we obtain that ϕ changes sign at y = A f,p (x). Thus, using that ϕ is continuous, ϕ vanishes at y = A f,p (x).
The next result establishes a sufficient condition for the equality of the n-variable generalized Bajraktarević means. We will call this situation the canonical case of the equality.
Theorem 5. Let f, g : I → R be strictly monotone and p = (p 1 , . . . , p n ) : hold on I, then the n-variable generalized Bajraktarević means A f,p and A g,q are identical on I n .
Proof. Let x = (x 1 , . . . , x n ) ∈ I n be arbitrary. Using the formulas (11), we obtain that ) changes sign at y. Hence, applying Theorem 3, A f,p (x) = A g,q (x) holds. The element x being arbitrary in I n , we get the statement of the theorem.
With the aid of the following lemma, we can reduce the regularity assumptions in our statements. For the formulation of this and the subsequent results, we define the diagonal diag(I n ) of I n and the map ∆ n : For all i ∈ {1, . . . , n}, let e i ∈ R n denote the ith vector of the standard base of R n , i.e., let e i := (δ ij ) n j=1 , where δ stands for the Kronecker symbol. Given p = (p 1 , . . . , p n ) : I → R n + and q = (q 1 , . . . , q n ) : I → R n + , we will also use the following notations: p 0 := p 1 + · · · + p n , q 0 := q 1 + · · · + q n , and r 0 := q 0 p 0 .
Lemma 6. Let f, g : I → R be continuous strictly monotone functions, n ≥ 2, and p = (p 1 , . . . , p n ) : I → R n + , q = (q 1 , . . . , q n ) : I → R n + . Assume that there exists an open set U ⊆ I n containing diag(I n ) such that A f,p = A g,q holds on U. Then the following two assertions hold.
(i) For all i ∈ {1, . . . , n}, the function p i is continuous on I if and only if the function q i is continuous on I. (ii) Let k ∈ N. Assume that f, g : I → R are k times differentiable (resp. k times continuously differentiable) functions on I with nonvanishing first derivatives. Then, for all i ∈ {1, . . . , n}, the function p i is k times differentiable (resp. k times continuously differentiable) on I if and only if q i is k times differentiable (resp. k times continuously differentiable) on I.
Proof. In what follows, we will prove that the regularity properties possessed by p i are transferred to the corresponding q i . The reversed statements can similarly be verified. For i ∈ {1, . . . , n}, denote Then U i is an open set containing diag(I 2 ). By our assumption, we have that, for all (x, y) ∈ U i , This is equivalent to the following equality (12) Observe that, for x, y ∈ I with x = y, the inequalities p i (x) < p 0 (x) and f (x) = f (y) imply that Therefore, Thus, solving equation (12) with respect to q i (y), we get is a neighborhood of x 0 on which we have the equality (13) for q i . Provided that f and g are continuous on I and p i is continuous at x 0 , it follows that g • f −1 is continuous on f (I) and hence the mapping is continuous at x 0 . This shows that the right hand side of (13) is a continuous function of y at x 0 and hence q i is continuous at x 0 . This proves the first assertion. Provided that, for some k ∈ N, the functions f, g : I → R are k times differentiable (resp. k times continuously differentiable) on I with nonvanishing first derivatives and that p i is k times differentiable (resp. k times continuously differentiable) at x 0 , it follows, by the standard calculus rules, that g • f −1 is k times differentiable (resp. k times continuously differentiable) and hence the mapping (14) is also k times differentiable (resp. k times continuously differentiable) at x 0 . This implies that the right hand side of (13) is a k times differentiable (resp. k times continuously differentiable) function of y at x 0 and hence q i is k times differentiable (resp. k times continuously differentiable) at x 0 . This proves the second statement.
The following theorem is of basic importance for our investigations. Proof. First of all, using Lemma 6 and the continuity of f , g and p, it is clear that q is continuous on I.
Assume that A f,p = A g,q holds on some open set U containing the diag(I n ) and for some constants a, b, c, d ∈ R with ad = bc there exists a nonempty open subinterval J of I such that (11) holds on J. We may assume that J is a maximal subinterval of I with this property. To complete the proof, we have to show that J = I. To the contrary, suppose that J = I. Then one of the strict inequalities inf I < inf J =: α or sup J < sup I must be valid. We may suppose that first inequality in (15) holds. Hence, due to the continuity of f , p 1 , and q 1 at α, it follows from (11) that q 1 (α) = (cf (α)+d)p 1 (α). Therefore, q 1 (α) > 0 implies that cf (α) + d > 0. Consequently, using the continuity of all functions, for all x ∈J := J ∪ {α}, we get that are valid. By the continuity of f , there is an elementᾱ ∈ I withᾱ < α such that cf (x) + d > 0 for all x ∈Ī := ]ᾱ, α] ∪ J. Define the functionsḡ :Ī → R andq :Ī → R n + bȳ Thus, for all x ∈J, the equations hold. On the other hand, the maximality property of J implies that there is no β < α such that (17) is valid for all x ∈ ]β, α] ∪ J. Furthermore, the equality A f,p = A g,q on U and Theorem 5 applied to the conditions (16) yield that is also valid for all x ∈Ū := (Ī) n ∩ U. The point (α, . . . , α) is an interior point ofŪ, therefore, there exists r > 0 such that ]α − r, α + r[ n ⊆Ū and hence (18) holds for all In what follows, we assume that g is strictly increasing and henceḡ must be also strictly increasing. The functions g andḡ are identical on [α, α + r[, therefore, their inverses are also equal on [g(α), g(α + r)[.
The following claim will be useful for the rest of the proof.
Indeed, the condition on x implies that α ≤ A g,q (x) ≤ max(x) < α + r also holds, hence g(A g,q (x)) =ḡ(A g,q (x)). On the other hand, in view of (18), we have the equality A g,q (x) = Aḡ ,q (x). Therefore, g(A g,q (x)) =ḡ(Aḡ ,q (x)), which implies the equation (19). Let y 0 ∈ ]α, α + r[ be fixed. Then the inequality g(α) < g(y 0 ) implies that Now, by the continuity of the functions g, q 1 , . . . , q n , we can find a positive number δ 0 := δ(y 0 ) < min(y 0 − α, α + r − y 0 ) < r such that, for all x ∈ ]α − δ 0 , α] and y ∈ ]y 0 − δ 0 , y 0 + δ 0 [, Applying the inverse of g side by side to this inequality, it follows that α ≤ A g,q (x 1 , . . . , x n ), where x i := x and x j := y for all j ∈ {1, . . . , n} \ {i}. Therefore, in view of the Claim above and the equality (17), for all x ∈ ]α − δ 0 , α] and y ∈ ]y 0 − δ 0 , y 0 + δ 0 [, we have that This equality can be rewritten as In the next step we show that If x ∈ ]α − δ 0 , α[ \S, then g(x) =ḡ(x). Using this, (21) simplifies to the product equality The first factor is not zero, because it is the sum of positive terms. Using that x < α < y 0 −δ 0 < y, the strict monotonicity of g implies that g(x) < g(y), proving that the second factor is also not zero. Therefore, we must have q i (x) =q i (x), which shows that . In this case (21) reduces to the product equality The first two factors are positive, hence we must have g(x) =ḡ(x), which proves that x ∈ ]α − δ 0 , α[ \S and completes the proof of the equality (22). The maximality of the interval J, in view of (22) implies that Let i ∈ {1, . . . , n} be fixed and y 1 , y 2 ∈ ]y 0 − δ 0 , y 0 + δ 0 [ be arbitrary such that y 1 = y 2 . Replacing y by y 1 and y 2 in (21), and then subtracting the two equations so obtained side by side, we get that Let x 1 , x 2 ∈ ]α − δ 0 , α[ be arbitrary. Substituting x by x 1 and then x 2 in (24), we get a homogeneous linear system of two equations of the form which is nontrivially solvable with respect to (ξ, η), because the equalities ξ := (q 0 − q i )(y 1 ) − (q 0 − q i )(y 2 ) = 0 and η := (q 0 − q i )(y 1 )g(y 1 ) − (q 0 − q i )(y 2 )g(y 2 ) = 0 (25) cannot be satisfied simultaneously. Indeed, if ξ = 0, then (q 0 − q i )(y 1 ) = (q 0 − q i )(y 2 ) > 0. This equality together with η = 0 implies that g(y 1 ) = g(y 2 ). The strict monotonicity of g then yields y 1 = y 2 , which contradicts the choice of y 1 and y 2 . Hence the determinant of the system (25) must be equal to zero, that is, , therefore, the above determinantal equality can be rewritten as Therefore, there exists a real constant c i such that holds for all x ∈ S ∩ ]α − δ 0 , α[ . Solving this equation with respect toḡ(x), we obtain that is valid for all x ∈ S ∩ ]α − δ 0 , α[ . Subsituting formula (26) into (21), for all x ∈ S ∩ ]α − δ 0 , α[ and y ∈ ]y 0 − δ 0 , y 0 + δ 0 [ , we arrive at the equation which simplifies to the identity Therefore, there exists a real constant d i such that Using these equalities on the domain indicated, the inequality (20) implies that Therefore, for all x ∈ S ∩ ]α − δ 0 , α[ , we have that g(x) < g(α) ≤ −c i , which yields that d i < 0 and q i (x) = d i g(x)+c i . This shows that q i is strictly increasing on S ∩ ]α−δ 0 , α[ . As a consequence of this property, it follows that the equality q i (x)(g(x) + c i ) = d i uniquely determines the constants c i and d i . Indeed, if q i (x)(g(x) + c ′ i ) = d ′ i were also true for all x ∈ S ∩ ]α − δ 0 , α[ and for some constant c ′ i and d ′ i , then subtracting the two equations side by side, we get i , then this last equality yields that q i is constant, which contradicts its strict monotonicity. Therefore, c i = c ′ i implying that d i = d ′ i is also valid. In the final step, instead of a fixed element y 0 ∈ ]α, α + r[ , we take another arbitrary element y ′ ∈ ]α, α + r[ . Repeating the same argument as above, there exists a positive number δ ′ := δ(y ′ ) and real constants On the set is valid for all y ∈ ]y ′ − δ ′ , y ′ + δ ′ [ , in particular, for y = y ′ . The point y ′ being arbitrary, we can see that (28) holds for all y ∈ ]α, α + r[ . Comparing the signs of both sides, we obtain that g(y) + c i > 0 for all y ∈ ]α, α + r[ . Upon taking the limit y → α + 0, it follows that g(α) + c i ≥ 0.
On the other hand, by (27), we also have that g(α) + c i ≤ 0, whence g(α) + c i = 0 follows. Using that (23) holds, we may also take the limit x → α − 0 in the equality whence we arrive at the equality d i = 0, which is the desired contradiction.

Partial derivatives of Bajraktarević means
In the next result we determine the partial derivatives of the Bajraktarević means up to third order at diagonal points of I n under tight regularity assumptions. For instance, as stated below in assertions (1), (2b), (3c), we prove the existence of partial derivatives of the form ∂ m i only assuming (m − 1) times continuous differentiability of p i . Theorem 8. Let ℓ ∈ {1, 2, 3}, let f : I → R be an ℓ times differentiable function on I with a nonvanishing first derivative, and let p = (p 1 , . . . , p n ) : I → R n + . Then we have the following assertions.
(1) If ℓ = 1, i ∈ {1, . . . , n}, and p i is continuous on I, then the first-order partial derivative ∂ i A f,p exists on diag(I n ) and . . , n} with i = j, furthermore, p i and p j are differentiable on I, then the second-order partial derivative ∂ i ∂ j A f,p exists on diag(I n ) and . . , n}, and p i is continuously differentiable on I, then the second-order partial derivative ∂ 2 i A f,p exists on diag(I n ) and (3a) If ℓ = 3, i, j, k ∈ {1, . . . , n} with i = j = k = i, furthermore, p i , p j , and p k are differentiable on I, then the third-order partial derivative ∂ i ∂ j ∂ k A f,p exists on I n and (3b) If ℓ = 3, i, j ∈ {1, . . . , n} with i = j, furthermore, p i is twice differentiable and p j is differentiable on I, then the third-order partial derivative ∂ 2 i ∂ j A f,p exists on I n and (3c) If ℓ = 3, i ∈ {1, . . . , n} and p i is twice continuously differentiable on I, then the thirdorder partial derivative ∂ 3 i A f,p exists on diag(I n ) and Proof. Let ℓ ∈ {1, 2, 3}. Assume that f : I → R is an ℓ times differentiable function on I with a nonvanishing first derivative. We have the following formulas for the derivatives of f −1 : In this proof, let δ denote the extended Kronecker symbol, which, for i, j, k ∈ N, is defined by: Furthermore, in order to make the calculations shorter, we use the notation R := R f,p , where R f,p was defined in (6).
To compute the partial derivatives of R, we introduce the notations P (x 1 , . . . , x n ) := p 1 (x 1 ) + · · · + p n (x n ), Then R · P = Q and we have that To prove the first assertion of the theorem, let x ∈ I be fixed. Then, using the continuity of p i and the differentiability of f at x, we get Therefore, using the standard differentiation rules, the last identity in (30) and (31), we obtain This completes the proof of assertion (1). For the proof of statement (2a), let i, j ∈ {1, . . . , n} with i = j be fixed and assume that p i and p j are differentiable and f is twice differrentiable on I. Then, for all α, β ∈ {i, j} with α = β, the partial derivatives ∂ α and ∂ α ∂ β of P and Q and hence of R exist at every point in I n . Furthermore, for all (x 1 , . . . , x n ) ∈ I n , we have that Differentiating the identity R · P = Q with respect to the jth and then with respect to the ith variable, in view of the equalities in the second line in (32), it follows that ∂ i ∂ j R · P + ∂ j R · ∂ i P + ∂ i R · ∂ j P = 0 holds on I n , whence, using (31) and (32), we arrive at Applying the chain rule, the first two formulas in (29) and then (30), (31), (33), it follows that To justify assertion (2b), let x ∈ I be fixed. Let i ∈ {1, . . . , n} and assume that p i is continuously differentiable and f is twice differentiable on I. Then the partial derivative ∂ i of P and Q and hence of R exist at every point in I n . Differentiating the identity R · P = Q with respect to the ith variable, we have that ∂ i R · P + R · ∂ i P = ∂ i Q, whence Using this, we obtain (34) Applying standard calculus rules, the first two formulas in (29) and then (30), (31), (34), we conclude To prove assertion (3a), let i, j, k ∈ {1, . . . , n} with i = j = k = i and assume that p i , p j and p k are differentiable on I. Then, for all α, β, γ ∈ {i, j, k} with α = β = γ = α, the partial derivatives ∂ α , ∂ α ∂ β and ∂ α ∂ β ∂ γ of P , Q and hence of R exist at every point in I n . Furthermore, for all (x 1 , . . . , x n ) ∈ I n , we have the equalities in (32) and in addition Differentiating the identity R · P = Q with respect to the kth variable, then with respect to the jth variable and then with respect to the ith variable, in view of the last two formulas in (32) Thus, after reduction, we get that is valid on I. Hence, there exists γ ∈ R \ {0} such that holds on I, whence, using Lemma 9 again, it follows that, for all i ∈ {1, . . . , n}, (44) is valid. If j = k, then with a similar calculation we arrive at the same differential equation for r 0 .
For a three times differentiable function f : I → R with a nonvanishing first derivative, we introduce its Schwarzian derivative S(f ) : I → R by the following formula: (45) The following lemma plays a basic role in our proofs.
Lemma 11. Let f, g : I → R be three times differentiable functions on I with nonvanishing first derivatives. If S(f ) = S(g) is valid on I, then there exist a, b, c, d ∈ R with ad = bc such that cf + d is positive on I and holds on I.
Our first main result is contained in the following theorem. It completely characterizes the equality of two generalized Bajraktarević means with at least three variables.
Theorem 12. Let n ≥ 3 and f, g : I → R be three times differentiable functions on I with nonvanishing first derivatives. Let p = (p 1 , . . . , p n ) : I → R n + be a continuous function on I and q = (q 1 , . . . , q n ) : I → R n + . Assume that there exist i, j, k ∈ {1, . . . , n} with i = j = k = i such that p i , p j , p k are differentiable functions on I. Then the following assertions are equivalent.
(i) The n-variable generalized Bajraktarević means A f,p and A g,q are identical on I n .
(ii) There is an open subset U of I n containing diag(I n ) such that the n-variable generalized Bajraktarević means A f,p and A g,q are identical on U. (iii) The function q is continuous, the functions q i , q j , q k are differentiable on I, and the equalities ∂ ℓ A f,p = ∂ ℓ A g,q (ℓ ∈ {1, . . . , n − 1}), hold on diag(I n ). (iv) There exist a, b, c, d ∈ R with ad = bc such that g = af + b cf + d and q ℓ = (cf + d)p ℓ (ℓ ∈ {1, . . . , n}) hold on I.
whence we get (ii) There is an open subset U of I 2 containing diag(I 2 ) such that the 2-variable generalized Bajraktarević means A f,(p,p) and A g,(q,q) are identical on U. (iii) The function q is three times differentiable and the equalities ∂ j 1 ∂ j 2 A f,(p,p) = ∂ j 1 ∂ j 2 A g,(q,q) (j ∈ {1, 2, 3}) hold on diag(I 2 ). (iv) Either there exist a, b, c, d ∈ R with ad = bc such that g = af + b cf + d and q = (cf + d)p hold on I or there exist two polynomials P and Q of at most second degree such that P and Q are positive on f (I) and g(I), respectively, and there exist two constants α, β ∈ R such that g = G −1 • (αF • f + β), p = P − 1 2 • f, and q = Q − 1 2 • g hold on I, where F and G denote a primitive function of 1/P and 1/Q, respectively.
Proof. The implication (i)⇒(ii) is obvious. Applying Lemma 6, it is also easy to see that assertion (iii) follows from statement (ii). The proof of the implication (iii)⇒(iv) is based on the result of Losonczi [8] (who classified the solutions into 1+32 classes) and a recent characterization of the equality of two-variable (symmetric) Bajraktarević means with two-variable quasi-aritmetic means by Páles and Zakaria [12]. The proof of the implication (iv)⇒(i) is also described in the paper [12].