Is there a general pattern for working with symbolic sums in Mathematica?
For example here's a derivative I want to compute:
D[Exp[Subscript[λ, α] x]/Sum[Exp[Subscript[λ, β] x],{β, 1, k}], Subscript[λ, α]]
The derivative is with respect to a parameter Subscript[λ, α], and it appears explicitly in the numerator, and implicitly in the denominator due to the sum. Mathematica differentiates the numerator where the parameter is explicitly present, but it misses the fact that the sum over the denominator contains an instance of Subscript[λ, α].
I can hack a solution to this since without loss of generality I could assume that the subscript α takes the value 1 and separate that term from the symbolic sum in the denominator.
But is there a way to represent the sum in the denominator so that Mathematica understands that Subscript[λ, α] is contained in the set Subscript[λ, β]?
appears explicitly in the numerator, and implicitly in the denominator due to the sumI do not see it. The denominator has noSubscript[\[Lambda], \[Alpha]]in it at all. The sum is over beta, not alpha. Here is screen shot of your expression\[Alpha]is a non-negative integer in[1,k], so there is going to be a term in the series in the denominator where\[Alpha]=\[Beta]. – Stripes Plaid Oct 19 '14 at 00:31so there is going to be a term in the series in the denominator where \[Alpha]=\[Beta]This I do not understand at all. You are doing symbolic differentiation? How is Mathematica supposed to know that Alpha and Beta are the same symbol at one point? – Nasser Oct 19 '14 at 00:35\[Alpha]to 1 for example and explicitly code the corresponding term in the denominator and get the right answer. But I'm wondering if there's some way to state the assumption that\[Alpha]is a non-negative integer that is in the same range as the index for the sum which would force Mathematica to differentiate the denominator. – Stripes Plaid Oct 19 '14 at 00:41Subscripts as variable names because they bury the meaning of the actual labels $\alpha$ and $\beta$ too deeply. ReplaceSubscript[lambda][alpha]bylambda[alpha]etc. – Jens Oct 19 '14 at 00:45