8

The original integral is $\displaystyle{ \int_{0}^{\infty} \frac{-\arctan(x)}{(1 + x^2)^n} \, dx }$. I started with introducing $\arctan(x)$ in the $dx$, so it becomes $\displaystyle{ \int_{0}^{\infty} \frac{-\arctan(x)}{(1 + x^2)^{n - 1}} \, d(\arctan(x)) }$ and we make substitution $t = \arctan(x)$ and it becomes $\displaystyle{ \int_{0}^{\frac{\pi}{2}} -t \cos^{2n - 2}(t) \, dt }$.

Now this very much looks like the Wallis' Integral, but not exactly. So what would be the easiest way to solve it from here? Or if you have any ideas I would be so thankful to hear!

Integreek
  • 8,530
Si Ning
  • 125

5 Answers5

14

It is possible to give a recurrence relation for the integrals.

Let $I_n=\int\limits_0^{\pi/2}t(\cos t)^{2n}\,dt.$ For $n\ge 1$ we have $$I_n=\int\limits_0^{\pi/2}\cos t\,[t(\cos t)^{2n-1}]\,dt\\ =\sin t\, [t\,(\cos t)^{2n-1}]\Big\vert_0^{\pi/2}-\int\limits_0^{\pi/2}\sin t\,[(\cos t)^{2n-1}-(2n-1)t\,(\cos t)^{2n-2}\,\sin t]\,dt\\ = {1\over 2n}(\cos t)^{2n}\big\vert_0^{\pi/2}+(2n-1)\int\limits_0^{\pi/2}t\,(\cos t)^{2n-2}[1-(\cos t)^2]\,dt\\ = -{1\over 2n}+(2n-1)I_{n-1}-(2n-1)I_{n}$$ Therefore $$I_n= {2n-1\over 2n}I_{n-1}-{1\over 4n^2}$$ We have $I_0={\pi^2\over 8}.$ Let $a_n={2n-1\over 2n}$ and $b_n=-{1\over 4n^2}.$ Then $$I_n=[b_n+a_nb_{n-1}+a_na_{n-1}b_{n-2}+\ldots +a_n\ldots a_2b_1]\\ +a_n\ldots a_1I_0$$

Remark The formula doesn't give a reasonable asymptotic behavior of $I_{n}.$ The asymptotic can be derived directly from the integral formula. We have $\sin t\le t\le \sin t+t^3/6$ and $t\le (\pi/2)\sin t.$ Hence $$I_n\ge \int\limits_0^{\pi/2}\sin t\,(\cos t)^{2n}\,dt ={1\over 2n+1}\\I_n\le \int\limits_0^{\pi/2}\sin t\,(\cos t)^{2n}\,dt +{1\over 6}\int\limits_0^{\pi/2}t^3(\cos t)^{2n}\,dt\\ \le {1\over 2n+1}+{1\over 6}{\pi^3\over 8}\int\limits_0^{\pi/2}(\sin t)^3(\cos t)^{2n}\,dt \\ ={1\over 2n+1}+{\pi^3\over 48}\int\limits_0^{\pi/2}\sin t\,[1-(\cos t)^2](\cos t)^{2n}\,dt\\ ={1\over 2n+1}+{\pi^3\over 48}\left ({1\over 2n+1}-{1\over 2n+3}\right )$$ Thus $I_n\approx {1\over 2n}.$

  • 1
    We can write the coefficient of $I_0$ in your final result as $$a_n\cdots a_1 =\frac{(2n)!}{(2n)!!^2}=\frac{1}{4^n}\binom{2n}{n}=\frac{2}{\pi}\int_0^{\pi/2} \cos^{2n}(t)dt$$ (proof). Hence the bracketed part of the final result is of the form $$-[b_n+\cdots]=F_n:=\int_0^{\pi/2}(\pi/4-t)\cos^{2n}(t)dt$$ Integrating $F_n$ by parts now yields $F_n=-\frac{1}{(2n)^2}-\frac{2n-1}{2n}F_n$ with $F_0=0$, generating a positive rational sequence that I haven't found on OEIS: $F_{n\geq 1}=1/4,1/4,17/72,2/9,21/100,\ldots$. – Semiclassical Apr 18 '25 at 20:48
7

Using the identity $\cos^n x = \frac{1}{2^n} \sum_{k=0}^{n} \binom{n}{k} e^{i (2k - n) x}$, we have

$$ \cos^{2n - 2} t = \frac{1}{2^{2n - 2}} \sum_{k=0}^{2n - 2} \binom{2n - 2}{k} e^{i (2k - (2n - 2)) t} = \frac{1}{2^{2n - 2}} \sum_{k=0}^{2n - 2} \binom{2n - 2}{k} e^{2i (k - n + 1) t} $$ $$ I_n = \int_{0}^{\frac{\pi}{2}} -t \cdot \frac{1}{2^{2n - 2}} \sum_{k=0}^{2n - 2} \binom{2n - 2}{k} e^{i 2 (k - n + 1) t} \, dt $$

Interchanging the sum and integral:

$$ I_n = -\frac{1}{2^{2n - 2}} \sum_{k=0}^{2n - 2} \binom{2n - 2}{k} \int_{0}^{\frac{\pi}{2}} t e^{i 2 (k - n + 1) t} \, dt $$

We have $ \int_{0}^{\frac{\pi}{2}} t e^{i \lambda_k t} \, dt = -\frac{2 + (2 - i \pi \lambda_k) e^{i \frac{\pi}{2} \lambda_k}}{2 \lambda_k^2} $

Here, $\lambda_k = 2 (k - n + 1)$, leaving us with:

$$ I_n = -\frac{1}{2^{2n - 2}} \sum_{k=0}^{2n - 2} \binom{2n - 2}{k} \left( -\frac{2 + (2 - i \pi \lambda_k) e^{i \frac{\pi}{2} \lambda_k}}{2 \lambda_k^2} \right) $$

$$ = \frac{1}{2^{2n - 1}} \sum_{k=0}^{2n - 2} \binom{2n - 2}{k} \frac{2 + (2 - i \pi \lambda_k) e^{i \frac{\pi}{2} \lambda_k}}{\lambda_k^2} $$

$\lambda_k^2 = 4 (k - n + 1)^2$, and $ e^{i \frac{\pi}{2} \lambda_k} = e^{i \frac{\pi}{2} \cdot 2 (k - n + 1)} = e^{i \pi (k - n + 1)} = (-1)^{k - n + 1} $

$$ I_n = \frac{1}{2^{2n - 1}} \sum_{k=0}^{2n - 2} \binom{2n - 2}{k} \frac{2 + [2 - i \pi \cdot 2 (k - n + 1)] (-1)^{k - n + 1}}{4 (k - n + 1)^2} $$

$$ = \frac{1}{2^{2n + 1}} \sum_{k=0}^{2n - 2} \binom{2n - 2}{k} \frac{2 + [2 - 2i \pi (k - n + 1)] (-1)^{k - n + 1}}{(k - n + 1)^2} $$

4

I just want to slightly improve upon Random Math Enthusiast's answer: He started with the formula $$\cos(x)^n = \frac{1}{2^n} \sum_{k=0}^{n} \binom{n}{k} \mathrm e^{\mathrm i (2k - n) x}$$ I want to get rid of the pesky $\mathrm i$'s as this integral should be real valued. Taking the real part on both sides gives $$\cos(x)^n = \frac{1}{2^n} \sum_{k=0}^{n} \binom{n}{k} \cos\big((2k - n) x\big)$$ Taking $n\to 2n$ , $$\cos(x)^{2n}=\frac{1}{2^{2n}}\sum_{k=0}^{2n}\binom{2n}{k}\cos\big(2(n-k)x\big)$$ This sum contains $2n+1$ terms, and so we partition it as $$\{0,\dots,2n\}=\{0,\dots,n-1\}\cup\{n\}\cup\{n+1,\dots, 2n\}$$ Hence $$\cos(x)^{2n}\\=\binom{2n}{n}+\frac{1}{2^{2n}}\sum_{k=0}^{n-1} \binom{2n}{k}\cos\big(2(n-k)x\big)+\frac{1}{2^{2n}}\sum_{k=n+1}^{2n} \binom{2n}{k}\cos\big(2(n-k)x\big)$$ We now perform two index shifts, $m=n-k$ and $l=k-n$. $$\cos(x)^{2n}= \\ \frac{1}{2^{2n}}\binom{2n}{n}+\frac{1}{2^{2n}}\sum_{m=1}^{n}\binom{2n}{n-m}\cos(2mx)+\frac{1}{2^{2n}}\sum_{l=1}^{n}\binom{2n}{n+l}\cos(2lx) $$ We now combine the two sums $$\cos(x)^{2n}=\frac{1}{2^{2n}}\binom{2n}{n}+\frac{1}{2^{2n}}\sum_{k=1}^n\left[\binom{2n}{n-k}+\binom{2n}{n+k}\right]\cos(2kx)$$ Since $\mathrm C(2n,n+k)=\mathrm C(2n,n-k)$ (draw a picture!) this gives $$\cos(x)^{2n}=\frac{1}{2^{2n}}\binom{2n}{n}+\frac{2}{2^{2n}}\sum_{k=1}^n\binom{2n}{n-k}\cos(2kx)$$ Including the $k=0$ term, $$\cos(x)^{2n}=-\frac{1}{2^{2n}}\binom{2n}{n}+\frac{1}{2^{2n-1}}\sum_{k=0}^n\binom{2n}{n-k}\cos(2kx)$$ Thus, $$A_n=\int_{0}^{\pi/2}t~{\cos(t)}^{2n}\mathrm dt \\ =\int_0^{\pi/2}t\left[-\frac{1}{2^{2n}}\binom{2n}{n}+\frac{1}{2^{2n-1}}\sum_{k=0}^n\binom{2n}{n-k}\cos(2kt)\right]\mathrm dt$$ Interchanging sum and integral $$A_n=-\frac{\pi^2}{2^{2n+3}}\binom{2n}{n}+\frac{1}{2^{2n-1}}\sum_{k=0}^n \binom{2n}{n-k}\int_{0}^{\pi/2}t\cos(2kt)\mathrm dt$$ A simple integration exercise shows that, for $k\in\Bbb N_0$, $$\int_{0}^{\pi/2}t\cos(2kt)\mathrm dt=\begin{cases}\frac{(-1)^k-1}{4k^2} & k\neq 0 \\ \frac{\pi^2}{4} & k=0\end{cases}$$ Thus $$A_n=\pi^2\frac{1}{2^{2n+3}}\binom{2n}{n}+\frac{1}{2^{2n-1}}\sum_{k=1}^n\binom{2n}{n-k}\frac{(-1)^k-1}{4k^2}$$ Splitting the sum, $$\boxed{A_n=\pi^2~2^{-2n-3}\binom{2n}{n}-2^{-2n-1}\sum_{k=1}^n \binom{2n}{n-k}\frac{1}{k^2}+2^{-2n-1}\sum_{k=1}^n \binom{2n}{n-k}\frac{(-1)^k}{k^2}}$$

There is almost certainly a hypergeometric representation of this sum, but that will take me some extra time to compute.

K.defaoite
  • 13,890
  • Here $\mathrm B(x,y)=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}$ is the Beta function and $C(x,y)=\frac{\Gamma(x+1)}{\Gamma(x-y+1)\Gamma(y+1)}$ is the binomial coefficient. – K.defaoite Apr 20 '25 at 03:35
  • Rather than splitting up the sum at the end, one can note that $(-1)^k-1=0$ when $k$ is even. So we just get a sum over odd $k$: $$A_n=\frac{\pi^2}{8}\frac{1}{2^{2n}}\binom{2n}{n}-\frac{1}{2^{2n}}\sum_{\substack{k=1\\text{odd}}}^n\binom{2n}{n-k}\frac{1}{k^2}$$ Here I've also written the first term in the spirit of my comment to Ryszard Szwarc's answer. – Semiclassical Apr 20 '25 at 21:10
  • @Semiclassical I mean sure, you can do that. The reason I split it up was so that I could reformulate in terms of hypergeometrics. – K.defaoite Apr 20 '25 at 21:31
2

Hypergeometric representations.

From my previous answer, of interest is the sum $$f_n(z)=2^{-2n-1}\sum_{k=1}^n \binom{2n}{n-k}\frac{1}{k^2}z^{k-1}$$ First, we shift the index by $1$ - $$f_n(z)=2^{-2n-1}\sum_{k=0}^{n-1}\binom{2n}{n-k-1}\frac{1}{(k+1)^2}z^k\tag{1}$$ Owing to the fact that $$\binom{2n}{n-k-1}=\frac{\Gamma(2n+1)}{\Gamma(n+k+2)\Gamma(n-k)}$$ We can safely extend this sum to $k\to\infty$ since $\frac{1}{\Gamma(n-k)}=0$ for $k\geq n$. Now, using the Legendre duplication formula, one can easily see $$\binom{2n}{n-k-1}=\frac{n~2^{2n}}{(n+1)!}\frac{\Gamma(n+1/2)}{\Gamma(1/2)}~\frac{k!}{(n+2)^{\overline k}}~\binom{n-1}{k}$$ Where $(x)^{\overline k}=\prod_{m=0}^{k-1}(x+m)$ is the rising factorial. Using the rising factorial definition of the binomial coefficient $$\binom{x}{k}=(-1)^k\frac{(-x)^{\overline k}}{k!}$$ And the obvious representation $k!=(1)^{\overline k}$ We can write $$\binom{2n}{n-k-1}=\frac{n~2^{2n}}{(n+1)!}\frac{\Gamma(n+1/2)}{\Gamma(1/2)}~\frac{(1)^{\overline k}(1-n)^{\overline k}}{(n+2)^{\overline k}}~\frac{(-1)^k}{k!}$$ Finally, we note the useful representation $$k+1=\frac{(2)^{\overline k}}{(1)^{\overline k}}$$ So $$\frac{1}{(k+1)^2}=\frac{(1)^{\overline k}(1)^{\overline k}}{(2)^{\overline k}(2)^{\overline k}}$$

Therefore, returning all the way to $(1)$, we find $$f_n(z)=\\2^{-2n-1}\frac{n~2^{2n}}{(n+1)!}\frac{\Gamma(n+1/2)}{\Gamma(1/2)}\sum_{k=0}^\infty \frac{(1)^{\overline k}(1-n)^{\overline k}}{(n+2)^{\overline k}}\frac{(1)^{\overline k}(1)^{\overline k}}{(2)^{\overline k}(2)^{\overline k}}~\frac{(-1)^kz^k}{k!}$$ Simplifying, $$\boxed{f_n(z)=\frac{1}{2}\frac{1}{n+1}\frac{1}{\mathrm B(n,1/2)}{}_4F_3\left(\begin{matrix}(1-n),1,1,1 \\ (n+2),2,2\end{matrix}~\bigg|~-z\right)}$$ Meaning $$A_n=\pi^2 2^{-2n-3}\binom{2n}{n}-f_n(-1)-f_n(1)$$ $$A_n=\\ \pi^2 2^{-2n-3}\binom{2n}{n}-\frac{1}{2}\frac{1}{n+1}\frac{1}{\mathrm B(n,1/2)}\left[{}_4F_3\left(\begin{matrix}(1-n),1,1,1 \\ (n+2),2,2\end{matrix}~\bigg|~-1\right)+{}_4F_3\left(\begin{matrix}(1-n),1,1,1 \\ (n+2),2,2\end{matrix}~\bigg|~1\right)\right]$$

Via the even part identity $$\frac{1}{2}{}_pF_q\left(\begin{matrix}a_1,\dots ,a_p \\ b_1,\dots,b_q\end{matrix}~\bigg|~z\right)+\frac{1}{2}{}_pF_q\left(\begin{matrix}a_1,\dots ,a_p \\ b_1,\dots,b_q\end{matrix}~\bigg|~-z\right) \\ ={}_{2p}F_{2q+1}\left(\begin{matrix}\frac{a_1}{2},\dots,\frac{a_p}{2},\frac{a_p+1}{2},\dots,\frac{a_p+1}{2} \\ \frac{b_1}{2},\dots,\frac{b_q}{2},\frac{b_1+1}{2},\dots,\frac{b_q+1}{2},\frac{1}{2}\end{matrix}~\bigg|~4^{p-q-1}z^2\right)$$ We see that this is equivalent to $$\boxed{A_n= \pi^2 2^{-2n-3}\binom{2n}{n}-\frac{1}{n+1}\frac{1}{\mathrm B(n,1/2)}~{}_5F_4\left(\begin{matrix}\frac{1-n}{2},1-\frac{n}{2},\frac{1}{2},\frac{1}{2},1 \\ \frac{n}{2}+1,\frac{n+3}{2},\frac{3}{2},\frac{3}{2}\end{matrix}~\bigg|~1\right)}$$

Feel free to numerically check my work.

K.defaoite
  • 13,890
  • Here $\mathrm B(x,y)=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}$ is the Beta function and $C(x,y)=\frac{\Gamma(x+1)}{\Gamma(x-y+1)\Gamma(y+1)}$ is the binomial coefficient. – K.defaoite Apr 20 '25 at 03:31
  • Perhaps there is some way to relate the final form in terms of polygamma functions or something using these identities, or, perhaps there is not. – K.defaoite Apr 20 '25 at 19:53
0

To make the story short, if you enjoy hypergeometric functions, another formula $$I_n=\int_{0}^{\pi/2} t \cos^{2n - 2}(t) \, dt=\frac{\, _3F_2\left(\frac{1}{2},\frac{1}{2},1 ;\frac{3}{2},n+\frac{1}{2};1\right)}{2 n-1}$$

Asymptotically $$I_n=\frac{1}{2 n}+\frac{1}{3n^2}+\frac{1}{5 n^3}+\frac{1}{10 n^4}+\frac{1}{10 n^5}+O\left(\frac{1}{n^6}\right)$$ Using this truncated formula $$I_{10}=\color{red}{0.053543}33$$ corresponding to an absolute error of $2.45\times 10^{-8}$.

  • Claude, how did you obtain this formula? I was able to compute in terms of ${}_4F_3$ but not ${}_3F_2$. – K.defaoite Apr 26 '25 at 00:05
  • @K.defaoite. What I do not remember is how I simplified the result $$\frac{\pi 4^{-n} \Gamma (2 n-1) , _3F_2\left(\frac{1}{2},n-\frac{1}{2},n;n+\frac{1}{2},n+\frac{1}{2};1\right)}{\Gamma \left(n+\frac{1}{2}\right)^2}$$ – Claude Leibovici Apr 26 '25 at 02:47
  • Even that expression, I am not sure how you obtained it. If you take a look at my answer, using the geometric series expansion for cosine, I was unable to obtain anything simpler than a ${}_4F_3$. Did you instead integrate termwise with a Taylor series? I don't think the Taylor series for $\cos(x)^{2n}$ is straightforward, though... – K.defaoite Apr 26 '25 at 03:47