Linear functions versus Logarithmic and Exponential functions

287 Views Asked by At

If a function is linear, I know that this should be true:

$$ {f(x_2)-f(x_1)}={f(\bar x)} $$

Where $\bar x$ is the point exactly in between $x_1$ and $x_2$. Now, I know from looking at their graphs that the same shouldn't be true for logarithmic and exponential functions. That is, for logarithmic functions:

$$ {f(x_2)-f(x_1)}<{f(\bar x)} $$

And for exponential functions:

$$ {f(x_2)-f(x_1)}>{f(\bar x)} $$

I'm not a mathematician by formation, but I feel like it should be possible to prove this without having to look at their graph. Does anyone know how to do this?

2

There are 2 best solutions below

2
On BEST ANSWER

Your statements are hinting at something called convexity; however, your notation is a bit off: as it is now, the statements don't hold even for simple cases. I'm going to assume that you intended to talk about convexity and answer myself :)

A function is said to be convex if, for any two points $x$ and $y$ and any $\lambda\in [0,1]$, then $$ f(\lambda x + (1-\lambda)y) \leq \lambda f(x) + (1-\lambda)f(y).$$ Note, in particular, that this means that the value of the function at the midpoint of $x$ and $y$ is smaller than the midpoint of the values of the function at $x$ and $y$: $$ f\left(\frac{x+y}{2}\right) \leq \frac{f(x) + f(y)}{2}.$$

If a function is not convex it may be concave, if $$ f(\lambda x + (1-\lambda)y) \geq \lambda f(x) + (1-\lambda)f(y).$$

If a function is both convex and concave, then it is linear. Note that there are functions that are neither convex nor concave!

In the examples you allude to, we have that the linear function is (clearly) linear, so $$ f(\lambda x + (1-\lambda)y) = \lambda f(x) + (1-\lambda)f(y).$$

Let's look at the exponential function $f(x) = \mathrm{e}^x$; this is a convex function, so in this case we would have $$ \mathrm{e}^{\lambda x + (1-\lambda)y} \leq \lambda \mathrm{e}^x + (1-\lambda)\mathrm{e}^y.$$

The general proof requires derivatives and Taylor expansions; however, for the midpoint, the proof is very easy. In this case we have to prove that $$ \mathrm{e}^{\frac{x+y}{2}} \leq \frac{\mathrm{e}^x + \mathrm{e}^y}{2},$$ for all $x$ and $y$. Consider the following steps $$ \mathrm{e}^{\frac{x+y}{2}} \leq \frac{\mathrm{e}^x + \mathrm{e}^y}{2}$$ $$ 2\mathrm{e}^{\frac{x+y}{2}} \leq \mathrm{e}^x + \mathrm{e}^y$$ $$ 2\mathrm{e}^{x/2}\mathrm{e}^{y/2} \leq \mathrm{e}^x + \mathrm{e}^y$$ $$ 0 \leq \mathrm{e}^x - 2 \mathrm{e}^{x/2}\mathrm{e}^{y/2} + \mathrm{e}^y$$ $$ 0 \leq \left(\mathrm{e}^{x/2} - \mathrm{e}^{y/2}\right)^2$$ Note that the right hand side is a square, so the inequality holds for all $x$ and $y$!

The logarithm function, on the other hand, is concave, so the reverse inequality holds: for all positive $x$ and $y$, $$\log\left(\frac{x+y}{2}\right) \geq \frac{\log(x) + \log(y)}{2}.$$ We can easily prove this with the following chain of inequalities: $$\log\left(\frac{x+y}{2}\right) \geq \frac{\log(x) + \log(y)}{2}$$ $$\frac{x+y}{2} \geq \exp\left(\frac{\log(x) + \log(y)}{2}\right)$$ $$\frac{x+y}{2} \geq \exp\left(\frac{\log(x)}{2}\right)\exp\left(\frac{\log(y)}{2}\right)$$ $$\frac{x+y}{2} \geq \exp\left(\log(\sqrt{x})\right)\exp\left(\log(\sqrt{y})\right)$$ $$\frac{x+y}{2} \geq \sqrt{x}\sqrt{y}$$ $$x+y \geq 2\sqrt{x}\sqrt{y}$$ $$x+y - 2\sqrt{x}\sqrt{y} \geq 0$$ $$\left(\sqrt{x} - \sqrt{y}\right)^2 \geq 0,$$ which, again, is true for all (positive) $x$ and $y$!

3
On

If $f(x) = ax + b$ for some $a, b, \in \mathbb{R}\,/\,\{0\}$ then \begin{align} f(x_2) - f(x_1) &=ax_1 + b - ax_2 -b \\ &= a(x_2 - x_1) \end{align} Now, you write

$\bar{x}$ is the point exactly in between $x_1$ and $x_2$.

Which means $$\bar{x} = \frac{x_2 - x_1}{2}$$

Where, wlog, $x_2 > x_1$.

Now \begin{align} f(\bar{x}) &= a \left( \frac{x_2 - x_1}{2} \right) + b \\ &= \frac{a}{2}(x_2 - x_1) + b\\ &\neq f(x_2)-f(x_1) \end{align}