Hi Johannes,
Mathematica has an excellent documentation:
ReplaceAll (Built-in Wolfram Language Symbol)
expr /. rules applies a rule or list of rules in an attempt to transform each subpart of an expression expr. ReplaceAll[rules] represents an operator form of ReplaceAll that ...
The reason why I did it this way was that x'
is not just a function, but a function acting on a function:
x' // FullForm
(* Out: Derivative[1][x] *)
You can define those properties of x
e.g. like so (i.e. using UpValues
):
x /: Derivative[1][x] = Sin;
or
Derivative[1][x] ^= Sin;
but I can not see how to use this in this context.
Regards -- Henrik