<s>[INST] Show that $\int_0^1 \tan^{-1}\left(\frac{3(1+x)}{1-2x-x^2}\right) \frac{dx}{1+x^2} = \frac{\pi^2}{8}$ $\displaystyle \int_0^1 \tan^{-1}\left(\frac{3(1+x)}{1-2x-x^2}\right) \frac{dx}{1+x^2} = \frac{\pi^2}{8}$
I had been told that $x =\displaystyle \frac{1-y}{1+y}$ solves it, but it takes me back to where I started.
 [/INST] Using the suggested substitution $x = \dfrac{1-y}{1+y}$, we get 
$\dfrac{3(1+x)}{1-2x-x^2} = -\dfrac{3(1+y)}{1-2y-y^2} \ \ \ \ \ \ \ \ \dfrac{1}{1+x^2} = \dfrac{(1+y)^2}{2(1+y^2)} \ \ \ \ \ \ \ \ dx = \dfrac{-2}{(1+y)^2}\,dy$.
and thus, 
$I = \displaystyle \int_0^1 \tan^{-1}\left(\frac{3(1+x)}{1-2x-x^2}\right) \frac{dx}{1+x^2}$ 
$= \displaystyle \int_1^0 \tan^{-1}\left(-\frac{3(1+y)}{1-2y-y^2}\right)\cdot \dfrac{(1+y)^2}{2(1+y^2)} \cdot \dfrac{-2}{(1+y)^2}\,dy$ 
$= \displaystyle \int_0^1 \tan^{-1}\left(-\frac{3(1+y)}{1-2y-y^2}\right) \frac{dy}{1+y^2}$ 
$= \displaystyle \int_0^1 \tan^{-1}\left(-\frac{3(1+x)}{1-2x-x^2}\right) \frac{dx}{1+x^2}$. 
Now, assuming we use a definition of $\arctan$ whose range is $[0,\tfrac{\pi}{2}) \cup (\tfrac{\pi}{2},\pi)$ instead of the usual $(-\tfrac{\pi}{2},\tfrac{\pi}{2})$ then we have $\arctan(A) + \arctan(-A) = \pi$. Hence, 
$2I = I + I = $ $\displaystyle \int_0^1 \tan^{-1}\left(\frac{3(1+x)}{1-2x-x^2}\right) \frac{dx}{1+x^2} + \int_0^1 \tan^{-1}\left(-\frac{3(1+x)}{1-2x-x^2}\right) \frac{dx}{1+x^2}$ 
$= \displaystyle \int_0^1 \left[\tan^{-1}\left(\frac{3(1+x)}{1-2x-x^2}\right)+\tan^{-1}\left(-\frac{3(1+x)}{1-2x-x^2}\right)\right]\frac{dx}{1+x^2}$
$= \displaystyle\int_0^1 \pi \dfrac{dx}{1+x^2}$ 
$= \pi \cdot \dfrac{\pi}{4} = \dfrac{\pi^2}{4}$. 
Since $2I =  \dfrac{\pi^2}{4}$, we have $I =  \dfrac{\pi^2}{8}$.
Remark: If we use the usual definition of $\arctan$ whose range is $(-\tfrac{\pi}{2},\tfrac{\pi}{2})$, then we get $I = 0$, which is what Wolfram Alpha suggests as the answer.
</s>