Demonstrating Continuity Properties of $f(x) = \sum_{n=1}^\infty [a_n H(x - x_n)]$ Let $H: \mathbb{R} \rightarrow \mathbb{R}$ s.t. $H(x) = 0$ whenever $x < 0$ and $H(x) = 1$ whenever $x \ge 0$.  Let $\sum_{n=1}^\infty a_n$ be a series of positive terms which converges.  Let $\{x_n\} \subset \mathbb{R}$ be a countable set of real numbers.
Define $f: \mathbb{R} \rightarrow \mathbb{R}$ s.t. $f(x) = \sum_{n=1}^\infty [a_n H(x - x_n)]$
From this definition we can see that $f$ is non-negative, non-decreasing, and bounded above by $\sum a_n$.
Now I want to show independently that 
(i) $f$ is right continuous on all $x \in \mathbb{R}$
(ii) $f$ is not continuous on any $x_n$
(iii) $f$ is continuous on all $\mathbb{R} - \{x_n\}$
$\fbox{First Proof Attempt}$ 


*

*For all $n \in \mathbb{N}$, let $f_n = a_n H(x-x_n)$ so that if $x < x_n$, $f_n(x) = 0$ and if $x \ge x_n$, $f_n(x) = a_n$.

*Consider that for all $n \in \mathbb{N}$, we have that $|f_n| \le a_n$ with $\sum a_n \le M$ for some $0 < M \in \mathbb{R}$ (since this series converges by hypothesis).  This implies $\sum f_n \rightarrow f$ uniformly (a fact from Real Analysis).  For notational simplicity, let $\sum_{i=1}^n f_n = g_n$ so that we have $g_n \rightarrow f$ uniformly.

*The uniform convergence of the $g_n$ now implies that $\forall x \in \mathbb{R}$, $\underset{t \rightarrow x+}{lim} \underset{n \rightarrow \infty}{lim} g_n(t) = \underset{n \rightarrow \infty}{lim}  \underset{t \rightarrow x+}{lim} g_n(t)$ (another fact from Real Analysis) so that since each $f_n$ is right continuous (and hence $g_n$, a finite sum of right continuous functions), we have that $\underset{t \rightarrow x+}{lim} f(t) = f(x)$ implying $f$ is right continuous.

*Similarly, if we let $b \in \mathbb{R} - \{a_n\}$, then it is easy to see that each $f_n$ is continuous at $b$ since each $f_n$ is locally constant on $b$.  Then the finite sums $g_n$ will also be locally constant on $b$ so that since the uniform continuity of the $g_n \rightarrow f$ implies $\underset{t \rightarrow b}{lim} \underset{n \rightarrow \infty}{lim} g_n(t) = \underset{n \rightarrow \infty}{lim}  \underset{t \rightarrow b}{lim} g_n(t)$, we have that $\underset{t \rightarrow b}{lim} f(t) = f(x)$ so that $f$ is continuous on $b$ as desired.

*Finally, if we consider an arbitrary $x_k \in \{x_n\}$, we can observe that $f_k$ is not continuous on $x_k$ (since, in particular, $f_k$ is not left continuous at $x_k$).  This then implies any finite sum $g_N$ s.t. $N \ge k$ is discontinuous at $x_k$ so that since $g_n \rightarrow f$ uniformly, we have $\underset{t \rightarrow x_k}{lim} \underset{n \rightarrow \infty}{lim} g_n(t) = \underset{n \rightarrow \infty}{lim}  \underset{t \rightarrow x_k}{lim} g_n(t)$ implies $\underset{t \rightarrow x_k}{lim} f(t) = \underset{n \rightarrow \infty}{lim}  \underset{t \rightarrow x_k}{lim} g_n(t) = undefined$ since each $\underset{t \rightarrow x_k}{lim} g_n(t)$ is undefined (i.e., such limit doesn't exist).
In particular, I'm worried about step (5).
$\fbox{John Mangual's Proof}$


*

*$\sum f_n \rightarrow  f$ uniformly via the Weiestrauss $M$-test.

*Let $\{x_{n_{k}}\}$ form an ordering of the countable $\{x_n\}$.

*Then $f(x)$ is constant on each $[x_{n_k},x_{n_{k+1}})$.

*Then $f(x)$ is right continuous on all real $x$ from (3).

*Furthermore, if $x \notin \{x_n\}$, then we have that $x \in [x_{n_k},x_{n_{k+1}})$ for some $k$.  Hence $f$ is continuous at such $x$ since $f$ is constant in small enough neighborhoods of $x$ (i.e., neighborhoods inside $[x_{n_k},x_{n_{k+1}})$).

*Finally, at each $x_n$, we have that $f$ is discontinuous since
$$
f(x_n - \delta) = \sum_{i \in S} a_i \ne a_n + \sum_{i \in S} a_i = f(x_n + \delta)
$$ 
where $S = \{i : x_i < x_n - \delta\}$.
This completes the proof.
 A: I think you lack intuition for this type of problem.  The infinite sum of heaveside functions is a step function or even a renewal process if you let the $a_n$ and $x_n$ be random numbers.
Why not use mathematica and let $x_n = \frac{k}{M}$ for $M >> 1$ and $a_n = f(x_n)$, for example?
http://demo.activemath.org/ActiveMath2/LeAM_calculusPics/StepFunction.png?lang=en
Your function is constant on the countably many intervals $\color{#EEEEEE}{[x_n, x_{n+1})}$ determined by how the $x_n$ are ordered on the real line.  Even if the $x_i$ accumulate somewhere:


*

*$f$ is right-continuous on $\mathbb{R}$

*$f$ is continuous away from the jumping points $\{ x_n \}$.


For $\epsilon > 0$ sufficiently small, let $S =\{ i: x_i < x_n - \epsilon\}$. 
At the points of discontinuity, we show $f$ has different values on the left and on the right. 


*

*$f(x_n - \epsilon) = \sum_{i \in S } a_i$

*$f(x_n + \epsilon) = a_n + \sum_{ i \in S } a_i$


Uniform convergence ensures that when we prove these statements for the finite sums $f_n$, they pass to the limit $f_n \to f$.

Example: $ \displaystyle \sum_{n=1}^\infty \frac{1}{n^2} H\left(x - \frac{1}{n}\right) $

