# FormalExponential [duplicate]

I defined an expression like

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


I would like to compute

D[e,t[3]]


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)?

• Since it will not expand, use iterator until it expands and try to differentiate it 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!}}$

• 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
– MaPo
Jan 26 '17 at 14:26
• Use Subscript instead of t (e.g. Subscript /: D[Subscript[t, i_], Subscript[t,j_], NonConstants->{Subscript}] := KroneckerDelta[i,j]` Jan 26 '17 at 15:04