TITLE: Calculating $\int_{0}^{\infty} x^{a-1} \cos(x) \ \mathrm dx = \Gamma(a) \cos (\pi a/2)$
QUESTION [7 upvotes]: My goal is to calculate the integral
$\int_{0}^{\infty} x^{a-1} \cos(x) dx = \Gamma(a) \cos (\pi a/2)$,
where $0<a<1$,
and my textbook provides the hint: integrate $z^{a-1} e^{iz}$ around the boundary of a quarter disk. 
However, I couldn't figure out how to control the integral over the quarter arc. Any hints?

REPLY [2 votes]: I recently read a short, yet interesting, article by Boas and Friedman where the authors calculated this same integral by using a different kind of contour:  
a triangle with vertices $-p_{1}, \;\ p_{2}, \;\ (p_{1}+p_{2})i$.
Consider $R(z)e^{iz}$, where R(z) is a rational function that vanishes at $\infty$
Then, $p_{1}, \;\ p_{2}$ are taken to be sufficiently large as to enclose the poles in the UHP.
Instead of using the arc of a circle in the first quadrant, they use a straight line segment.
By letting $p_{1}, \;\ p_{2} \to \infty$ the integral over the real axis is equal to $2\pi i$ times the sum of the residues in the UHP. 
This computation is claimed to be simpler because the slope of the triangular contour is bounded away from 0 in the UHP. 
Connect the points $z=p, \;\ z=pi$ with a line rather than the arc of a circle.
On this line, $|dz|=\sqrt{2}dy$ and $\frac{1}{|z|}\leq \frac{\sqrt{2}}{p}$.
It follows immediately that the integral over the line is bounded by a constant times 
$p^{s-1}\int_{0}^{p}e^{-y}dy\leq p^{s-1}$ which tends to 0 as $p\to \infty$ since $s<1$.
I have not included all of the intricacies, so if any one is interested in looking over this article it is in JSTOR.  Look for "a simplification in certain contour integrals".