Find all functions $f:\mathbb R^+\to\mathbb R$ such that $$f\left(\frac x y\right)=f(x)+f(y)-f(x)f(y)$$ for all $x,y\in\mathbb R^+$. Here, $\mathbb R^+$ denotes the set of all positive real numbers.
I really couldn't solve it. Any help?
This question is from IMO Competition, 2015 day 1, first problem.
Small Hint :Let $y=1$. $f(x)=f(x)+f(1)-f(x)f(1)$. So if $f$ does not vanish at $1$,then $f$ is the constant function $1$. Edited later: If $f$ vanishes at $1$, then pluging in $x=y$, you can get $2f(x)=f(x)^{2}$.