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)$ 
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.
 A: Let $P(x,y)$ be the property that $f(\tfrac{x}{y}) = f(x)+f(y)-f(x)f(y)$. 
$P(1,1)$ yields $f(1) = 2f(1)-f(1)^2$, and so, either $f(1) = 1$ or $f(1) = 0$. 
If $f(1) = 1$, then $P(x,1)$ yields $f(x) = f(x)+f(1)-f(x)f(1)$, which simplifies to $f(x) = 1$ for all $x \in \mathbb{R}^+$. 
Now, suppose instead $f(1) = 0$. 
$P(x,x)$ yields $f(1) = 2f(x)-f(x)^2$, which gives us that $2f(x)-f(x)^2 = 0$ for all $x \in \mathbb{R}^+$.
$P(1,x)$ yields $f(\tfrac{1}{x}) = f(1)+f(x)-f(1)f(x)$, which simplifies to $f(\tfrac{1}{x}) = f(x)$ for all $x \in \mathbb{R}^+$. 
Finally, $P(\sqrt{x},\tfrac{1}{\sqrt{x}})$ yields $f(x) = f(\sqrt{x})+f(\tfrac{1}{\sqrt{x}})-f(\sqrt{x})f(\tfrac{1}{\sqrt{x}}) = 2f(\sqrt{x})-f(\sqrt{x})^2 = 0$ for all $x \in \mathbb{R}^+$. 
Hence, the only solutions are $f(x) = 0$ for all $x \in \mathbb{R}^+$ and $f(x) = 1$ for all $x \in \mathbb{R}^+$.
A: None of these functions are very interesting. Let $x=y$. Then $$f(1)=2f(x)-f(x)^2.$$ Solving this quadratic, we have that $$f(x)=1\pm\sqrt{1-f(1)}.$$ Thus, $f$, whatever it is, is constant. To find the constant, $$f(1)=1\pm\sqrt{1-f(1)}$$
$$f(1)^2-2f(1)+1=1-f(1)$$
$$f(1)^2-f(1)=0$$
$$f(1)=0\text{ or }f(1)=1.$$
Thus, $f(x)=0$ and $f(x)=1$ are the only two continuous solutions.
A: 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}$.
A: There are two approaches to problems like this that I know. One is to recognize some $f$ that meets the requirement and then prove that is the only one.  I don't see one offhand, but maybe somebody will. The other is to try special values for the variables and see what you learn.  For example, let $y=1$, then $f(x)=f(x)+f(1)-f(x)f(1)$ or $0=f(1)(1-f(x))$
