I defined an expression like

e=Exp[Sum[t[s]/s! x^s,{s,∞}]]

I would like to compute


for instance. Of course Mathematica gives me zero because it doesn't expand the series. Is there an elegant way to get the result (which in this case is trivial to get by hands)?

  • $\begingroup$ Since it will not expand, use iterator until it expands and try to differentiate it $\endgroup$
    – no-one
    Jan 26 '17 at 1:50

Perhaps something along these lines might work for you:

t /: D[t[i_], t[j_], NonConstants->{t}] := KroneckerDelta[i,j];

D[Exp[Sum[t[s]/s! x^s,{s, Infinity}]], t[3], NonConstants->{t}]//TeXForm

$\frac{1}{6} x^3 e^{\sum _s^{\infty } \frac{t(s) x^s}{s!}}$

  • $\begingroup$ How can I modify the code if instead of t[s] I want to use subscritpt ie: `Subscript[t,s]'? In this case the s sit in a deeper level and TagSet doesn't seem to work $\endgroup$
    – MaPo
    Jan 26 '17 at 14:26
  • $\begingroup$ Use Subscript instead of t (e.g. Subscript /: D[Subscript[t, i_], Subscript[t,j_], NonConstants->{Subscript}] := KroneckerDelta[i,j] $\endgroup$
    – Carl Woll
    Jan 26 '17 at 15:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.