A functional relation which is satisfied by $\cos x$ and $\sin x$ Assume that the functions $f,g : \mathbb R\to \mathbb R$ satisfy the relations
\begin{align}
\left\{
\begin{array}{ll}
f(x+y) &=& f(x)f(y)-g(x)g(y), \\
g(x+y) &=& f(x)g(y)+f(y)g(x),
\end{array}
\right. \tag{$\star$}
\end{align}
for all $x,y\in \mathbb R$.


*

*Find $f,g$, if they are continuous.

*Is there a pair functions $f,g$ satisfying $(\star)$ which are not continuous?

*Characterization of all such pairs.
Update. This problem is clearly harder than the characterization of functions satisfying $$f(x+y)=f(x)+f(y),$$ as it is a system of non-linear functional equations. I imagine that, in order to attack this problem, one has to make it linear.
 A: Let me put together all in an answer.
Define $h(x):=g(x)+if(x)$. Then $(\star)$ is equivalent to $$h(x+y)=h(x)h(y).$$
If $h(x)=0$ for some $x$ then $h$ is identically zero. Assume that $h$ never vanishes.
Let $\{a_i\}_{i\in I}$ be a Hamel basis of $\mathbb{R}$ as $\mathbb{Q}$-vector space.
Put $b_i:=h(a_i)$ and define $\hat{h}(x):=e^{r(x)}$, where $r(x)$ is the unique function determined by $r(x+y)=r(x)+r(y)$, and $r(a_i)=c_i$, where $c_i$ is any number such that $e^{c_i}=b_i$, and in the sequel I will not use anything beyond this).
Then $u(x):=h(x)/\hat{h}(x)$ satisfies $u(x+y)=u(x)u(y)$, and $u(0)=1$.
If $x=\sum\frac{p_i}{q_i}a_i$, with $(p_i,q_i)=1$, then $u(x)^{\prod q_i}=\prod u(\frac{p_i}{q_i}a_i)^{\prod q_i}=1$. The last equality is because $u(\frac{p_i}{q_i}a_i)^{q_i}=u(p_ia_i)=u(a_i)^{p_i}=1$
Then $u$ is a character (group homomorphism from $\mathbb{R}$ to the unit circle).
Converselly, for every $r$ such that $r(x+y)=r(x)+r(y)$ and a character $u$ of $\mathbb{R}$ we get $h(x):=e^{r(x)}u(x)$, which satisfies $h(x+y)=h(x)h(y)$. This gives us $$f(x):=\text{Im}(h(x))$$ and $$g(x):=\text{Re}(h(x)).$$
Now, to finish, we need to 'compute' all characters of the additive group $\mathbb{R}$.
Notice that each $\frac{p}{q}\mapsto u(\frac{p}{q}a_i)$ is a character of the additive group $\mathbb{Q}$. And conversely, if $u_i$ are characters of $\mathbb{Q}$ then $$u(x)=u\left(\sum\frac{p_i}{q_i}a_i\right):=\prod u_i\left(\frac{p_i}{q_i}\right)$$ satisfies $u(x+y)=u(x)u(y)$, and $u(0)=1$.
So, what we need is to 'compute' all characters of $\mathbb{Q}$. This can be read here, for example.
Notice the above gives us a way to produce all the solutions $h$, but it is not a unique writing of them. If we get two $\hat{h}$'s which quotient is a character of $\mathbb{R}$ then we can obtain the same $h$ from them by dividing by this character.
