<s>[INST] Is there always an alternative way to compute integral other than complex integral? Sometimes we have to compute integrals that are not easy to calculate so that we need to depend on the method of complex integrals like the residue method. But I became curious about possibility of alternative method of evaluation of integrals other than complex integrals.
For example, do we have an ordinary, 'real' method of integral evaluation method for calculating
$$\int_{0}^{\infty}x^{1-\alpha}\cos(\omega x)dx$$
or
$$\int_{-\infty}^{\infty}{\cos(ax)\over{b^2-x^2}}dx$$
?
In this question I mean 'real' method in the sense that one does not visit the complex plane to evaluate the integral.
 [/INST] For $1 <a <2$,
$$ \begin{align} \int_{0}^{\infty} x^{1-a} \cos (wx)\ dx &= w^{a-2} \int_{0}^{\infty} u ^{1-a} \cos (u) \ du \\ &= \frac{w^{a-2}}{\Gamma(a-1)} \int_{0}^{\infty} \int_{0}^{\infty} \cos (u) \ t^{a-2} e^{-ut} \ dt \ du
 \\ &= \frac{w^{a-2}}{\Gamma(a-1)} \int_{0}^{\infty}t^{a-2} \int_{0}^{\infty} \cos (u)e^{-tu} \ du \ dt  \\ & = \frac{w^{a-2}}{\Gamma(a-1)} \int_{0}^{\infty} t^{a-2} \frac{t}{1+t^{2}} \ dt \\ &= \frac{w^{a-2}}{\Gamma(a-1)} \int_{0}^{\infty} \frac{t^{a-1}}{1+t^{2}} \ dt \\ &=  \frac{w^{a-2}}{\Gamma(a-1)}  \frac{1}{2} \int_{0}^{\infty}  \frac{v^{\frac{a}{2}-1}}{1+v} \ dv \\ &= \frac{w^{a-2}}{\Gamma(a-1)} \frac{1}{2} B \left(\frac{a}{2}, 1- \frac{a}{2} \right) \\ &= \frac{w^{a-2}}{\Gamma(a-1)} \frac{\pi}{2} \csc \left(\frac{\pi a}{2} \right) \\ &= \frac{w^{a-2}}{\Gamma(a-1)} \frac{\pi}{2} \frac{2 \cos \left(\frac{\pi a}{2} \right)}{\sin (\pi a)} \\  &= w^{a-2} \frac{\Gamma(a) \Gamma(1-a) \cos \left(\frac{\pi a}{2} \right)}{\Gamma(a-1)} \\ &= w^{a-2} \ (a-1) \Gamma(1-a) \cos \left(\frac{\pi a}{2} \right)  \\ &=- w^{a-2} \  \cos \left(\frac{\pi a}{2} \right) \Gamma(2-a) \end{align}$$
which is the answer given by Wolfram Alpha
If you want to be more rigorous, integrate by parts at the beginning and choose $1+ \sin u$ for the antiderivative of $\cos u$. Then when you switch the order of integration, it's easily justified by Tonelli's theorem.
</s>