evaluate $\int_{0}^{\infty}\cos(t) t^{z-1}dt=\Gamma(z)\cos(\frac{\pi z}{2})$

I need to prove $\int_{0}^{\infty}\cos(t) t^{z-1}dt=\Gamma(z)\cos(\frac{\pi z}{2})$ for $0<Re(z)<1$. I tried $\cos t=\frac{e^{it}+e^{-it}}{2}$ and to integrate it along the contour from $\epsilon$ to R, then to $Ri$ via a quarter of a circle, then downward to $\epsilon i$, finally back to $\epsilon$ via a small quarter of a circle. However, I find that $e^{-it}t^{z-1}$ does not converge when $R\to \infty$, can anyone give a correction of my integration or offer another method to evaluate the integral?(would be better if using complex contours) thanks in advance.

-
I don't have a solution for you right now but some thoughts: you have to use the fact that 0 < Re z < 1; If you look at (e^-it)t^(z-1) in that strip, the real part of t^(z-1) cannot get large;. I wonder if you have the right contour. Also, since you are not after e^it but e^t, you might try a change of variables u = it -- the cos(it) may be more useful. – Betty Mock Aug 30 '13 at 3:49

Use $$\cos \theta = \frac{1}{2} (e^{i\theta} + e^{-i\theta})$$ to split the integral into two parts, namely $$\frac{1}{2} \int_0^\infty e^{it} t^{s-1} dt \quad\text{and}\quad \frac{1}{2} \int_0^\infty e^{-it} t^{s-1} dt.$$ Let $t^{s-1} = e^{(\log t)(s-1)}$ where the logarithm is the branch with the cut along the negative real axis.

To evaluate the first integral, let $t = iu$, so that $u$ runs along the negative imaginary axis, giving $$i \int_0^{-i\infty} e^{-u} e^{\log(iu)(s-1)} du.$$ Now we must have $\log(iu) = \log|u|$ because $iu$ is on the positive real axis. Furthermore $\log u = \log|u|-i\pi/2.$ Substituting, we have $\log(iu) = \log u +i\pi/2.$ This gives the integral $$i \int_0^{-i\infty} e^{-u} e^{(\log(u)+i\pi/2)(s-1)} du = e^{i\pi/2(s-1)} e^{i\pi/2} \int_0^{-i\infty} e^{-u} u^{s-1} du = e^{i\pi/2 s} \Gamma(s).$$

For the second integral, let $t = -iu$, so that $u$ runs along the positive imaginary axis, giving $$-i \int_0^{+i\infty} e^{-u} e^{\log(-iu)(s-1)} du.$$ As before, $-iu$ is on the positive real axis so that $\log(-iu) = \log|u|.$ Furthermore, $\log u = \log|u|+i\pi/2.$ Substituting, we have $\log(-iu) = \log u -i\pi/2.$ This gives the integral $$-i \int_0^{+i\infty} e^{-u} e^{(\log(u)-i\pi/2)(s-1)} du = e^{-i\pi/2(s-1)} e^{-i\pi/2} \int_0^{+i\infty} e^{-u} u^{s-1} du = e^{-i\pi/2 s} \Gamma(s).$$ Put these two together to obtain $$\frac{1}{2}e^{i\pi/2 s} \Gamma(s) + \frac{1}{2} e^{-i\pi/2 s} \Gamma(s) = \cos(s \pi/2)\Gamma(s).$$ The computation of $\log(iu)$ and $\log(-iu)$ in terms of $\log u$ is necessary because in general we can't use $\log(zw) = \log z + \log w$ as with positive reals.

Remark. To complete the above argument you still need to show that those integrals along the imaginary axis in fact represent the Gamma function integral. Use a quarter-circle contour (first and fourth quadrant) to achieve this. I will do this myself later if no one solves it before I do and if it gets done sooner, even better.

-
@ Marko Riedel I think you answer is great but unfortunately I can't accept two answers, sorry! – Alex Aug 30 '13 at 16:21
@Alex: if you like an answer better than the one you've accepted, you can unaccept the one you've accepted and accept the answer you like better. This is disappointing to the author of the originally accepted answer, and this is why some people wait a while to accept an answer. – robjohn Aug 31 '13 at 1:27
How do you justify moving the integral from the real axis to the imaginary axis (that is, changing variables $t=iu$)? – robjohn Aug 31 '13 at 1:43
@robjohn: Notice this, $t = iu = e^{i\frac{\pi}{2}} u$. – Mhenni Benghorbal Aug 31 '13 at 3:54
yes, but you cannot simply change the path of integration without justification. Residue theory needs to be cited. – robjohn Aug 31 '13 at 3:54

You can use the nice result Ramanujan's master theorem

Theorem: Assume function $f(x)$ has an expansion of the form $$f(x)=\sum_{k=0}^\infty \frac{\phi(k)}{k!}(-x)^k$$ then Mellin transform of $f(x)$ is given by $$\int_0^\infty x^{s-1} f(x) \, dx = \Gamma(s)\phi(-s)$$ where $\Gamma(s)$ is the Gamma function.

-
This theorem is definitely worth recalling. Upvoted even though the intent of the question was to practice complex variable techniques and recapitulate the derivation, I think. – Marko Riedel Aug 31 '13 at 1:02
@MarkoRiedel: You are right. It is a nice theorem and it is good to know. – Mhenni Benghorbal Aug 31 '13 at 3:26

Substituting $e^{it}$ for $\cos(t)$ and taking the real part of the integral becomes complicated when we let $z$ be non-real, so I simply use $\cos(t)=\frac{e^{it}+e^{-it}}{2}$.

One must also justify the vanishing of the integral over the arc at infinity since that only vanishes when $\mathrm{Re}(z)\lt1$.

\begin{align} \int_0^\infty\cos(t)\,t^{z-1}\,\mathrm{d}t &=\frac12\int_0^\infty e^{it}\,t^{z-1}\,\mathrm{d}t +\frac12\int_0^\infty e^{-it}\,t^{z-1}\,\mathrm{d}t\tag{1}\\ &=\frac12\int_0^{i\infty} e^{it}\,t^{z-1}\,\mathrm{d}t +\frac12\int_0^{-i\infty} e^{-it}\,t^{z-1}\,\mathrm{d}t\tag{2}\\ &=\frac12e^{\pi iz/2}\int_0^\infty e^{-t}\,t^{z-1}\,\mathrm{d}t +\frac12e^{-\pi iz/2}\int_0^\infty e^{-t}\,t^{z-1}\,\mathrm{d}t\tag{3}\\[9pt] &=\cos(\pi z/2)\Gamma(z)\tag{4} \end{align} Justification:
$(1)$: $\cos(t)=\frac{e^{it}+e^{-it}}{2}$
$(2)$ left: integral over $[0,R]\cup Re^{i[0,\pi/2]}\cup[iR,0]$ is $0$
$\hphantom{(2)}$ right:integral over $[0,R]\cup Re^{i[0,-\pi/2]}\cup[-iR,0]$ is $0$
$(3)$: change variables
$(4)$: $\cos(t)=\frac{e^{it}+e^{-it}}{2}$

The integrals of $e^{it}\,t^{z-1}$ along $Re^{i[0,\pi/2]}$ and $e^{-it}\,t^{z-1}$ along $Re^{i[0,-\pi/2]}$ are bounded by \begin{align} \int_0^{\pi/2}R^{\mathrm{Re}(z)}e^{\pi|\mathrm{Im}(z)|/2}e^{-R\sin(t)}\,\mathrm{d}t &\le\int_0^{\pi/2}R^{\mathrm{Re}(z)}e^{\pi|\mathrm{Im}(z)|/2}e^{-2Rt/\pi}\,\mathrm{d}t\\ &=\frac\pi2R^{\mathrm{Re}(z)-1}e^{\pi|\mathrm{Im}(z)|/2}(1-e^{-R})\\[6pt] &\to0 \end{align} when $\mathrm{Re}(z)\lt1$.

-
Note that for $t=Re^{i\theta}$ we have $$|t^{z-1}| = |e^{(\log t)(z-1)}| = e^{(\log R+i\theta)(z-1)} = R^{\Re(z)-1} e^{-\theta\Im(z)}.$$ – Marko Riedel Aug 31 '13 at 3:58
@MarkoRiedel: that adds a factor of at most $e^{\pi|\mathrm{Im}(z)|/2}$; still limits to $0$. – robjohn Aug 31 '13 at 4:27

\begin{align} \int_{0}^{\infty}\cos\left(t\right)\,t^{z - 1}\,{\rm d}t &= \Re\int_{0}^{\infty}{\rm e}^{{\rm i}t}\,t^{z - 1}\,{\rm d}t = \Re\int_{-{\rm i}\,0}^{-{\rm i}\,\infty}{\rm e}^{{\rm i}\left({\rm i}x\right)}\, \left({\rm i}x\right)^{z - 1}\left({\rm i}\,{\rm d}x\right) \\[3mm]&= -\Im\left\lbrack% {\rm i}^{z - 1}\int_{-{\rm i}\,0}^{-{\rm i}\,\infty}{\rm e}^{-x}\,x^{z - 1}\,{\rm d}x \right\rbrack = -\Im\left({\rm i}^{z - 1}\right)\ \ \overbrace{\int_{0}^{\infty}{\rm e}^{-x}\,x^{z - 1}\,{\rm d}x}^{\Gamma\left(z\right)} \\[3mm]&= -\Im\left({\rm e}^{{\rm i}\pi\left(z - 1\right)/2}\right)\Gamma\left(z\right) = -\sin\left({\pi z \over 2} - {\pi \over 2}\right)\Gamma\left(z\right) = {\large\Gamma\left(z\right)\cos\left(\pi z \over 2\right)} \end{align}

-

To complete this argument we need to show that the two integrals along the negative and the positive imaginary axis do indeed represent the gamma function. There are several possible methods here having various degrees of difficulty ranging from simple to quite involved. We will treat the case of $s$ being a real number where $0<s<1,$ the goal being to keep the effort within reasonable limits.

Let $$f(z) = e^{-z} z^{s-1}.$$ Start with the first integral and use the contour consisting of a segment from the origin to $-Ri$ (call this $\Gamma_1$, with $R$ eventually going to infinity), a straight line to $R$ (call this $\Gamma_2$) and a segment from $R$ back to zero (call this $\Gamma_3$). The segment $\Gamma_1$ is the integral we obtained during the calculation (in the limit) and the segment $\Gamma_3$ is $-\Gamma(s).$ So if we can show that the contribution from $\Gamma_2$ goes to zero we are done (no poles).

Parameterize $\Gamma_2$ by $z = -Ri(1-t) + Rt = R(1+i)t-Ri$ with $t$ between zero and one and $dz = R (1+i) dt.$ We have $$\Re(\log z) = \log \sqrt{R^2(1-t)^2+R^2 t^2} = \log R + \frac{1}{2} \log\left((1-t)^2 + t^2\right).$$ This gives the following bound for $|z^{s-1}|$ on $\Gamma_2$ (note that $s-1$ is negative): $$|z^{s-1}| = |e^{(\log z) (s-1)}| \\ = e^{( \log R + \frac{1}{2} \log\left((1-t)^2 + t^2\right) ) (s-1)} = R^{s-1} \sqrt{(1-t)^2 + t^2}^{s-1} = R^{s-1} \sqrt{\frac{1}{(1-t)^2 + t^2}}^{1-s}.$$ Since the term under the root sign is at least one and $1-s$ is positive the whole is maximized when the inner term is maximized, which occurs when $t=1/2,$ giving the upper bound $$R^{s-1} \sqrt{2}^{1-s} = \left(\frac{R}{\sqrt 2}\right)^{s-1}.$$ Returning to the integral we thus have $$\left|\int_{\Gamma_2} f(z) dz \right| \le \int_0^1 \left|e^{Ri(1-t)-Rt}\right| \left(\frac{R}{\sqrt 2}\right)^{s-1} |R (1+i)| dt.$$ This is $$\frac{R^s}{\sqrt{2}^{s-2}} \int_0^1 e^{-Rt} dt = \frac{R^s}{\sqrt{2}^{s-2}} \left[ \frac{e^{-Rt}}{-R}\right]_0^1 = \frac{R^{s-1}}{\sqrt{2}^{s-2}} \left(1 - e^{-R}\right).$$ But $s-1<0$ so this integral (along $\Gamma_2$) vanishes as claimed and the integral along $\Gamma_1$ is indeed equal to $\Gamma(s),$ which was to be shown. The second integral (along the positive imaginary axis) may be treated in a similar manner.

-

(Edit, now that other answers have fleshed out various arguments, I wanted to elaborate on why solving the real case is good enough)

First, let $z$ be real, $z=x, 0<x<1$. Use any method to compute the answer (Felix Marin seems most direct towards this condition, and of course in all answers need residue theorem to justify the transfer, and that the quarter-circle vanishes towards $\infty$).

Given the solution for real $z=x$, we now apply uniqueness theorem, which states that two analytic functions agreeing on a set containing an accumulation point (i.e. an interval on the real line) must agree everywhere (in the domain both are defined).

Now on one hand, $\Gamma(z)\cos(\pi z/2)$ is meromorphic, and in particular analytic on $0 < \Re{z} < 1$. The integral is also analytic in the same region by using uniform convergence of the integral on regions such as $0 < \epsilon \leq \Re{z} \leq 1-\epsilon$. This completes the argument, since we showed they agree on the segment of the real line $(0,1)$.

Anyway, any method is just fine, but I think uniqueness theorem really should be emphasized for complex analysis, as not often do we get to use such a powerful theorem :).

[Original comment: I think your contour is right, and you should just use $f(z) = e^{iz} z^{x-1}$. You will need to define an appropriate branch of $z^{x-1}$ of course. On the positive real axis the desired integral is the real part of the integral of $f$. On the positive imaginary axis the integral is a Gamma function integral, multiplied by a constant. Any residues? Quarter-circle integral for large radius vanish? Then take the real part of resulting application of residue theorem. ]

-
Then how do you get $cost$ from $e^{it}$ only? – Alex Aug 30 '13 at 3:40
@Alex The real part of $e^{it}$. – Evan Aug 30 '13 at 3:52
Problem is, I can't just integrate the real part because $t^{z-1}$ is not purely real. – Alex Aug 30 '13 at 3:54
@Alex Ah, it is okay if you first let $z$ be real, and use the uniqueness theorem (two analytic functions agreeing on an interval (say $(0,1)$) must be equal!) – Evan Aug 30 '13 at 4:17
@Alex made a clarifying edit concerning my point, though I understand if you didn't want to resort to using the uniqueness theorem. Cheers~ – Evan Sep 1 '13 at 17:29