Integrating a function of tan inverse
How would I carry out the following integration? $$\int_0^12\arctan x^2$$
I tried to substitute $x^2 = \tan\theta$ From there I wrote the integral as: $$\int_0^{\pi/4}\theta\cdot \frac{\sec^2\theta}{\sqrt{\tan\theta}}\ d\theta$$
Now, is my only option to use integration by parts? Or is there a better method to solve this integral?
$\endgroup$3 Answers
$\begingroup$Notice,you can use integration by parts as follows
$$\int_0^1 2\tan^{-1}(x^2)\ dx=2\int_0^1 \tan^{-1}(x^2)\cdot 1\ dx$$
$$=2\left(\tan^{-1}(x^2)\int 1\ dx-\int \left(\frac{d}{dx}(\tan^{-1}(x^2))\int 1\ dx \right)\ dx\right)_0^1$$
$$=2\left(x\tan^{-1}(x^2)-\int \frac{2x^2}{1+x^4}\ dx\right)_0^1$$
$$=2\left(x\tan^{-1}(x^2)-\int \frac{2}{x^2+\frac{1}{x^2}}\ dx\right)_0^1$$
$$=2\left(x\tan^{-1}(x^2)-\int \frac{\left(1+\frac{1}{x^2}\right)+\left(1-\frac{1}{x^2}\right)}{x^2+\frac{1}{x^2}}\ dx\right)_0^1$$
$$=2\left(x\tan^{-1}(x^2)-\int \frac{\left(1+\frac{1}{x^2}\right)}{x^2+\frac{1}{x^2}}\ dx-\int \frac{\left(1-\frac{1}{x^2}\right)}{x^2+\frac{1}{x^2}}\ dx\right)_0^1$$
$$=2\left(x\tan^{-1}(x^2)-\int \frac{\left(1+\frac{1}{x^2}\right)dx}{\left(x-\frac{1}{x}\right)^2+2}-\int \frac{\left(1-\frac{1}{x^2}\right)dx}{\left(x+\frac{1}{x}\right)^2-2}\right)_0^1$$
$$=2\left(x\tan^{-1}(x^2)-\int \frac{d\left(x-\frac{1}{x}\right)}{\left(x-\frac{1}{x}\right)^2+(\sqrt 2)^2}-\int \frac{d\left(x+\frac{1}{x}\right)}{\left(x+\frac{1}{x}\right)^2-(\sqrt 2)^2}\right)_0^1$$
$$=2\left(x\tan^{-1}(x^2)-\frac{1}{\sqrt 2}\tan^{-1}\left(\frac{x-\frac 1x}{\sqrt 2}\right)-\frac{1}{2\sqrt 2}\ln\left|\frac{x+\frac 1x-\sqrt 2}{x+\frac 1x+\sqrt 2}\right|\right)_0^1$$ $$=2\left(x\tan^{-1}(x^2)-\frac{1}{\sqrt 2}\tan^{-1}\left(\frac{x^2-1}{x\sqrt 2}\right)-\frac{1}{2\sqrt 2}\ln\left|\frac{x^2+1-x\sqrt 2}{x^2+1+x\sqrt 2}\right|\right)_0^1$$ $$=2\left(1\cdot \frac{\pi}{4}-\frac{1}{\sqrt 2}\tan^{-1}\left(0\right)-\frac{1}{2\sqrt 2}\ln\left|\frac{2-\sqrt 2}{2+\sqrt 2}\right|-0-\frac{1}{\sqrt 2}\cdot \frac{\pi}{2}+0\right)$$ $$=\color{blue}{\frac{\pi}{2}-\frac{\pi}{\sqrt 2}-\frac{1}{\sqrt 2}\ln(3-2\sqrt 2)}$$
$\endgroup$ $\begingroup$By integrating by parts:
$$\int_0^1\arctan(x^2)dx=x\arctan(x^2)\Big|_0^1-2\int_0^1\frac{x^2}{1+x^4}dx$$ and we compute the last integral by the usual ways.
$\endgroup$ 2 $\begingroup$By using the Taylor series of the arctangent function, $\arctan(x)=\sum_{n\geq 0}\frac{(-1)^n x^{2n+1}}{2n+1}$, we get: $$ \int_{0}^{1}\arctan(x^2)\,dx = 2\sum_{n\geq 0}\frac{(-1)^n}{(4n+2)(4n+3)}=2\sum_{n\geq 0}(-1)^n\left(\frac{1}{4n+2}-\frac{1}{4n+3}\right),$$ where the series $$\sum_{n\geq 0}\frac{(-1)^n}{4n+3} = \sum_{n\geq 0}\left(\frac{1}{8n+3}-\frac{1}{8n+7}\right)$$ can be computed through the identity $$ -\log(1-z) = \sum_{n\geq 1}\frac{z^n}{n} $$ with $z$ being a root of $\frac{z^8-1}{z-1}$, i.e. through the discrete Fourier transform. By collecting the pieces,
$$ \int_{0}^{1}\arctan(x^2)\,dx = \color{red}{\frac{\pi}{4}-\frac{\pi}{2\sqrt{2}}+\frac{1}{\sqrt{2}}\,\log(1+\sqrt{2})}.$$
As an alternative, you may notice that the problem is equivalent, by integration by parts, to computing $\int_{0}^{1}\frac{x^2}{1+x^4}\,dx$, but $$1+x^4 = (1+2x^2+x^4)-2x^2 = (1+x^2)^2-(\sqrt{2} x)^2 $$ gives $$ \frac{x^2}{1+x^4} = \frac{1}{2\sqrt{2}}\cdot\left(\frac{x}{x^2-\sqrt{2}\,x+1}-\frac{x}{x^2+\sqrt{2}\,x+1}\right)$$ and the primitive of $\frac{x}{x^2\pm\sqrt{2}\,x+1}$ is just: $$ \frac{1}{2}\,\log(x^2\pm\sqrt{2}\,x+1)\mp\arctan\left(\frac{2x\pm\sqrt{2}}{2}\right).$$
$\endgroup$ 1