Functional equations leading to sine and cosine

This question is a possibly harder version of: Find $g'(x)$ at $x=0$.

Question. Let $f,g :\mathbb R\to\mathbb R$, such that
\begin{align}
f(x-y)=f(x)\, g(y)-f(y)\, g(x), \tag{1}\\
g(x-y)=g(x)\, g(y)+f(x)\, f(y), \tag{2}
\end{align}
for all $x,y \in \mathbb{R}$. If $g$ is continuous at $x=0$ and not identically zero, then there exists an $\alpha\in\mathbb R$, such
$$f(x)=\sin \alpha x\quad\text{and}\quad g(x)=\cos \alpha x.$$
Is there a pair of discontinuous $f$ and $g$ satisfying $(1)$ and $(2)$
?

Update. If $\ell :\mathbb R\to\mathbb R$ is a linear functional over $\mathbb Q$ (i.e., $\ell(qx+ry)=q\ell(x)+r\ell(y)$, for all $x,y\in\mathbb R$ and $q,r\in\mathbb Q$), then
$$\sin\big(\ell(x)\big), \quad \cos\big(\ell(x)\big),$$
satisfy $(1)$ and $(2)$. Discontinuous such functionals do exist, and they are obtainable
using Zorn’s Lemma (equivalently the Axiom of Choice.) This takes care of the second question.

Solutions Collecting From Web of "Functional equations leading to sine and cosine"

Since $f(0)=0$ and $g(0)=1$, we also have $f(-y)=-f(y)$ and
\begin{align}
f(x+y)=f(x)g(y)+f(y)g(x),\\
g(x+y)=g(x)g(y)-f(x)f(y).
\end{align}

Set $\psi(x)=g(x)+if(x)$. Then
\begin{align}
\psi(x+y)=g(x+y)+if(x+y)
&=g(x)g(y)-f(x)f(y)+i(f(x)g(y)+f(y)g(x))\\[1ex]
&=(g(x)+if(x))(g(y)+if(y))\\[1ex]
&=\psi(x)\psi(y)
\end{align}
Thus $\psi$ is a homomorphism of the additive group $\mathbb{R}$ into the multiplicative group $\mathbb{C}\setminus\{0\}$. Conversely, any homomorphism from $\mathbb{R}$ to the multiplicative group $\mathbb{C}\setminus\{0\}$ provides a solution to the functional equations we’re dealing with, by taking the real and imaginary parts for $g$ and $f$ respectively.

Let $\varphi\colon\mathbb{C}\to\mathbb{C}$ be a field automorphism. Consider the map
$$\psi\colon\mathbb{R}\to\mathbb{C},\qquad \psi(x)=\varphi(e^x).$$
Then $\psi$ is a homomorphism of the additive group of $\mathbb{R}$ into the group $\mathbb{C}\setminus\{0\}$.

Let’s take as $\varphi$ an automorphism that doesn’t send the reals into the reals; the existence of such automorphisms was first proved as a consequence of Steinitz’s theorem by Segre (Atti dell’Accademia dei Lincei, 1947). Of course, this requires the axiom of choice. Basically, an automorphism is defined by an arbitrary permutation of a transcendency basis of $\mathbb{C}$ over $\mathbb{Q}$. It’s sufficient to send a real element (we can always assume one is present, say $e$) into a non real one (which of course must exist).

By Theorem 2 in a paper by Kestelman (Proc. London Math. Soc. (2), 1951), the image of the reals under such an automorphism is dense in the complex numbers; since
$$\phi(\mathbb{R})=\psi(\mathbb{R})\cup\{0\}\cup(-\psi(\mathbb{R})),$$
also $\psi(\mathbb{R})$ must be dense in $\mathbb{C}$, so it can’t be contained in the unit circle and so $\psi$ has not the form $\psi(x)=\cos(ax)+i\sin(ax)$, for any real $a$.