Why index notation of summation changes during derivative in chain rule

chain rulederivativespartial derivativesummation

I am trying to understand a derivative example from a class note. As shown in the picture, it's working out the derivative of a $log(exp())$ function with respect to $V_c$. When applying the chain rule, the index of summation $\sum\limits_{w=1}^V$ changed from $w$ to $x$ and the note says "Important to change index". I'm a bit confused why we have to change the index. Thanks.
Picture to the example

Best Answer

It's not apparent from that image alone why it should be important to change the index. My guess would be that they later go on to write this as

$$\sum_{x=1}^Va_xu_x$$

with weights

$$ a_x=\frac{\exp\left(u_x^\top V_c\right)}{\sum_{w=1}^V\exp\left(u_w^\top V_c\right)}\;, $$

and in that case, when the index is no longer just a bound summation index but appears as a free variable, it's important not to use the same letter for it as for a summation index in the same expression. As long as you just have two summations in the same expression and they're not nested, it's not a problem if they use the same summation index.

Related Question