Smarter way to solve $ \int_0^1\arctan(x^2)\,dx$ I'm trying to solve the following definite integral:
\begin{equation}
\int_0^1 \arctan(x^2)dx
\end{equation}
I tryed first by parial integration, finding:
\begin{equation}
x\arctan(x^2)\Bigl|_0^1-\int_0^1 \dfrac{2x^2}{1+x^4}dx
\end{equation}
Then:
\begin{equation}
\int_0^1 \dfrac{2x^2}{1+x^4}dx=\int_0^1 \dfrac{(x^2+1)+(x^2-1)}{1+x^4}dx=\int_0^1 \dfrac{x^2+1}{1+x^4}dx+\int_0^1 \dfrac{x^2-1}{1+x^4}dx
\end{equation}
and i introduced the following substitution:
\begin{equation}
t=x-\dfrac{1}{x}\qquad s=x+\dfrac{1}{x}
\end{equation}
Than I used this weird substitution:
\begin{equation}
\dfrac{\sqrt{2}}{2}\arctan\left( \dfrac{t}{\sqrt{2}} \right)\Bigl|_0^1+\int_0^1\dfrac{ds}{(s-2)(s+2)}
\end{equation}
In the end simple fraction:
\begin{equation}
\left[\dfrac{\sqrt{2}}{2}\arctan\left( \dfrac{t}{\sqrt 2} \right)+\dfrac{1}{4}\log(2-s)-\dfrac{1}{4}\log(s+2)\right]_0^1
\end{equation}
and that is the solution.
Now: does it exist a simpler path to solve this integral?
 A: I wouldn't necessarily say it is simpler, but it is more systematic and the same method can be applied to integrating general rational functions of $x$.
You already got to the point of calculating $$x\arctan(x^2)\bigg\vert_0^1 - \int\limits_0^1\frac{2x^2}{1+x^4}dx = \frac{\pi}{4} - \int\limits_0^1\frac{2x^2}{1+x^4}dx$$
Now we use the factorization $x^4 + 1 = (x^2 + \sqrt{2}x + 1)(x^2 - \sqrt{2}x + 1)$, which allows writing: $$\frac{2x^2}{1+x^4} = \frac{2x^2}{(x^2 + \sqrt{2}x + 1)(x^2 - \sqrt{2}x + 1)} = \frac{Ax+B}{x^2 + \sqrt{2}x + 1} + \frac{Cx+D}{x^2 - \sqrt{2}x + 1}$$
We can solve for $A, B, C, D$ and find $$\frac{2x^2}{1+x^4} = \frac{\frac{\sqrt{2}}{2}x}{x^2 - \sqrt{2}x + 1} - \frac{\frac{\sqrt{2}}{2}x}{x^2 + \sqrt{2}x + 1} = \frac{\frac{\sqrt{2}}{4}(2x - \sqrt{2}) + \frac{1}{2}}{x^2 - \sqrt{2}x + 1} - \frac{\frac{\sqrt{2}}{4}(2x + \sqrt{2}) - \frac{1}{2}}{x^2 + \sqrt{2}x + 1}$$
After separating terms and completing the squares in the denominators of the last two terms we get:
$$\frac{\sqrt{2}}{4}\frac{2x - \sqrt{2}}{x^2 - \sqrt{2}x + 1} - \frac{\sqrt{2}}{4}\frac{2x + \sqrt{2}}{x^2 + \sqrt{2}x + 1} + \frac{1}{2}\frac{1}{\left(x - \frac{\sqrt{2}}{2}\right)^2+\frac{1}{2}} + \frac{1}{2}\frac{1}{\left(x + \frac{\sqrt{2}}{2}\right)^2+\frac{1}{2}}$$
The first two terms can be integrated easily with the substitution $u = x^2 - \sqrt{2}x + 1$ or $u = x^2 + \sqrt{2}x + 1$ respectively, and the standard integral $\int\frac{1}{u}du = \ln u + C$.
The last two terms are integrated with the substitution $u = x - \frac{\sqrt{2}}{2}$ or $u = x + \frac{\sqrt{2}}{2}$ and the standard integral $\int\frac{1}{u^2 + a^2}du = \frac{1}{a}\arctan\left(\frac{u}{a}\right) + C$ with $a = \frac{\sqrt{2}}{2}$.
The result is: $$\int\limits_0^1\frac{2x^2}{1+x^4}dx = $$
$$\frac{\sqrt{2}}{4}\ln\left(x^2 - \sqrt{2}x + 1\right)\bigg\vert_0^1 - \frac{\sqrt{2}}{4}\ln\left(x^2 + \sqrt{2}x + 1\right)\bigg\vert_0^1 + $$ $$\frac{\sqrt{2}}{2}\arctan\left(\sqrt{2}x-1\right)\bigg\vert_0^1 + \frac{\sqrt{2}}{2}\arctan\left(\sqrt{2}x+1\right)\bigg\vert_0^1$$
$$ = \frac{\sqrt{2}}{4}\ln(2 - \sqrt{2}) - \frac{\sqrt{2}}{4}\ln(2 + \sqrt{2}) + \frac{\sqrt{2}}{2}\arctan(\sqrt{2}-1) + \frac{\sqrt{2}}{2}\arctan(\sqrt{2}+1) $$
$$ = \frac{\sqrt{2}}{2}\ln\left(\sqrt{2} - 1\right) + \frac{\sqrt{2}\pi}{4}$$
So finally the integral is $$\int_0^1\arctan\left(x^2\right)dx = \frac{(1 - \sqrt{2})\pi}{4} - \frac{\sqrt{2}}{2}\ln\left(\sqrt{2}-1\right)$$
A: First you need to write $x^4+1$ as a product of factors that are irreducible in the ring of real polynomials.$$x^4+1=(x^2+1)^2-(\sqrt 2 x)^2 $$ $$(x^2+1-\sqrt2 x)(x^2+1+\sqrt 2 x)$$ $$=(x^2-\sqrt 2 x+1)(x^2+\sqrt 2 x+1)$$.Then decompose $$\frac{2x^2}{(x^2-\sqrt 2 x+1)(x^2+\sqrt 2 x+1)}$$ into partial fractions as $$\frac{Ax+B}{x^2-\sqrt 2 x+1}+\frac{Cx+D}{x^2+\sqrt 2 x+1} $$. Find $A,B,C,D$. Then you should have no troble integrating to obtain terms involving ln and arctan functions.
