\[ \int \frac {(-6 x+3 \log (4)) \log \left (\frac {x}{2}\right )+\left (-2 x^2+x \log (4)\right ) \log ^2\left (\frac {x}{2}\right )+\left (3 x-3 \log (4)+\left (-x^2+x \log (4)\right ) \log ^2\left (\frac {x}{2}\right )\right ) \log \left (-x^2+x \log (4)\right )}{\left (-x^2+x \log (4)\right ) \log ^2\left (\frac {x}{2}\right )} \, dx \]
Optimal antiderivative \[ \ln \! \left (x \left (2 \ln \! \left (2\right )-x \right )\right ) \left (\frac {3}{\ln \! \left (\frac {x}{2}\right )}+x \right ) \]
command
integrate((((2*x*ln(2)-x**2)*ln(1/2*x)**2-6*ln(2)+3*x)*ln(2*x*ln(2)-x**2)+(2*x*ln(2)-2*x**2)*ln(1/2*x)**2+(6*ln(2)-6*x)*ln(1/2*x))/(2*x*ln(2)-x**2)/ln(1/2*x)**2,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {Exception raised: TypeError} \]
Sympy 1.8 under Python 3.8.8 output
\[ \frac {\left (x \log {\left (\frac {x}{2} \right )} + 3\right ) \log {\left (- x^{2} + 2 x \log {\left (2 \right )} \right )}}{\log {\left (\frac {x}{2} \right )}} \]