Integration of a Heaviside function I stumbled upon this issue while solving a integration step in a problem as follows:
I  have a discontinuous function   $F_X(x)$ given by
$$F_X(x)=\begin{cases} 
      1 &, 0\leq x< 3 \\\\
      \exp(-\mu x)&, 3\leq x<\infty 
 \end{cases}$$
I could integrate $F_X(x)$  by a piecewise integration. However, if I were to represent this function as $$\displaystyle1-(1-\exp(-\mu x))H(x-3),$$ then I should be able to  integrate as
$$\displaystyle \int_0^{\infty} [1-\{1-\exp(-\mu x)\}H(x-3)] dx.$$
Yet,  I couldn't solve it.
Further, I want to integrate rectangular function decomposed as Heaviside functions as follows:
$$\int_0^{\infty} \left(H(t-2)-H(t-3)\right) \,dt$$
I know that that the answer is 1; however, I am unable separate the integral using the linearity of integration and find the answer. Obviously, I am missing some fundamentals here.
Please any advice will be helpful. Is there some silly mistake I am making in the whole question?
 A: It's unclear as to the specific comment in the OP

"It is quite straight forward that the answer is 1, however I am unable separate the integral using the linearity of integration and find the answer.

But, note that we have for $L>3$
$$\begin{align}
&
\int_0^L (H(t-2)-H(t-3))\,dt
\\\\
&\quad=
\left(\int_0^L H(t-2)\,dt\right)-\left(\int_0^L H(t-3)\,dt \right)
\\\\
&\quad=
(L-2)-(L-3)
\\\\
&\quad=
1
\end{align}$$
Now letting $L\to \infty$, we obtain the expected result.

Similarly, for $L>3$, we have
$$\begin{align}
&
\int_0^L \left(1-(1-e^{-\mu x})H(x-3)\right)\,dx 
\\\\
&\quad 
=\int_0^L (1)\,dx- \int_0^L (1-e^{-\mu x})H(x-3)\,dx
\\\\
&\quad 
=L-\int_3^L(1-e^{-\mu x})\,dx
\\\\
&\quad 
=L-(L-3)+\int_3^L e^{-\mu x}\,dx
\\\\
&\quad 
=3+\frac{e^{-3\mu}-e^{-L\mu}}{\mu}
\end{align}
$$
Letting $L\to \infty$ we find that
$$\int_0^\infty \left(1-(1-e^{-\mu x})H(x-3)\right)\,dx=3+\frac{e^{-3\mu}}{\mu}$$
A: The problem is that you're assuming $\lim_{x\to\infty}\Big[F(x)+G(x)\Big]=\lim_{x\to\infty} F(x)+\lim_{x\to\infty}G(x)$, although it is not true if the limits on the RHS don't exist. Lets do this step by step. The integral on the interval $\left[0,\infty\right)$ is defined as the limit
$$\int_{0}^{\infty}h(x){\rm d}x=\lim_{L\to\infty}\int_{0}^{L}h(x){\rm d}x\tag{1}$$
In your case, denote $f(x)=H(x-2)$ and $g(x)=H(x-3)$. By definition
$$1=\int_{0}^{\infty}\Big[f(x)-g(x)\Big]{\rm d}x=\lim_{L\to\infty}\int_{0}^{L}\Big[f(x)-g(x)\Big]{\rm d}x=\tag{2}$$
$$=\lim_{L\to\infty}\Bigg[\int_{0}^{L}f(x){\rm d}x-\int_{0}^{L}g(x){\rm d}x\Bigg]$$
Now the key is that both $\lim_{L\to\infty}\int_{0}^{L}f(x){\rm d}x$ and $\lim_{L\to\infty}\int_{0}^{L}g(x){\rm d}x$ don't exist, so
$$\lim_{L\to\infty}\Bigg[\int_{0}^{L}f(x){\rm d}x-\int_{0}^{L}g(x){\rm d}x\Bigg]\neq\lim_{L\to\infty}\int_{0}^{L}f(x){\rm d}x-\lim_{L\to\infty}\int_{0}^{L}g(x){\rm d}x\tag{3}$$
$$\int_{0}^{\infty}\Big[f(x)-g(x)\Big]{\rm d}x\neq\int_{0}^{\infty}f(x){\rm d}x-\int_{0}^{\infty}g(x){\rm d}x\tag{4}$$
and in fact the RHS in both Eq. $3$ and $4$ is undefined, since each integral (of $f$ and of $g$) diverges to infinity.
