Advanced Integration Techniques Textbook?

Can anyone recommend a textbook that goes beyond the usual techniques of integration taught in freshman/sophomore calculus and describes how to tackle more difficult integrals?

In my reading, I'm encountering identities such as

$\displaystyle \int_{0}^{\infty} \frac{x dx}{e^{ax} + 1} = \frac{\pi^2}{12a^2}$

and

$\displaystyle \int_{0}^{2\pi} \frac{cos(\theta) d\theta}{A + B cos(\theta)} = \frac{2\pi}{B}(1 - \frac{A}{\sqrt{A^2 - B^2}})$

and while I am willing to believe that they are correct, I'd prefer to know where they come from.

(I suspect the first can be solved using contour integration in the complex plane, and the second by a substitution such as $\displaystyle u = tan(\theta / 2)$, but I haven't managed to work out the details of either and suspect that a good textbook would be helpful.)