A question about computing an integral. Let $a < c < b$ and $\alpha$ a function on $[a,b]$ which is constant on $[a,c)$  and on $(c,b]$. Now assume that $f$ is a function on $[a,b]$ such that at least one of the function $f$ or $\alpha$ is left continuous at $c$ and at least one of the functions are right continuous at $c$. 
Prove that $f \in \Re (\alpha)$ on $[a,b]$ and $$\int_{a}^{b}fd\alpha=f(c)(\alpha(c^+)-\alpha(c^-))$$
Iam stuck on this one, im not sure how to use the information that at least one of the function are continuous at each side of $c$. Suggestions?
 A: First, notice that:
$\int_{a}^{b}fd\alpha =\int_{a}^{b}f\frac{d\alpha}{dx} dx$, since $f$ is a function of $x$  
Now, split the integral up into two pieces:$\lim\limits_{z\rightarrow c^-} \int_{a}^{z}f\frac{d\alpha}{dx} dx + \lim\limits_{z\rightarrow c^+} \int_{z}^{b}f\frac{d\alpha}{dx}dx$
Since $\alpha$ is constant on $[a,c) \cup (c,b]$, $\frac{d\alpha}{dx} = 0$ on $[a,c) \cup (c,b]$
From the definition of $\alpha(x)$ we have: $\lim\limits_{z\rightarrow c^-} \alpha(z) = \alpha(a)$ and $\lim\limits_{z\rightarrow c^+} \alpha(z) = \alpha(b)$. This is true regardless of whether the function actually achieves its limit at $x=c$.  
Since $d\alpha=0$ if $x\neq c$, the integrals equal $0$ if $z\neq c$. At $x=c$ the derivative of $\alpha$ does not exist, so we will need to use limiting arguments that do not depend on the derivative. In particular:
Let $\delta(z):=\alpha(c+z)-\alpha(c-z)\;\; \text{for}\;\;z\in [0, \min\{c-a,b-c\}]$
Let's approximate (very crudely) the integral $\int_{c-z}^{c+z}fd\alpha$ by $f(c)\delta(z)$. Again, the integrand will end up being $0$ for all $z>0$, but what is the value of the integral as we focus it around $x=c$ (i.e., $z\rightarrow 0)$?
We get $\lim\limits_{z\rightarrow 0} \int_{c-z}^{c+z}fd\alpha = \lim\limits_{z\rightarrow 0} f(c)\delta(z)= f(c)(\alpha(b)-\alpha(a))=f(c)(\alpha(c^+)-\alpha(c^-))$ since $\frac{d\delta}{dz} = 0 \;\;\forall z$, so the limit exists at $c$. 
Putting all this together, we get $\int_{a}^{b}fd\alpha = \lim\limits_{z\rightarrow c^-} \int_{a}^{z}f\frac{d\alpha}{dx} dx + \lim\limits_{z\rightarrow c^+} \int_{z}^{b}f\frac{d\alpha}{dx}dx + \lim\limits_{z\rightarrow 0} \int_{c-z}^{c+z}fd\alpha = 0+0+f(c)(\alpha(c^+)-\alpha(c^-))\;\;\square$
