Assuming that you have defined
f[a_, cs_List, ts_List] := cs.Exp[-(ts - a)^2]
setting
dfd2 := D[f[a, {c1, c2, c3}, {t1, t2, t3}], t1]
defines dfd2 without taking into consideration the current value of f. You can inspect the definition of dfd2 by evaluating ?dfd2, which returns exactly what you typed above. Then, whenever dfd2 is evaluated, it looks for any definition associated with the symbol f at that moment in order to manipulate the expression. This means that dfd2 returns
2 c1 Exp[-(a - t1)^2] (a - t1)
You can compare this behavior with that of
immediate = D[f[a, {c1, c2, c3}, {t1, t2, t3}], t1]
Check the expression returned by ?immediate. You'll see that, while in the definition of dfd2 the expression f[___] is kept in an unevaluated form, in immediate the right hand side is simplified at definition time.
Among other things, this means that if you redefine f, as with Clear[f]; f[___] := 0, dfd2 will evaluate to 0, reflecting the change in f, while immediate will remain unmodified. This, again, is because f does not appear in the definition of immediate, which you can check through ?immediate.
ClearAll[f, d, x]; d := D[f, x];then evaluated. Now definef = Sin[x]then evaluatedagain. Because of the delayed definition you can redefinefas many times as you would like anddwill always resolve it. – mfvonh Aug 09 '15 at 20:49Hold, etc. See here. – mfvonh Aug 09 '15 at 20:52dfdtkeepsfas is in the RHS, then computes the derivative (and in doing so, resolvesfat that exact moment) each time you "call" it (clearer to say "evaluate" in Mathematica) – mfvonh Aug 10 '15 at 16:04Btw, I also tried putting
– Charlie Parker Aug 10 '15 at 16:54Unevaluated[dfd2]and it didn't quite work either. Not sure, if I still have a misconception. Is it just impossible to displayDin the tree form of an expression?TreeForm[Unevaluated[d]]in your example, it doesn't show the derivative in the tree diagram :/ – Charlie Parker Aug 10 '15 at 16:55Unevaluatedpays off. To quote, Unevaluated works only where it appears; it is not propagated:. On the other hand,Holdhelps. CompareTreeForm[D[f,x]]andTreeForm[Hold[D[f,x]]]. Also, note the mention ofUnevaluatedsuppressing evaluation when it's an argument to a function. Try alsoTreeForm[somehead[Unevaluated[D[f,x]]]]– LLlAMnYP Aug 10 '15 at 17:15TreeForm@Inactivate[D[f[a, {t1, t2, t3}, {c1, c2, c3}], c1], D] /. Inactive[D] -> "D". Is that what you want? – m_goldberg Aug 10 '15 at 17:35