I have the expression:
$$ p_i = \frac{e^{x_i}}{\sum_{j=1}^{n} e^{x_j}} $$
which I defined with the following Mathematica code:
Subscript[p, i] = E^Subscript[x, i] / Sum[E^Subscript[x, j], {j, 1, n}]
I tried to take the derivative with respect to an $x_i$:
D[Subscript[p, i], Subscript[x,i]]
but, I just get the expression back as the result:
$$ \frac{e^{x_i}}{\sum_{j=1}^{n} e^{x_j}} $$
Obviously, I am doing something wrong. How should I go about working with this type of expression?
Comments
Post a Comment