# Spivak' Calculus Chapter 7 Problem 19(b) [continuity]

The question is from Spivak's Calculus 3rd Ed:

Suppose $0<a<1$, but that $a$ is not equal to $1/n$ for any natural number $n$. Find a function $f$ which is continuous on $[0,1]$ and which satisfies $f(0) = f(1)$, but which does not satisfy $f(x) = f(x+a)$ for any $x$.

The solution from Spivak's solutions book is as follows:

In general if ${1 \over n+1} <a< {1 \over n}$ then define $f$ arbitrarily on $[0,a]$, subject only to $f(0)=0 , f(a)>0$ and $f(1-na)=-nf(a).$ Then define $f$ on $[ka,(k+1)a]$ by $f(ka+x)=f(x)+ ka.$ In particular we have, we have $f(1) = f(na + (1-na))= na+f(1-na)=0$ but $f(x+a)-f(a)=f(a)>0$ for all $x$.

I don't see how we get $na+f(1-na)=0$ and the final $f(x+a)-f(a)=f(a)>0$ for all $x$.

EDIT: Post below found an error in the answer book. Instead we require $f(ka+x)=k\color{red}{f(a)}+f(x)$, then we have $f(1)=0$ and the final statement also follows.

• This is impossible to type up, as the solution is a graph, rather than a formula. It's a beautiful, classic problem. You should make your post a reasonable post by stating specifically what in particular makes you dissatisfied. If you want a formula for a function, you should work on that. – Ted Shifrin Jul 22 '17 at 17:14
• Don't answer your question with an answer in which you post the solution given in your answer book. What you can do, and I strongly suggest you do, is to include the solution in your answer book: by editing within your question field to include it there, along with an explanation addressing why you're not satisfied with it. – amWhy Jul 22 '17 at 17:17
• @amWhy Ok I will fix it now, but I wanted to see alternative soln's please undo any downvote. – helios321 Jul 22 '17 at 17:22
• @helios321 The downvotes are probably because the question doesn't follow the rules mentioned in the help centre – Sahiba Arora Jul 22 '17 at 17:28
• There is often a rush to downvote. Who knows why... – copper.hat Jul 22 '17 at 17:33

First of all, note that $0<1-na<1-\frac n{n+1}<\frac 1{n+1}$, so $1-na\in (0,a)$. Next, there is a typo in what you typed: It should be that $f(1)=f(na+(1-\color{red}{n}a))$. But there is also a typo in Spivak's solution: He should have set $f(ka+x)=k\color{red}{f(a)}+f(x)$. [A consequence of this is that $f(ka) = kf(a)$ for all $k=1,\dots,n$.] So then $f(1) = nf(a) + f(1-na) = nf(a) + (-nf(a)) = 0$.
Last, note that when $t\in [ka,(k+1)a]$ for some $k=0,1,\dots,n-1$, we have $t=ka+x$ for some $x\in [0,a]$, so $f(t)=kf(a)+f(x)$. On the other hand, $t+a = (k+1)a+x$, so $f(t+a)= (k+1)f(a)+f(x)$, from which we conclude that $f(t+a)-f(t)=f(a)>0$ for all $t\in [0,1-a]$.
• Thanks for your answer. But it seems you too have made a typo! $t+a = (k+1)+x$ should be $t+a = \color{red}{a}(k+1)+x$. – helios321 Jul 23 '17 at 4:39