I am attempting to evaluate

$$\int_{-\infty}^{\infty}\dfrac{b\tan^{-1}\Big(\dfrac{\sqrt{x^2+a^2}}{b}\Big)}{(x^2+b^2)(\sqrt{x^2+a^2})}\,dx. $$

I have tried using the residue formula to calculate the residues at $\pm ib,\pm ia,$ but it got messy very quickly. Then I tried to use a trigonometric substitution $x=a\tan(\theta)$; $dx=a\sec^{2}(\theta)\,d\theta$ which led me to the integral $$\int_{-\infty}^{\infty}\dfrac{b\tan^{-1}\Big(\dfrac{a\sec(\theta)}{b}\Big)\sec(\theta)}{(a^2\tan^{2}(\theta)+b^2)}\,d\theta.$$ The bounds for this integral seem incorrect, but I am more worried about the actual expression before I deal with the bounds, which may have to be changed into a double integral where $0\leq\theta\leq2\pi$ and the second bound would range from $-\infty$ to $\infty$. I am wondering if there is some kind of substitution I have missed, but I have hit the wall. The OP of this problem said there were cases that would come into play, but when I asked him whether or not those cases arose from $b<0$ and $b>0$ he told me they did not. The cases most likely arise from whether $a$ and $b$ are positive or negative, because the case where $b=0$ is trivial, and in the case where $a=0$ I used wolframalpha and the integral evaluates to $\dfrac{\pi\ln(2)\lvert b \rvert}{b^2}$ for $\Im(b)=0 \land \Re(b)\neq0.$ Contour integration may be necessary. I am stuck on this problem and I would greatly appreciate the help. Thank you for your time.

  • 1
    $\begingroup$ I have changed the formatting of the title so as to make it take up less vertical space -- this is a policy to ensure that the scarce space on the main page is distributed evenly over the questions. See here for more information. Please take this into consideration for future questions. Thanks in advance. $\endgroup$ Apr 24, 2018 at 15:19
  • 1
    $\begingroup$ Have you tried using Feynman's Trick? $\endgroup$
    – Mark Viola
    Apr 24, 2018 at 15:22
  • $\begingroup$ @MarkViola I have not attempted to use Feynman's Trick (manipulation under the integral sign) only because I have very little experience using that technique, but I will review notes and see if I can make it work. $\endgroup$ Apr 24, 2018 at 15:26
  • $\begingroup$ @MarkViola Thank you for pointing that out. $\endgroup$ Apr 24, 2018 at 15:27
  • 2
    $\begingroup$ You might try letting $$F(c)=b\int_{-\infty}^\infty \frac{\arctan\left(\frac{\sqrt{x^2+a^2}}{c}\right)}{(x^2+b^2)\sqrt{x^2+a^2}}\,dx$$ $$F'(c)=-b\int_{-\infty}^\infty \frac{1}{(x^2+b^2)(x^2+a^2+c^2)}\,dx$$The integral that represents $F'(c)$ can be obtained in closed form. And it's antiderivative might be found in closed form also. $\endgroup$
    – Mark Viola
    Apr 24, 2018 at 15:38

3 Answers 3


In the following we shall assume that $a$, $b$, and $c$ are real valued and that $a>b>0$.

Let $F(c)$ be represented by the integral

$$F(c)=b\int_{-\infty}^\infty \frac{\arctan\left(\frac{\sqrt{x^2+a^2}}{c}\right)}{(x^2+b^2)\sqrt{x^2+a^2}}\,dx\tag 1$$

Differentiating $(1)$ reveals

$$\begin{align} F'(c)&=-b\int_{-\infty}^\infty \frac{1}{(x^2+b^2)(x^2+a^2+c^2)}\,dx\\\\ &=-\frac{\pi}{c^2+a^2+b\sqrt{c^2+a^2}}\tag2 \end{align}$$

Integrating $(2)$ and using $\lim_{c\to \infty}F(c)=0$, we find that

$$\begin{align} F(c)&=\pi\,\left(\frac{\arctan\left(\frac{bc}{\sqrt{a^2-b^2}\sqrt{a^2+c^2}}\right)-\arctan\left(\frac{b}{\sqrt{a^2-b^2}}\right)+\pi/2-\arctan\left(\frac{c}{\sqrt{a^2-b^2}}\right)}{\sqrt{a^2-b^2}}\right) \end{align}$$

Setting $c=b$ yields the coveted result

$$\int_{-\infty}^\infty \frac{b\arctan\left(\frac{\sqrt{x^2+a^2}}{b}\right)}{(x^2+b^2)\sqrt{x^2+a^2}}\,dx=\pi\,\left(\frac{\arctan\left(\frac{b^2}{\sqrt{a^2-b^2}\sqrt{a^2+b^2}}\right)+\pi/2-2\arctan\left(\frac{b}{\sqrt{a^2-b^2}}\right)}{\sqrt{a^2-b^2}}\right)$$

  • $\begingroup$ Thank you for your answer. When I posted this thread to the comments section, OP informed me that the "answer is not correct to its truest form. The case still hasn’t been split." Do you know what case it is he is referring to? I asked him and he only replied "Look at the expression under the square root on the denominator." What could that mean? Please let me know when you have the chance and I look forward to your take on his comments. $\endgroup$ Apr 25, 2018 at 12:09
  • $\begingroup$ More information: "The result is different for |a|>|b| compared to |a|<|b| and this needs to be taken into consideration when evaluating the integral. It is not at all obvious from the problem alone that it will be the case but it is so." $\endgroup$ Apr 25, 2018 at 12:14
  • $\begingroup$ Also I would normally not withdraw the acceptance of an answer, but I figured that since you have a high reputation you are not as concerned with reputation points as you are the enjoyment of solving problems of this kind. $\endgroup$ Apr 25, 2018 at 12:50
  • $\begingroup$ Upon further investigation I believe integrating (2) with the assumption $\lvert\,a\,\rvert<\lvert\,b\,\rvert$ changes the integral's form completely, and using $a=2$ and $b=3$ as an example on Wolframalpha demonstrates this change wolframalpha.com/input/… $\endgroup$ Apr 25, 2018 at 14:24
  • 1
    $\begingroup$ @JohnColtraneisJC If $a<b$, then we simply use $$\arctan(ix)=i\text{atanh}(x)=\frac{i}{2}\log\left(\frac{1+x}{1-x}\right)$$ $\endgroup$
    – Mark Viola
    Apr 25, 2018 at 16:25

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

Note that $\ds{{\arctan\pars{\xi} \over \xi} = \int_{1}^{\infty}{\dd t \over t^{2} + \xi^{2}}}$.

\begin{align} &\bbox[#ffd,10px]{\ds{\int_{-\infty}^{\infty}{b\arctan\pars{\root{x^{2} + a^{2}}/b} \over \pars{x^{2} + b^{2}}\root{x^{2} + a^{2}}}\,\dd x}} = 2\int_{0}^{\infty}{\arctan\pars{\root{x^{2} + a^{2}}/\verts{b}} \over \root{x^{2} + a^{2}}/\verts{b}}\,{\dd x \over x^{2} + b^{2}} \\[5mm] = &\ 2\int_{0}^{\infty}\int_{1}^{\infty}{\dd t \over t^{2} + \pars{x^{2} + a^{2}}/b^{2}}\,{\dd x \over x^{2} + b^{2}} = 2b^{2}\int_{1}^{\infty}\int_{0}^{\infty}{\dd x \over \pars{x^{2} + b^{2}t^{2} + a^{2}}\pars{x^{2} + b^{2}}}\,\dd t \\[5mm] = &\ {2 \over \verts{b}}\int_{1}^{\infty}\int_{0}^{\infty}{\dd x \over \pars{x^{2} + t^{2} + \mu^{2}}\pars{x^{2} + 1}}\,\dd t\,, \qquad\qquad\qquad\mu \equiv {a \over b} \end{align}

\begin{align} &\bbox[#ffd,10px]{\ds{\int_{-\infty}^{\infty}{b\arctan\pars{\root{x^{2} + a^{2}}/b} \over \pars{x^{2} + b^{2}}\root{x^{2} + a^{2}}}\,\dd x}} \\[5mm] = &\ {2 \over \verts{b}}\int_{1}^{\infty}{1 \over t^{2} + \mu^{2} - 1} \int_{0}^{\infty}{\dd x \over x^{2} + 1}\,\dd t - {2 \over \verts{b}}\int_{1}^{\infty}{1 \over t^{2} + \mu^{2} - 1} \int_{0}^{\infty}{\dd x \over x^{2} + t^{2} + \mu^{2}}\,\dd t \\[5mm] = &\ {\pi \over \verts{b}}\int_{1}^{\infty}{\dd t \over t^{2} + \mu^{2} - 1} - {\pi \over \verts{b}}\int_{1}^{\infty}{\dd t \over \pars{t^{2} + \mu^{2} - 1}\root{t^{2} + \mu^{2}}} \\[5mm] = &\ \bbox[#ffe,10px,border:1px groove navy]{{\pi \over \verts{b}}\bracks{{\arctan\pars{\root{\mu^{2} - 1}} - \mrm{arccot}\pars{\root{\mu^{2} - 1}} + \mrm{arccot}\pars{\root{\mu^{4} - 1}} \over \root{\mu^{2} - 1}}}}\,, \quad\mu \equiv {a \over b} \end{align}

The second integral was evaluated as follows

\begin{align} &\bbox[10px,#ffd]{\ds{\int_{1}^{\infty}{\dd t \over \pars{t^{2} + \mu^{2} - 1}\root{t^{2} + \mu^{2}}}}} \,\,\,\stackrel{t\ \mapsto\ 1/t}{=}\,\,\, \int_{0}^{1}{t\,\dd t \over \bracks{\pars{\mu^{2} - 1}t^{2} + 1}\root{1 + \mu^{2}t^{2}}} \\[5mm] \stackrel{t^{2}\ \mapsto\ t}{=}\,\,\, &\ {1 \over 2}\int_{0}^{1}{\dd t \over \bracks{\pars{\mu^{2} - 1}t + 1}\root{1 + \mu^{2}t}} \,\,\,\stackrel{\root{1 + \mu^{2}t}\ \mapsto\ t}{=}\,\,\, \int_{1}^{\root{1 + \mu^{2}}}{\dd t \over \pars{\mu^{2} - 1}t^{2} + 1} \\[5mm] = &\ {\mrm{arccot}\pars{\root{\mu^{2} - 1}} - \mrm{arccot}\pars{\root{\mu^{4} - 1}} \over \root{\mu^{2} - 1}} \end{align}


We will use Mark Viola’s derivations to account for the case when $\lvert\,a\,\rvert< \lvert\,b\,\rvert$.

Integrating $(2)$ (See Mark Viola's answer above) and using $\lim_{c\to \infty}F(c)=0$, we find that

$$\begin{align} F(c)&=\pi\,\left(\frac{\arctan\left(\frac{bc}{\sqrt{a^2-b^2}\sqrt{a^2+c^2}}\right)-\arctan\left(\frac{b}{\sqrt{a^2-b^2}}\right)+\pi/2-\arctan\left(\frac{c}{\sqrt{a^2-b^2}}\right)}{\sqrt{a^2-b^2}}\right) \end{align}.$$

Now we will account for our case’s assumption and arrive at

$$\begin{align} F(c)&=\pi\,\left(\frac{-i\tanh^{-1}\left(\frac{bc}{\sqrt{b^2-a^2}\sqrt{a^2+c^2}}\right)+i\tanh^{-1}\left(\frac{b}{\sqrt{b^2-a^2}}\right)+\pi/2+i\tanh^{-1}\left(\frac{c}{\sqrt{b^2-a^2}}\right)}{i\sqrt{b^2-a^2}}\right) \\ &=\pi\,\left(\frac{-\tanh^{-1}\left(\frac{bc}{\sqrt{b^2-a^2}\sqrt{a^2+c^2}}\right)+\tanh^{-1}\left(\frac{b}{\sqrt{b^2-a^2}}\right)-i\pi/2+\tanh^{-1}\left(\frac{c}{\sqrt{b^2-a^2}}\right)}{\sqrt{b^2-a^2}}\right) \end{align}.$$

We replace $c=b$ to obtain our result

$$\int_{-\infty}^\infty \frac{b\arctan\left(\frac{\sqrt{x^2+a^2}}{b}\right)}{(x^2+b^2)\sqrt{x^2+a^2}}\,dx=\\\pi\,\left(\frac{-\tanh^{-1}\left(\frac{b^2}{\sqrt{b^2-a^2}\sqrt{a^2+b^2}}\right)-i\pi/2+2\tanh^{-1}\left(\frac{b}{\sqrt{b^2-a^2}}\right)}{\sqrt{b^2-a^2}}\right).$$

  • $\begingroup$ After the first line, the term $\sqrt{a^2-b^2}$ should be replaced with $\sqrt{b^2-a^2}$. $\endgroup$
    – Mark Viola
    Apr 25, 2018 at 17:25
  • $\begingroup$ @Mark Viola You're correct $\endgroup$ Apr 25, 2018 at 17:27
  • $\begingroup$ This solution is incorrect. The integrand is a real to real function, there is no imaginary part in the final result. $\endgroup$ May 2, 2018 at 0:15
  • $\begingroup$ @Jack Lam I don’t see how the solution wouldn’t have an imaginary part when considering this specific case $\endgroup$ May 2, 2018 at 14:05
  • 1
    $\begingroup$ The OP is wrong. The inverse hyperbolic tangent with argument greater than $1$ will be a complex number with imaginary part equal too $\pi/2$. And both of the terms $b/\sqrt{b^2-a^2}$ and $b^2/(\sqrt{b^2+a^2}\sqrt{b^2-a^2})$ exceed $1$. $\endgroup$
    – Mark Viola
    May 2, 2018 at 17:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .