# Integral $\int_a^\infty \frac{\arctan(x+b)}{x^2+c}dx$

I was playing around with some integrals and noticed that some integrals of the form: $$I(a,b,c)=\int_a^\infty \frac{\arctan(x+b)}{x^2+c}dx$$ Does have a closed form. I am trying to find for what constant $$c$$ will this work. In case you wonder why only $$c$$ is problematic, I will try to show by an example. $$I=I(1,3,16)=\int_1^\infty \frac{\arctan(x+3)}{x^2+16}dx$$ Let's start by letting $$x-1=t\,$$ thus: $$I=\int_0^\infty \frac{{\arctan(\color{blue}{t+4})}}{t^2+2t+17}dt$$ With $$\displaystyle{t=\frac{17}{y}\rightarrow dt=-\frac{17}{y^2}dy}$$ $$I=\int_0^\infty \frac{{\arctan\left(\color{red}{\frac{17}{y}+4}\right)}}{\left(\frac{17}{y}\right)^2 +\frac{34}{y}+17 }\frac{17}{y^2}dy\overset{y=t}=\int_0^\infty \frac{{\arctan\left(\color{red}{\frac{17}{t}+4}\right)}}{t^2+2t+17}dt$$ $$2I=\int_0^\infty \frac{{\arctan(\color{blue}{t+4})+{\arctan\left(\color{red}{\frac{17}{t}+4}\right)}}}{t^2+2t+17}dt$$ $${\arctan(\color{blue}{t+4})+{\arctan\left(\color{red}{\frac{17}{t}+4}\right)}}=\arctan\left(\frac{\color{blue}{t+4}+\color{red}{\frac{17}{t}+4}}{1-(\color{blue}{t+4})\left(\color{red}{\frac{17}{t}+4}\right)}\right)$$ $$=\arctan\left(\frac{x^2+8x+17}{x}\frac{x}{-4(x^2+8x+17}\right)=\pi-\arctan\left(\frac14\right)$$ Above follows since the original integral is positive so we take $$\arctan(-x)$$ as $$\pi-\arctan x$$ and therefore getting a negative answer will not be an issue. $$I=\frac12 \left(\pi -\arctan\left(\frac14\right)\right)\int_0^\infty \frac{1}{t^2+2t+17}dt$$ Well, now the inner integral is not hard to compute and the final answer happens to be: $$I=\frac12 \left(\pi -\arctan\left(\frac14\right)\right)\frac14\arctan\left(\frac{t+1}{4}\right)\bigg|_0^\infty =\frac{\pi^2}{16}-\frac{3\pi}{16}\arctan\left(\frac14\right)+\frac18\arctan^2\left(\frac14\right)$$ There are more examples that I found by checking and try such as: $$I(1,2,9)=\int_1^\infty \frac{\arctan(x+2)}{x^2+9}dx$$ $$I(2,1,6)=\int_2^\infty \frac{\arctan(x+1)}{x^2+6}dx$$ $$I(2,2,13)=\int_2^\infty \frac{\arctan(x+2)}{x^2+13}dx$$ And so on... All those can be solved by the same method: First substitute $$x-a=t$$, then let $$t=\frac{\alpha}{y}$$, where $$\alpha$$ is the "free of x" coefficient from the denominator.

The problem is that I tried more than $$100$$ combinations to get those integrals which is not that nice. How can we "smartly" find $$c$$ so that $$I(a,b,c)$$ is evaluable by symmetry? Or put in other word what should be $$c$$ if one wants to compute by symmetry $$I(7,13,c)$$?

• By Feynman's trick $I(a,b,c)$ is related to the dilogarithm, which has a reflection formula. – Jack D'Aurizio Nov 18 '18 at 18:05
• That's nice to hear, but the dilogarithm it's abit advanced for me. – カカロット Nov 18 '18 at 18:07
• It doesn't change the fact that your integral is what it is. You are like asking for $\sum_{n\geq 1}\frac{(-1)^n}{n!^2}$ then stating "sorry, Bessel functions are a bit too advanced for me" :D – Jack D'Aurizio Nov 18 '18 at 18:09
• Well, this is how I thought. First we have $$\arctan(\tan \pi) -\arctan\left(\frac14\right) =\arctan \left(\frac{\tan (\pi) - \frac14}{1+\tan(\pi) \frac14}\right)$$ Since $\tan(\pi)= 0$ the above is just $\arctan\left(-\frac14\right)$, and I did this because the original integral is positive thus we don't want to arrive at a negative value, and since $\arctan$ is a multivalued function I choosed it to become positive. Sorry if I explain poorly. – カカロット Nov 18 '18 at 18:34
• Ah, now it is clear to me. I would say it would be worth to be added but I guess it is enough that it is explained with the comment section. – mrtaurho Nov 18 '18 at 18:36

The simplest approaches are sometimes the right ones. Therefore choose any arbitrarily numbers $$a,b$$ and $$c$$ and apply your algorithm. So by firstly setting $$t=x-a$$ we get

\begin{align} I(a,b,c)=\int_a^{\infty}\frac{\arctan(x+b)}{x^2+c}dx=\int_0^{\infty}\frac{\arctan(t+a+b)}{t^2+2at+(c+a^2)}dt \end{align}

Now set $$\alpha=c+a^2$$ and then $$\displaystyle t=\frac{c+a^2}{y}$$ to further get

\begin{align} I(a,b,c)=\int_0^{\infty}\frac{\arctan(t+a+b)}{t^2+2at+(c+a^2)}dt&=\int_0^{\infty}\frac{\arctan\left(\frac{c+a^2}{y}+a+b\right)}{\left(\frac{c+a^2}{y}\right)^2+2a\left(\frac{c+a^2}{y}\right)+(c+a^2)}\frac{c+a^2}{y^2}dy\\ &\stackrel{y=t}{=}\int_0^{\infty}\frac{\arctan\left(\frac{c+a^2}{y}+a+b\right)}{t^2+2at+(c+a^2)}dt \end{align}

Adding the first and the second form up results in using the addition theorem of the inverse tangent function. This addition looks like the following

\small\begin{align} \arctan(\color{blue}{t+a+b})+\arctan\left(\color{red}{\frac{c+a^2}{y}+a+b}\right)&=\arctan\left(\frac{\color{blue}{t+a+b}+\color{red}{\frac{c+a^2}{y}+a+b}}{1-(\color{blue}{t+a+b})\left(\color{red}{\frac{c+a^2}{y}+a+b}\right)}\right)\\ &=\arctan\left(\frac{t^2+2(a+b)t+a^2+c}{-(a+b)\left(t^2+\frac{2a^2+2ab+b^2+c-1}{a+b}t+a^2+c\right)}\right) \end{align}

In order to make the polynomial $$t^2+2(a+b)t+a^2+c$$ vanish the following condition has to be fulfilled

$$\frac{2a^2+2ab+b^2+c-1}{a+b}=2(a+b)$$

From hereon we can deduce a relation between $$a,b$$ and $$c$$ that has to be satisfied. To be precise

\begin{align} \frac{2a^2+2ab+b^2+c-1}{a+b}=2(a+b)&\Leftrightarrow 2a^2+2ab+b^2+c-1=2(a+b)^2\\ &\Leftrightarrow 2a^2+2ab+b^2+c-1=2a^2+2b^2+4ab\\ &\Leftrightarrow c=b^2+2ab+1 \end{align}

And indeed your given case $$I(\color{red}{1},\color{blue}{3},\color{green}{16})$$ fulfills this relation as $$\color{green}{16}=\color{blue}{3}^2+2\cdot\color{blue}{3}\cdot\color{red}{1}+1$$. Another example would be $$I(\color{red}{1},\color{blue}{1},\color{green}{4})$$ which again turns out to work since $$\color{green}{4}=\color{blue}{1}^2+2\cdot\color{blue}{1}\cdot\color{red}{1}+1$$.

Therefore for your given case $$I(7,13,c)$$ you have to choose $$c=352$$ in order to let the integral be solvable via symmetry.

To finish the evaluation of $$I(a,b,c)$$, now under the restriction of $$c=b^2+2ab+1$$, we arrive at

$$\small\arctan\left(\frac{t^2+2(a+b)t+a^2+c}{-(a+b)\left(t^2+\frac{2a^2+2ab+b^2+c-1}{a+b}t+a^2+c\right)}\right)=\arctan\left(\frac{-1}{a+b}\right)=\pi-\arctan\left(\frac1{a+b}\right)$$

following the same argumentation as you did. So for $$I(a,b,c)$$ as a whole we get

\begin{align} 2I(a,b,c)&=\left(\pi-\arctan\left(\frac1{a+b}\right)\right)\int_0^{\infty}\frac{dt}{t^2+2at+(c+a^2)}\\ &=\left(\pi-\arctan\left(\frac1{a+b}\right)\right)\int_0^{\infty}\frac{dt}{(t+a)^2+c}\\ &=\left(\pi-\arctan\left(\frac1{a+b}\right)\right)\left[\frac1{\sqrt{c}}\arctan\left(\frac{t+a}{\sqrt{c}}\right)\right]_0^{\infty}\\ \Leftrightarrow I(a,b,c)&=\frac1{2\sqrt{c}}\left(\pi-\arctan\left(\frac1{a+b}\right)\right)\left[\frac{\pi}2-\arctan\left(\frac a{\sqrt{c}}\right)\right] \end{align}

Where the final formula produces the right value for your example integral $$I(1,3,16)$$.

I do not claim that this deduced relation between $$a,b$$ and $$c$$ is the only one for which the integral can be evaluated via symmetry but in fact it is one possibilty.

• This is perfect, thank you! – カカロット Nov 18 '18 at 20:03
• No problem. I am glad that I could help :) – mrtaurho Nov 18 '18 at 20:05