How to evaluate $\int_0^1\arctan (1-x+x^2)dx$? I tried using $\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$ but it's giving back the same result. I tried using integration by parts but it's giving a very long answer. 
Is there any simple way to do this?
Btw the answer to this question is $\log 2$.
 A: Let $\displaystyle I = \int^{1}_{0}\tan^{-1}(1-x+x^2)dx = \int^{1}_{0}\frac{\pi}{2}dx-\int^{1}_{0}\cot^{-1}(1-x+x^2)dx$
So $\displaystyle I = \frac{\pi}{2}-\int^{1}_{0}\tan^{-1}\left(\frac{1}{1-x(1-x)}\right)dx = \frac{\pi}{2}-\int^{1}_{0}(\tan^{-1}(x)+\tan^{-1}(1-x))dx$
using $\displaystyle \int^{a}_{0}f(x)dx = \int^{a}_{0}f(a-x)dx$
So $\displaystyle I = \frac{\pi}{2}-2\int^{1}_{0}\tan^{-1}(x)\cdot 1dx$
Using by parts
So $\displaystyle I = \frac{\pi}{2}-2\bigg(x\tan^{-1}(x)\bigg|_{0}^{1}-\int^{1}_{0} \frac{x}{1+x^2}dx\bigg)=\frac{\pi}{2}-\frac{\pi}{2}+\frac{2\ln 2}{2}=\ln (2)$
A: As $1-x+x^2=\dfrac{3+(2x-1)^2}4>0,$
$$\tan^{-1}(1-x+x^2)$$
$$=\dfrac\pi2-\cot^{-1}(1-x+x^2)$$
$$=\dfrac\pi2-\tan^{-1}\dfrac1{1-x+x^2}$$
$$=\dfrac\pi2-\tan^{-1}\dfrac{x-(x-1)}{1+x(x-1)}$$
Now
$$\tan^{-1}\dfrac{x-(x-1)}{1+x(x-1)}=\tan^{-1}x-\tan^{-1}(x-1)$$
Now use Integration by parts
A: Hint:
$$\int_0^1\arctan (1-x+x^2)dx$$ $$=\frac{\pi}{2}-\int_{0}^{1}\arctan \frac1{1-x+x^2}dx$$ $$=\frac{\pi}{2}-\int_0^1 \arctan (x)-\arctan (x-1)dx$$
Can you take it from here??
