# Solving the functional equation $f(x+y)-f(x)f(y)+g(x)g(y)=0$

As in the title I want to solve the functional equation $$f(x+y)-f(x)f(y)+g(x)g(y)=0 \tag{1}$$ provided that $f,g$ are differentiable for all real values, and that $f$ is an even function.

My attempt:

Using the change of variables $(x,y) \mapsto (-x,-y)$ alongside with the evenness of $f$ gives

$$f(x+y)-f(x)f(y)+g(-x)g(-y)=0$$

Subtracting this from the original equation we find that $$g(x)g(y)=g(-x)g(-y) \tag{2}.$$

There are now two cases.

• $g \equiv 0$. In this case the original equation reduces considerably to the well known $$f(x+y)=f(x)f(y)$$ whose solution is $f \equiv 0$ or $f(x)=\exp(\alpha x)$.

• $g \not \equiv0$. In this case we may find a number $y_0$ such that $g(y_0) \neq 0$. Using Eq. 2 gives $$g(x)=\frac{g(-y_0)}{g(y_0)}g(-x). \tag{3}$$ Replacing $x \mapsto -x$ gives $$g(-x)=\frac{g(-y_0)}{g(y_0)}g(x) \tag{4}.$$ Plugging in (4) into (3) gives $$g(x)=\left( \frac{g(-y_0)}{g(y_0)} \right)^2 g(x),$$ and since $g \not \equiv 0$ we may take $x=y_0$, divide by $g(y_0)$ to find that $$\frac{g(-y_0)}{g(y_0)} = \pm 1.$$ With this information equation (3) tells us that $g$ is either even or odd.

From now on we only discuss the $g \not \equiv 0$ case, so that $g$ has to be either even or odd:

• Suppose $g$ is odd (so that $g(0)=0$) and form the difference quotient (simplified using (1)) $$\frac{f(x+h)-f(x)}{h}=\frac{f(x)f(h)-g(x)g(h)-f(x)}{h}=f(x)\frac{f(h)-1}{h}-g(x)\frac{g(h)-g(0)}{h} .$$ Since both limits $$\lim_{h \to 0} \frac{f(x+h)-f(x)}{h},\lim_{h \to 0}g(x) \frac{g(h)-g(0)}{h}$$ are known to exist, we must have that the limit $$\lim_{h \to 0}f(x) \frac{f(h)-1}{h}$$ exists. There are two cases: Either $f \equiv 0$ (which gives the trivial solution, again), or that $f \not \equiv 0$. In the latter, we find that in order for the limit to exist we must have $f(0)=1$. With $f(0)=1$ at hand, we return to (1) and take $y=-x$ to get $$f(x)^2+g(x)^2=1.$$ This means we may write $$f(x)=\cos \phi(x),g(x)=\sin \phi(x)$$ for some function $\phi$. Equation (1) reduces in that case to $$\cos \phi(x+y)=\cos ( \phi(x)+\phi(y)). \tag{5}$$

This is as far as I can go. Can anyone please see if what I did was right, and also help me finish?

Edit: I have made some more progress on the "g is odd" case:

Using the trigonometric identity for difference of cosines on (5) we find that

$$-2 \sin \left(\frac{\phi(x+y)+\phi(x)+\phi(y)}{2} \right) \sin \left( \frac{\phi(x+y)-\phi(x)-\phi(y)}{2} \right)=0,$$ which leaves us with two options:

$$\frac{\phi(x+y)+\phi(x)+\phi(y)}{2}=\pi k(x,y)$$ or $$\frac{\phi(x+y)-\phi(x)-\phi(y)}{2}=\pi k(x,y)$$

where $k=k(x,y)$ is an integer which at a first sight may depend on $x$ and $y$. However, since in both cases division by $\pi$ exposes $k(x,y)$ as a continuous function, we see that it reduces to a single integer $k_0$ for all values of $x,y$.

Now, in both cases differentiation w.r.t. $x$ followed by another one w.r.t. $y$ gives $$\phi''(x+y)=0$$ so that $\phi(x)=\alpha x+\beta$ is a first degree polynomial. In the first case this gives $\alpha=0,\beta=\frac{2}{3} \pi k_0$, and in the second case $\alpha$ is free, while $\beta=-2 \pi k_0$.

Thus the first case gives the constant solutions $f(x)=\cos \frac{2 \pi k_0}{3},g(x)=\sin \frac{2 \pi k_0}{3}$ (which is not valid for some values of $k_0$...), while the second case gives the more interesting $$f(x)=\cos \alpha x,g(x)=\sin \alpha x .$$

I am still stuck on the case where $g \not \equiv 0$ is even.

Thanks!

• If $g$ is even and $g(0) = 0$, then your argument implies that $f(0) =1$. So with $y=-x$, you get $$f(x)^2 - g(x)^2 = 1$$ So, presumably $$f(x) = \sec(\phi(x)), \text{ and } g(x) = \tan(\phi(x))$$ which does not seem to go anywhere.
• If $a:=g(0) \neq 0$, then you can take $y_0 = 0$, and conclude that $g$ must be even. Also, note that at $x=y=0$, you get $$f(0) - f(0)^2 + a^2 = 0$$ so $b:= f(0) \notin \{0,1\}$.
At $y=0$, the first equation now becomes $$f(x) - bf(x) + ag(x) = 0$$ So $$f(x) = \alpha g(x) \text{ where } \alpha := \frac{a}{b-1}$$ Plugging this back in the first equation should go somewhere, but it's late, and I'm not sure if I am running around in circles. Hope you can salvage this :)