# Minimizing bizarre exponential function

I am trying to minimize the function in the form of $f(x) = (1-a^x)^x$ where $0 < a < 1$ with respect to $x$ (for $x > 0$) and I am stuck!

Unfortunately the derivative is not nice enough to use the traditional method of setting it equal to zero.

Some quick plots show that the minimizer should be something around $-1 / \log(a)$ but not exactly that. (Indeed $x^* = - 1 / \log(a)$ is the minimizer of $1 - x a^x$ which approximates $f(x)$ if $a \ll 1$).

I appreciate if you someone can give me hints or ideas about how to minimize such a function?

Cheers,

-
The solution seems to be $x=\log_a \frac12$, though I couldn't tell you how to get there. – Rahul Jan 15 '13 at 13:59
@RahulNarain: Thank you very much for the hint. I guess your answer can be right (at least according to plots) and to get there one may define $u = (1-a^x)$ and observe that $f(u) = u^{\log_a(1-u)}$ is symmetric around $u = 1/2$. (More precisely $f(u) = f(1-u)$) Then if we show this function is convex in $0 < u <1$ we can conclude that $u = 1/2$ is the minimizer. – MBP Jan 15 '13 at 14:13
Oh, neat! You should post that as the answer. P.S. I notice that the symmetry can be made explicit by writing it as $f(u) = a^{\log_a(u)\log_a(1-u)}$. – Rahul Jan 15 '13 at 14:17

The derivative is not nice, but having a clue to the solution helps tame it.

$$\frac{d}{dx} \log{f(x)} = \log{(1-a^x)} - \frac{x a^x}{1-a^x} \log{a}$$

Set the above to zero (because $\log$ is monotonic), and let $x = \log_a{y}$. A little manipulation shows that the equation needed to find the critical point is

$$y \log{y} = (1-y) \log{(1-y)}$$

The equation holds when $y = 1-y$, or $y=1/2$, as pointed out above. You can compute the second derivative of the above to show that this is indeed a minimum at this point.

-

Differentiating, you get $$f'=\left(1-a^x\right)^x \left(\frac{a^x x \log(a)}{a^x-1}+\log(1-a^x)\right)=0$$ Since $a\ne1$, you also have $a^x\ne1$ and you can forget about the prefactor. You're left with $$\frac{a^x \log(a^x)}{a^x-1}+\log(1-a^x)=0\ ,$$ which is better written as $$a^x \log(a^x)-(1-a^x)\log(1-a^x)=0\ .$$ Now define $y\equiv a^x$ and write that as $$y \log(y)=(1-y)\log(1-y)\ .$$ Defining $g(y)=y\log(y)$, you get that you actually need to find a $y$ that satisfies $g(y)=g(1-y)$ and this obviously happens for $y=\frac{1}{2}$, or $$x=\log_a\left(y\right)=\log_a\left(\frac{1}{2}\right)$$. You can convince yourself that the only other solutions to $g(y)=g(1-y)$ are $y=0,1$.

-

One other possible solution (following the suggestions of Rahul) is the following:

Take $u = 1 - a^x$, then $f(u) = u^{\log_a (1-u)} = a^{\log_a(u) \log_a(1-u)}$.

Now take a look at $\phi(u) = \log_a(f(u)) = \log_a(u) \log_a(1-u)$. Since $\log_a(\cdot)$ is convex when $a < 1$, $\phi(u)$ is also convex for $u \in [0,1]$. Furthermore $\phi(u)$ is symmetric around $u = 1/2$, i.e., $\phi(u) = \phi(1-u)$. Then its minimum must be at $u = 1/2$.

This shows that the minimizer of $f(x)$ is indeed $x^* = \log_a(1/2)$.

-