I'm fairly familiar with basic Mathematica, but some of its more advanced syntax (especially certain special characters) eludes me.
In the Scope section in the documentation of Collect, there's this curious bit at the end:
D[f[Sqrt[x^2 + 1]], {x, 3}];
Collect[%, Derivative[_][f][_], Together]
I understand that _ indicates any valid expression — it's essentially Mathematica's wildcard character.
In the above example, what do each of the blanks correspond to, syntactically?
I'm guessing the first blank indicates "collect terms of any order derivative", so the first blank corresponds to derivative order. If so, what about the second blank?
Along the same lines, why is there the third argument ([_]) at all? Shouldn't Derivative only have two bracketed arguments, the first indicating the set of derivative orders and the second indicating the function?
Derivative[n][f]. As a concrete example:Derivative[2][Sin][x]is the same as-Sin[x]. – J. M.'s missing motivation Jun 26 '15 at 20:58