When do we cannot split an improper integral? I know it might be a funny question but there was a time when my Calc II teacher said that if we have a an improper integral
$$ \int_a^b \left[f(x) + g(x)\right] dx$$
Where either $ \int_a^b f(x) dx $ or $ \int_a^b g(x) dx $ are divergent, we cannot assume that the integral is divergent, and that integrating $ h(x) = f(x) + g(x)$ might, indeed be convergent.
So, is true that we cannot split up the integral to conclude that the integral diverges?
 A: Reduction
There are many ways the integrals in the question could be improper.
For instance, the integrand(s) could have one or more singularities
in the open interval $\left(a,b\right)$. And a limit may need to
be taken at $a$ and/or $b$.
However, as long there are finitely many singularities of $f$ and
$g$, we can chop up the interval at the singularities and between
them, so that only one limit is relevant for each piece of the interval.
For example, suppose there are singularities at $c$ and $d$ (with
$c<d$) as well as at $a$ and $b$. Then $\int_{a}^{b}f(x)\,\mathrm{d}x$$=\int_{a}^{(a+c)/2}f+\int_{(a+c)/2}^{c}f+\int_{c}^{(c+d)/2}f$$+\int_{(c+d)/2}^{d}f+\int_{d}^{(d+b)/2}f+\int_{(d+b)/2}^{b}f$.
For each of those six improper integrals, a limit only needs to be
taken at the lower bound or the upper bound of integration.
Note that a lower bound limit case can be turned into an upper bound
limit case via a substitution. For example, $\int_{c}^{(c+d)/2}f(x)\,\mathrm{d}x=-\int_{-c}^{-(c+d)/2}f(-x)\,\mathrm{d}x=\int_{-(c+d)/2}^{-c}f(-x)\,\mathrm{d}x$.
Therefore, we can assume WLOG that
there is no limit needed at $a$ or on the interval $(a,b)$, just
at $b$.
Setup
Suppose that for $a\le B<b$, $\int_{a}^{B}f(x)\,\mathrm{d}x$ and
$\int_{a}^{B}g(x)\,\mathrm{d}x$ are proper integrals, so that the
original integral is ${\displaystyle \lim_{B\to b^{-}}}\int_{a}^{B}\left[f(x)+g(x)\right]\,\mathrm{d}x$.
Then, by the sum rule for proper integrals, we have $\int_{a}^{B}\left[f(x)+g(x)\right]\,\mathrm{d}x=\int_{a}^{B}f(x)\,\mathrm{d}x+\int_{a}^{B}g(x)\,\mathrm{d}x$
for $a\le B<b$.
In this situation, it turns out that the integrals don't really matter
(except that they impose restrictions on the functions involved, see
the Appendix), and we have reduced things to more fundamental limit
laws. Define $F\left(B\right)=\int_{a}^{B}f(x)\,\mathrm{d}x$ and
similarly for $G$. The question becomes: when can we not split ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]$?
Cases
We can analyze the extent to which the limit can be split in various
cases.
Case 1a:
Suppose ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)$ and ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$
both exist (finitely). Then by the basic sum rule
for limits, ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]={\displaystyle \lim_{B\to b^{-}}}F\left(B\right)+{\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$.
So the limit splits in this case where the limits of the individual
functions exist.
Case 1b:
Suppose ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)$ exists
(finitely), and ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]$
is known to exist (finitely). Then, by the basic difference rule for limits, ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)={\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]-{\displaystyle \lim_{B\to b^{-}}}F\left(B\right)$.
Since that is a difference of finite numbers, we know that ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$
is finite, and again have ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]={\displaystyle \lim_{B\to b^{-}}}F\left(B\right)+{\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$.
Similiarly, if ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$
were known to exist instead of ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)$.
The limit splits if one of the individual function limits exists and
the limit of the sum is known to exist.
Case 2a:
Suppose ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)=\infty$
and ${\displaystyle \liminf_{B\to b^{-}}}\,G\left(B\right)>-\infty$
(in other words, ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$
is either finite or $\infty$ or diverges due to an oscillation which
might get arbitrarily high but doesn't get arbitrarily low). Then
by properties of $\liminf$
in the extended reals, and ${\displaystyle \liminf_{B\to b^{-}}}\,\left[F\left(B\right)+G\left(B\right)\right]\ge{\displaystyle \liminf_{B\to b^{-}}}\,F\left(B\right)+{\displaystyle \liminf_{B\to b^{-}}}\,G\left(B\right)=\infty+\left[>-\infty\right]=\infty$,
so ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]=\infty$.
Analogous things happen if we have ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)=-\infty$
and ${\displaystyle \limsup_{B\to b^{-}}}\,G\left(B\right)<\infty$
or if we swap $F$ with $G$ in either case.
In cases like these, we kind of have the limit splitting even though
${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)$ doesn't exist
finitely, as long as we don't run into an $\infty-\infty$ type of
problem.
Case 2b:
Suppose ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]=\infty$
and ${\displaystyle \limsup_{B\to b^{-}}}\,F\left(B\right)<\infty$.
Then ${\displaystyle \liminf_{B\to b^{-}}}\,G\left(B\right)$$\ge{\displaystyle \liminf_{B\to b^{-}}}\,\left[F\left(B\right)+G\left(B\right)\right]+{\displaystyle \liminf_{B\to b^{-}}}\,\left[-F\left(B\right)\right]$$={\displaystyle \liminf_{B\to b^{-}}}\,\left[F\left(B\right)+G\left(B\right)\right]-{\displaystyle \limsup_{B\to b^{-}}}\,F\left(B\right)=\infty-\left[<\infty\right]=\infty$,
so ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)=\infty$. Again,
analogous things happen if we have ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]=-\infty$
and ${\displaystyle \liminf_{B\to b^{-}}}\,F\left(B\right)>-\infty$,
or if $F$ and $G$ are swapped.
In cases like these, we kind of have the limit splitting even though
${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$ doesn't exist
finitely, as long as we don't run into an $\infty-\infty$ type of
problem.
Case 2c:
Suppose ${\displaystyle \limsup_{B\to b^{-}}}\,\left[F\left(B\right)+G\left(B\right)\right]<\infty$
and ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)=\infty$. Then
${\displaystyle \limsup_{B\to b^{-}}}\,G\left(B\right)$$\le{\displaystyle \limsup_{B\to b^{-}}}\,\left[F\left(B\right)+G\left(B\right)\right]+{\displaystyle \limsup_{B\to b^{-}}}\,\left[-F\left(B\right)\right]$$={\displaystyle \limsup_{B\to b^{-}}}\,\left[F\left(B\right)+G\left(B\right)\right]-{\displaystyle \liminf_{B\to b^{-}}}\,F\left(B\right)=\left[<\infty\right]-\infty=-\infty$,
so ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)=-\infty$. Again,
analogous things happen if we have ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]=-\infty$
and ${\displaystyle \liminf_{B\to b^{-}}}\,F\left(B\right)>-\infty$,
or if $F$ and $G$ are swapped.
In cases like these, its more debatable whether we have the limit
splitting, since we explicitly set up an $\infty-\infty$ problem.
But it's still a case where knowledge about the behavior of $F+G$
and $F$ allows you to conclude something about the behavior of $G$.
Case 3a:
Suppose ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)=\infty$
and ${\displaystyle \liminf_{B\to b^{-}}}\,G\left(B\right)=-\infty$
(in other words, ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$
is either $-\infty$ or diverges due to an oscillation which gets
arbitrarily low and may or may not get arbitrarily high). Then ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]$
can exist (finitely). A simple way to do this would be to have
$G\left(B\right)=C-F\left(B\right)$ for some constant $C$, but you
could also have more complicated examples by introducing oscillation,
like $G(B)=\left(1+\left(b-B\right)\sin\left(\dfrac{1}{b-B}\right)\right)*\left(C-F\left(B\right)\right)$,
etc. There is not going to be a simple enumeration of all examples
fitting this pattern.
But ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]$
can also fail to exist (finitely), in essentially any sort of
way. For example, if $F(B)=-2G(B)$, then the limit of the sum is
$\infty$. If $G\left(B\right)=\sin\left(\dfrac{1}{b-B}\right)F\left(B\right)$,
then $F\left(B\right)+G\left(B\right)$ oscillates between $0$ and
arbitrarily large numbers. If $G\left(B\right)=\sin\left(\dfrac{1}{b-B}\right)-F\left(B\right)$
then $F\left(B\right)+G\left(B\right)$ oscillates between $-1$ and
$1$, etc. There is not going to be a simple enumeration of all examples
fitting this pattern either.
To be explicit, examples like these cannot really be said to split
since $\infty-\infty$ is undefined. As with the previous cases, we
can change $\infty$ to $-\infty$ and $\liminf$ to $\limsup$ and/or
swap $F$ and $G$ to get other examples where the limit of the sum
does/doesn't exist, but can't really be split in this way.
Case 3b:
Suppose ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]=\infty$
and ${\displaystyle \limsup_{B\to b^{-}}}\,F\left(B\right)=\infty$.
Then ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$ can
exist (finitely). By Case 2b, all examples must be of the form ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)=\infty$.
And by Case 2a, any situation where ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$
is finite and ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)=\infty$
will work to make ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]=\infty$.
There is not going to be a simple enumeration of them, though.
But ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$ can also
fail to exist (finitely), in essentially any sort of way. Define $\widetilde{F}\left(B\right):=F\left(B\right)+G\left(B\right)$
(so that ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)=\infty$)
and $\widetilde{G}\left(B\right):=-F\left(B\right)$ (so that ${\displaystyle \liminf_{B\to b^{-}}}\,\widetilde{G}\left(B\right)=-\infty$),
and then apply any example for Case 3a to $\widetilde{F}$ and $\widetilde{G}$
to find an example of $G=\widetilde{F}+\widetilde{G}$ not having
a finite limit.
As with the previous cases, we can change $\infty$ to $-\infty$
and $\limsup$ to $\liminf$ and/or swap $F$ and $G$ to get other
examples where we cannot learn about the behavior of $F$ or $G$.
Case 3c:
Suppose ${\displaystyle \limsup_{B\to b^{-}}}\,\left[F\left(B\right)+G\left(B\right)\right]=\infty$
and ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)=\infty$. Then
${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$ can exist
(finitely). By Case 2a, all examples must be of the form ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]=\infty$.
And by Case 2b, any situation where ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$
is finite and ${\displaystyle \lim_{B\to b^{-}}}\left[F\left(B\right)+G\left(B\right)\right]=\infty$
will work to make ${\displaystyle \lim_{B\to b^{-}}}F\left(B\right)=\infty$.
There is not going to be a simple enumeration of them, though.
But ${\displaystyle \lim_{B\to b^{-}}}G\left(B\right)$ can also
fail to exist (finitely), in essentially any sort of way. Define $\widetilde{G}\left(B\right):=-\left(F\left(B\right)+G\left(B\right)\right)$
(so that ${\displaystyle \liminf_{B\to b^{-}}}\,\widetilde{G}\left(B\right)=-\infty$),
and then apply any example for Case 3a to $F$ and $\widetilde{G}$
to find an example of $-G=F+\widetilde{G}$ not having a finite limit,
so that $G$ doesn't have a finite limit either.
As with the previous cases, we can change $\infty$ to $-\infty$
and $\limsup$ to $\liminf$ and/or swap $F$ and $G$ to get other
examples where we cannot learn about the behavior of $F$ or $G$.
Appendix
In Cases 3x above, we described classes of problematic examples of
$F$ and $G$. However, in the original setup, $F$ and $G$ were
integrals of functions (that are presumably piecewise continuous on
$[a,b)$), which limits how weird they can be. Improper integrals
that are finite or diverge to $\infty$ are common, so I'll focus
on generating something like the specific examples of Case 3a.
To achieve $G\left(B\right)=C-F\left(B\right)$ (for $B$ near $b$,
anyway), we can take $g(x)=\begin{cases}
\dfrac{2C}{b-a}-f(x) & \text{ if }x\le\dfrac{a+b}{2}\\
-f(x) & \text{ if }x>\dfrac{a+b}{2}
\end{cases}$. Then for $B>\dfrac{a+b}{2}$, we have $G\left(B\right)=\int_{a}^{B}g(x)\,\mathrm{d}x$$=\int_{a}^{\left(a+b\right)/2}g(x)\,\mathrm{d}x+\int_{\left(a+b\right)/2}^{B}g(x)\,\mathrm{d}x$$=\int_{a}^{\left(a+b\right)/2}\dfrac{2C}{b-a}-f(x)\,\mathrm{d}x+\int_{\left(a+b\right)/2}^{B}-f(x)\,\mathrm{d}x$$=\dfrac{2C}{b-a}\left(\dfrac{a+b}{2}-a\right)+\int_{a}^{B}-f(x)\,\mathrm{d}x$$=C-F\left(B\right)$.
To achieve $G\left(B\right)=\left(1+\left(b-B\right)\sin\left(\dfrac{1}{b-B}\right)\right)*\left(C-F\left(B\right)\right)$,
we can achieve it up to a constant by differentiating both sides to
find $g(x)$. However, for the constants to line up, we need $0=\left(1+\left(b-a\right)\sin\left(\dfrac{1}{b-a}\right)\right)*C$.
If $C=0$, we obtain an example of this form. But we can modify things
slightly to get a different interesting example. As long as $b-a\ne1/\left(n\pi\right)$
for any integer $n$, we can consider $G\left(B\right)=\left(1-\dfrac{\left(b-B\right)\sin\left(1/\left(b-B\right)\right)}{b-a\sin\left(1/\left(b-a\right)\right)}\right)*\left(C-F\left(B\right)\right)$
which still has oscillation, satisfies $G(a)=0$, and can be differentiated
to obtain $g(x)$ in terms of $f(x)$. If $b-a=1/\left(n\pi\right)$,
then the phase of sine can be shifted to avoid that issue.
For $F(B)=-2G(B)$ and $G\left(B\right)=\sin\left(\dfrac{1}{b-B}\right)F\left(B\right)$,
$G(a)=0$ is immediate, so differentiation works fine.
Finally, to achieve something like $G\left(B\right)=\sin\left(\dfrac{1}{b-B}\right)-F\left(B\right)$,
we can do a similar trick, like $G\left(B\right)=1-\dfrac{\sin\left(1/\left(b-B\right)\right)}{\sin\left(1/\left(b-a\right)\right)}-F\left(B\right)$.
