  Let $\mathbb R_t[\theta]$ be the ring generated over $\mathbb R$ by
$\cos\theta$ and $\sin\theta$, and $\mathbb R_t(\theta)$ be its quotient field.
In this paper we study the ways in which an element p of $\mathbb R_t[\theta]$
can be decomposed into a composition of functions of the form $p=R(q),$ where
$\mathbb R\in \mathbb R(x)$ and $q\in \mathbb R_t(\theta)$. In particular, we
describe all possible solutions of the functional equation $R_1(q_1)=R_2(q_2)$,
where $R_1, R_2 \in \mathbb R[x]$ and $q_1,q_2\in \mathbb R_t[\theta].$
