I was explaining to my students the other day why $\cos(2x)$ is not a linear combination of $\sin(x)$ and $\cos(x)$ over $\mathbb{R}$. Besides the canonical method of using special values of sine and cosine, I noticed something interesting. In the following, all vector spaces are over $\mathbb{R}$. 


Consider the linear space $C^\infty\_b(\mathbb{R})$ of real-valued bounded smooth functions on $\mathbb{R}$, and take any $c > 0$. We say a function $f \in C^\infty\_b(\mathbb{R})$ has property $P(c)$, if for all $k \in \mathbb{N}$ (including $0$), we have
$$\sup f^{(k+1)} = c \sup f^{(k)} = -\inf f^{(k+1)} = -c \inf f^{(k)}.$$
Here, the supremum and infimum are of course taken over $\mathbb{R}$, and $f^{(k)}$ is the $k$-th derivative of $f$, with the convention that $f^{(0)}=f$.


Define
$$S(c) = \{f \in C^\infty\_b(\mathbb{R}) \,\vert\, f \text{ has property } P(c)\}.$$
Since for fixed $a,b$ and all $x$, we have $a \sin(x) + b \cos(x) = \sqrt{a^2 + b^2} \sin(x + \theta) $ for some fixed $\theta$, it is clear that all linear combinations of $\sin(cx)$ and $\cos(cx)$ belong to $S(c)$. In particular, linear combinations of $\sin(x)$ and $\cos(x)$ are all in $S(1)$, while $\cos(2x)$ is not.


**Question:** is it true that $S(c) = \operatorname{Vect}\bigl(\sin(cx), \cos(cx)\bigr)$? 


If $f \in S(1)$ and $f$ is periodic, then using Fourier series, I can prove that $f$ is indeed $2 \pi$-periodic and $f \in \operatorname{Vect}\bigl(\sin(x), \cos(x)\bigr)$ with some work. Although I haven't checked this yet, I also believe that the periodic case for $S(c)$ where $c>0$ is arbitrary could be established by a more elaborate Fourier series argument (of course, I could be wrong). So the real interest lies in treating the non-periodic case, i.e., answering the following


**Special case:** does $f \in S(c)$ imply $f$ is periodic?


At first, I suspect the answer to the above special case is negative. But after some experiment, I am not so sure. Note that the radius of convergence of the Taylor series (say around $0$) for all $f \in S(c)$ is infinite, so the Taylor series of $f$ converges to $f$ itself. In particular, all functions in $S(c)$ are automatically analytic, so one does not have much freedom when trying to construct a (counter-)example.


If the answer turns out to be negative, then can one at least assert that $S(c)$ is a linear subspace? What if we only consider periodic functions for some fixed period in case $S(c)$ is not a linear subspace? Of course, these probably depend on the explicit form of the answer which is not yet known to me, and all of these are just some (perhaps stupid and naive) speculation on an old exercise of a first-year undergraduate. But it seems interesting, and any thought is appreciated.


**Edit**: I was a bit careless in formulating the question since the questions for all different $c$ are equivalent merely by rescaling, so one can simply assume $c = 1$, in which case we still have much work to do.


**Edit 2**: Proof of the periodic case can be found [here](https://drive.google.com/file/d/1Vyp5bcaGVXHvdxuvksNaaXQcrNlG4pFT/view?usp=sharing) in case anyone is interested.



Linear combination of sine and cosine
As noted by the OP we can replace $f$ by $af(bx)$ for suitable $a,b\in\mathbb{R}$ so that wlog we can take $c=1$ and ensure that $\sup f=-\inf f=1$.


Firstly we note that $f(z)$ is infinitely differentiable on $\mathbb{R}$ so we can form the taylor series at 0, $f(z)=\sum\_{i=0}^{\infty}\frac{f^{(i)}(0)}{i!}z^i$. Since $|f^{(i)}(0)|\leq 1$ for all $i\geq 0$ we have $\sum\_{i=0}^{\infty}|\frac{f^{(i)}(0)}{i!}z^i|=\sum\_{i=0}^{\infty}\frac{|f^{(i)}(0)|}{i!}|z|^i\leq \sum\_{i=0}^{\infty}\frac{|z|^i}{i!}$ which converges for all $z$ to $e^{|z|}$. 


Hence $F(z)=\sum\_{i=0}^{\infty}\frac{a\_i}{i!}z^i$ is an absolutely convergent series defining an entire function on $\mathbb{C}$ agreeing with $f$ on $\mathbb{R}$ s.t. $\sup f^{(k)}=-\inf f^{(k)}=1$ for all $k\in \mathbb{Z}\_{\geq0}$ and $|F(z)|\leq e^{|z|}$ for all $z\in \mathbb{C}$.


**We now determine the form of $F$ given the preceding conditions.**


First note that Bernstein proved the following (see Rahman and Tariq$^1$) as an extension of his related inequality for polynomials:


**Theorem** Let $g$ be an entire function of exponential type $\tau>0$ such that $|g(x)|\leq M$ on the real axis. Then $$\sup\_{-\infty<x<+\infty}|g^{'}(x)|\leq M\tau.$$


Now $|F(z)|\leq e^{|z|}$ for all $z\in \mathbb{C}$ and therefore we know that $F$ is of exponential type 1. In addition $|F(x)|=|f(x)|\leq 1$ on the real axis. 


**We are therefore interested in the conditions of equality in the above.** 


Fortunately in their book "Analytic Theory of Polynomials"$^2$ Rahman and Schmeisser prove (Theorem 14.1.7) that equality holds in the above if and only if $g(z)=ae^{i\tau z}+be^{-i\tau z}$ where $|a|+|b|=M$. (You can access the relevant pages 513-514 on [google books](https://books.google.co.uk/books?id=FzFEEVO3PXYC&printsec=frontcover&dq=analytic%20theory%20of%20polynomials%20rahman%20pdf&hl=en&sa=X&ved=0ahUKEwjIvM7clvLnAhUTbcAKHREQDRwQ6AEIKTAA#v=onepage&q=analytic%20theory%20of%20polynomials%20rahman%20pdf&f=false))


$|F(x)|\leq 1$ for $x\in\mathbb{R}$ and hence in the above theorem we may take $M=1$, $\tau=1$ and $g=F$ since $|F|$ is of exponential type 1. Also $\sup\_{x\in\mathbb{R}}|F^{'}(x)|=1$ which means we have the case of equality.


Thus $F(z)=ae^{iz}+be^{-iz}$ where $|a|+|b|=M=1$.


On the real axis $F$ is real valued and agrees with $f$ so we must have $f(x)=ae^{ix}+be^{-ix}$, $x\in \mathbb{R}$ with $a=\bar{b}$. Setting $a=c+id$ we obtain $f(x)=2c\cos x-2d\sin x$ with $|a|=|b|=2\sqrt{c^2+d^2}=1$. Rewriting with $C=2c$, $D=-2d$, we obtain


$$f(x)=C\cos x+D\sin x$$
for some constants $C,D\in \mathbb{R}$, $C^2+D^2=1$.


This proves the OP's conjecture. Note that the condition $C^2+D^2=1$ is due to the bound we imposed on $f$ due to our normalisation which is not part of the definition of $S(c)$.


 **1** *Rahman, Q. I.; Tariq, Q. M.*, [**On Bernstein’s inequality for entire functions of exponential type**](http://dx.doi.org/10.1016/j.jmaa.2009.05.035), J. Math. Anal. Appl. 359, No. 1, 168-180 (2009). [ZBL1168.30002](https://zbmath.org/?q=an:1168.30002). 


 **2** *Rahman, Q. I.; Schmeisser, G.*, Analytic theory of polynomials, London Mathematical Society Monographs. New Series 26. Oxford: Oxford University Press (ISBN 0-19-853493-0/hbk). xiv, 742 p. (2002). [ZBL1072.30006](https://zbmath.org/?q=an:1072.30006). 


