Consider the cosine function $f = \cos : \Bbb R \to \Bbb R$.
Is it true that the set of iterates $$\left\{f_n := \cos \circ \dotsb \circ \cos, \; n \text{ times } \mid n \geq 1\right\}$$ is linearly independent over $\Bbb R$ ? That is, I am wondering if, for any $r \geq 1$ and any real numbers $a_k$, we have : $$\sum_{k=1}^r a_k f_k = 0 : \Bbb R \to \Bbb R \implies a_k=0 \;\forall k.$$
I know that this true if we consider the powers of $\cos( \cdot )$, but I don't know how to deal with compositions. What I tried is to take derivative, or induction on the minimal length of linear dependence relation.
If you can use the fact that $\cos(x)$ and its iterates are entire functions of a complex variable, you can use the following idea (I use your notations): We proceed by inductioon, the case $n=1$ is obvious.
Let $n\geq 2$, and suppose that $a_1f_1(x)+a_2f_2(x)+\cdots+a_nf_n(x)=0$ for all $x\in \mathbb{R}$. Then this imply that $g(z)=a_1z+a_2f_1(z)+\cdots+a_nf_{n-1}(z)$ is zero for all $z\in [-1,1]$ (because $g(\cos(x))=0$, we have put $z=\cos(x)$). As $g$ is entire, this imply that $g(z)=0$ for all $z\in \mathbb{C}$, and that $a_1z$ is periodic with period $2\pi$. Hence $a_1=0$. Now , putting $b_1=a_2,...$ etc, we have $b_1f_1(x)+\cdots+b_{n-1}f_{n-1}(x)=0$ for all $x$. The induction hypothesis apply, and we are done. .