How to compute this integral... I need to compute $$ \int_0^1 \frac{\arctan x}{(1+x)^2}dx$$
I tried substituting $t= \arctan x$ (check please), getting $$ \int \frac{t}{1+2\sin t \cos t}dt $$ but I still can't handle it. Any help would be useful: I haven't done integrals for years. Thanks
 A: By parts $f=\arctan x$ and $g=-\frac{1}{x+1}$
$$-\frac{\arctan x}{x+1}+\int\frac{dx}{(x+1)(x^2+1)}$$
Now partial fractions
$$-\frac{\arctan x}{x+1}+\frac 1 2\int \frac{1-x}{x^2+1}dx+\frac 1 2\int\frac{dx}{x+1}\\
=-\frac{\arctan x}{x+1}-\frac 1 2\int \frac{x}{x^2+1}dx+\frac 1 2\int\frac{dx}{x^2+1}+\frac 1 2 \int \frac {dx}{x+1}\\
=\frac{\ln(x+1)}{2}-\frac{\ln(x^2+1)}{4}-\frac{\arctan x}{x+1}+\frac {\arctan x}{2}+\mathcal C$$
$$\left(\frac{\ln(x+1)}{2}-\frac{\ln(x^2+1)}{4}-\frac{\arctan x}{x+1}+\frac {\arctan x}{2}\right)\bigg|_0^1=\frac{\ln(2)}{4}$$
A: Notice, integral $\int \frac{t}{1+2\sin t\cos t}\ dt$ after substitution is not correct. 
let $\tan^{-1}x=\theta\implies dx=\sec^2\theta \ d\theta$, 
$$\int_0^1\frac{\tan^{-1}x}{(1+x)^2}\ dx=\int_0^{\pi/4} \theta\cdot\frac{\sec^2\theta}{(1+\tan\theta)^2}\ d\theta$$
Now, using integration by parts,  $$=\left[-\frac{\theta}{1+\tan\theta}-\int1\cdot \left(-\frac{1}{1+\tan\theta}\right)\ d\theta\right]_0^{\pi/4}$$
$$=\left[-\frac{\theta}{1+\tan\theta}+\frac{1}{2}\left(\theta+\ln(\sin\theta+\cos\theta)\right)\right]_0^{\pi/4}$$
$$=\left[-\frac{\pi}{8}+\frac{1}{2}\left(\frac{\pi}{4}+\ln(\sqrt 2)\right)\right]=\color{red}{\frac{1}{4}\ln 2}$$

the following integral can be evaluated as , $$\int\frac{1}{1+\tan\theta}\ d\theta=\int \frac{\cos\theta}{\sin\theta+\cos\theta}\ d\theta=\frac 12\int \frac{(\sin\theta+\cos\theta)+(\cos\theta-\sin\theta)}{\sin\theta+\cos\theta}\ d\theta$$
  $$=\frac12\left(\int d\theta+\int\frac{d(\sin\theta+\cos\theta)}{\sin\theta+\cos\theta}\right)=\frac12\left(\theta+\ln(\sin\theta+\cos\theta)\right)+C$$

A: You may try the following, integrate by parts
$$\int \frac{\arctan x}{(1+x)^2}dx = -\frac{\arctan(x)}{x+1} + \int \frac{1}{(x+1)(x^2+1)}dx$$
and use $\frac{1}{(x+1)(x^2+1)} = \frac{1}{2}\Big(\frac{1-x}{x^2+1}+\frac{1}{x+1}\Big)$
