Carifications on periodic functions: periodicity of $f^n, f+g, fg, \frac{f}{g}, f(g)$, constant function, etc. During a lecture I've been given (only!) the definition of periodic function:
Let $A \subset \mathbb{R}, f: A \to \mathbb{R}, t > 0$; $f$ is $t$-periodic iff for every $x \in A$, we have $a+t \in A, x-t \in A$ and $f(x+t)=f(x)$.
I started reasoning of the definition and I've made some deductions and elaborated the following questions:


*

*If $f$ is odd, it seems that $f^2$ is $t\over 2$ periodic. Is this true in general? Can the statement be generalized to an arbitrary $n$? Does this hold for some even functions too?

*Can one define the constant function as a function of period $0$? Is this a good definition or is it useless? In particular, is the constant function the only function of period $0$ (this seems obvious, but how do I prove it?)?

*Given two periodic functions $f$ and $g$, what can one say about the periodicity of $f+g, fg, \frac{f}{g}, f(g)$?
I am looking forward to receiving some formal answers and proofs to clarify these points. I would also appreciate some links to useful material on periodic functions. Thank you.
 A: First: if $f$ is $t$-periodic than $f^2$ is $t$-periodic, not $t/2$-periodic. An example is the function $f: \mathbb R \to \mathbb R$ by $f(x) = \lfloor x\rfloor$. Plainly $f$ is 1-periodic, but $f^2$ is 1-periodic, but not 1/2-periodic since $f^2(0) = 0 \neq \frac{1}{4} = f^2(1/2)$.
Now in general, we have that for $f,g$ that are both $t$-periodic, then $f+g$, $fg$, and $f/g$ are all $t$-periodic as well (for $f/g$ supposing that $g$ is nonzero). Proof for the additive case: Suppose $f,g: A\to \mathbb R$ are both $t$-periodic. Then for $x \in A$, the function $f+g$ satisfies 
$$(f+g)(x+t) = f(x+t) + g(x+t) = f(x) + g(x) = (f+g)(x),$$
as desired. The rest of these proofs follow pretty similarly. In fact, if you have some function $\Phi: \mathbb R^2 \to \mathbb R$ and consider the function $\Phi(f,g): \mathbb R \to \mathbb R$ by $\Phi(f,g)(x) = \Phi(f(x),g(x))$, then this will be $t$-periodic as well.
In addition, asserting that a function has period zero is merely stating that $f(x) = f(x + 0)$ for all $x \in \mathbb A$, which is true for any function $f$. The characteristic of a constant function is that $f(x+t) = f(x)$ for all $t,x \in \mathbb R$, so it is sufficient to say the constant function is the function that is $t$-periodic for every $t \in \mathbb R$.

The question gets more interesting when we consider functions of different periods. A sufficient condition to guarantee periodicity of a combination function is this: 

Theorem: Suppose that $f: A \to \mathbb R$ is $t$-periodic and $g: B \to \mathbb R$ is $s$-periodic, and suppose that $A + t = \{a + t \mid a \in A\} \subset A$, $B + s \subset B$. Further, suppose that $nt + ms = 0$ for integers $n,m \in \mathbb Z$ with $\gcd(n,m) = 1$, i.e. $\{t,s\}$ is $\mathbb Z$-dependent. Let $\Phi:\mathbb R^2\to \mathbb R$. 
Then the function $\phi:A \cap B \to \mathbb R$ given by $\phi(x) = \Phi(f(x),g(x))$ is $nt$-periodic.

Before the proof, we need a lemma:

Lemma: If $f$ is $t$-periodic, then $f(x + nt) = f(x)$ for all $n \in \mathbb Z$.
Proof: First for $n$ positive, we proceed by induction. The base case is $n=0$. Then we know that if $f(x+nt) = f(x)$, then $f(x+(n+1)t) = f((x+nt) + t)= f(x+nt)$ by $t$-periodicity. By IHOP $f(x+nt) = f(x)$ and we are done.
For $n$ negative, we proceed by induction downwards. The base case is $n=0$. Now suppose that $f(x+nt) = f(x)$. Then $f(x+(n-1)t) = f(x + (n-1)t + t)$ by $t$-periodicity. But $f(x+ (n-1)t + t) = f(x + nt) = f(x)$ so we are done.

Now for the Proof:
Suppose we have $f,g,\Phi,\phi$ satisfying the given conditions. Then for $x \in A \cap B$ we have
$\phi(x + nt) = \Phi(f(x+nt),g(x + nt)) = \Phi(f(x), g(x +nt))$ by Lemma. But $nt = -ms$, so $\phi(x+nt)  = \Phi(f(x), g(x - ms)) = \Phi(f(x),g(x))$ again by Lemma.
