This question is admittedly pedantic, but I like my definitions precise.
Tom Apostol, in his calculus book, defines a periodic function as follows.
A function f is said to be periodic with period $p \neq 0$ if its domain contains $x+p$ whenever it contains $x$ and if $f(x+p) = f(x)$ for every $x$ in the domain of $f$.
This is slightly unclear to me.
Let $g:[0, 32\pi] \rightarrow \mathbb{R}$ be defined by $g(x) = \sin(x)$. By this definition, $g$ is not periodic with $2\pi$; this is counter-intuitive, however.
$\endgroup$ 22 Answers
$\begingroup$Let $A\subseteq\mathbb{R}$ and $f:A\rightarrow B$ be a function. We say that $f$ is periodic with period $p\in \mathbb R$ if for any $a_{1},a_{2}\in A$,
$$a_{1}-a_{2}=kp\text{ for some }k\in\mathbb{Z} \implies f\left(a_{1}\right)=f\left(a_{2}\right).$$
$\endgroup$ 2 $\begingroup$A periodic function, as I know it, is nothing but a function that repeats its values after certain intervals. Or, if $f(x+np)=f(x) \, \forall n \in \mathbb{Z}$ whenever it is defined. The definition you're referring to is dealing with periodicity in the real line or equivalent. To be precise, we say that the functions have a single period (as opposed to $f(x)=0$ and such) i.e. $f(x)-f(y)=0 \implies x-y=np$ for some $n \in \mathbb{Z}$.
$\endgroup$ 2