Can the sum of two divergent integrals yield a convergent integral? Given:
$f(x) + g(x) \neq 0$
$\int_a^b f(x) dx $ diverges
$\int_a^b g(x) dx $ diverges
$a$ and $b$ can be real numbers or $\pm\infty$
Find $f$ and $g$ such that:
$$\int_a^b (f(x)+g(x)) dx = L$$
for some finite $L$.
I really can't seem to think of any examples asides from $f+g=0$. Is there a solution to this at all?

You have some $f$ firstly, and then you let $g$  be $-f$ outside a finite subset $F$ of $[a,b]$. For any $x\in F$, you can take any values for $g$ such that $f(x)+g(x)\neq 0$.
