This is from an example in my PDE text. It's something I should probably know, but maybe I am just reading the wording wrong.
The text (Asmar as it happens, section 2.1) gives the following example of a periodic function: it's a set of lines that have slope -x, one of which is $f(x)=(-x+1)$ and the next to the left is $(-x-1)$ and to the right would be $(-x+2)$. But they aren't continuous (I wish I could draw the darn thing here). Anyhow, it says to consider the function in a couple of different ways. from the interval $0 \le x \lt 2$ and $-1 \le x \lt 1$.
The picture shows a series of lines with slope -1, each extending from 1 to -1 on the y-axis, if that gives any idea.
Then it says that in the interval $0 \le x \lt 2$ the function is a piece of the straight line $f(x)=-x+1 $ if $0 \le x \lt 2$. So far so good. But then it says that $f(x+2) = f(x)$ describes $f$ for all other values of x. But it doesn't! if you plug in any number outside of that interval you get numbers way out of the range of 0 to 2.
On top of that, it says that looked at from the interval $-1 \le x \lt 1$ the graph is 2 straight lines (again, I'm OK with that). So we have the relation $$f(x)=\begin{cases} -x-1, & \text{if $-1 \le x \lt 0$} \\ -x+1, & \text{if $\ \ \ 0 \le x \lt 1$} \\ \end{cases}$$
and then the book says $f(x+2) = f(x)$ for all values of x outside $[-1,1)$. But that doesn't make sense to me, again if I plug in values outside of that interval I get a different answer. So am I just reading this wrong? The whole point is that the function is periodic, but it doesn't look periodic to me.
So am i just having reading comprehension problem? Thanks.
From the comments let's try to rephrase all this in a (possibly) clearer way :
We start with : $$\tag{1}f(x)=-x+1\quad\text{if $\,x \in[0,2)$}$$
and will use the recurrence $\,f(x+2)=f(x)\,$ for any real $x$ rewritten as : $$\tag{2}f(x)=f(x-2)\quad\forall x\in\mathbb{R}$$
This implies that for $\,x$ in $[2,4)\,$ we may apply $(1)$ to $\,(x-2)$ in $[0,2)$ to get : $$f(x)\overset{(2)\\}=f(x-2)\overset{(1)\\}=-(x-2)+1=-x+3\quad\text{if $\,x \in[2,4)$}$$ This corresponds to an horizontal shift of $2$ at the right of the graph of $f(x)$ in $[0,2)$.
(as explained the vertical shift doesn't generalize to other functions $f$ and should be forgotten)
We may continue for $\,x$ in $[4,6)\,$ so that $\,(x-4)$ will be in $[0,2)$ to get : $$f(x)\overset{(2)\\}=f(x-2)\overset{(2)\\}=f(x-4)\overset{(1)\\}=-(x-4)+1=-x+5\quad\text{if $\,x \in[4,6)$}$$
We may obtain values for intervals in $\mathbb{R^-}$ using $\,f(x)=f(x+2)$.
The general formula for any $k\in\mathbb{Z}$ will be : $$\tag{3} f(x)=\cdots=f(x-2k)=-(x-2k)+1\quad\text{if}\ x \in [2k,2k+2)$$
We may apply the same method to the $[-1,1)$ interval :
$$\tag{4}f(x)=\begin{cases} -x-1, & \text{if $\;-1 \le x \lt 0$} \\ -x+1, & \text{if $\quad 0 \le x \lt 1$} \\ \end{cases}$$ and obtain more generally for any $k\in\mathbb{Z}$ :
$$\tag{5}f(x)=f(x-2k)=\begin{cases} -(x-2k)-1, & \text{if $\quad 2k-1 \le x \lt 2k$} \\ -(x-2k)+1, & \text{if $\quad 2k \le x \lt 2k+1$} \\ \end{cases}$$
Hoping all this will be less confusing,