Integral $\int_0^1 \frac{(x^2+1)\ln(1+x)}{x^4-x^2+1}dx$
\begin{align}J&=\int_0^1 \frac{(x^2+1)\ln(1+x)}{x^4-x^2+1}dx\\ &=\int_0^1\int_0^1 \frac{x(x^2+1)}{(x^4-x^2+1)(1+xt)}\,dt\,dx\\ &=-\int_0^1\int_0^1 \frac{t(t^2+1)}{(t^4-t^2+1)(1+xt)}\,dt\,dx+\int_0^1\int_0^1 \frac{t^3+t^2x-\sqrt{3}t^2-\sqrt{3}tx+t+x}{2(t^4-t^2+1)(x^2-\sqrt{3}x+1)}\,dt\,dx+\\ &\int_0^1\int_0^1 \frac{t^3+t^2x+\sqrt{3}t^2+\sqrt{3}tx+t+x}{2(t^4-t^2+1)(x^2+\sqrt{3}x+1)}\,dt\,dx\\ &=-J+\int_0^1\int_0^1 \frac{t^3+t^2x-\sqrt{3}t^2-\sqrt{3}tx+t+x}{2(t^4-t^2+1)(x^2-\sqrt{3}x+1)}\,dt\,dx+\\ &\int_0^1\int_0^1 \frac{t^3+t^2x+\sqrt{3}t^2+\sqrt{3}tx+t+x}{2(t^4-t^2+1)(x^2+\sqrt{3}x+1)}\,dt\,dx\\ \end{align}
Since,
\begin{align}A_1&=\int_0^1 \frac{t}{t^4-t^2+1}\,dt\\ &=\frac{1}{\sqrt{3}}\left[\arctan\left(\frac{2t^2-1}{\sqrt{3}}\right)\right]_0^1\\ &=\frac{\pi}{3\sqrt{3}}\\ A_3&=\int_0^1 \frac{t^3}{t^4-t^2+1}\,dt\\ &=\frac{1}{12}\left[2\sqrt{3}\arctan\left(\frac{2t^2-1}{\sqrt{3}}\right)+3\ln(t^4-t^2+1)\right]_0^1\\ &=\frac{\pi}{6\sqrt{3}}\\ B_1&=\int_0^1 \frac{1}{x^2-\sqrt{3}x+1}\,dx\\ &=2\Big[\arctan\left(2x-\sqrt{3}\right)\Big]_0^1\\ &=\frac{5\pi}{6}\\ B_2&=\int_0^1 \frac{1}{x^2+\sqrt{3}x+1}\,dx\\ &=2\Big[\arctan\left(2x+\sqrt{3}\right)\Big]_0^1\\ &=\frac{\pi}{6}\\ C_1&=\int_0^1 \frac{x}{x^2-\sqrt{3}x+1}\,dx\\ &=\Big[\frac{1}{2}\ln\left(x^2-\sqrt{3}x+1\right)+\sqrt{3}\arctan\left(2x-\sqrt{3}\right)\Big]_0^1\\ &=\frac{1}{2}\ln\left(2-\sqrt{3}\right)+\frac{5}{4\sqrt{3}}\pi\\ C_2&=\int_0^1 \frac{x}{x^2+\sqrt{3}x+1}\,dx\\ &=\Big[\frac{1}{2}\ln\left(x^2+\sqrt{3}x+1\right)-\sqrt{3}\arctan\left(2x+\sqrt{3}\right)\Big]_0^1\\ &=\frac{1}{2}\ln\left(2+\sqrt{3}\right)-\frac{1}{4\sqrt{3}}\pi\\ A_2&=\int_0^1 \frac{t^2}{t^4-t^2+1}\,dt\\ &=\int_0^1 \frac{t^2+1}{t^4-t^2+1}\,dt-\int_0^1 \frac{1}{t^4-t^2+1}\,dt\\ &=\left[\arctan\left(\frac{x}{1-x^2}\right)\right]_0^1-\frac{1}{2\sqrt{3}}\int_0^1 \frac{x}{x^2+\sqrt{3}x+1}\,dx+\frac{1}{2\sqrt{3}}\int_0^1 \frac{x}{x^2-\sqrt{3}x+1}\,dx-\\ &\frac{1}{2}\int_0^1 \frac{1}{x^2+\sqrt{3}x+1}\,dx-\frac{1}{2}\int_0^1 \frac{1}{x^2-\sqrt{3}x+1}\,dx\\ &=\frac{\pi}{2}-\frac{1}{2\sqrt{3}}C_2+\frac{1}{2\sqrt{3}}C_1-\frac{1}{2}B_2-\frac{1}{2}B_1\\ &=\frac{\pi}{4}-\frac{1}{2\sqrt{3}}\ln\left(2+\sqrt{3}\right)\\ A_0&=\int_0^1 \frac{1}{t^4-t^2+1}\,dt\\ &=\int_0^1 \frac{1+t^2}{t^4-t^2+1}\,dt-\int_0^1 \frac{t^2}{t^4-t^2+1}\,dt\\ &=\left[\arctan\left(\frac{x}{1-x^2}\right)\right]_0^1-A_2\\ &=\frac{\pi}{4}+\frac{1}{2\sqrt{3}}\ln\left(2+\sqrt{3}\right)\\ \end{align}
then,
\begin{align} 2J&=\left(\frac{1}{2}A_3B_1+\frac{1}{2}A_2C_1-\frac{\sqrt{3}}{2}A_2B_1-\frac{\sqrt{3}}{2}A_1C_1+\frac{1}{2}A_1B_1+\frac{1}{2}A_0C_1\right)+\\ &\left(\frac{1}{2}A_3B_2+\frac{1}{2}A_2C_2+\frac{\sqrt{3}}{2}A_2B_2+\frac{\sqrt{3}}{2}A_1C_2+\frac{1}{2}A_1B_2+\frac{1}{2}A_0C_2\right)\\ \end{align}
Since,
\begin{align}\frac{1}{2}A_3B_1&=\frac{5\pi^2}{72\sqrt{3}}\\ \frac{1}{2}A_2C_1&=\frac{5\pi^2}{32\sqrt{3}}+\frac{\pi}{16}\ln\left(2-\sqrt{3}\right)-\frac{1}{8\sqrt{3}}\ln\left(2-\sqrt{3}\right)\ln\left(2+\sqrt{3}\right)-\frac{5\pi}{48}\ln\left(2+\sqrt{3}\right)\\ -\frac{\sqrt{3}}{2}A_2B_1&=\frac{5\pi}{24}\ln\left(2+\sqrt{3}\right)-\frac{5\pi^2}{16\sqrt{3}}\\ -\frac{\sqrt{3}}{2}A_1C_1&=-\frac{\pi}{12}\ln\left(2-\sqrt{3}\right)-\frac{5\pi^2}{24\sqrt{3}}\\ \frac{1}{2}A_1B_1&=\frac{5\pi^2}{36\sqrt{3}}\\ \frac{1}{2}A_0C_1&=\frac{\pi}{16}\ln\left(2-\sqrt{3}\right)+\frac{5\pi^2}{32\sqrt{3}}+\frac{1}{8\sqrt{3}}\ln\left(2-\sqrt{3}\right)\ln\left(2+\sqrt{3}\right)+\frac{5\pi}{48}\ln\left(2+\sqrt{3}\right)\\ \frac{1}{2}A_3B_2&=\frac{\pi^2}{72\sqrt{3}}\\ \frac{1}{2}A_2C_2&=\frac{\pi}{12}\ln\left(2+\sqrt{3}\right)-\frac{\pi^2}{32\sqrt{3}}-\frac{1}{8\sqrt{3}}\ln^2\left(2+\sqrt{3}\right)\\ \frac{\sqrt{3}}{2}A_2B_2&=\frac{\pi^2}{16\sqrt{3}}-\frac{\pi}{24}\ln\left(2+\sqrt{3}\right)\\ \frac{\sqrt{3}}{2}A_1C_2&=\frac{\pi}{12}\ln\left(2+\sqrt{3}\right)-\frac{\pi^2}{24\sqrt{3}}\\ \frac{1}{2}A_1B_2&=\frac{\pi^2}{36\sqrt{3}}\\ \frac{1}{2}A_0C_2&=\frac{1}{8\sqrt{3}}\ln^2\left(2+\sqrt{3}\right)+\frac{\pi}{24}\ln\left(2+\sqrt{3}\right)-\frac{\pi^2}{32\sqrt{3}}\\ \end{align}
Therefore,
\begin{align}2J&=\frac{\pi}{24}\ln\left(2-\sqrt{3}\right)+\frac{3\pi}{8}\ln\left(2+\sqrt{3}\right)\end{align}
Since,
\begin{align}\left(2-\sqrt{3}\right)\left(2+\sqrt{3}\right)=1\end{align}
Therefore,
\begin{align}2J&=-\frac{\pi}{24}\ln\left(2+\sqrt{3}\right)+\frac{3\pi}{8}\ln\left(2+\sqrt{3}\right)\\ &=\frac{\pi}{3}\ln\left(2+\sqrt{3}\right) \end{align}
Thus,
\begin{align}\boxed{J=\frac{\pi}{6}\ln\left(2+\sqrt{3}\right)} \end{align}
$$I=\int_0^1 \frac{(x^2+1)\ln(1+x)}{x^4-x^2+1}dx\overset{\large{x=\frac{1-t}{1+t}}}=4\int_0^1 \frac{(t^2+1)\left(\ln 2 - \ln(1+t)\right)}{t^4+14t^2+1}dt$$ $$\overset{IBP}=\frac{\pi}{2}\ln 2- (2+\sqrt 3)\left( \int_0^1 \frac{\ln(1+t)}{t^2+(2+\sqrt 3)^2}dt +\int_0^1 \frac{\ln(1+t)}{(2+\sqrt 3)^2 t^2+1}dt\right)$$ $$\int_0^1 \frac{\ln(1+t)}{t^2+(2+\sqrt 3)^2}dt=\int_0^\infty \frac{\ln(1+t)}{t^2+(2+\sqrt 3)^2}dt-\int_0^1 \frac{\ln(1+t)-\ln t}{(2+\sqrt 3)^2t^2+1}dt$$ $$\Rightarrow I=\frac{\pi}{2}\ln 2 -(2+\sqrt 3)\left(\int_0^\infty \frac{\ln(1+t)}{t^2+(2+\sqrt 3)^2}dt+\int_0^1 \frac{\ln t}{(2+\sqrt 3)^2t^2+1}dt\right) $$ By substituting $t=(2+\sqrt 3) x$ respectively $(2+\sqrt 3)t =x$ we get: $$I=\frac{\pi}{2}\ln 2 -\left(\int_0^\infty \frac{\ln\left(1+(2+\sqrt 3)x\right)}{1+x^2}dx+\int_0^{2+\sqrt 3} \frac{\ln\left(\frac{x}{2+\sqrt 3}\right)}{1+x^2}dx\right)$$ $$=\frac{\pi}{2}\ln 2 + \ln(2+\sqrt 3) \arctan( x)\bigg|_0^{2+\sqrt 3}-\int_0^\infty \frac{\ln\left(1+(2+\sqrt 3)x\right)}{1+x^2}dx-\int_0^{2+\sqrt 3} \frac{\ln\left(x\right)}{1+x^2}dx$$ $$=\frac{\pi}{2}\ln 2 + \frac{5\pi}{12}\ln(2+\sqrt 3)-(J_1(2+\sqrt 3)+J_2(2+\sqrt 3))$$ $$J_1(a)=\int_0^\infty \frac{\ln(1+ax)}{1+x^2}dx\Rightarrow J_1'(a)=\int_0^\infty \frac{x}{(1+x^2)(1+ax)}dx=$$ $$=\frac{a}{1+a^2} \int_0^\infty \frac{1}{1+x^2}dx+\frac{1}{1+a^2}\int_0^\infty \left(\frac{x}{1+x^2}-\frac{a}{1+ax}\right)dx=$$ $$=\frac{\pi}{2}\frac{a}{1+a^2} +\frac{1}{1+a^2}\ln\left(\frac{\sqrt{1+x^2}}{1+ax}\right)\bigg|_0^\infty=\frac{\pi}{2}\frac{a}{1+a^2}-\frac{\ln a}{1+a^2}$$ $$J_1(0)=0 \Rightarrow J_1(2+\sqrt 3) =\int_0^{2+\sqrt 3}\left(\frac{\pi}{2}\frac{a}{1+a^2}-\frac{\ln a}{1+a^2}\right)da$$ $$J_1(2+\sqrt 3)+J_2(2+\sqrt 3) =\int_0^{2+\sqrt 3}\frac{a}{1+a^2}da-\int_0^{2+\sqrt 3}\frac{\ln a}{1+a^2}da+\int_0^{2+\sqrt 3}\frac{\ln a}{1+a^2}da$$ $$\Rightarrow I=\frac{\pi}{2}\ln 2 + \frac{5\pi}{12}\ln(2+\sqrt 3)+\frac{\pi}{2}\int_0^{2+\sqrt 3}\frac{a}{1+a^2}da=$$ $$= \frac{\pi}{2}\ln 2 + \frac{5\pi}{12}\ln(2+\sqrt 3) +\frac{\pi}{4}\ln(4(2+\sqrt 3))$$ $$\Rightarrow I=\int_0^1 \frac{(x^2+1)\ln(1+x)}{x^4-x^2+1}dx= \frac{\pi}{6}\ln(2+ \sqrt 3)$$
Integrate by parts
\begin{align} I&=\int_0^1 \frac{(x^2+1)\ln(1+x)}{x^4-x^2+1}dx = \int_0^1 \frac{dx}{1+x} \cot^{-1}\frac x{1-x^2} \end{align} Let $J(a) =\int_0^1 \frac{dx}{1+x} \cot^{-1}\frac {2x\sin a}{1-x^2}$ \begin{align} J’(a) &= 2\cos a \int_0^1 \frac{x^2-x}{(x^2+1)^2-(2x\cos a)^2}dx \\ &= \frac12\int_0^1 \left(\frac{1-x}{x^2+2x\cos a+1} -\frac{1-x}{x^2-2x\cos a+1} \right)dx\\ &= - \frac\pi4\tan\frac a2+\frac12\left( a\>{\csc a}+ \ln\tan\frac a2\right) \end{align}
where the integral below with $b=\pm\cos a$ is used
$$\int \frac{1-x}{x^2+2b x+1}dx = \sqrt{\frac{1+b}{1-b}}\tan^{-1}\frac{x+b}{\sqrt{1-b^2}}-\frac12\ln(x^2+2bx+1)$$
Then \begin{align} I&= J\left(\frac\pi6\right)= J(0)+\int_0^{\frac\pi6}J’(a)da \\ &= \frac\pi2 \int_0^{1}\frac {dx}{1+x}-\frac\pi4 \int_0^{\frac\pi6}\tan\frac a2 da+\frac12\int_0^{\frac\pi6} d\left( a\ln\tan\frac a2\right)\\ &=\frac\pi2\ln2+\frac\pi2\ln\cos\frac\pi{12}+\frac\pi{12}\ln\tan\frac\pi{12}\\ &=\frac\pi4\ln4-\frac\pi4\ln\frac{2+\sqrt3}4-\frac\pi{12}\ln(2+\sqrt3)\\ &= \frac\pi6\ln(2+\sqrt3) \end{align}