\[ \int \frac {(a+b \text {ArcCos}(c x))^2 \log \left (h (f+g x)^m\right )}{\sqrt {1-c^2 x^2}} \, dx \]
Optimal antiderivative \[ -\frac {i m \left (a +b \arccos \left (c x \right )\right )^{4}}{12 b^{2} c}-\frac {\left (a +b \arccos \left (c x \right )\right )^{3} \ln \left (h \left (g x +f \right )^{m}\right )}{3 b c}+\frac {m \left (a +b \arccos \left (c x \right )\right )^{3} \ln \left (1+\frac {\left (c x +i \sqrt {-c^{2} x^{2}+1}\right ) g}{c f -\sqrt {c^{2} f^{2}-g^{2}}}\right )}{3 b c}+\frac {m \left (a +b \arccos \left (c x \right )\right )^{3} \ln \left (1+\frac {\left (c x +i \sqrt {-c^{2} x^{2}+1}\right ) g}{c f +\sqrt {c^{2} f^{2}-g^{2}}}\right )}{3 b c}-\frac {i m \left (a +b \arccos \left (c x \right )\right )^{2} \polylog \left (2, -\frac {\left (c x +i \sqrt {-c^{2} x^{2}+1}\right ) g}{c f -\sqrt {c^{2} f^{2}-g^{2}}}\right )}{c}-\frac {i m \left (a +b \arccos \left (c x \right )\right )^{2} \polylog \left (2, -\frac {\left (c x +i \sqrt {-c^{2} x^{2}+1}\right ) g}{c f +\sqrt {c^{2} f^{2}-g^{2}}}\right )}{c}+\frac {2 b m \left (a +b \arccos \left (c x \right )\right ) \polylog \left (3, -\frac {\left (c x +i \sqrt {-c^{2} x^{2}+1}\right ) g}{c f -\sqrt {c^{2} f^{2}-g^{2}}}\right )}{c}+\frac {2 b m \left (a +b \arccos \left (c x \right )\right ) \polylog \left (3, -\frac {\left (c x +i \sqrt {-c^{2} x^{2}+1}\right ) g}{c f +\sqrt {c^{2} f^{2}-g^{2}}}\right )}{c}+\frac {2 i b^{2} m \polylog \left (4, -\frac {\left (c x +i \sqrt {-c^{2} x^{2}+1}\right ) g}{c f -\sqrt {c^{2} f^{2}-g^{2}}}\right )}{c}+\frac {2 i b^{2} m \polylog \left (4, -\frac {\left (c x +i \sqrt {-c^{2} x^{2}+1}\right ) g}{c f +\sqrt {c^{2} f^{2}-g^{2}}}\right )}{c} \]
command
Integrate[((a + b*ArcCos[c*x])^2*Log[h*(f + g*x)^m])/Sqrt[1 - c^2*x^2],x]
Mathematica 13.1 output
\[ \text {Result too large to show} \]
Mathematica 12.3 output
\[ \int \frac {\left (a+b \cos ^{-1}(c x)\right )^2 \log \left (h (f+g x)^m\right )}{\sqrt {1-c^2 x^2}} \, dx \]________________________________________________________________________________________