# argmax of integral under log transformation

I am trying the find $x^*$ defined as: $$x^* = argmax_x \int f(x,y)p(y)dy$$ where $f(x,y)$ can be an arbitrary positive function and $p(y)$ is a probability density.

Does the location of $x^*$ hold true under a log transformation of $f$? Specifically, does the previous equation imply: $$x^* = argmax_x \int log \{f(x,y)\} p(y)dy$$

I doubt that this is true, because of the $p(y)$ term in the integral, but I can't quite pin down why not. A formal proof is not necessary - some intuitive explanation (or counterexample) would suffice.

• $\log(f(x, y))$ needs not be integrable to begin with. – user251257 Feb 16 '16 at 1:17
• True, but in this case lets assume that the log transformed integrand has an analytical solution (which is one of the reasons we want to do a log transform), while the original formulation may or may not have one. – Supratik Paul Feb 16 '16 at 11:51

On $[\frac12, 1]^2$ let $f(x,y) = y$ for $\frac12\le y \le x \le 1$, $f(x,y) = 0$ else. Let $p(y) = 2$ for $\frac12\le y \le 1$. Then, we have $$g(x) := \int_{1/2}^1 f(x, y) p(y) dy = 2\int_{1/2}^x \underbrace{y}_{\ge 0}\, dy$$ and $\operatorname{argmax} g = 1$. On other hand, we have $$h(x) := \int_{1/2}^1 \log(f(x,y)) p(y) dy = 2\int_{1/2}^x \underbrace{\log(y)}_{\le 0} dy$$ and thus $\operatorname{argmax} h = \frac{1}{2}$.