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

and

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 , but I haven't managed to work out the details of either and suspect that a good textbook would be helpful.)