# Logarithmic mean

Three-dimensional plot showing the values of the logarithmic mean.

In mathematics, the logarithmic mean is a function of two non-negative numbers which is equal to their difference divided by the logarithm of their quotient. This calculation is applicable in engineering problems involving heat and mass transfer.

## Definition

The logarithmic mean is defined symbolically as:

{\displaystyle {\begin{aligned}M_{\text{lm}}(x,y)&=\lim _{(\xi ,\eta )\to (x,y)}{\frac {\eta -\xi }{\ln(\eta )-\ln(\xi )}}\\[6pt]&={\begin{cases}0&{\text{if }}x=0{\text{ or }}y=0,\\x&{\text{if }}x=y,\\{\frac {y-x}{\ln(y)-\ln(x)}}&{\text{otherwise,}}\end{cases}}\end{aligned}}}

for the positive numbers ${\displaystyle x,y}$.

## Inequalities

The logarithmic mean of two numbers is smaller than the arithmetic mean but larger than the geometric mean (unless the numbers are the same, in which case all three means are equal to the numbers):

${\displaystyle {\sqrt {xy}}\leq M_{\text{lm}}(x,y)\leq {\frac {x+y}{2}}\qquad {\text{ for all }}x\geq 0{\text{ and }}y\geq 0.}$[1][2]

## Derivation

### Mean value theorem of differential calculus

From the mean value theorem, there exists a value ${\displaystyle \xi }$ in the interval between x and y where the derivative ${\displaystyle f'}$ equals the secant line:

${\displaystyle \exists \xi \in (x,y):\ f'(\xi )={\frac {f(x)-f(y)}{x-y}}}$

The logarithmic mean is obtained as the value of ${\displaystyle \xi }$ by substituting ${\displaystyle \ln }$ for ${\displaystyle f}$ and similarly for its corresponding derivative:

${\displaystyle {\frac {1}{\xi }}={\frac {\ln(x)-\ln(y)}{x-y}}}$

and solving for ${\displaystyle \xi }$:

${\displaystyle \xi ={\frac {x-y}{\ln(x)-\ln(y)}}}$

### Integration

The logarithmic mean can also be interpreted as the area under an exponential curve.

{\displaystyle {\begin{aligned}L(x,y)={}&\int _{0}^{1}x^{1-t}y^{t}\ \mathrm {d} t={}\int _{0}^{1}\left({\frac {y}{x}}\right)^{t}x\ \mathrm {d} t={}x\int _{0}^{1}\left({\frac {y}{x}}\right)^{t}\mathrm {d} t\\[3pt]={}&\left.{\frac {x}{\ln \left({\frac {y}{x}}\right)}}\left({\frac {y}{x}}\right)^{t}\right|_{t=0}^{1}={}{\frac {x}{\ln \left({\frac {y}{x}}\right)}}\left({\frac {y}{x}}-1\right)={}{\frac {y-x}{\ln \left({\frac {y}{x}}\right)}}\\[3pt]={}&{\frac {y-x}{\ln \left(y\right)-\ln \left(x\right)}}\end{aligned}}}

The area interpretation allows the easy derivation of some basic properties of the logarithmic mean. Since the exponential function is monotonic, the integral over an interval of length 1 is bounded by ${\displaystyle x}$ and ${\displaystyle y}$. The homogeneity of the integral operator is transferred to the mean operator, that is ${\displaystyle L(cx,cy)=cL(x,y)}$.

Two other useful integral representations are

${\displaystyle {1 \over L(x,y)}=\int _{0}^{1}{\operatorname {d} \!t \over tx+(1-t)y}}$
and
${\displaystyle {1 \over L(x,y)}=\int _{0}^{\infty }{\operatorname {d} \!t \over (t+x)\,(t+y)}.}$

## Generalization

### Mean value theorem of differential calculus

One can generalize the mean to ${\displaystyle n+1}$ variables by considering the mean value theorem for divided differences for the ${\displaystyle n}$th derivative of the logarithm.

We obtain

${\displaystyle L_{\text{MV}}(x_{0},\,\dots ,\,x_{n})={\sqrt[{-n}]{(-1)^{(n+1)}n\ln \left(\left[x_{0},\,\dots ,\,x_{n}\right]\right)}}}$

where ${\displaystyle \ln \left(\left[x_{0},\,\dots ,\,x_{n}\right]\right)}$ denotes a divided difference of the logarithm.

For ${\displaystyle n=2}$ this leads to

${\displaystyle L_{\text{MV}}(x,y,z)={\sqrt {\frac {(x-y)\left(y-z\right)\left(z-x\right)}{2\left(\left(y-z\right)\ln \left(x\right)+\left(z-x\right)\ln \left(y\right)+\left(x-y\right)\ln \left(z\right)\right)}}}}$.

### Integral

The integral interpretation can also be generalized to more variables, but it leads to a different result. Given the simplex ${\textstyle S}$ with ${\textstyle S=\{\left(\alpha _{0},\,\dots ,\,\alpha _{n}\right):\left(\alpha _{0}+\dots +\alpha _{n}=1\right)\land \left(\alpha _{0}\geq 0\right)\land \dots \land \left(\alpha _{n}\geq 0\right)\}}$ and an appropriate measure ${\textstyle \mathrm {d} \alpha }$ which assigns the simplex a volume of 1, we obtain

${\displaystyle L_{\text{I}}\left(x_{0},\,\dots ,\,x_{n}\right)=\int _{S}x_{0}^{\alpha _{0}}\cdot \,\cdots \,\cdot x_{n}^{\alpha _{n}}\ \mathrm {d} \alpha }$

This can be simplified using divided differences of the exponential function to

${\displaystyle L_{\text{I}}\left(x_{0},\,\dots ,\,x_{n}\right)=n!\exp \left[\ln \left(x_{0}\right),\,\dots ,\,\ln \left(x_{n}\right)\right]}$.

Example ${\textstyle n=2}$

${\displaystyle L_{\text{I}}(x,y,z)=-2{\frac {x\left(\ln \left(y\right)-\ln \left(z\right)\right)+y\left(\ln \left(z\right)-\ln \left(x\right)\right)+z\left(\ln \left(x\right)-\ln \left(y\right)\right)}{\left(\ln \left(x\right)-\ln \left(y\right)\right)\left(\ln \left(y\right)-\ln \left(z\right)\right)\left(\ln \left(z\right)-\ln \left(x\right)\right)}}}$.

## Connection to other means

• Arithmetic mean: ${\displaystyle {\frac {L\left(x^{2},y^{2}\right)}{L(x,y)}}={\frac {x+y}{2}}}$
• Geometric mean: ${\displaystyle {\sqrt {\frac {L\left(x,y\right)}{L\left({\frac {1}{x}},{\frac {1}{y}}\right)}}}={\sqrt {xy}}}$
• Harmonic mean: ${\displaystyle {\frac {L\left({\frac {1}{x}},{\frac {1}{y}}\right)}{L\left({\frac {1}{x^{2}}},{\frac {1}{y^{2}}}\right)}}={\frac {2}{{\frac {1}{x}}+{\frac {1}{y}}}}}$