Find a series of continuous functions whose sum is discontinuous at a point The sequence of continuous real functions $f_i$
is defined on the unit interval $[0, 1]$.
Each $f_i$
is composed of finitely many linear segments, each segment
has slope +1 or −1, moreover $f =\sum f_i$
is convergent for every $x$.
Give a sequence $f_i$ for which $f$ is not continuous at 1/2.
Any hints on  how to construct this sequences. 
 A: Let $$g(x)=\left\{\begin{array}{cc}-x,&0<x<1/4\\x-1/2,&1/4<x<3/4\\1-x,&3/4<x<1\end{array}\right.$$
Then build $f_k$ out of $k$ of these functions, $f_k(x)=\frac{(-1)^{k-1}}kg(\{kx\})$.  The $(-1)^{k-1}$ is so that the slope at $x=1/2$ is always +1.
Then $f_k(1/2)=0$, but the first $n$ values of $f_k(\frac12-\frac1{4n})$ are $-\frac1{4n}$ which gives a finite offset near $x=1/2$.
The sign of $f_k\left(\frac12-\frac1{4n}\right)$ changes whenever $\frac k{4n}$ passes a multiple of $1/2$.  So between $k=2np+1$ and $k=2np+2n$, there are $2n$ contributions of the same sign, spread evenly over a triangle whose height is roughly $\frac1{8np}$.  The sum is of the order $1/8p$, plus correction terms of the order $\frac1p-\frac1{p+1}$.  All in all, the sum will be an alternating harmonic series plus $O(1/p^2)$ terms.
A: Here is another series:
First note that by adding two functions together we can obtain slopes
of $-2,0,2$, and by adding $n$ functions together we can obtain slopes
of $-2n, \cdots, -2,0,2, \cdots 2n$. Hence we can assume that
the linear segments of the $f_k$ can have any even slope.
Define $f_1$ by the line segments joining $(0,0), ({1 \over 2},0), (1,1)$.
Define $f_2$ by the line segments joining $(0,0), ({1 \over 2},0), ({1 \over 2}+{1 \over 4},{1 \over 2}), (1, 0)$.
Note that $f_1+f_2$ is given by the line segments joining
$(0,0), ({1 \over 2},0), ({1 \over 2}+{1 \over 4},1), (1, 1)$.

Now suppose $f_1+\cdots+f_n$ is given by the line segments joining
$(0,0), ({1 \over 2},0), ({1 \over 2}+{1 \over 2^n},1), (1, 1)$ and
define
$f_{n+1}$ by the line segments joining $(0,0), ({1 \over 2},0), ({1 \over 2}+{1 \over 2^{n+1}},{1 \over 2}), ({1 \over 2}+{1 \over 2^n},0), (1, 0)$.
Then we can check that $f_1+\cdots+f_{n+1}$ is given by the line segments joining
$(0,0), ({1 \over 2},0), ({1 \over 2}+{1 \over 2^{n+1}},1), (1, 1)$.
Since the $f_n$ are non negative and $f_1(x)+\cdots+f_n(x) \le 1$ for all $x$
we see that $\phi(x) = \sum_n f_n(x)$ converges for all $x$. Furthermore,
we have $\phi({1 \over 2}) = 0$ and $\phi(x) = 1$ for all $ x > {1 \over 2}$.
