I am self-studying through Spivak's Calculus and on the fourth chapter, I got stuck at the plot of a function. It's on the page 61 by the way. The function is this and piecewisely defined;
$$f(1/n) = (-1)^{(n+1)}$$ $$f(-1/n) = (-1)^{(n+1)}$$ and $f(x) = 1$ when $\mid{x}\mid\geq1$
So the interesting part is part of the graph between -1 and 1. Spivak says the function oscillates at each interval such as [1/n+1, 1/n] and each such interval behaves as a linear line segment. So when n = 3, we have f(1/3) = 1 and when n=2 we have f(1/2) = -1 and f behaves like a line in the interval [1/3, 1/2], going from -1 to 1. Spivak says we can even find a line equation for each such interval [1/n+1, 1/n]. But I can't see how this graph is made of straight lines. Can anyone explain this to me?



