Examples of "difficult" integrals with are easier to solve with a series? Yesterday someone posted an extremely elegant solution to a seemingly bizarre series where the integral:
$$\int_{0}^{1} x^{m}\ dx =  \frac{1}{m + 1}$$
was utilized. 
Oftentimes one will also interchange the summation from inside the integral to the outside in the case of uniformly convergent series.
Are there situations where an otherwise complicated looking integral has a "trivial" solution as a series?
 A: The following double integral is an example.
$$\int_{0}^{1}\int_{0}^{1}\frac{1}{1-xy}\,dx\,dy=\int_{0}^{1}\int_{0}^{1}\sum_{k=0}^{\infty}(xy)^{k-1}\,dx\,dy\\=\sum_{k=0}^{\infty}\int_{0}^{1}\int_{0}^{1}(xy)^{k-1}\,dx\,dy=\sum_{k=0}^{\infty}\int_{0}^{1}x^{k-1}\,dx\int_{0}^{1}y^{k-1}\,dy=\sum_{k=0}^{\infty}\frac1{k^2}=\frac{\pi^2}{6}$$
A: In statistical physics, integrals of the form $\int_0^\infty dx\, {x^n}(e^{x}\pm 1)^{-1}$ are common, and the standard approach is to expand the reciprocal in powers of $e^{-x}$:
\begin{align}
\int_0^\infty dx\, \frac{x^n}{e^{x}\pm 1} 
&= \int_0^\infty dx\, \frac{x^n e^{-x}}{1\pm e^x}\\
&= \int_0^\infty dx\, x^n \sum_{k=0}^\infty (\mp 1)^k e^{-(k+1)x}\\
&= \sum_{k=0}^\infty (\mp 1)^k \int_0^\infty dx\, x^n e^{-(k+1)x}\\
&= \sum_{k=0}^\infty (\mp 1)^k \frac{n!}{(k+1)^{n+1}} = \left\{\array{n!\,\eta(n+1)\\ n!\, \zeta(n+1)}\right\}
\end{align}
where $\eta(n)$ and $\zeta(n)$ are the Dirichlet eta and Riemann zeta functions respectively. (Note that such integrals are really particular cases of the polylogarithm.)
A: Here's an integral I saw on this AoPS thread a while ago: $\displaystyle\int_{1}^{\infty}\left(\ln\left(1-\dfrac{1}{x}\right)\right)^2\,dx$ 
WolframAlpha tells us the answer is $\dfrac{\pi^2}{3}$, which should remind you of $\zeta(2) = \displaystyle\sum_{n=1}^{\infty}\dfrac{1}{n^2} = \dfrac{\pi^2}{6}$. 
Indeed, using an infinite series is the way to go. Specifically, this one:  $\displaystyle\sum_{n = 1}^{\infty}ny^{n} = \dfrac{y}{(1-y)^2}$.
Of course, evaluating that integral required a few more tricks. See that thread for a few solutions. 
