# is the following a decreasing function?

I am stuck on figuring out why the following function is a decreasing function when I read a paper. The function is following $$f(x)=-\frac{1}{x}\log[{pe^{-ax}+(1-p)e^{-bx}}]$$ where $a$ and $b$ are two arbitrary non-zero constants (can be negative or positive), but $a$ is not equal to $b$ and $p \in(0,1)$. I am stuck on figuring out why $f(x)$ is globally decreasing in $x \in R$ for any choice of $a, b$.

I find the first derivative as follows, for any $a, b$. $$f'(x)=\frac{1}{x^2}\log[{pe^{-ax}+(1-p)e^{-bx}}]+\frac{1}{x}\frac{ape^{-ax}+b(1-p)e^{-bx}}{{pe^{-ax}+(1-p)e^{-bx}}}$$ But then I get stuck, how to show it's negative for all $x \in R$? I use mathematica to plot this function, and it is indeed decreasing in $x$, but I can't proceed further on how to show this analytically

Any hint or help is extremely appreciated!

Edited: To make thing more interesting..in fact I am considering the case $a$ is not equal to $b$ and $p$ is interior in (0,1)..

• This is false when $a=b$ -- the function is constant then. Dec 3, 2013 at 3:07
• @IgorRivin Thank you for pointing out, but I think I am considering the case $a$ is not equal to $b$ Dec 3, 2013 at 3:11
• $qe^{-ax} + re^{-bx}$ is decreasing. What about $(qe^{-ax} + re^{-bx})^{1/x}$ Can you show it is increasing? Then so is log $(qe^{-ax} + re^{-bx})^{1/x}$ and its negative will be decreasing. Dec 3, 2013 at 4:20
• @BettyMock Thanks for the help, from your advise, I find that to show $(qe^{-ax}+re^{-bx})^{\frac{1}{x}}$ is increasing, the first derivative tells me it's enough to show $\log(qe^{-ax}+re^{-bx})$ is negative, but don't know how to deal with this Dec 3, 2013 at 4:49
• @BettyMock One can't say $pe^{-ax}+(1-p)e^{-bx}$ is decreasing without some assumption such as $a,b>0$ which OP doesn't assume, and also doesn't seem to be required for $f(x)$ to wind up decreasing. Dec 3, 2013 at 21:15

This answer is added to the others mainly because its methods are different, and (at least to me) make the argument less involved. Working with the derivative of the original function is difficult because of the presence of a log term added to a rational term. I hope that someone finds this approach interesting, if only as a variant one. First note that, since we wish to show the inequality of the OP holds for all real $a \neq b$, we'll use $a,b$ rather than the $-a,-b$ in front of the $x$ in the two exponentials. We will also drop the initial minus sign in front of the whole function, and then the OP function is decreasing iff our altered function is increasing. These adjustments just make the algebra go smoother and don't affect the argument. Let $f(x)$ be denoted referring to its parameters as $$f(p,a,b,x)=\frac{1}{x} \log(p e^{ax}+(1-p)e^{bx}).$$ Note that then $f(p,a,b,x)=f(1-p,b,a,x).$ Thus we may assume that $a>b$ since if this is not so we may replace $p$ by $1-p$ and interchange the letters $a,b.$ Let $k=a-b>0.$ Then $a=b+k$ and using $e^{ax}=e^{bx}e^{kx}$ we arrive at a form similar to that used in other posts: $$f(x)=b+ \frac{1}{x} \log(pe^{kx}+1-p).$$ Now let $t=kx$ and note that since $k>0$ we have $t$ increases with $x$, and then from the above, after dropping the initial added constant $b$ and rewriting the initial fraction as $k\cdot \frac{1}{kx},$ and also dropping the initial positive factor $k$, we see that $f(x)$ will be increasing iff $g(t)$ is increasing, where $$g(t)=\frac{1}{t} \log(p e^t +1-p).$$ [Note that in the parameter notation this is $f(p,1,0,t)$, so that so far we've just reduced the problem to a particular case.]

Note that as it stands $g(0)$ is not defined; however L'Hopital shows the limit as $t \to 0$ of $g(t)$ is the parameter $p$. And note also for later that $g$ is analytic on $\mathbb{R} \setminus \{ 0 \} .$

Now $g(t)$ has the properties that $0 < g(t) < 1$ and that $g(t) \to 0$ as $t \to -\infty$ and $g(t) \to 1$ as $t \to \infty.$ These properties are simple to show, and I'll add details if anyone asks. In particular the range of $g$ is the open interval $(0,1).$

MAIN CLAIM: $g'(t) \ge 0$ for all $t.$

Otherwise choose a fixed $t_1$ at which $g'(t_1)<0.$ Then one can choose points $a,b$ near $t_1$ for which $a<t_1<b$ and also $f(a)>f(t_1)>f(b).$ Now since $g$ is continuous on $(-\infty,a]$ and goes to $0$ at $-\infty$, there is by the intermediate value theorem some point $t_0<a$ for which $g(t_0)=g(t_1).$ Similarly, since $g$ goes to $1$ at $+\infty$ there is some point $t_2>b$ for which $g(t_2)=g(t_1).$ So from the assumption that $g'(t_1)<0$, we have produced three points $t_0<t_1<t_2$ at each of which $g$ has the same value, say $a$, i.e. $$g(t_0)=g(t_1)=g(t_2)=a.$$ Now assuming $t\neq 0$ we may take the equation $g(t)=a,$ multiply through by $t$ and expontiate, and obtain the equivalent equation $w(t)=0$ where $$w(t)=pe^t+1-p-e^{at}.$$ Note that if $t=0$ then $w(0)=0$ holds no matter what the values of $p,a$ are. From the above, viewing $a$ as the constant common value of the $g(t_j),$ we see that $w(t)=a$ has the three distinct solutions $t_0<t_1<t_2$. So by Rolle's theorem there are two distinct values $t_a,t_b$, one in each open interval $(t_0,t_1)$ and $(t_1,t_2)$, where $w'(t_a)=w'(t_b)=0.$ But calculating $w'$ gives $$w'(t)=pe^t-ae^{at}$$ so that $w'(t)=0$ implies $pe^t=ae^{at}$, then $e^{t-at}=a/p$, so that $e^{(1-a)t}=a/p$ which has only one solution, since the constant $1-a$ is not zero (recall $0<a<1$). Thus $w'(t)=0$ does not have two distinct solutions, contradicting the two solutions guaranteed above using Rolle's theorem. This completes our argument for the main claim.

Now that we know $f'(t)\ge 0$ it only remains to show that in fact $f$ is strictly increasing. But this follows from $f' \ge 0$ by the fact that $f$ is analytic except at $0$, because an analytic nonconstant function cannot be zero at every point in an open interval.

• Your initial simplification of the problem reduced a whole lot of computational effort. And in the later part you have done a further simplification by getting rid of log function itself. This makes the analysis of zeroes of $w(t) = c$ reasonably easy. +1 for a very simple (although non-obvious) solution. Dec 7, 2013 at 5:04
• @ParamanandSingh -- Yes I thought that, though involved to set it up, the final few steps did not need any complicated derivatives. (Also it was $w(t)=a$ in the notation, I had $c$ in there at one place but it was a typo, now fixed.) Dec 7, 2013 at 14:33

$f(x)=-\frac{1}{x}\log({pe^{-ax}+(1-p)e^{-bx}})=\log[({pe^{-ax}+(1-p)e^{-bx}})^{-\frac{1}{x}}]$

observe that f(x) is increasing (resp decreasing) iff $g(x)=({pe^{-ax}+(1-p)e^{-bx}})^{-\frac{1}{x}}$ is increasing ( resp decreasing).

claim: if $a>b$ f is globally decreasing: proof:

let: $h(x)=\frac{1}{x}log(\frac{1}{(p+(1-p)e^{(a-b)x})})$ $h(x)$ is a globally decreasing function regardless of the values of a,b and p and i wil explain why at the end of this proof. let's assume this fact for now and later on we will see the justification. now let $x<y$ then: $h(y)<h(x)$

then $\frac{1}{y}\log(\frac{1}{(p+(1-p)e^{(a-b)y})})<\frac{1}{x}log(\frac{1}{(p+(1-p)e^{(a-b)x})})$ thus:

$\log(\frac{1}{(p+(1-p)e^{(a-b)y})})^{\frac{1}{y}}<\log(\frac{1}{(p+(1-p)e^{(a-b)x})})^{\frac{1}{x}}$ hence

$(p+(1-p)e^{(a-b)y})^{\frac{-1}{y}}<(p+(1-p)e^{(a-b)x})^{\frac{-1}{x}}$ now multiply both sides by $e^{a}$ and end up with :

$(e^{-ay}(p+(1-p)e^{(a-b)y}))^{\frac{-1}{y}}<(e^{-ax}(p+(1-p)e^{(a-b)x}))^{\frac{-1}{x}}$

that is

$({pe^{-ay}+(1-p)e^{-by}})^{-\frac{1}{y}}<({pe^{-ax}+(1-p)e^{-bx}})^{-\frac{1}{x}}$

which implies that g(x) is decreasing and consequently f(x) is decreasing.

to show that h(x) is globally decreasing:

let $Z(x)=p+(1-p)e^{(a-b)x}$ then $h(x)=-\frac{1}{x}log(Z(x))$

$h^{'}(x)=\frac{1}{x^2}(log(Z(x)-x\frac{Z^{'}(x)}{Z(x)})$ then the sign of $h^{'}$ is the same as the sign of $L(x)=log(Z(x)-x\frac{Z^{'}(x)}{Z(x)}$ from here it is easy to show that L(x) (by studying its derivative) is increasing when x<0 and decreasing when x>0 where L(x) is taking a finite limit at x=0 ( which i believe is zero )therefore L(x) is always below (or equal to zero) and the same follows for $h^{'}$ which implies finally that h is decreasing.

Now for the case b>a we will consider another function:$\frac{1}{x}log(\frac{1}{(pe^{(b-a)x}+(1-p)})$ which is just the same as h(x), use the same technique used above and prove that f is decreasing.

• When $a=2,b=1,p=0.4$ look at the graph of $f(x)$ via any graphing device. It is decreasing for all reals, and here $a>b$ [so this goes against your claim it should increase when $x<0$ Dec 4, 2013 at 13:09
• thanks a lot coffemath for pointing that out . i will provide the proof later on today. when $x<0$ the inequality changes twice. Dec 4, 2013 at 18:42
• @toufic_kh.17 Of course there is also the third case where $x<0<y$, though it might be trivial. Interesting how many gyrations are needed to get the inequality to work out, and I for one hope to see the other cases done so this inequality can finally be shown to hold for any $p,a,b$. And +1... Dec 5, 2013 at 2:12
• In the step between the line starting "and" and the line starting "then": In one line you have something of the form $\log A<\log B$ and you can show that both of these logs are negative numbers. Then to get the next line you proceed to multiply the first by $1/y$ and the second by $1/x$, and presumably use that $1/y<1/x$ [true here]. But this is not (without further information) a valid inequality step. That is, from $u<v<0$ and $0<a<b$ it does not necessarily follow that $au<bv$, as one can see by cooking up examples. Something more specific is needed about how the terms interact. Dec 5, 2013 at 5:22
• @coffeemath thanks a lot for the excellent observations . i hope you approve the approach i used to avoid the issue. Dec 8, 2013 at 8:27

Let $b=a+\epsilon$ With a little bit of algebra: $$f(x)=-\frac{1}{x} \log[pe^{-ax}+(1-p)e^{-(a+\epsilon)x}]$$

$$=-\frac{1}{x} \log[e^{-ax}(p+(1-p)e^{-\epsilon x})]$$ $$=-\frac{1}{x} \log[e^{-ax}\exp[\ln[(p+(1-p)e^{-\epsilon x})]]]$$ $$=-\frac{1}{x} \{\log[e^{-ax}]+\log[\exp[\log[(p+(1-p)e^{-\epsilon x})]]]\}$$ $$=a-x^{-1}\log[p+(1-p)e^{-\epsilon x}]$$

$$f'(x) = \frac{[(\epsilon(p-1)x+[p(-e^{\epsilon x}+p-1]\log(p-(p-1)e^{-\epsilon x}))]}{x^2[p(e^{\epsilon x})-1]+1}$$ After some careful calculations.

Then choose $\epsilon=-1$ and $p=0.0001\neq 0$ and evaluate at $x=1$, you will find evaluate $f'(x=1;\epsilon=-1,p=0.0001) = 0.718228>0$ this of course shows that the function is not strictly decreasing because the derivative is positive at this point. There are other points you may evaluate yourself if you want.

• @Squrtle Thanks for the reply but I am confused with third line, should that be $$-\frac{1}{x}\log[e^{-ax}(p+(1-p)e^{-\epsilon x})]=a-\frac{1}{x}\log(p+(1-p)e^{-\epsilon x})$$ Dec 3, 2013 at 5:14
• Typo!Thanks for spotting it.... I left out the - sign Dec 3, 2013 at 5:16
• Sorry for all the edits..... I am final on it now! Dec 3, 2013 at 5:31
• Thank you so much for your help and effort, really appreciate it, but still, I am not clear if the third line is should be like the way it is in my first comment...also I am interested in the cases, in fact, $p$ cannot be equal to either 0 or 1... Dec 3, 2013 at 5:37
• thanks but still obviously $\log(ab)$ is not equal to $(\log(a))b$, so the third line still missing log in front of $(p+(1-p)e^{-\epsilon x})$ Dec 3, 2013 at 5:47