Thank you for the reply. It shows that the substitution works in Wolfram, but I have not yet bought the programme, instead I am trying to do this calculation on the single-line input of the Wolframalpha website:
http://www.wolframalpha.com/
(here with our input: http://www.wolframalpha.com/input/?i=2*f[x]+where+f[x]%3A%3DSin[x])
Here only one line of command is possible and thus the function assignment is not as easy as with the multi-line input in the full version. However, there is also the possibility of assignment with the "where" keyword (maybe a different command is better) as you see in my example N°1 and N°3 above. But it works only for some inputs and I am wondering why it does not work for all imputs like in my second example. I think the interpretation of the input is straightforward, but somehow it is not understood by Wolframalpha.
This is very surprising to me for such an easy input, because usually Wolframalpha understands more complicated input e.g. in unit transformations.
Can anyone help me with some correct input syntax to make things like "(df/dx)+1 where f=sin(x)" work in Wolframalpha?