I don't know how to do this. Could you try re-defining f in the first place, without using mu as a variable but instead using the expression you've given?