# Geometric representation of the weighted harmonic mean of $n$ positive
values and potential uses.

S. Amat Departamento de Matemática Aplicada y Estadística. Universidad
Politécnica de Cartagena (Spain<EMAIL_ADDRESS>The first four
authors have been supported through the Proyecto financiado por la Comunidad
Autónoma de la Región de Murcia a través de la convocatoria de Ayudas a
proyectos para el desarrollo de investigación científica y técnica por grupos
competitivos, incluida en el Programa Regional de Fomento de la Investigación
Científica y Técnica (Plan de Actuación 2018) de la Fundación Séneca-Agencia
de Ciencia y Tecnología de la Región de Murcia 20928/PI/18 and by the Spanish
national research project PID2019-108336GB-I00. P. Ortiz  Departamento de
Matemática Aplicada y Estadística. Universidad Politécnica de Cartagena
(Spain<EMAIL_ADDRESS>J. Ruiz  Departamento de Matemática
Aplicada y Estadística. Universidad Politécnica de Cartagena (Spain).
<EMAIL_ADDRESS>J.C.Trillo  Departamento de Matemática Aplicada y
Estadística. Universidad Politécnica de Cartagena (Spain).
<EMAIL_ADDRESS>D. F. Yañez  Departamento de Matemáticas.
Universidad de Valencia (Spain<EMAIL_ADDRESS>
###### Abstract

This paper is dedicated to the analysis and detailed study of a procedure to
generate both the weighted arithmetic and harmonic means of $n$ positive real
numbers. Together with this interpretation, we prove some relevant properties
that will allow us to define numerical approximation methods in several
dimensions adapted to discontinuities.

Key Words. Arithmetic mean, harmonic mean, weighted arithmetic mean, weighted
harmonic mean, reconstruction operators, adaptation, singularities.

AMS(MOS) subject classifications. 41A05, 41A10, 65D17.

##  1 Introduction

Both the arithmetic and the harmonic means of positive numbers appear in
different scientific scenarios varying from subdivision schemes and image
processing to signal filtering, solution of partial differential equations,
statistics, etcetera. The harmonic mean penalizes large values in the given
data, being appropriate, because of this characteristic, for several real
world applications. Besides, when the input variables are similar, both means
keep that similarity, which is also convenient in applications as it will be
seen later in the paper.

Among the applications of these two means we can mention for instance the
following: in the field of numerical solution of hyperbolic conservation laws
[13, 14], for applications involving signal processing [1, 2, 4, 15], in more
specific research areas such as image compression and image denoising [5, 8],
in the fast generation of curves and surfaces by means of subdivision schemes
[3, 9, 10].

In [11] a nonlinear reconstruction operator called PPH (Piecewise Polynomial
Harmonic) was extended to nonuniform grids by using a specific weighted
harmonic mean instead of the standard harmonic mean. In this paper our aim is
to introduce some necessary ingredients to extend in turn this last
reconstruction operator to several dimensions. More specifically speaking, we
need to dispose of an appropriate mean in several dimensions which satisfies
the required basic properties, the two mentioned above, as the harmonic mean
does. We carry out this study accompanied by a geometric representation of the
weighted harmonic mean of several values, which helps to quickly and
intuitively understand the theoretical results.

Nonlinear means appear as good candidates to define adapted reconstruction
methods which minimize the undesirable effects generated by the presence of a
discontinuity in the data. In fact, we will give a list of already existing
methods sharing these properties, and in turn we will summarize how to define
families of new methods based on the theory and ideas developed through this
paper.

The paper is organized as follows: In Section 2 we work with the weighted
arithmetic and harmonic means of two positive numbers, proving two essential
results about these means which will allow us to define adapted reconstruction
operators in the numerical experiments section. These properties come
accompanied with an intuitive graphical interpretation in $2D$ according to a
corresponding theoretical result that will be also proven. In Section 3 a
similar path will be followed for the $3D$ case, which involves working with
weighted and harmonic means of three positive numbers. Section 4 deals with
the general case of considering the weighted arithmetic and harmonic mean of
$n$ positive numbers for whatever integer value $n\geq 2.$ In Section 5 we
outline some applications of these results in order to define adapted
reconstructions in several dimensions. Finally, in Section 6 we give some
conclusions.

##  2 About specific results on the weighted harmonic mean of two positive
values

In this section we present an intuitive graphical interpretation of the
weighted arithmetic and harmonic means of two positive values together with
two key results about the weighted harmonic mean that justify their use in
several fields of application. Among them we can mention image processing,
curve and surface generation, numerical approximation of the solution of
hyperbolic conservation laws apart from more traditional uses in statistics
and physics. Perhaps the better known problem where the weighted harmonic mean
appears is in the computation of the average speed of a vehicle that drives
along a path divided into two parts of different lengths $s_{1}$ and $s_{2}$
at constant speed $v_{1}$ and $v_{2}$ respectively, that is

$v_{a}=\frac{s_{1}+s_{2}}{t_{1}+t_{2}}=\frac{s_{1}+s_{2}}{\frac{s_{1}}{v_{1}}+\frac{s_{2}}{v_{2}}}=\frac{1}{w_{1}\frac{1}{v_{1}}+w_{2}\frac{1}{v_{2}}},$

with $w_{1}=\frac{s_{1}}{s_{1}+s_{2}},w_{2}=\frac{s_{2}}{s_{1}+s_{2}}.$

The weighted harmonic mean $H_{w}$ is given in the following definition.

######  Definition 1.

Given $a_{1}>0,$ $a_{2}>0$ two positive real numbers and two weights
$w_{1}>0,$ $w_{2}>0$ with $w_{1}+w_{2}=1,$ the weighted harmonic mean of
$a_{1}$ and $a_{2}$ is defined by

$H_{w}(a_{1},a_{2})=\dfrac{a_{1}a_{2}}{w_{1}a_{2}+w_{2}a_{1}}.$

We now present two particular properties, which have been already used in [12]
in order to work with a nonlinear reconstruction for nonuniform grids adapted
to the potential presence of jump discontinuities on the signal. The first
property has to do with the adaptation in case of jump discontinuities, while
the second property is related to the order of approximation attained by the
nonlinear reconstruction operator, see [12] for more details.

######  Lemma 1.

If $a_{1}>0$ and $a_{2}>0,$ the weighted harmonic mean is bounded as follows

$H_{w}(a_{1},a_{2})<\min\left\\{\dfrac{1}{w_{1}}a_{1},\dfrac{1}{w_{2}}a_{2}\right\\}.$
(1)

######  Lemma 2.

Let $a>0$ a fixed positive real number, and let $a_{1}\geq a$ and $a_{2}\geq
a.$ If $\,|a_{1}-a_{2}|=O(h)$, then the weighted harmonic mean is also close
to the weighted arithmetic mean $M_{w}(a_{1},a_{2})=w_{1}a_{1}+w_{2}a_{2},$

$|M_{w}(a_{1},a_{2})-H_{w}(a_{1},a_{2})|=\dfrac{w_{1}w_{2}}{w_{1}a_{2}+w_{2}a_{1}}(a_{1}-a_{2})^{2}=O(h^{2}).$
(2)

A way of intuitively check these two properties graphically is by using the
following interpretation. Given $a_{1},$ $a_{2}$ two positive numbers and
considering $H_{w}$ the weighted harmonic mean of these values, we can build
the following two parabolas

$\begin{array}[]{lllcl}p_{1}(x)&=&\dfrac{a_{1}x_{H}-\frac{H_{w}}{2}}{x_{H}(1-x_{H})}x^{2}&+&\dfrac{\frac{H_{w}}{2}-a_{1}{x_{H}}^{2}}{x_{H}(1-x_{H})}x,\\\
p_{2}(x)&=&\dfrac{\frac{H_{w}}{2}+a_{2}(x_{H}-1)}{x_{H}(x_{H}-1)}x^{2}&-&\dfrac{\frac{H_{w}}{2}+a_{2}(x_{H}-1)(x_{H}+1)}{x_{H}(x_{H}-1)}x+a_{2},\end{array}$
(3)

where $x_{H}$ is defined as the abscissa of the point where both parabolas
intersect inside the trapezoid delimited by the four vertices $(0,0),$
$(1,0),$ $(1,a_{1}),$ $(0,a_{2}).$ Its value is given by

$x_{H}=\dfrac{w_{1}a_{2}}{w_{1}a_{2}+w_{2}a_{1}}.$ (4)

######  Remark 1.

Geometrically, one can build the parabolas $p_{1}(x)$ and $p_{2}(x)$ as the
unique polynomials of degree less or equal to $2$ such that they interpolate
the points
$\\{(0,0),(\frac{1}{2},(\frac{1}{4}+\frac{1}{8w_{1}})a_{1}+(\frac{1}{4}-\frac{1}{8w_{2}})a_{2}),(1,a_{1})\\},$
and
$\\{(0,a_{2}),(\frac{1}{2},(\frac{1}{4}-\frac{1}{8w_{1}})a_{1}+(\frac{1}{4}+\frac{1}{8w_{2}})a_{2}),(1,0)\\}$
respectively.

In Figure 1 upper-left we can see the representation of the trapezoid with the
two parabolas intersecting at a point with abscissa $x_{H},$ for similar
values of $a_{1}$ and $a_{2}$ and for a value of the weights
$w_{1}=\frac{7}{10},$ $w_{2}=\frac{3}{10}.$ In this case, it is appreciated a
similar value of the weighted harmonic and arithmetic means. This particular
situation relates with Lemma 2. In Figure 1 bottom-left we can see the case
for quite different values of $a_{1}$ and $a_{2}.$ Now, it can be observed
that the weighted harmonic mean remains much closer to the minimum value
between $a_{1}$ and $a_{2}$ than the weighted arithmetic mean. This situation
has a close relation with Lemma 1. In Figure 1 upper-right and bottom-right we
consider the case of having equal weights $w_{1}=w_{2}=\frac{1}{2},$ which
gives rise to the usual arithmetic and harmonic means. The observations are
the same as in the weighted case, although it is interesting to notice that
the parabolas degenerate in the two diagonals of the trapezoid.

Figure 1: Representation of the weighted harmonic and arithmetic means. Upper-
left: $w_{1}=0.7,$ $w_{2}=0.3,$ $a_{1}=14,$ $a_{2}=10.$ Upper-right:
$w_{1}=0.5,$ $w_{2}=0.5,$ $a_{1}=14,$ $a_{2}=10.$ Bottom-left: $w_{1}=0.7,$
$w_{2}=0.3,$ $a_{1}=14,$ $a_{2}=2.$ Bottom-right: $w_{1}=0.5,$ $w_{2}=0.5,$
$a_{1}=14,$ $a_{2}=2.$ In black the weighted harmonic mean, in red the
weighted arithmetic mean, in dashed magenta line the parabola $p_{1}(x)$ and
in dashed green line the parabola $p_{2}(x).$

There are infinitely many ways of defining two parabolas which degenerate in
the two diagonals for $w_{1}=w_{2}=\frac{1}{2},$ and intersect at the abscissa
$x_{H}$ where $a_{2}+(a_{1}-a_{2})x_{H}=H_{w}.$ In fact, for each ordinate of
the type $y_{H}=f(w_{1},w_{2})a_{1}x_{H}$ with $f(w_{2},w_{1})=1$ for
$w_{1}=w_{2}=\frac{1}{2},$ the parabolas interpolating the points
$\\{(0,0),(x_{H},y_{H}),(1,a_{1})\\}$ and
$\\{(0,a_{2}),(x_{H},y_{H}),(1,0)\\}$ satisfy both requirements. In
particular, we remark three particular cases because of their symmetry or
simplicity.

Case 1: $f(w_{1},w_{2})=\dfrac{w_{2}}{w_{1}}$.
In this case we have

$y_{H}=\dfrac{w_{2}}{w_{1}}a_{1}x_{H}=\dfrac{w_{2}a_{2}a_{1}}{w_{1}a_{2}+w_{2}a_{1}},$
(5)

and the parabolas take the form

$\begin{array}[]{lcl}p_{1}(x)&=&\dfrac{a_{1}}{1-x_{H}}\left[\left(1-\dfrac{w_{2}}{w_{1}}\right)x^{2}-\left(x_{H}-\dfrac{w_{2}}{w_{1}}\right)x\right],\\\
p_{2}(x)&=&a_{2}-a_{2}x.\end{array}$ (6)

Case 2: $f(w_{1},w_{2})=1$.
In this case we get

$y_{H}=a_{1}x_{H},$ (7)

and the parabolas are given by

$\begin{array}[]{lcl}p_{1}(x)&=&a_{1}x,\\\
p_{2}(x)&=&\left(\dfrac{a_{1}}{x_{H}-1}+\dfrac{a_{2}}{x_{H}}\right)x^{2}-\left(\dfrac{a_{1}}{x_{H}-1}+\dfrac{a_{2}(x_{H}+1)}{x_{H}}\right)x+a_{2}.\end{array}$
(8)

Case 3. $f(w_{1},w_{2})=\dfrac{1}{2w_{1}}$.
In this case

$y_{H}=\dfrac{1}{2w_{1}}a_{1}x_{H},$ (9)

and the parabolas are given in (3).
Notice that in the first two cases one of the parabolas remains always equal
to one of the diagonals of the trapezoid for all values of $w_{1}.$ Since the
first and second cases are symmetrical, we will consider only the first and
third cases from now on. In the next section, we will present the geometrical
extension of the given results to the three variables case. The proofs will be
omitted because they appear later in the general n-dimensional case.

##  3 Geometrical interpretation of the weighted harmonic mean of three
positive values

In this section we give the corresponding results about the weighted harmonic
mean for the case of dealing with three positive values. These results can be
generalized to $n$ values with $n$ a positive integer number, and we will
address this situation in the next section, where we will include the proofs.

######  Definition 2.

Given $a_{1}>0,$ $a_{2}>0,$ $a_{3}>0$ three positive real numbers and the
weights $w_{1}>0,$ $w_{2}>0,$ $w_{3}>0$ with $w_{1}+w_{2}+w_{3}=1,$ their
weighted harmonic mean is defined by

$H_{w}(a_{1},a_{2},a_{3})=\dfrac{a_{1}a_{2}a_{3}}{w_{1}a_{2}a_{3}+w_{2}a_{1}a_{3}+w_{3}a_{1}a_{2}}.$

######  Lemma 3.

If $a_{1}>0,$ $a_{2}>0,$ $a_{3}>0$ the weighted harmonic mean is bounded as
follows

$H_{w}(a_{1},a_{2},a_{3})<\min\left\\{\dfrac{1}{w_{1}}a_{1},\dfrac{1}{w_{2}}a_{2},\dfrac{1}{w_{2}}a_{2}\right\\}.$
(10)

######  Lemma 4.

Let $a>0$ a fixed positive real number, and let $a_{1}\geq a,$ $a_{2}\geq a,$
$a_{3}\geq a.$ If $|a_{1}-a_{2}|=O(h),$ $|a_{1}-a_{3}|=O(h),$ then the
weighted harmonic mean is also close to the weighted arithmetic mean
$M_{w}(a_{1},a_{2},a_{3})=w_{1}a_{1}+w_{2}a_{2}+w_{3}a_{3},$

$\displaystyle|M_{w}(a_{1},a_{2},a_{3})-H_{w}(a_{1},a_{2},a_{3})|$
$\displaystyle=$
$\displaystyle\dfrac{w_{1}w_{2}(a_{1}-a_{2})^{2}a_{3}+w_{1}w_{3}(a_{1}-a_{3})^{2}a_{2}+w_{2}w_{3}(a_{2}-a_{3})^{2}a_{1}}{w_{1}a_{2}a_{3}+w_{2}a_{1}a_{3}+w_{3}a_{1}a_{2}}$
(11) $\displaystyle=$ $\displaystyle O(h^{2}).$

The following two theorems are dedicated to write in a formal way the
geometrical interpretation of the weighted harmonic mean, generalizing the
expressions for the two variables case given in (3), and (6). The case of
expressions (8) could be treated in a similar way, and we will not consider
it, since it is a symmetrical version of case (6). Let us first introduce the
following notations for the vertices of a straight prism with triangular base

$\displaystyle B_{1}$ $\displaystyle=$ $\displaystyle(1,0,0),\quad
B_{2}=(0,1,0),\quad B_{3}=(0,0,0),$ $\displaystyle P_{1}$ $\displaystyle=$
$\displaystyle(1,0,a_{1}),\quad P_{2}=(0,1,a_{2}),\quad P_{3}=(0,0,a_{3}),$

where $B_{i},i=1,2,3,$ stand for the vertices of the base and the
corresponding $P_{i}$ for the vertices located at the heights of the prism
through the points $B_{i}$ satisfying that the length of the segment between
$P_{i}$ and $B_{i}$ is $a_{i}.$ We will also use the barycenter of the points
$B_{i}$

$GM_{w}:=w_{1}B_{1}+w_{2}B_{2}+w_{3}B_{3}.$

The first theorem amounts to the generalization of the expressions in (6) and
can be written as follows.

######  Theorem 1.

Let us consider the plane $\Pi$ which passes through the points $P_{1},$
$P_{2}$ and $P_{3}$ given by the equation

$\Pi\equiv x_{1}(a_{3}-a_{1})+x_{2}(a_{3}-a_{2})+x_{3}-a_{3}=0.$ (12)

Let us also consider the plane $V_{3}$ which passes through the points
$B_{1},$ $B_{2}$ and $P_{3}$ given by the equation

$V_{3}\equiv x_{1}+x_{2}+\frac{x_{3}}{a_{3}}=1,$ (13)

and the two paraboloids $V_{1}$ and $V_{2}$ given by the equations

$\displaystyle V_{1}$ $\displaystyle\equiv$ $\displaystyle
x_{3}=b_{1}{x_{1}}^{2}+(a_{1}-b_{1})x_{1},\quad\textrm{which passes through}\
P_{1},B_{2},B_{3},$ (14) $\displaystyle V_{2}$ $\displaystyle\equiv$
$\displaystyle x_{3}=b_{2}{x_{2}}^{2}+(a_{2}-b_{2})x_{2},\quad\textrm{which
passes through}\ B_{1},P_{2},B_{3},$

where the coefficients $b_{i}$ are given by

$b_{i}=\dfrac{H_{w}}{\bar{x}_{i}(\bar{x}_{i}-1)}(w_{3}-w_{i}),\qquad i=1,2.$
(15)

Then, the system of equations formed by (13) and (14) has a unique solution
$(\bar{x}_{1},\bar{x}_{2},\bar{x}_{3})$ given by

$\bar{x}_{1}=w_{1}\dfrac{H_{w}}{a_{1}},\quad\bar{x}_{2}=w_{2}\dfrac{H_{w}}{a_{2}},\quad\bar{x}_{3}=w_{3}H_{w}.$
(16)

Moreover, the height of the prism through the point
$(\bar{x}_{1},\bar{x}_{2},0)$ coincides with the weighted harmonic mean
$H_{w}$ of $a_{1},$ $a_{2},$ $a_{3}$ and the height of the prism through the
barycenter of the triangular base $GM_{w}=w_{1}B_{1}+w_{2}B_{2}+w_{3}B_{3}$
coincides with the weighted arithmetic mean.

The second theorem deals with the generalization of expressions (3).

######  Theorem 2.

Let us consider the plane $\Pi$ which passes through the points $P_{1},$
$P_{2}$ and $P_{3}$ given by the equation

$\Pi\equiv x_{1}(a_{3}-a_{1})+x_{2}(a_{3}-a_{2})+x_{3}-a_{3}=0.$ (17)

Let us also consider the paraboloid $V_{3}^{*}$ passing through $B_{1},$
$B_{2},$ $P_{3}$ given by

$\displaystyle x_{3}$
$\displaystyle=a_{3}+(c_{1}x_{1}(x_{1}-1)-a_{3}x_{1})+(c_{2}x_{2}(x_{2}-1)-a_{3}x_{2}),$
(18)

where the coefficients $c_{i}$ are given by

$c_{i}=\dfrac{\frac{H_{w}}{3}+(\bar{x}_{1}+\bar{x}_{2}-1)a_{3}}{2\bar{x}_{i}(\bar{x}_{i}-1)},\qquad
i=1,2,$ (19)

and the two paraboloids $V_{1}$ and $V_{2}$ given by the equations

$\displaystyle V_{1}^{*}$ $\displaystyle\equiv$ $\displaystyle
x_{3}=b_{1}{x_{1}}^{2}+(a_{1}-b_{1})x_{1},\quad\textrm{which passes through}\
P_{1},B_{2},B_{3},$ (20) $\displaystyle V_{2}^{*}$ $\displaystyle\equiv$
$\displaystyle x_{3}=b_{2}{x_{2}}^{2}+(a_{2}-b_{2})x_{2},\quad\textrm{which
passes through}\ B_{1},P_{2},B_{3},$

where the coefficients $b_{i}$ are given by

$b_{i}=\dfrac{H_{w}}{\bar{x}_{i}(\bar{x}_{i}-1)}(\frac{1}{3}-w_{i}),\qquad
i=1,2.$ (21)

Then, the system of equations formed by (18) and (20) has a unique solution
$(\bar{x}_{1},\bar{x}_{2},\bar{x}_{3})$ given by

$\bar{x}_{1}=w_{1}\dfrac{H_{w}}{a_{1}},\quad\bar{x}_{2}=w_{2}\dfrac{H_{w}}{a_{2}},\quad\bar{x}_{3}=\frac{H_{w}}{3}.$
(22)

Moreover, the height of the prism through the point
$(\bar{x}_{1},\bar{x}_{2},0)$ coincides with the weighted harmonic mean
$H_{w}$ of $a_{1},$ $a_{2},$ $a_{3}$ and the height of the prism through the
barycenter of the triangular base $GM_{w}=w_{1}B_{1}+w_{2}B_{2}+w_{3}B_{3}$
coincides with the weighted arithmetic mean.

In Figures 2 and 3 we represent the situation given in Theorem 2, being the
situation of Theorem 1 similar. In Figure 2, in the left part, we show the
paraboloids built with the values $a_{1}=3,$ $a_{2}=4,$ $a_{3}=6,$ with the
weights $w_{1}=0.2,$ $w_{2}=0.2,$ $w_{3}=0.6,$ and in the right part, the
planes obtained for the case of dealing with equal weights
$w_{1}=w_{2}=w_{3}=\frac{1}{3}.$ These plots correspond to the situation
considered in Theorem 2. We observe how the paraboloids degenerate in planes
generalizing the case of the non-weighted harmonic mean.
In Figure 3, we show the intersection of the three paraboloids for the same
values and weights. It is interesting to compare the representation of the
weighted harmonic mean $H_{w},$ which coincides with the height of the prism
through the point $GH_{w}$ (orthogonal projection onto the base of the
intersection point of the three paraboloids considered in Theorem 2), with the
representation of the weighted arithmetic mean $M_{w},$ which amounts to the
height of the prism through the barycenter $GM_{w}$ of the vertices of the
triangular base affected by the corresponding weights.

Figure 2: Representation of the three paraboloids considered in Theorem 2 for
the representation of the harmonic mean of the values $a_{1}=3,$ $a_{2}=4,$
$a_{3}=6.$ Weights $w_{1}=0.2,$ $w_{2}=0.2,$ $w_{3}=0.6$ to the left and
$w_{1}=w_{2}=w_{3}=\frac{1}{3}$ to the right. Upper: $V_{1}^{*}.$ Medium:
$V_{2}^{*}.$ Bottom: $V_{3}^{*}.$

Figure 3: Representation of weighted harmonic mean of three positive values
$a_{1}=3,$ $a_{2}=4,$ $a_{3}=6$ as the height of the prism through the
intersection point of the three paraboloids considered in Theorem 2.
Comparison with the weighted arithmetic mean. for the representation of the
harmonic mean of the values. Weights $w_{1}=0.2,$ $w_{2}=0.2,$ $w_{3}=0.6$ to
the left and $w_{1}=w_{2}=w_{3}=\frac{1}{3}$ to the right. Upper: Intersection
of the three paraboloids. Bottom: Comparison between the weighted harmonic
mean and the weighted arithmetic mean.

##  4 Results on the weighted harmonic mean of $n$ values

First, we introduce the definition of weighted harmonic mean $H_{w}$ that we
are going to be using.

######  Definition 3.

Given $a_{i}>0,i=1,\ldots,n$ $n$ positive real numbers and the weights
$w_{i}>0,i=1,\ldots,n$ with $\sum_{i=1}^{n}w_{i}=1,$ the weighted harmonic
mean is defined by

$H_{w}(a_{1},\ldots,a_{n})=\dfrac{1}{\sum\limits_{i=1}^{n}\dfrac{w_{i}}{a_{i}}}=\dfrac{\prod\limits_{k=1}^{n}a_{k}}{\sum\limits_{i=1}^{n}w_{i}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq i\end{subarray}}^{n}{a_{k}}},$

and the weighted arithmetic mean is defined by

$M_{w}(a_{1},\ldots,a_{n})=\sum_{i=1}^{n}w_{i}a_{i}.$

We now give the main two results which are crucial in applications in
numerical analysis, such as we will show in the section devoted to practical
cases. The first lemma has to do with the property of boundedness of the mean
by the minimum of its arguments and it is used to define adaptative methods.

######  Lemma 5.

Let $a_{i}>0,i=1,\ldots,n$ be $n$ positive real numbers and
$w_{i}>0,i=1,\ldots,n$ the corresponding weights with $\sum_{i=1}^{n}w_{i}=1.$
Then, the weighted harmonic mean $H_{w}$ is bounded as follows

$H_{w}<\dfrac{a_{i_{0}}}{w_{i_{0}}}\leq\dfrac{a_{i}}{w_{i}},\quad
i=1,\ldots,n,$

where
$\dfrac{a_{i_{0}}}{w_{i_{0}}}=\min\\{\dfrac{a_{1}}{w_{1}},\cdots,\dfrac{a_{n}}{w_{n}}\\}.$

###### Proof.

$H_{w}=\dfrac{\prod\limits_{k=1}^{n}a_{k}}{\sum\limits_{j=1}^{n}{w_{j}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq
j\end{subarray}}^{n}{a_{k}}}}=\dfrac{a_{i_{0}}}{w_{i_{0}}}\,\dfrac{\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq
i_{0}\end{subarray}}^{n}{a_{k}}}{\sum\limits_{j=1}^{n}\dfrac{w_{j}}{w_{i_{0}}}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq
j\end{subarray}}^{n}{a_{k}}}<\dfrac{a_{i_{0}}}{w_{i_{0}}}\leq\dfrac{a_{i}}{w_{i}},\quad
i=1,\ldots,n.$

∎

The second lemma deals with how close remains the weighted harmonic mean to
the weighted arithmetic mean when the arguments are also close among them.
This property is essential to define nonlinear methods which preserve the
order of approximation of their linear counterparts from which they are
derived. We will also show this relation in the section dedicated to the
practical examples.

######  Lemma 6.

Let $a_{i}>0,i=1,\ldots,n$ be $n$ positive real numbers and
$w_{i}>0,i=1,\ldots,n$ the corresponding weights with $\sum_{i=1}^{n}w_{i}=1.$
If $\;a_{i}=O(1),\quad\forall i=1,\cdots,n,\quad$ and
$\quad\left|a_{1}-a_{i}\right|=O(h),\quad\forall i=2,\cdots,n,\quad$ then, the
weighted harmonic mean $H_{w}$ and the weighted arithmetic mean
$M_{w}:=\sum_{i=1}^{n}w_{i}a_{i}$ satisfy

$\left|M_{w}-H_{w}\right|=O(h^{2}).$

###### Proof.

Using the expressions of $H_{w}$ and $M_{w}$ we have

$|M_{w}-H_{w}|=\left|\sum\limits_{i=1}^{n}w_{i}a_{i}-\dfrac{\prod\limits_{k=1}^{n}a_{k}}{\sum\limits_{j=1}^{n}w_{j}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq
j\end{subarray}}^{n}{a_{k}}}\right|=\left|\dfrac{\sum\limits_{i=1}^{n}w_{i}a_{i}\sum\limits_{j=1}^{n}w_{j}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq
j\end{subarray}}^{n}{a_{k}}-\prod\limits_{k=1}^{n}a_{k}}{\sum\limits_{j=1}^{n}w_{j}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq j\end{subarray}}^{n}{a_{k}}}\right|.$ (23)

Now, paying attention to the fact that given two indices $\;i_{0},j_{0}\;$
such that $\;1\leq i_{0}<j_{0}\leq n\;$ we have

$w_{i_{0}}a_{i_{0}}w_{j_{0}}\prod\limits_{\begin{subarray}{c}k=1\\\ k\neq
j_{0}\end{subarray}}^{n}{a_{k}}=w_{i_{0}}a_{i_{0}}^{2}w_{j_{0}}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq i_{0},j_{0}\end{subarray}}^{n}{a_{k}},$ (24)
$w_{j_{0}}a_{j_{0}}w_{i_{0}}\prod\limits_{\begin{subarray}{c}k=1\\\ k\neq
i_{0}\end{subarray}}^{n}{a_{k}}=w_{i_{0}}a_{j_{0}}^{2}w_{j_{0}}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq i_{0},j_{0}\end{subarray}}^{n}{a_{k}},$ (25)

and just by summing up both terms in (24) and (25) we get

$w_{i_{0}}a_{i_{0}}w_{j_{0}}\prod\limits_{\begin{subarray}{c}k=1\\\ k\neq
j_{0}\end{subarray}}^{n}{a_{k}}+w_{j_{0}}a_{j_{0}}w_{i_{0}}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq
i_{0}\end{subarray}}^{n}{a_{k}}=w_{i_{0}}w_{j_{0}}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq i_{0},j_{0}\end{subarray}}^{n}{a_{k}}(a_{i_{0}}^{2}+a_{j_{0}}^{2}).$
(26)

For the case $i_{0}=j_{0}$ we get

$w_{i_{0}}a_{i_{0}}w_{j_{0}}\prod\limits_{\begin{subarray}{c}k=1\\\ k\neq
j_{0}\end{subarray}}^{n}{a_{k}}=w_{i_{0}}^{2}\prod\limits_{k=1}^{n}{a_{k}}.$
(27)

Using the simplifications in (26) and (27) we can rewrite (23) as

$|M_{w}-H_{w}|=\left|\dfrac{\sum\limits_{i=1}^{n}{w_{i}}^{2}\prod\limits_{k=1}^{n}a_{k}+\sum\limits_{\begin{subarray}{c}i,j=1\\\
i<j\end{subarray}}^{n}w_{i}w_{j}(a_{i}^{2}+a_{j}^{2})\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq
i,j\end{subarray}}^{n}{a_{k}}}{\sum\limits_{j=1}^{n}w_{j}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq
j\end{subarray}}^{n}{a_{k}}}\right|=\left|\dfrac{\sum\limits_{\begin{subarray}{c}i,j=1\\\
i<j\end{subarray}}^{n}w_{i}w_{j}(a_{i}-a_{j})^{2}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq
i,j\end{subarray}}^{n}{a_{k}}}{\sum\limits_{j=1}^{n}w_{j}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq j\end{subarray}}^{n}{a_{k}}}\right|=O(h^{2}),$

since by the triangular inequality we have that
$\;\left|a_{i}-a_{j}\right|\leq\left|a_{i}-a_{1}\right|+\left|a_{1}-a_{j}\right|=O(h).$
∎

We introduce the following notation for the vertices of a prism in
$\mathbb{R}^{n}.$

$\begin{cases}B_{i}\equiv(0,\cdots,0,\underset{i}{1},0,\cdots,0)\quad
i=1,\cdots,n-1,\\\ B_{n}=(0,\cdots,0),\\\
P_{i}\equiv(0,\cdots,0,\underset{i}{1},0,\cdots,0,a_{i})\quad
i=1,\cdots,n-1,\\\ P_{n}=(0,\cdots,0,a_{n}),\end{cases}$

where the points $B_{i}$ represent the vertices which lay on the base of the
prism and the vertices $P_{i}$ are nothing more than the points located at the
maximum height of the prism at the corresponding points $B_{i}$ in the base
and in the parallel direction to the $x_{n}$ axis.

We are now ready to give the following two theorems for the weighted harmonic
mean, which generalize the geometrical representations using prisms.

######  Theorem 3.

Let us consider the hyperplane $\Pi$ which passes through the points
$P_{i},i=1,\ldots,n,$ $n\geq 2,$ given by the equation

$\Pi\equiv\;x_{n}=a_{n}+\sum_{i=1}^{n}{x_{i}(a_{i}-a_{n})}.$ (28)

Let us also consider the hyperplane $V_{n}$ which passes through the points
$B_{i},i=1,\ldots,n-1$ and $P_{n}$ given by the equation

$V_{n}\equiv\;\sum_{i=1}^{n-1}{x_{i}}+\dfrac{x_{n}}{a_{n}}=1.$ (29)

and the paraboloids $V_{i},i=1,\ldots,n-1$ given by the equations

$\displaystyle V_{i}$ $\displaystyle\equiv$ $\displaystyle
x_{n}=b_{i}{x_{i}}^{2}+(a_{i}-b_{i})x_{i},$ (30)

which pass through $B_{1},\ldots,B_{i-1},P_{i},B_{i+1},\ldots,B_{n}$
respectively, where the coefficients $b_{i}$ are given by

$b_{i}=\dfrac{H_{w}}{\bar{x}_{i}(\bar{x}_{i}-1)}(w_{n}-w_{i}),\qquad
i=1,\ldots,n-1.$ (31)

Then, the system of equations formed by (29) and (30) has a unique solution
$(\bar{x}_{1},\ldots,\bar{x}_{n})$ given by

$\bar{x}_{i}=w_{i}\dfrac{H_{w}}{a_{i}},\quad
i=1,\ldots,n-1,\quad\bar{x}_{n}=w_{n}H_{w}.$ (32)

Moreover, the following two affirmations are true:

  * a)

The height of the prism through the point
$(\bar{x}_{1},\ldots,\bar{x}_{n-1},0)$ coincides with the weighted harmonic
mean $H_{w}$ of $a_{i},i=1,\ldots,n,$ that is, the point
$(\bar{x}_{1},\ldots,\bar{x}_{n-1},H_{w})$ belongs to the hyperplane $\Pi.$

  * b)

The height of the prism through the barycenter of the base
$GM_{w}=\sum\limits_{i=1}^{n}w_{i}B_{i}$ coincides with the weighted
arithmetic mean.

###### Proof.

It is immediate to check that the proposed solution satisfies (29) and (30).
Let us prove that the solution is unique. By reductio ad absurdum, let us
suppose that there exists another solution
$x^{\prime}=(x^{\prime}_{1},\cdots,x^{\prime}_{n})$ with
$x^{\prime}\neq\bar{x}.$ Then, denoting
$z_{i}=\bar{x}_{i}-x^{\prime}_{i},i=1,\cdots,n,$ the system of equations
formed by (29) and (30) can be easily transformed into

$\displaystyle\sum\limits_{i=1}^{n-1}{z_{i}}+\dfrac{z_{n}}{a_{n}}$
$\displaystyle=0,$ (33a) $\displaystyle
z_{n}-b_{i}z_{i}(\bar{x}_{i}+x^{\prime}_{i})-(a_{i}-b_{i})z_{i}$
$\displaystyle=0,\quad i=1,\cdots,n-1,$ (33b)

what amounts to a homogeneous linear system of $n$ equations with $n$
unknowns. If we show that this system has only the trivial solution $z=0,$
then we would have proven that $\bar{x}=x^{\prime},$ what is a contradiction
with the starting supposition. Therefore, $\bar{x}$ would be the unique
solution. Let us then prove that system (33) has $z=0$ as the unique solution.
Again by reductio ad absurdum, let us suppose that the system has infinite
solutions, that is, $z=\sum\limits_{k=1}^{s}{\lambda_{k}v^{k}}$, where
$s=n-r,$ being $r$ the rank of the coefficient matrix of the linear system,
$\lambda_{k}\in\mathbb{R},$ and $v^{k},\ k=1,\ldots,s,$ represent a base of
the kernel of the associated linear map. Let us consider the univariate set of
solutions $z=\lambda_{1}v^{1},$ $\lambda_{1}\in\mathbb{R}.$ By the sake of
simplicity, we will drop the superindex and we will write $z=\lambda v.$ Thus,
we obtain

$x^{\prime}=\bar{x}-z=\bar{x}-\lambda v,$

whose coordinates are given by

$x^{\prime}_{i}=\bar{x}_{i}-z_{i}=\bar{x}_{i}-\lambda v_{i}.$ (34)

Plugging (34) into (33b) we get

$\lambda v_{n}=b_{i}\lambda v_{i}(2\bar{x}_{i}-\lambda
v_{i})+(a_{i}-b_{i})\lambda v_{i},\quad\forall i=1,\cdots,n-1,$ (35)

and simplifying expression (35) we obtain

$-\lambda
b_{i}v_{i}^{2}+2b_{i}v_{i}\bar{x}_{i}+(a_{i}-b_{i})v_{i}-v_{n}=0,\quad\forall
i=1,\cdots,n-1,\quad\lambda\neq 0.$ (36)

Now, particularizing expression (36) for two different values of $\lambda,$
$\lambda_{1}\neq\lambda_{2},$ and subtracting both expressions, we reach to

$(\lambda_{1}-\lambda_{2})b_{i}v_{i}^{2}=0,\quad\forall i=1,\cdots,n-1.$ (37)

We are going to prove now that there exists
$i_{0}\in\left\\{1,\cdots,n-1\right\\}$ such that $b_{i_{0}}\neq
0\;\text{and}\;v_{i_{0}}\neq 0,$ and therefore, from (37), this would imply
that $\;\lambda_{1}=\lambda_{2}$ what is a contradiction. Thus, $z=0$ would be
the unique solution of the homogeneous linear system and $\bar{x}$ would be
the unique solution of the system given by (29) and (30).

Since $v\neq 0,$ $\exists v_{i}\neq 0\ \text{for some}\
i\in\left\\{1,\cdots,n-1\right\\}.$ Otherwise, if $v_{i}=0,\ \forall
i\in\left\\{1,\cdots,n-1\right\\}$, from (33a) we get
$v_{n}=-a_{n}\sum\limits_{i=1}^{n-1}{v_{i}}=0\;$ and $\;v=0,$ what is not
possible. Let us denote $I$ the set of indices for which $v_{i}\neq 0$. If we
suppose that $b_{i}=0,\ \forall i\in I,$ then from (36) we get
$\;a_{i}v_{i}-v_{n}=0.$ Thus, $v_{i}=\dfrac{v_{n}}{a_{i}},\ \forall i\in I.$
Also, from (33a)

$\sum\limits_{i\in I}{\lambda v_{i}}+\lambda\dfrac{v_{n}}{a_{n}}=0.$ (38)

Now, using in (38) the fact that $v_{i}=\dfrac{v_{n}}{a_{i}},\ \forall i\in
I,$ we get $v_{n}=0,$ and in turn, $v=0,$ what gives a contradiction which
comes from the supposition $b_{i}=0,\ \forall i\in I.$ Therefore, $\exists
i_{0}\in I,$ such that $b_{i_{0}}\neq 0.$

In order to prove now point a) of the theorem, we consider the straight line
parallel to the $x_{n}$ axis passing through
$(\bar{x}_{1},\ldots,\bar{x}_{n-1},0)$, that is

$r_{w}\equiv\begin{cases}x_{1}=\bar{x}_{1},\\\ \vdots\\\
x_{n-1}=\bar{x}_{n-1}.\end{cases}$ (39)

Cutting this straight line with the hyperplane $\Pi$ we get the point
$(\bar{x}_{1},\ldots,\bar{x}_{n-1},H_{w}),$ which gives the enunciated result.
A similar argument proves point b), just by considering in this case the
straight line parallel to the $x_{n}$ axis passing through the barycenter
$GM_{w}=\sum\limits_{i=1}^{n}w_{i}B_{i}=(w_{1},\ldots,w_{n-1},0),$ and
verifying that its intersection point with the hyperplane $\Pi$ is just the
weighted arithmetic mean $M_{w}=\sum\limits_{i=1}^{n}w_{i}a_{i}.$ ∎

######  Theorem 4.

Let us consider the hyperplane $\Pi$ which passes through the points
$P_{i},i=1,\ldots,n,$ $n\geq 2,$ given by the equation

$\Pi\equiv\;x_{n}=a_{n}+\sum_{i=1}^{n}{x_{i}(a_{i}-a_{n})}.$ (40)

Let us also consider the paraboloid given by $V_{n}$ which passes through the
points $B_{i},i=1,\ldots,n-1$ and $P_{n}$ given by the equation

$V_{n}\equiv\;x_{n}=a_{n}+\sum_{i=1}^{n-1}(c_{i}x_{i}^{2}-(c_{i}+a_{n})x_{i}),$
(41)

where the coefficients $c_{i}$ are given by

$\displaystyle
c_{i}=\dfrac{\frac{H_{w}}{n}+(\sum\limits_{j=1}^{n-1}{\bar{x}_{j}}-1)a_{n}}{(n-1)\bar{x}_{i}(\bar{x}_{i}-1)},\qquad
i=1,\ldots,n-1,$ (42)

and the paraboloids $V_{i},i=1,\ldots,n-1$ given by the equations

$\displaystyle V_{i}$ $\displaystyle\equiv$ $\displaystyle
x_{n}=b_{i}{x_{i}}^{2}+(a_{i}-b_{i})x_{i},$ (43)

which pass through $B_{1},\ldots,B_{i-1},P_{i},B_{i+1},\ldots,B_{n}$
respectively, where the coefficients $b_{i}$ are given by

$b_{i}=\dfrac{H_{w}}{\bar{x}_{i}(\bar{x}_{i}-1)}(\frac{1}{n}-w_{i}),\qquad
i=1,\ldots,n-1.$ (44)

Then, the system of equations formed by (41) and (43) has a unique solution
$(\bar{x}_{1},\ldots,\bar{x}_{n})$ given by

$\bar{x}_{i}=w_{i}\dfrac{H_{w}}{a_{i}},\quad
i=1,\ldots,n-1,\quad\bar{x}_{n}=\frac{H_{w}}{n}.$ (45)

Moreover, the following two affirmations are true:

  * a)

The height of the prism through the point
$(\bar{x}_{1},\ldots,\bar{x}_{n-1},0)$ coincides with the weighted harmonic
mean $H_{w}$ of $a_{i},i=1,\ldots,n,$ that is, the point
$(\bar{x}_{1},\ldots,\bar{x}_{n-1},H_{w})$ belongs to the hyperplane $\Pi.$

  * b)

The height of the prism through the barycenter of the base
$GM_{w}=\sum\limits_{i=1}^{n}w_{i}B_{i}$ coincides with the weighted
arithmetic mean.

###### Proof.

It is trivial to see that the proposed solution satisfies (41) and (43). Let
us prove that the solution is unique. Let us suppose that there exists another
solution $x^{\prime}=(x^{\prime}_{1},\cdots,x^{\prime}_{n})$ with
$x^{\prime}\neq\bar{x}.$ Then, denoting
$z_{i}=\bar{x}_{i}-x^{\prime}_{i},i=1,\cdots,n,$ the system of equations
formed by (41) and (43) can be written as

$\displaystyle\sum\limits_{i=1}^{n-1}\left[{c_{i}z_{i}(\bar{x}_{i}+x^{\prime}_{i})-(c_{i}+a_{n})z_{i}}\right]-z_{n}$
$\displaystyle=0,$ (46a) $\displaystyle
z_{n}-b_{i}z_{i}(\bar{x}_{i}+x^{\prime}_{i})-(a_{i}-b_{i})z_{i}$
$\displaystyle=0,\quad i=1,\cdots,n-1,$ (46b)

what amounts to a homogeneous linear system of $n$ equations with $n$
unknowns. If we show that this system has only the trivial solution $z=0,$
then we would have proven that $\bar{x}=x^{\prime},$ what is a contradiction
with the starting supposition. Therefore, $\bar{x}$ would be the unique
solution. Let us then prove that system (46) has $z=0$ as the unique solution.
By reductio ad absurdum, let us suppose that the system has infinite
solutions, that is, $z=\sum\limits_{k=1}^{s}{\lambda_{k}v^{k}}$, where
$s=n-r,$ being $r$ the rank of the coefficient matrix of the linear system,
$\lambda_{k}\in\mathbb{R},$ and $v^{k},\ k=1,\ldots,s,$ represent a base of
the Kernel of the associated linear map. Let us consider the univariate set of
solutions $z=\lambda_{1}v^{1},$ $\lambda_{1}\in\mathbb{R}.$ By the sake of
simplicity, we will drop the superindex and we will write $z=\lambda v.$ Thus,
we obtain

$x^{\prime}=\bar{x}-z=\bar{x}-\lambda v,$

whose coordinates are given by

$x^{\prime}_{i}=\bar{x}_{i}-z_{i}=\bar{x}_{i}-\lambda v_{i}.$ (47)

Plugging (47) into (46b) we get

$\lambda v_{n}=b_{i}\lambda v_{i}(2\bar{x}_{i}-\lambda
v_{i})+(a_{i}-b_{i})\lambda v_{i},\quad\forall i=1,\cdots,n-1,$ (48)

and simplifying expression (48) we obtain

$-\lambda
b_{i}v_{i}^{2}+2b_{i}v_{i}\bar{x}_{i}+(a_{i}-b_{i})v_{i}-v_{n}=0,\quad\forall
i=1,\cdots,n-1,\quad\lambda\neq 0.$ (49)

Now, particularizing expression (49) for two different values of $\lambda,$
$\lambda_{1}\neq\lambda_{2},$ and subtracting both expressions, we reach to

$(\lambda_{1}-\lambda_{2})b_{i}v_{i}^{2}=0,\quad\forall i=1,\cdots,n-1.$ (50)

Before continuing with the main proof, we need to prove the following
statement

  * s1)

$sign(c_{i})=sign(c_{j})$ $\forall i,j\ \in\\{1,\ldots,n-1\\},$

where $sign(.)$ denotes the sign function

$sign(x):=\left\\{\begin{array}[]{ll}1&x>0,\\\ -1&x<0,\\\
0&x=0.\end{array}\right.$

Statement s1) is proven just by isolating the term $H_{w}$ in equation
$c_{i}=0,$ that is

$\displaystyle c_{i}=0$ $\displaystyle\Leftrightarrow$
$\displaystyle\frac{H_{w}}{n}=a_{n}(1-\sum_{j=1}^{n-1}\bar{x}_{j})=a_{n}-H_{w}(a_{n}\sum_{j=1}^{n-1}\frac{w_{j}}{a_{j}})$
$\displaystyle\Leftrightarrow$ $\displaystyle
H_{w}=\dfrac{a_{n}}{\frac{1}{n}+a_{n}\sum\limits_{j=1}^{n-1}\frac{w_{j}}{a_{j}}}=\dfrac{\prod\limits_{k=1}^{n}a_{k}}{\frac{1}{n}a_{1}\ldots
a_{n-1}+\sum\limits_{j=1}^{n-1}w_{j}\prod\limits_{\begin{subarray}{c}k=1\\\
k\neq j\end{subarray}}^{n}{a_{k}}}.$

Comparing expression (4) with the expression of $H_{w}$ in Definition 3, we
get that $c_{i}=0\Leftrightarrow w_{n}=\frac{1}{n},$ $c_{i}>0\Leftrightarrow
w_{n}<\frac{1}{n},$ and $c_{i}<0\Leftrightarrow w_{n}>\frac{1}{n}.$
We are ready to continue with the main proof. Since $v\neq 0,$ the set of
indices $I$ such that $v_{i}\neq 0,i\in I,$ is not empty. Let us suppose that
$b_{i}=0,\forall i\in I.$ From (46), we get

$\displaystyle v_{n}$ $\displaystyle=$ $\displaystyle a_{i}v_{i},$ (52)
$\displaystyle v_{n}$ $\displaystyle=$ $\displaystyle\sum_{i\in I}(-\lambda
c_{i}v_{i}+2c_{i}\bar{x}_{i}-(a_{n}+c_{i}))v_{i}.$ (53)

Plugging (52) into (53) and using that $v_{i}\neq 0,$ and in turn $v_{n}\neq
0,$ we get that

$\sum_{i\in I}(-\lambda
c_{i}\frac{v_{i}}{a_{i}}+2c_{i}\frac{\bar{x}_{i}}{a_{i}}-\frac{a_{n}+c_{i}}{a_{i}})-1=0,\
\forall\lambda\in\mathbb{R}.$ (54)

From equation (54), since it is true for all value of $\lambda,$ taking two
different values $\bar{\lambda}_{1},\bar{\lambda}_{2}$ we get that

$\displaystyle-\bar{\lambda}_{1}v_{n}(\sum_{i\in
I}\frac{c_{i}}{a_{i}^{2}})+\sum_{i\in
I}(2c_{i}\frac{\bar{x}_{i}}{a_{i}}-\frac{a_{n}+c_{i}}{a_{i}})-1=0,$ (55)
$\displaystyle-\bar{\lambda}_{2}v_{n}(\sum_{i\in
I}\frac{c_{i}}{a_{i}^{2}})+\sum_{i\in
I}(2c_{i}\frac{\bar{x}_{i}}{a_{i}}-\frac{a_{n}+c_{i}}{a_{i}})-1=0,$ (56)

and subtracting (55) and (56) we get

$\sum_{i\in I}\frac{c_{i}}{a_{i}^{2}}=0.$ (57)

Taking into account statement s1), since all $c_{i}$ have the same sign, it
must be $c_{i}=0,i\in I.$ In turn, by using (53), this fact implies

$-\sum_{i\in I}\frac{a_{n}v_{n}}{a_{i}}=v_{n}\Rightarrow v_{n}(1+\sum_{i\in
I}\frac{a_{n}}{a_{i}})=0,$

what is not viable as $v_{n}\neq 0,$ and we get a contradiction. Therefore,
$\exists i\in I,$ such that $b_{i}\neq 0.$ From (50), this means that
$\;\lambda_{1}=\lambda_{2}$ what gives again a contradiction, this time with
the initial supposition. Thus, $z=0$ is the unique solution of the homogeneous
linear system and $\bar{x}$ is the unique solution of the system given by (41)
and (43).

In order to prove now point a) of the theorem, we consider the straight line
parallel to the $x_{n}$ axis passing through
$(\bar{x}_{1},\ldots,\bar{x}_{n-1},0)$, that is

$r_{w}\equiv\begin{cases}x_{1}=\bar{x}_{1},\\\ \vdots\\\
x_{n-1}=\bar{x}_{n-1}.\end{cases}$ (58)

Cutting this straight line with the hyperplane $\Pi$ we get the point
$(\bar{x}_{1},\ldots,\bar{x}_{n-1},H_{w}),$ which gives the enunciated result.
A similar argument proves point b), just by considering in this case the
straight line parallel to the $x_{n}$ axis passing through the barycenter
$GM_{w}=\sum\limits_{i=1}^{n}w_{i}B_{i}=(w_{1},\ldots,w_{n-1},0),$ and
verifying that its intersection point with the hyperplane $\Pi$ is just the
weighted arithmetic mean $M_{w}=\sum\limits_{i=1}^{n}w_{i}a_{i}.$ ∎

######  Remark 2.

In the non-weighted case, that is, when all $w_{i}=\frac{1}{n},i=1,\ldots,n,$
all the paraboloids degenerate in diagonal hyperplanes.

A simpler representation using only hyperplanes is also possible for the
general case of dealing with the weighted harmonic mean, as it comes out
directly from Remark 2 and from the observation

$H_{\frac{1}{n}}(\frac{a_{1}}{w_{1}},\ldots,\frac{a_{n}}{w_{n}})=nH_{w}(a_{1},\ldots,a_{n}),$
(59)

where $H_{\frac{1}{n}}$ stands for the harmonic mean with uniform weights
$w_{i}=\frac{1}{n},i=1,\ldots,n.$

More precisely, using the previous notations and defining also

$\begin{cases}a_{i}^{*}=\frac{a_{i}}{w_{i}},\\\
P_{i}^{*}\equiv(0,\cdots,0,\underset{i}{1},0,\cdots,0,a_{i}^{*}),\quad
i=1,\cdots,n-1,\\\ P_{n}^{*}=(0,\cdots,0,a_{n}^{*}),\\\
H_{w}=H_{w}(a_{1},\ldots,a_{n}),w=(w_{1},\ldots,w_{n}),\\\
H_{\frac{1}{n}}^{*}=H_{w}(a_{1}^{*},\ldots,a_{n}^{*}),w=(\frac{1}{n},\ldots,\frac{1}{n}),\\\
M_{w}=M_{w}(a_{1},\ldots,a_{n}),w=(w_{1},\ldots,w_{n}),\\\
M_{\frac{1}{n}}^{*}=M_{w}(a_{1}^{*},\ldots,a_{n}^{*}),w=(\frac{1}{n},\ldots,\frac{1}{n}),\end{cases}$

we can give the following corollary.

######  Corollary 1.

Let us consider the hyperplanes $\Pi,$ $\Pi^{*}$ which pass through the points
$P_{i},$ and $P_{i}^{*},i=1,\ldots,n,$ respectively, $n\geq 2.$ They are given
by the equations

$\displaystyle\Pi$ $\displaystyle\equiv$
$\displaystyle\;x_{n}=a_{n}+\sum_{i=1}^{n}{x_{i}(a_{i}-a_{n})},$ (60)
$\displaystyle\Pi^{*}$ $\displaystyle\equiv$
$\displaystyle\;x_{n}=\frac{a_{n}}{w_{n}}+\sum_{i=1}^{n}{x_{i}(\frac{a_{i}}{w_{i}}-\frac{a_{n}}{w_{n}})}.$
(61)

Let us also consider the hyperplane $V_{n}^{*}$ which passes through the
points $B_{i},i=1,\ldots,n-1$ and $P_{n}^{*}$ given by the equation

$V_{n}^{*}\equiv\;\sum_{i=1}^{n-1}{x_{i}}+w_{n}\dfrac{x_{n}}{a_{n}}=1.$ (62)

and the hyperplanes $V_{i}^{*},i=1,\ldots,n-1$ given by the equations

$\displaystyle V_{i}^{*}$ $\displaystyle\equiv$ $\displaystyle
x_{n}=\frac{a_{i}}{w_{i}}x_{i},\quad\textrm{which pass through}\
B_{1},\ldots,B_{i-1},P_{i}^{*},B_{i+1},\ldots,B_{n}.$ (63)

Then, the system of equations formed by (62) and (63) has a unique solution
$(\bar{x}_{1},\ldots,\bar{x}_{n})$ given by

$\bar{x}_{i}=w_{i}\dfrac{H_{w}}{a_{i}},\quad
i=1,\ldots,n-1,\quad\bar{x}_{n}=\frac{H_{\frac{1}{n}}^{*}}{n}=H_{w}.$ (64)

Moreover, the following two affirmations are true:

  * a)

The height of the prism $P^{*}$ (with vertices $P_{i}^{*}$) through the point
$(\bar{x}_{1},\ldots,\bar{x}_{n-1},0)$ coincides with the harmonic mean of
$a_{i}^{*},i=1,\ldots,n,$ that is, $H_{\frac{1}{n}}^{*},$ and the height of
the prism $P$ (with vertices $P_{i}$) through the same point is
$\frac{1}{n}H_{\frac{1}{n}}^{*}=H_{w},$ that is, the point
$(\bar{x}_{1},\ldots,\bar{x}_{n-1},H_{w})$ belongs to the hyperplane $\Pi.$

  * b)

The height of the prism $P^{*}$ through the barycenter of the triangular base
$GM_{\frac{1}{n}}=\sum\limits_{i=1}^{n}\frac{1}{n}B_{i}$ coincides with the
arithmetic mean $M_{\frac{1}{n}}^{*},$ and the height of the prism $P$ through
the weighted barycenter of the triangular base
$GM_{w}=\sum\limits_{i=1}^{n}w_{i}B_{i}$ coincides with the weighted
arithmetic mean $M_{w}.$

###### Proof.

It is trivially derived either from Theorem 3 or from Theorem 4 just by
applying the relation (59) and observing the Remark 2. ∎

In Figure 4 we see the representation of Corollary 1 in $2D$ and in $3D$ for a
particular choice of the arguments $a_{i}$ and the weights. In the upper part
we see the case of two arguments. We can appreciate the relation (59) between
the harmonic mean of the modified arguments $a_{i}^{*}$ and the weighted
harmonic mean of the original arguments $a_{i},$ which is placed at the half
part of the height of the trapezoid at the abscissa where both means take
place. However, no clear relation is observed between the arithmetic mean of
the modified values $M_{\frac{1}{n}}^{*}$ and the weighted arithmetic mean
$M_{w}$ of the original ones. The same appreciation runs for the case of three
arguments, where the weighted harmonic mean of the original arguments locates
at the third part of the height of the prism through the corresponding
abscissa.

Figure 4: Representation of weighted harmonic mean according to Corollary 1.
Upper-left: Weighted harmonic mean of the two positive values $a_{1}=3,$
$a_{2}=6,$ with weights $w_{1}=0.6,$ $w_{2}=0.4.$ Upper-right: Comparison
among $H_{\frac{1}{n}}^{*},$ $H_{w},$ $M_{\frac{1}{n}}^{*},$ $M_{w},$ in the
case of two arguments. Bottom-left: Weighted harmonic mean of the three
positive values $a_{1}=6,$ $a_{2}=7,$ $a_{3}=10$ with weights $w_{1}=0.4,$
$w_{2}=0.3,$ $w_{3}=0.3.$ Bottom-right: Comparison among
$H_{\frac{1}{n}}^{*},$ $H_{w},$ $M_{\frac{1}{n}}^{*},$ $M_{w},$ in the case of
three arguments. In blue the harmonic mean, in red the weighted arithmetic
mean of the original values, in yellow the arithmetic mean of the modified
values.

##  5 Examples of application

In this section our main purpose is to point out how to use the simple
theoretical results presented in previous sections to define a nonlinear
reconstruction operator adapted to jump discontinuities. This application is
just one possibility of use of the introduced concepts. It can be applied in
many other contexts in order to define a nonlinear method from an already
existing linear method, just by writing the necessary expressions in terms of
a weighted arithmetic mean of some quantities, which act somehow as smoothness
indicators. Adaptation after the substitution of the weighted arithmetic mean
for the corresponding weighted harmonic mean will take place if only a few of
these quantities are affected by the presence of a potential discontinuity,
and these affected quantities are not used in the rest of the expressions.
These smoothness indicators should also satisfy similar hypothesis to those of
Lemma 6 in smooth areas of an hypothetical underlying function in order to
maintain the approximation order of the original method. The fact of
substituting the arithmetic mean for a corresponding harmonic mean will allow
the adaptation thanks to Lemma 5, since the large values, due to the presence
of a discontinuity, will be limited.
In real applications, it might be also necessary the application of a
translation strategy as it is well explained in [6, 7] in order to deal with
weighted means of values which do not necessarily have the same sign.
Some examples of already existing methods that use these ideas with the
harmonic mean of two values can be found in several applications. Let us
mention:

  * •

Point values reconstructions and the related field of subdivision and
multiresolution schemes, see [1, 11] and the references therein.

  * •

The field of image processing, to define nonlinear compression methods into
the cell averages framework inside Harten’s multiresolution, see [5].

  * •

Also in the field of image processing for denoising purposes, see [8].

  * •

Generation of curves and surfaces, due to some remarkable properties of the
harmonic mean in relation with the definition of convexity preserving
reconstruction methods, see for example [10].

  * •

In combination with spline reconstructions, see [9].

  * •

In the solution of hyperbolic conservation laws, see [13, 14].

Up to our knowledge, there is only one application using these ideas in $3D$
involving harmonic means of $3$ values, [7], and there is no other
implementation of nonlinear algorithms based on this methodology in higher
dimensions or involving harmonic means of more than $3$ values.

##  6 Conclusions

In this article, we have presented two relevant properties of the harmonic
mean that allow for new constructions of numerical methods, such as nonlinear
reconstruction operators, subdivision and multiresolution schemes, and solvers
of hyperbolic conservation laws. These properties have been presented for any
finite number of arguments, with the purpose of generating new algorithms in
problems involving $N$-dimensional spaces. We have given some geometrical
representations of both the weighted harmonic mean and the weighted arithmetic
mean, where the mentioned properties can be appreciated in an intuitive way.
In the last part of the article, we offer a list of examples that illustrate
the methodology for the two variables case, and we explain how to use these
simple concepts to attain interesting and promising results in defining new
methods for higher dimensions. In fact, we give also a reference of a
particular new reconstruction method for two dimensional functions which seems
to avoid Gibbs effect at the time of retaining some approximation order close
to jump discontinuities.

## References

  * [1] S. Amat, R. Donat, J. Liandrat, J.C. Trillo, Analysis of a new nonlinear subdivision scheme. Applications in image processing. Found. Comput. Math. 6 (2), (2006), 193-225.
  * [2] S. Amat, K. Dadourian, J. Liandrat, J. C. Trillo, High order nonlinear interpolatory reconstruction operators and associated multiresolution schemes. J. Comput. Appl. Math. 253, (2013), 163-180.
  * [3] S. Amat, R. Donat, J. C. Trillo, Proving convexity preserving properties of interpolatory subdivision schemes through reconstruction operators. Appl. Math. Comput. 219 (14), (2013), 7413-7421.
  * [4] S.Amat, J.Liandrat, On the stability of PPH nonlinear multiresolution. Appl. Comp. Harm. Anal. 18 (2), (2005), 198-206.
  * [5] S. Amat, J. Liandrat, J. Ruiz, J.C. Trillo, On a nonlinear mean and its application to image compression using multiresolution schemes. Numer. Algorithms. 71 (4) (2016), 729-752.
  * [6] S. Amat, P. Ortiz, J. Ruiz, J.C. Trillo, D. F. Yáñez, The translation operator. Applications to nonlinear reconstruction operators on nonuniform grids. Submitted.
  * [7] S. Amat, P. Ortiz, J. Ruiz, J.C. Trillo, D. F. Yáñez, A nonlinear PPH-type reconstruction based on equilateral triangles. arXiv 2022, arxiv:2202.02293.
  * [8] S. Amat, J. Ruiz, J.C. Trillo, Fast multiresolution algorithms and their related variational problems for image denoising. J. Sci. Comput. 43 (1), (2010), 1-23
  * [9] S.Amat, C.W. Shu, J.Ruiz, J.C. Trillo, On a class of splines free of Gibbs phenomenon. Math. Modell. in Numer. Anal. DOI: 10.1051/m2an/2020021, (2020).
  * [10] F. Kuijt, R. van Damme, Convexity preserving interpolatory subdivision schemes. Const. Approx., 14, (1998), 609-630.
  * [11] P. Ortiz, J.C. Trillo, On the convexity preservation of a quasi $C^{3}$ nonlinear interpolatory reconstruction operator on $\sigma$ quasi-uniform grids. Mathematics. , 9 (4-310), (2021). https://doi.org/10.3390/math9040310.
  * [12] P. Ortiz, J.C. Trillo, PPH nonlinear interpolatory reconstruction operator on non uniform grids: Adaptation around jump discontinuities and elimination of Gibbs phenomenon. Mathematics., 9 (335), (2021). https://doi.org/10.3390/math9040335
  * [13] S. Serna, A class of extended limiters applied to piecewise hyperbolic methods. SIAM J. Sci. Comput. 28 (1), (2006), 123-140.
  * [14] S. Serna, A. Marquina, Power ENO methods: a fifth-order accurate weighted power ENO method. J. Comput. Phys. 194 (2), (2004), 632-658.
  * [15] J.C. Trillo, Nonlinear multiresolution and applications in image processing, PhD in the University of Valencia, Spain, (2007).