Reasoning in an integration substitution 
Evaluate: $\displaystyle\int_{0}^{1}\frac{\ln(x+1)}{x^2+1}\,\mathrm{d}x$

So I did this a completely different way than what the answer key states. I used integration by parts and some symmetry tricks and got the correct answer. However the answer key says: 

Make the substitution $x=\frac{1-u}{1+u}$

The same solution was reached in about half the steps but still using symmetry, my questions are How would I know to do that? Is this a certain type of substitution? Is there something else that maybe I could use this for?

Set
$$x=\tan t, \qquad dt=\dfrac1{1+x^2}dx,$$ Then
$$
\begin{align}
\int_0^1 \frac{\ln(1+x)}{1+x^2}\, dx&= \int_0^{\pi/4} \ln(\cos t +\sin t)\, dt- \int_0^{\pi/4} \ln(\cos t)\, dt\\\\
&=\int_0^{\pi/4} \ln\left(\sqrt{2}\cos \left(\frac \pi4- t\right)\right)\, dt- \int_0^{\pi/4} \ln(\cos t)\, dt\\\\
&=\int_0^{\pi/4} \ln\left(\sqrt{2}\right)\, dt+\int_0^{\pi/4} \ln\left(\cos \left(\frac \pi4- t\right)\right)\, dt- \int_0^{\pi/4} \ln(\cos t)\, dt\\\\
&=\frac{\pi}8 \:\ln 2+\int_0^{\pi/4} \ln(\cos u)\, du-\int_0^{\pi/4} \ln(\cos t)\, dt\quad \left(u=\frac \pi4- t\right)\\\\
&=\frac{\pi}8 \:\ln 2.
\end{align}
$$
