I currently want to show $$ \log\Gamma(z)=(z-1/2)\log z-z+\frac{1}{2}\log2\pi+\int_0^\infty \frac{[u]-u+1/2}{u+z}du. $$ where $[u]$ denotes the floor function. Here, $z$ is a complex variable.
Could anyone provide a hint? This comes from Murty's Problems in Analytic Number Theory Exercise 6.3.13, but I do not want to look in the back of the book for the solution.
What I have tried thus far is to take the Hadamard factorization of $1/\Gamma(z)$, take the logarithm, and try to estimate the series that comes out of it. Unfortunately, what I get is $$ \log\Gamma(z)=-\gamma z-\log z+\sum_{n=1}^\infty \frac{\log(1+\frac{z}{n})}{n}. $$ Here, the series isn't easy to work with. I tried partial summation but it doesn't provide me with any reasonable approach for estimate.
I have a few more ideas on approaches, but am posting this question in case I come back empty handed.
Thanks!
The integral begs for $\int_0^\infty=\sum_{n=1}^\infty\int_{n-1}^n$ and summation by parts (even without the book at hand).
More conceptually though, it looks like a remainder of the Euler–Maclaurin summation formula: $$\sum_{n=0}^N f(n)=\int_0^N f(x)\,dx+\frac{f(0)+f(N)}{2}+\int_0^N f'(x)\left(x-\lfloor x\rfloor-\frac12\right)dx$$ for, say, $f\in C^1[0,N]$, applied to $f(x)=\log(x+z)$, assuming $z\in\mathbb{C}\setminus\mathbb{R}_{\leqslant 0}$ fixed. To make things easy, we let $z\in\mathbb{R}_{>0}$ and rely on analytic continuation elsewhere. Let $$I_N=\int_0^N\frac{\lfloor x\rfloor-x+1/2}{x+z}\,dx;$$ then, computing all the other pieces of the formula, we get $$I_N=\left(N+z+\frac12\right)\log(N+z)-\left(z-\frac12\right)\log z-N-\sum_{n=0}^N\log(z+n).$$
The connection to $\Gamma$ (basically the idea behind Euler's definition) is the formula $$\Gamma(z)=\lim_{N\to\infty}\frac{N^z N!}{z(z+1)\cdots(z+N)}$$ (a proof is obtained by computing $\int_0^1\big[N(1-x^{1/N})\big]^z\,dx$ and taking $N\to\infty$).
Thus $\lim\limits_{N\to\infty}I_N=\log\Gamma(z)-(z-1/2)\log z+\lim\limits_{N\to\infty}L_N$, where $$L_N=\left(N+z+\frac12\right)\log\frac{N+z}{N}+\log\frac{N^N e^{-N}\sqrt{N}}{N!}.$$ The first term tends to $z$ as $N\to\infty$, and the second tends to $-\frac12\log(2\pi)$ by Stirling's formula.
Not sure if this is elementary enough. Compared to the suggestion by @Conrad in his comment, this doesn't use any not-that-hard-to-prove characterizations of $\Gamma$, but I've decided to use the Euler-Maclaurin summation formula, which is nice to have at hand (including a proof).