Integral $\int_0^{\infty} \arctan{\left(\frac{n}{\cosh{(x)}}\right)} \mathop{dx}$

calculusintegration

I want to evaluate the integral

$$\int_0^{\infty} \arctan{\left(\frac{n}{\cosh{(x)}}\right)} \mathop{dx}$$
I think the integral evaluates to $$\frac{\pi}{2} \ln{\left(\sqrt{n^2+1}+n\right)}$$
but I dont know how really! I think $n$ is any number but I dont know for sure!
The answer reminds me of $\int \frac{\pi}{2} \sec{x} \mathop{dx}$ and $n=\tan{x}$.

I got to $$\int_0^{\infty} \arctan{\left(\frac{e^{x} n}{e^{2x}+1}\right)} \mathop{dx}$$
$$\int_0^{\infty} \arctan{\left(\frac{n}{2}\frac{e^{x} +e^x}{e^{x}\cdot e^x+1}\right)}
\mathop{dx}$$

Reminds me of $\tan{a-b}$ but the $n/2$ factor?

Best Answer

Unfortunately, standard integration techniques will not help you solve this integral. The actual anti-derivative of this function is huge (according to Wolfram alpha at least, see: https://www.wolframalpha.com/input/?i=integral+arctan%281%2F%28cosh%28x%29%29%29 ). To combat this, will we use a method called Feynman Integration (named after the Physicist Richard Feynman. Although the actual rule was discovered by Leibniz - who independently discovered Calculus).

Let

$${I(t)=\int_{0}^{\infty}\arctan\left(\frac{t}{\cosh(x)}\right)dx}$$

So we have defined a function in terms of our integral. Using the Leibniz rule for integration we get

$${I'(t)=\int_{0}^{\infty}\frac{\text{sech}(x)}{t^2\text{sech}^2(x) + 1}dx}$$

(to take the derivative, you take take the partial derivative of the inside :D). The inner function now has an elementary anti-derivative; namely

$${\int\frac{\text{sech}(x)}{1+t^2\text{sech}^2(x)}dx=\frac{-\arctan\left(\sqrt{t^2 + 1}\text{csch}(x)\right)}{\sqrt{1+t^2}} + C}$$

Hence the integral for ${I'(t)}$ can be found by taking limits:

$${\int_{0}^{\infty}\frac{\text{sech}(x)}{t^2\text{sech}^2(x) + 1}dx=\lim_{x\rightarrow \infty}\frac{-\arctan\left(\sqrt{t^2 + 1}\text{csch}(x)\right)}{\sqrt{1+t^2}} - \lim_{x\rightarrow 0}\frac{-\arctan\left(\sqrt{t^2 + 1}\text{csch}(x)\right)}{\sqrt{1+t^2}}}$$

$${\Rightarrow I'(t) = \frac{\pi}{2}\frac{1}{\sqrt{1+t^2}}}$$

So to find ${I(t)}$ we now simply integrate with respect to ${t}$ and find the constant. This gives us

$${I(t)=\frac{\pi}{2}\int\frac{1}{\sqrt{t^2 + 1}}dt=\frac{\pi}{2}\sinh^{-1}(t) + C}$$

(${\int\frac{1}{\sqrt{1+t^2}}dt}$ is just a known integral).

But ${I(0)=0\Rightarrow C=0}$ (since ${\sinh^{-1}(0)=0}$), hence

$${\int_{0}^{\infty}\arctan\left(\frac{n}{\cosh(x)}\right)dx=\frac{\pi}{2}\sinh^{-1}(n)}$$, but

$${\sinh^{-1}(n)=\ln\left(\sqrt{n^2 + 1} + n\right)}$$

and so indeed

$${\int_{0}^{\infty}\arctan\left(\frac{n}{\cosh(x)}\right)dx=\frac{\pi}{2}\ln\left(\sqrt{n^2 + 1} + n\right)}$$

Related Question