Other than for documentational purposes, there's no reason to solve for a function, such as f(x). The important part is what you do with the result of the (symbolic) solution.
Note that f(x) need not be defined before using it in a symbolic solve. It's better when it's not defined.
But you can even 'solve for f(x,y)' if you need a function of more variables.
The symbolic solutions below all cause f to be defined as a function of two variables.
Bottom line: the symbolic solve operation solves for a symbol. Whether that symbol is a simple variable, or a function with parameters doesn't matter. Important is that the symbolic processor can identify it as a symbol. Of course, and as shown, an expression is not a symbol. The symbolic solver cannot solve for expressions. Fotunately the substitute command can be used to substitute a symbol for an expression ...