Which $f$ satisfy the equation $\,\,f(x)\,f(y)-f(x+y)=\sin x\,\sin y\,$?

Find all continuous functions $f$ which satisfy the functional equation $$ f(x)\,f(y)-f(x+y)=\sin x\,\sin y, $$ for all $x,y\in\mathbb R$.

I can prove that $f(n\pi)=\cos\left(n\pi\right)$ for all $n\in\mathbb Z$.

First attempt. I have tried to prove that: $$ f\left(\frac{\pi}n\right)=\cos\left(\frac{\pi}n\right),\quad \text{for all}\,\,\, n\in\mathbb Z\smallsetminus\{0\} \tag{1}, $$ but I have failed.

If I prove $(1)$, then the functional equation will be solved completely using the continuity of $f$.

So how do we solve this functional equation?


Solution 1:

Setting $x=y=0$, we obtain that $\,\,f(0)f(0)-f(0)=0$, and thus $\,\,f(0)=0$ or $1$.

If $f(0)=0$, then setting $y=0$, we get $-f(x)=0$, which is a contradiction. Therefore $f(0)=1$.

Set $y=-x$, and get $$ f(x)f(-x)=1-\sin^2 x=\cos^2x. $$ Letting above $x=\pi/2$ we get that $f(\pi/2)=0$ or $f(-\pi/2)=0$, while letting $y=\pi/2$ or $-\pi/2$ in the original relation we get, respectively: $$ -f(x+\pi/2)=\sin x, $$ or $$ -f(x-\pi/2)=-\sin x, $$ which in both cases imply that $$ f(x)=\sin(x+\pi/2)=\cos x. $$

Note. The continuity of the function $f$ has not been used in the proof.

Solution 2:

If you want a much more heavy-handed solution which uses continuity: first show that the function is periodic (easy, using growth at infinity). Then, a periodic function can be expanded (uniquely) in a Fourier series, from which the result follows by equating left and right sides.