Derivative of log $x_i$ inside a $\log \sum$ of $x$

316 Views Asked by At

I'm trying to differentiate the following:

$\frac{\delta}{\delta \log x_m} \log \sum_{m=1}^M x_m^k \, f(y_m)$

So we only care about a particular index of $x$, and $k$ is a constant. I'm stumped at how to take the derivative of $\log x_m$. Since I can't push the $\log$ inside the sum, how can I even obtain $\log x_m$? I thought maybe the chain rule could apply here, but it's not obvious to me how that would work in this instance either.

1

There are 1 best solutions below

1
On BEST ANSWER

You can write $x_j^k=(e^{\log(x_j)})^k=e^{k\log(x_j)}$, so that $$ \frac{\partial}{\partial\log(x_i)}e^{k\log(x_j)} = \delta_{ij}ke^{k\log(x_j)} = \delta_{ij}kx_j^k. $$ If you change your summation index from $m$ to $j$ for clarity, you get $$ \begin{split} &\frac{\partial}{\partial \log x_m} \log\left(\sum_{j=1}^M x_j^k \, f(y_j)\right) \\=& \frac{\frac{\partial}{\partial \log x_m}\sum_{j=1}^M x_j^k \, f(y_j)}{\sum_{j=1}^M x_j^k \, f(y_j)} \\=& \frac{kx_m^k \, f(y_j)}{\sum_{j=1}^M x_j^k \, f(y_j)} \end{split} $$ if everything is positive so the logarithms make sense.