2

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

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
MaPo
  • 909
  • 4
  • 14

1 Answers1

3

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!}}$

Carl Woll
  • 130,679
  • 6
  • 243
  • 355
  • 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] – Carl Woll Jan 26 '17 at 15:04