[Math] A product of two functions is periodic; are the functions individually periodic

periodic functions

I'm interested in the converse of the question here: Period of the sum/product of two functions.

Instead of "given two periodic functions, $f(x)$, $g(x)$, what is the period of a sum $f(x)+g(x)$ or product $f(x)g(x)$?", I am curious about:

"Given a periodic function $P(x)$ with period $T$ that can be written as a sum

$$P(x)=f(x)+g(x)$$

or a product

$$P(x)=f(x)g(x)$$

is it necessarily true that $f(x)$ and $g(x)$ are periodic?"

If they are, it's pretty clear to me their periods would satisfy the same relationships as in the original question. For instance, $f$ and $g$ must have periods $p$ and $q$ such that $mp=mq=T$ for some $(m,n)\in\mathbb{Z}$.

Best Answer

For the sum, find some periodic function $P$ and a non-periodic function $f$, and set $g(x) = P(x) - f(x)$.

For the product, find some periodic function $P$, and a non-periodic function $f$ which never equals $0$, and set $g(x) = \frac{P(x)}{f(x)}$.