Interchanging sum and integral when dominated convergence fails Suppose $f=\sum_{n >2} \frac{\sin(nx)}{n \log n}$. Now  $\sum \int_{[0, 2\pi]} |\sin(nx)|/(n \log n)$ does not converge because it is exactly $C\sum 1/(n\log n)$ which does not converge, so I can't apply dominated convergence theorem.  I know this converges uniformly on every compact that doesn't contain $0$. How can I conclude that sum and integration commute?

edit:
Sorry I was not thinking. I want to integrate from $[0,2\pi]$.  My main issue is what to do, because $[0,2\pi]$ contains $0$.  Now on $E=[0,2\pi]\setminus ([0,\epsilon] \cup [\pi-\epsilon, \pi +\epsilon] \cup [2\pi-\epsilon,2\pi])$ I know that the series converges uniformly, by using Dirichlet's test for uniform convergence, or just by arguing from first principles using summation by parts. Thus $\int_E$ commutes with the sum. It takes some work to show that the series converges uniformly on $[0,2\pi]$.  But I think it should be possible to proceed without having uniform convergence on $([0,\epsilon] \cup [\pi-\epsilon, \pi +\epsilon] \cup [2\pi-\epsilon,2\pi])$. My question then is how to do it.
 A: Define $$ g_k(x) = \sum_{n=3}^k \frac{sin(nx)}{n\log(n)} $$ 
It sounds to me like you are saying that  you already know the following: Over any interval $[a,b]$ that does not contain 0, for any $\epsilon>0$ there is a $K$ such that $|g_k(x)-f(x)| \leq \epsilon$ for all $x \in [a,b]$ and all $k\geq K$. Is this correct?  That is how I interpret " I know this converges uniformly on every compact that doesn't contain 0." 
In that case, let $[a,b]$ be an interval such that $0 < a < b< 2\pi$.  fix $\epsilon \in (0,\pi)$ and choose $K$ as above. Then for all $k \geq K$: 
$$ \left|\int_a^b [g_k(x)-f(x)]dx\right| \leq \int_a^b |g_k(x)-f(x)|dx \leq (b-a)\epsilon $$ 
But $\int_a^b g_k(x) dx = \sum_{n=3}^k\frac{-\cos(nb)+\cos(na)}{n^2\log(n)}$, which certainly converges as $k\rightarrow\infty$.  
So then for any interval $[a,b]$ that does not contain 0 we get: 
$$\int_a^b f(x) dx = \sum_{n=3}^{\infty} \frac{-\cos(nb)+\cos(na)}{n^2\log(n)}$$

If you want to fix $\epsilon>0$ and take $b=2\pi-\epsilon$ and $a=\epsilon$ then: 
$$ \int_{\epsilon}^{2\pi-\epsilon} f(x)dx = \sum_{n=3}^{\infty} \frac{-\cos(n(2\pi-\epsilon))+\cos(n\epsilon)}{n^2\log(n)}$$
Because the summation is of terms that decay like $1/n^2$, there seems to be no trouble taking $\epsilon\rightarrow 0^+$ on the right-hand-side:
$$ \lim_{\epsilon\rightarrow 0^+} \int_{\epsilon}^{2\pi-\epsilon} f(x)dx = 0 $$
In view of the comments below, it is not obvious how to prove the left-hand-side is equal to $\int_0^{2\pi} f(x)dx$.

Taking a hint from Christian Remling’s comment on $L^2$ and Fourier series: 
Let $[a,b]$ be an interval such that $0<a<b<2\pi$.  Fix $\epsilon>0$, let $k\geq 3$ be such that $|g_k(t)-f(t)|\leq \epsilon$ for all $t \in [a,b]$.  We know that for any real numbers $a,b$ we have $a^2 \leq 4b^2 + 4(a-b)^2$.  So: 
\begin{align}
&\int_a^b f(t)^2dt \\
&\leq \int_a^b[4g_k(t)^2 + 4(f(t)-g_k(t))^2]dt \\
&\leq 4\int_a^b g_k(t)^2dt + 4(b-a)\epsilon^2\\
&\leq 4\int_0^{2\pi}g_k(t)^2dt + 4(2\pi)\epsilon^2  \\
&= 4\sum_{n=3}^k \frac{\pi}{(n\log(n))^2} + 8\pi \epsilon^2 
\end{align}
where the final equality holds by orthogonality of the $\sin(nx)$ functions. 
Thus, there is a finite constant $C$ (independent of $[a,b]$) such that: 
$$ \int_a^b f(t)^2dt \leq C $$
By the monotone convergence theorem, it follows that $\int_0^{2\pi} f(t)^2dt \leq C$. Hence, $\int_0^{2\pi}|f(t)|dt < \infty$ (by Cauchy-Schwarz).  So the integrals of $f(t)^+$ and $f(t)^-$ exist and are finite. It follows again by the monotone convergence theorem that: 
$$ \lim_{\epsilon\rightarrow 0^+} \int_{\epsilon}^{2\pi-\epsilon} f(x)dx = \int_0^{2\pi} f(x)dx $$ 
and the right-hand-side is 0 by the last equation in the previous section of this answer.  
