# Improper Definite integral $\int_{-\infty}^\infty -\frac{i \pi e^{-i a p} \text{sech}\left(\frac{c p}{2}\right)}{p}dp$

I came across this improper integral that I couldn't solve

$$\int_{-\infty}^\infty -\frac{i \pi e^{-i a p} \text{sech}\left(\frac{c p}{2}\right)}{p} dp$$

My guess would be to use Residue theorem but it does not seem help.

My try so far is that it has a pole at $$p=0$$. With $$a>0$$, closing the contour upward, I compute the residue

$$\lim_{p\to 0}-\frac{i \pi e^{-i a p} \text{sech}\left(\frac{c p}{2}\right)}{p} p =-I \pi$$

Thus, the value of the integral is $$2\pi I Res(f,0)= 2\pi^2$$. This is definitely not the correct answer (which I confirmed by numerical integration).

Taking the hint from the comment I proceeded the following way

$$\int_{-\infty}^\infty e^{-iap} sech(\frac{cp}{2})=\frac{2 \pi \text{sech}\left(\frac{\pi a}{c}\right)}{c}$$ which comes from the fact that Fourier transform of sech function is sech function itself.

Now, to account the p in the denominator, I need to integrate this result and add a delta function which gives

$$\int_{-\infty}^\infty \frac{ e^{-i a p} \text{sech}\left(\frac{c p}{2}\right)}{p} dp =\int \frac{2 \pi \text{sech}\left(\frac{\pi a}{c}\right)}{c} da =-\frac{2 \pi ^2 \tanh \left(\frac{\pi a}{c}\right) \text{sech}\left(\frac{\pi a}{c}\right)}{c^2}+ \delta(a)$$

Multiplying by the factor $$-i\pi$$ on both sides, I get

$$\int_{-\infty}^\infty -\frac{i \pi e^{-i a p} \text{sech}\left(\frac{c p}{2}\right)}{p} dp=\frac{2 i \pi ^3 \tanh \left(\frac{\pi a}{c}\right) \text{sech}\left(\frac{\pi a}{c}\right)}{c^2}-i\pi \delta (a)$$

This is supposed to be the correct answer. But that still does not match with the numerical integration.

• You can use Fourier transform properties. The Fourier transform of sech is sech, then this integral is the antiderivative of sech plus a Dirac delta. – Ninad Munshi Aug 15 at 15:44
• @NinadMunshi This looks like a good way to go. But how do I Fourier transform $\frac{f(x)}{x}$? I know that $x^nf(x)$ has a Fourier transform $i^n \frac{d}{dp^n}\tilde f(p)$. Does not look like this works for division. Any help? – user824530 Aug 15 at 17:22
• That's why I said it is the antiderivative plus a Dirac delta. This is a Fourier transform property. – Ninad Munshi Aug 15 at 17:52
• Gotcha! $\int_{-\infty}^\infty e^{-iap} sech(\frac{cp}{2})=\frac{2 \pi \text{sech}\left(\frac{\pi a}{c}\right)}{c}$ Now, to account the p in the denominator, I need to integrate this result and add a delta function which gives $\int_{-\infty}^\infty \frac{ e^{-i a p} \text{sech}\left(\frac{c p}{2}\right)}{p} dp =\int \frac{2 \pi \text{sech}\left(\frac{\pi a}{c}\right)}{c} da =-\frac{2 \pi ^2 \tanh \left(\frac{\pi a}{c}\right) \text{sech}\left(\frac{\pi a}{c}\right)}{c^2}+ \delta(a)$ I edited the post because I couldn't type long comment. I guess this is what you suggested. – user824530 Aug 15 at 18:17
• Yes but you have to be particular about the coefficient of the delta. – Ninad Munshi Aug 15 at 18:22

$$\newcommand{\bbx}{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}{\displaystyle{#1}} \newcommand{\expo}{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}{\mathcal{#1}} \newcommand{\mrm}{\mathrm{#1}} \newcommand{\pars}{\left(\,{#1}\,\right)} \newcommand{\partiald}[]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}{\left\vert\,{#1}\,\right\vert}$$ $$\ds{\bbox[10px,#ffd]{\left. -\ic\pi\,\mrm{P.V.}\int_{-\infty}^{\infty} {\expo{-\ic ap} \mrm{sech}\pars{cp/2} \over p}\,\dd p \,\right\vert_{\ a, c\ \in\ \mathbb{R}}}:\ {\Large ?}}$$.
\begin{align} &\bbox[5px,#ffd]{\left. -\ic\pi\,\mrm{P.V.}\int_{-\infty}^{\infty} {\expo{-\ic ap} \mrm{sech}\pars{cp/2} \over p}\,\dd p \,\right\vert_{\ a, c\ \in\ \mathbb{R}}} \\[5mm] = &\ -2\pi\,\mrm{sgn}\pars{a}\int_{0}^{\infty} {\sin\pars{\verts{a}p} \over p\cosh\pars{\verts{c}p/2}}\,\dd p \\[5mm] \,\,\,\stackrel{2\verts{c}p\ \mapsto\ p}{=}\,\,\,& \left. -\,{a \over \verts{c}}\,\pi\int_{0}^{\infty} \!\!\!\!\!{1 \over \cosh\pars{p/4}}{\sin\pars{bp} \over bp}\,\dd p \,\right\vert_{\ds{\ b = \color{red}{\verts{a}/\pars{2\verts{c}}}}} \label{1}\tag{1} \\[5mm] = &\ -\,{a \over \verts{c}}\,\pi\int_{0}^{\infty} {1 \over \cosh\pars{p/4}} \pars{{1 \over 2}\int_{-1}^{1}{\expo{\ic kbp} \,\dd k}}\,\dd p \\[5mm] = &\ -\,{a \over 2\verts{c}}\,\pi\int_{-1}^{1}\ \underbrace{\int_{0}^{\infty}{\expo{\ic kbp} \over \cosh\pars{p/4}}\,\dd p} _{\ds{\equiv\ \mathcal{I}\pars{b}}}\ \dd k \label{2}\tag{2} \end{align}
$$\ds{\large\mathcal{I}\pars{b}\ \mbox{Evaluation:}}$$ \begin{align} \mathcal{I}\pars{b} & \equiv \bbox[5px,#ffd]{\int_{0}^{\infty}{\expo{\ic kbp} \over \cosh\pars{p/4}}\,\dd p} \\[5mm] = &\ \int_{0}^{\infty}{\expo{-\pars{-1/4 - \ic kb}p} - \expo{-\pars{1/4 - \ic kb}p} \over \sinh\pars{p/2}}\,\dd p \\[5mm] & = 2\int_{0}^{\infty}{\expo{-\pars{1/4 - \ic kb}p} - \expo{-\pars{3/4 - \ic kb}p} \over 1 - \expo{-p}}\,\dd p \\[5mm] & = 2\bracks{\Psi\pars{{3 \over 4} - \ic kb} - \Psi\pars{{1 \over 4} - \ic kb}} \label{3}\tag{3} \end{align} With (\ref{2}) and (\ref{3}): \begin{align} &\bbox[5px,#ffd]{\left. -\ic\pi\,\mrm{P.V.}\int_{-\infty}^{\infty} {\expo{-\ic ap} \mrm{sech}\pars{cp/2} \over p}\,\dd p \,\right\vert_{\ a, c\ \in\ \mathbb{R}}} \\[5mm] = &\ -\,{a\,\pi \over \verts{c}}\bracks{% \ln\pars{\Gamma\pars{3/4 - \ic kb}} - \ln\pars{\Gamma\pars{1/4 - \ic kb}} \over -\ic b} _{\ k\ =\ -1}^{\ k\ =\ 1} \\[5mm] = & \left. -2\pi\ic\,\mrm{sgn}\pars{a}\ln\pars{\Gamma\pars{3/4 - \ic kb} \over \Gamma\pars{1/4 - \ic kb}}\right\vert_{\ k\ =\ -1}^{\ k\ =\ 1} \\[5mm] = &\ -2\pi\ic\,\mrm{sgn}\pars{a}\ln\pars{\Gamma\pars{3/4 - \ic b}\Gamma\pars{1/4 +\ic b} \over \Gamma\pars{1/4 - \ic b}\Gamma\pars{3/4 + \ic b}} \\[5mm] = &\ -2\pi\ic\,\mrm{sgn}\pars{a}\,\ln\pars{\sin\pars{\pi\bracks{1/4 - \ic b}} \over \sin\pars{\pi\bracks{1/4 + \ic b}}} \\[5mm] = &\ 4\pi\,\mrm{sgn}\pars{a}\,\Im\ln\pars{\sin\pars{\pi\bracks{{1 \over 4} - \ic b}}} \\[5mm] = &\ 4\pi\,\mrm{sgn}\pars{a}\,\Im\ln\pars{{\root{2} \over 2}\cosh\pars{\pi b} - {\root{2} \over 2}\sinh\pars{\pi b}\ic} \\[5mm] = &\ -4\pi\,\mrm{sgn}\pars{a}\,\arctan\pars{\tanh\pars{\pi b}} \\[5mm] = &\ \bbx{\large% -4\pi\arctan\pars{\tanh\pars{\pi a \over 2\verts{c}}}} \\ &\ \end{align}