I used the Tag Set Delayed to set
F /: D[F[f_], x_] := F[D[f, x]] It works if I give as input a single F:
D[F[g[x]],x] = F[g'[x]] the result is as expected. However if I insert a linear combination of Fs
D[F[g[x]] + F[h[x]], x] = F'[g[x]]g'[x]+F'[h[x]]h'[x] instead of
D[F[g[x]] + F[h[x]], x] = F[g'[x]] + F[h'[x]] I was expecting the last result since I thought that first the D would distribute on Fs
D[F[g[x]],x] + D[F[h[x]],x] and then my Tag Set Delayed would have applied.
Instead
Defining
d[a_ + b_] := d[a] + d[b]; F/:d[F[g_],x_]:=F[d[g,x]]; I gat the expected result
d[F[g[x]]+F[h[x]],x] = F[d[g[x],x]]+F[d[h[x],x]] Which is what I would like to have with D.
Question
How can I get the same behavior with D?
Fas an operator. ImagineF = Sum. It is linear and a derivative can be moved inside. $\endgroup$F = Sumthere is no contradiction inD[Sum[f[x] , ...], x]. How can I have a similar structure with a genericF? $\endgroup$