In the following problem, feel free to use the following facts for any complex number $z=x+iy\in\mathbb{C}$ with $\mathfrak{Re}z=x\in\mathbb{R}$ and $\mathfrak{Im}z=y\in\mathbb{R}$: $$ \begin{align*} \cosh z&=\cosh x\cdot\cos y+i\sinh x\cdot\sin y,\\ |\cosh z|&\geq|\cos y|,\\ |\cosh z|&\geq|\sinh x|,\\ \cosh(iy)&=\cos y,\\ \sinh(iy)&=i\sin y. \end{align*} $$ Let $$ f(x)=\frac1{\pi\cosh(x)}\quad\text{for }x\in\mathbb{R}\quad\text{ and }\quad\varphi(t)=\int_{-\infty}^\infty e^{itx}f(x)dx\quad\text{for }t\in\mathbb{R}.\label{eq1}\tag{1} $$ Then $\varphi(t)$ is the characteristic function of the variable with probability density $f(x)$. Argue that the integral \eqref{eq1} can be obtained as the limit $$ \varphi(t)=\lim_{R\to\infty}\int_{-R}^Re^{itx}f(x)dx.\label{eq2}\tag{2} $$ Argue that for $t>0$, the integral \eqref{eq2} can be extended by an upper semi-circle on the complex plane to a closed contour integral in a way that the contribution from the semicircle part vanishes along a subsequential limit as $R\to\infty$. Hint: Pick $R$'s to avoid hitting the poles of the integrand with the semicircle.
I haven't been able to do the first part, but my question is on the second part. So far I have showed that there are poles at $z=i\pi\frac{2n-1}{2}$, so we simply choose $R$'s that avoid these poles. Then my question is how to argue that the contribution from the semicircle part vanishes. I am not very confident at complex integration, but I think that we can use the change of variable $x=R\cos\theta, y=R\sin\theta$ to get that the semicircle part is equal to $$ \int_0^\pi\frac{Re^{itR(\cos\theta+i\sin\theta)}}{\pi\cosh(R(\cos\theta+i\sin\theta))}d\theta $$ Can anyone confirm that this is right? And then I was thinking that if we can show that $\int_0^\pi|\cdot|d\theta$ goes to $0$, then we are done. So I tried to show this, but couldn't really get anywhere. I tried using the inequalities that were given for free at the start of the question like this: $$ \begin{align*} &\int_0^\pi\left|\frac{Re^{itR(\cos\theta+i\sin\theta)}}{\pi\cosh(R(\cos\theta+i\sin\theta))}\right|d\theta\\ =&\frac1\pi\int_0^\pi\left|\frac{Re^{-tR\sin\theta}e^{itR\cos\theta}}{\cosh(z)}\right|d\theta\\ =&\frac1\pi\int_0^\pi\left|\frac{Re^{-tR\sin\theta}}{\cosh(z)}\right|d\theta\\ \leq&\frac R\pi\int_0^\pi\left|\frac{e^{-tR\sin\theta}}{\cos(R\sin\theta)}\right|d\theta\quad\text{(from the equality given at the start)}\\ =&\frac R\pi\int_0^\pi\left|\frac{2e^{-tR\sin\theta}}{e^{iR\sin\theta}+e^{-iR\sin\theta}}\right|d\theta. \end{align*} $$ But I couldn't really see where to go from there. Is there a much simpler way of arguing that this part of the integral vanishes? Any help here would be really appreciated!
Consider $t >0$. First of all recall that $$\frac{e^{izt}}{\cosh(z)}=\frac{e^{izt}}{\cos(iz)}$$ So by considering the zeros of $\cos(iz)$ we have $$\lim_{z \to i\frac{\pi}{2}+\pi ik}(z-i(\frac{\pi}{2}+\pi k))\frac{e^{izt}}{\cos(iz)}=\lim_{z \to i\frac{\pi}{2}+\pi ik}\frac{(itz+t(\frac{\pi}{2}+\pi )+1)e^{izt}}{-i\sin(iz)}\\\implies \sum_{k=0}^\infty\textrm{Res}\bigg(\frac{e^{izt}}{\cos(iz)},i(\frac{\pi}{2}+\pi k)\bigg)=-ie^{-t\frac{\pi}{2}}+ie^{-t(\frac{\pi}{2}+\pi)}-ie^{-t(\frac{\pi}{2}+2\pi)}+ie^{-t(\frac{\pi}{2}+3\pi)}-...=$$ $$=-i\sum_{k=0}^\infty (-1)^{k}e^{-t(\frac{\pi}{2}+\pi k)}=-ie^{-\frac{\pi}{2}t}\sum_{k=0}^\infty(-1)^ke^{-t\pi k}=-\frac{ie^{-\frac{\pi}{2}t}}{e^{-t\pi}+1}=-\frac{i}{2}\frac{1}{\cosh(t\frac{\pi}{2})}$$ Therefore in the upper semidisk $C_R$ we get $$\lim_{R \to \infty}\int_{C_R}\frac{e^{izt}}{\pi\cos(iz)}dz=2 i\sum_{k=0}^\infty\textrm{Res}\bigg(\frac{e^{izt}}{\cos(iz)},i(\frac{\pi}{2}+\pi k)\bigg)=\frac{1}{\cosh(t\frac{\pi}{2})}$$ It will be now shown that the integral on the upper semicircle vanishes. $$\bigg|\int_{\Gamma_R}\frac{e^{izt}}{\pi\cos(iz)}dz\bigg|\leq \pi R\max_{z \in \Gamma_R}\bigg|\frac{e^{izt}}{\pi\cos(iz)}\bigg|$$ we have $$\pi R\bigg|\frac{e^{izt}}{\pi\cos(iz)}\bigg|\leq \max\bigg\{\frac{2R}{e^{R}+e^{-R}},\frac{Re^{-Rt}}{|\cos(R)|}\bigg\}\to 0$$ along a subsequential limit that does not hit the poles. Since $f$ is a pdf, for $t=0$ we have $\phi=1$. By symmetry, we obtain that $$\phi(t)=\frac{1}{\cosh(t\frac{\pi}{2})} \ \ \ \ t \in \mathbb{R}$$