Integration – Compute ?_{-1}^{1} x?x tan?¹(?x) dx

definite integralsintegration

I was trying to make an IBP problem for an integration bee.
I came up with the simple arctan integral with the square roots just for an easy round.
However, WolframAlpha challenged me a suggestion, which was adding the bounds -1 to 1.
I was so confused because I thought it was undefined, divergent, or complex. But it turns out the answer is real and defined.

My attempt was performing integration by parts in which I got the indefinite answer:
$$ \left [ \frac{2}{5}x^{\frac{5}{2}}\tan^{-1}(\sqrt{x})-\frac{x^2}{10}+\frac{1}{5}x-\frac{1}{5}\ln|x+1| \right ]_{-1}^{1}$$
The hardest part was inputting the bounds as I am unaware of some weird odd values.
$$\frac{\pi}{10}+\frac{1}{10}-\frac{1}{5}\ln(2)-\left(\frac{2}{5}i\tan^{-1}(i)-\frac{3}{2}-\ln(0)\right)$$
Not only that, the answer is $\frac{2}{5}+\frac{\pi}{10}+\frac{\ln(2)}{5}$.

Did I do anything wrong? How do I come to this exact answer???

Best Answer

We first split the integration interval into two. $$ \int_{-1}^1 x \sqrt{x} \tan ^{-1} \sqrt{x} d x = \underbrace{\int_0^1 x \sqrt{x} \tan ^{-1} \sqrt{x} d x}_{\frac{\pi}{10}+\frac{1}{10}-\frac{1}{5} \ln (2)} + \underbrace{ \int_{-1}^0 x \sqrt{x} \tan ^{-1} \sqrt{x} d x}_{J} $$ For the integral $J$, we let $x\mapsto -x$ yields $$ \begin{aligned} J & =-\int_0^1 x(\sqrt{x} i) \tan ^{-1}(i \sqrt{x}) d x \\ & =\int_0^1 x \sqrt{x} \operatorname{arctanh}(\sqrt{x}) d x \\ & =2 \int_0^1 x^4 \operatorname{arctanh} x d x \end{aligned} $$ By the expansion of arctanh $x$, we have $$ \begin{aligned} J& =2 \int_0^1 x^4 \sum_{n=0}^{\infty} \frac{x^{2 n+1}}{2 n+1} d x \\ & =2 \sum_{n=0}^{\infty} \frac{1}{2 n+1} \int_0^1 x^{2 n+5} d x \\ & =2 \sum_{n=0}^{\infty} \frac{1}{(2 n+1)(2 n+6)} \\ & =\frac{1}{5} \sum_{n=0}^{\infty}\left(\frac{1}{n+\frac{1}{2}}-\frac{1}{n+3}\right) \\ & =\frac{1}{5}\left(\psi(3)-\psi\left(\frac{1}{2}\right)\right)\\&= \frac{1}{5}\left((\frac32-\gamma)-(-\gamma-2\ln 2) \right)\\&=\frac{1}{5}\left(\frac{3}{2}+2\ln 2\right) \end{aligned}$$

where $\psi(.)$ is the Digamma Function.

Hence $$I= \frac{\pi}{10}+\frac{1}{10}-\frac{1}{5} \ln (2)+\frac{1}{5}\left(\frac{3}{2}+\ln 4\right)= \frac{2}{5}+\frac{\pi}{10}+\frac{\ln(2)}{5} $$ In general, $$ \boxed{\int_{-1}^1 x^k \sqrt{x} \tan ^{-1}(\sqrt{x}) d x=\frac{1}{2(2 k+3)}\left[(\pi+1-2 \ln 2)+2\left(\psi(k+2)-\psi\left(\frac{1}{2}\right)\right)\right]} $$