I have to differentiate the following function and evaluate it at $x =1$ (so I search for $f'(1)$)
$f(x) = Var[ln(x*A + (1-x) * B)], \space \space \space x \in (0,1)$, A and B are two i.i.d. random variables.
Honestly, I have no idea what to do here exactly.
My first attempt was to rewrite it as a function of the expectation $E$ :
$ f(x) = E[(ln(x*A + (1-x) * B)^2] - (E[ln(x*A + (1-x) * B)])^2 =: E[g(x)] - (E[h(x)])^2$
Building the derivatives of g(x) and h(x) (which I am not sure about their correctness, please check):
$ g'(x) = \frac{2*(A-B)*(ln(x*A + (1-x) * B))}{x*A + (1-x)*B}, h'(x) = \frac{A-B}{x*A+(1-x)*B}$
Now follows the part I mainly struggle with, how to deal with the $E$ and the $(E(...))^2$ part? My initial guess would be:
$f'(x) = E[g'(x)] - (E[h'x])^2$
Plugging in $x=1$:
$f'(1) = E[\frac{2*(A-B)*ln(A)}{A}] - (E[\frac{A-B}{A}])^2$
The solution at which I should (but do not) arrive at is the following: $f'(1) = 2*E[B] * (-E[e^{-C}*C] + E[e^{-C}] * E[C])$ ,with $\space C:= ln A$
I think you may have forgotten the chain rule with a few of the derivatives. We should have \begin{align*} g'(x) &= 2 \ln(x*A + (1-x)*B) \frac{A - B}{x*A+(1-x)*B}\end{align*} and $$ f'(x) = \mathbb{E}[g'(x)] - 2* \mathbb{E}[h(x)] *\mathbb{E}[h'(x)], $$ at least assuming that you can interchange the derivative and expectation. This requires that $\mathbb{P}(A = 0) = 0$, which you also need for $f$ to be well-defined so not much of an extra assumption.