Is set of periodic functions from $\mathbb{R}$ to $\mathbb{R}$ subspace of $\mathbb{R}^{\mathbb{R}}$?
My answer is No. I give the following counterexample:
We consider periodic functions $f(x),g(x)$ so that $f(x)=x$ for $x \in [0,\sqrt{2})$ and $f(x)=f(x+\sqrt{2})$, function $g(x)=x$ for $x \in [0,\sqrt{3})$ and $g(x)=g(x+\sqrt{3})$ then $f+g$ is not periodic.
Indeed, assume that the function $f(x)+g(x)$ is periodic with length $T$. Note that if $T/\sqrt{2}$ is not an integer then $f(x)<f(x+T)$, similar to $T/\sqrt{3}$. Thus, since $T/ \sqrt{2}$ or $T/ \sqrt{3}$ can't be both integers so $f(x)+g(x)<f(x+T)+g(x+T)$, a contradiction. Thus, $f+g$ is non-periodic function. This yields that set of periodic function from $\mathbb{R}$ to $\mathbb{R}$ is not a subspace of $\mathbb{R}^{\mathbb{R}}$.
My questions are
- Is this counterexample correct?
- Are there any other examples?
Your argument that $f+g$ is not periodic is not quite correct. For instance, if $T=1$ then $T/\sqrt{2}$ is not an integer, but $f(1)=1>f(1+T)=2-\sqrt{2}$. However, you can fix your argument by specifically looking at $x=0$: then $f(x)+g(x)=0+0=0$, but at least one of $f(x+T)$ and $g(x+T)$ must be positive since $T$ cannot be an integer multiple of both $\sqrt{2}$ and $\sqrt{3}$. So for $x=0$, you must have $f(x)+g(x)<f(x+T)+g(x+T)$.
More generally, a similar argument shows that if $f$ and $g$ are periodic with periods $a$ and $b$ respectively where $a/b$ is irrational, and $f$ and $g$ both achieve their minimum values only at integer multiples of $a$ and $b$ respectively, then $f+g$ is not periodic.