What is definition of a periodic function? Periodic functions are defined over the domain of a function,say it is $[a,b]$.
I A Maron defines a periodic function as such:The function $f(x)$ is called periodic if there exists a number $T>0$ such that $f(x)=f(x+T)$ for all $x$ belonging to the domain of function(together with any point  $x$ the point $x+ T$ must belong to the domain of definition). My question is,$(x+T)$ does not lie in the domain of definition for $x \in (b-T,b]$? So the $x$ in this interval does not satisfy the definition? Also the definition demands all $x$ of domain satisfying it ?
 A: I have the following definition in at least one textbook:
Let $A\subset \Bbb R$ and $f:A\to\Bbb K$. $f$ is said to be $T$-periodic for some  $T\in\Bbb R^*_+$ such that for all $x\in A$, $x+T\in A$ and $f(x+T)=f(x)$. $f$ is said to be periodic is such a $T$ exists.
That excludes the possibility of a bounded set. However, that does not exclude the possibility that $A=[a,+\infty)$ for instance.

Now, defining periodicity on a bounded set is a corner case that I have never, ever encountered. I doubt it would make much sense: what kind of property would such a "periodic" function have, that would make this definition useful? Not even considering that, as Yves Daoust noticed, every function $f:[a,b]\to\Bbb R$ is periodic, as long as you are free to pick a large enough $T$ (and it would seem awkward to require $T<b-a$).
That said, if $x+T\in A$ is a problem, just say $f$ is $T$-periodic if, for all $(x,y)\in A^2$ such that $\dfrac{x-y}{T}\in\Bbb Z$, $f(x)=f(y)$.
A: For any bounded domain such as $[a,b]$ and any positive constant $T$, there will be some $x\in[a,b]$ such that $x+T\notin[a,b]$. For such $x$, the condition $f(x)=f(x+T)$ must be considered true by default, otherwise there would be no periodic functions at all. (Equivalently, you must only consider $x$'s such that both $x$ and $x+T$ are in the domain.)
But this induces another problem: whenever $T> b-a$, periodicity vacuously holds. To fix, the minimal condition $T\le b-a$ could be added (implying that any function such that $f(a)=f(b)$ is periodic).
A: In my opinion, for a real-valued function defined on a subset of the set $\mathbb{R}$ of  real numbers, a necessary condition for it to be periodic, is that the domain of definition should be both unbounded above, and below. In precision, the definition would be as follows.
Definition 1 Suppose $f\colon D\subset\mathbb{R}\to\mathbb{R}.$ We say $f$ is periodic, if there exists $T\in\mathbb{R}\backslash\{0\},$ such that
\begin{align*}
&(1)\quad \forall x\in D: x\pm T\in D;\\
&(2) \quad \forall x\in D:  f(x+T)=f(x).
\end{align*}
If so, we call $T$ a period of $f.$
By Definition 1, we can prove that $-T$ is also a period if $f,$ if $T$ is. And we can show that $mT$ is also a period for every nonzero integer $m.$
But Some textbook demands only $x+T\in D,$ other than $x\pm T\in D.$ I think this is strange. Consider the following example. Let $\mathbb{N}$ denote the set of positive integers. For every $n\in\mathbb{N},$ let $f(n)$ denote the the remainder of $n$ divided by $3.$ Thus, $f(1)=1, f(2)=2, f(3)=0, f(4)=1,\dots.$ Hence we constructed a function $f\colon\mathbb{N}\to\mathbb{R}.$  Clearly, for every $n\in\mathbb{N},$ we have $n+3\in\mathbb{N},$ and $f(n+3)=f(n).$ Therefore, $f$ is periodic, according to such a definition.  But $\mathbb{N}$ is not unbounded below.
