37.1 Problem number 31

\[ \int \frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{(g+h x)^2} \, dx \]

Optimal antiderivative \[ \frac {b p r \ln \left (b x +a \right )}{h \left (-a h +b g \right )}+\frac {d q r \ln \left (d x +c \right )}{h \left (-c h +d g \right )}-\frac {\ln \left (e \left (f \left (b x +a \right )^{p} \left (d x +c \right )^{q}\right )^{r}\right )}{h \left (h x +g \right )}-\frac {b p r \ln \left (h x +g \right )}{h \left (-a h +b g \right )}-\frac {d q r \ln \left (h x +g \right )}{h \left (-c h +d g \right )} \]

command

integrate(log(e*(f*(b*x+a)^p*(d*x+c)^q)^r)/(h*x+g)^2,x, algorithm="fricas")

Fricas 1.3.8 (sbcl 2.2.11.debian) via sagemath 9.6 output

\[ -\frac {b d g^{2} + a c h^{2} - {\left (b c + a d\right )} g h + {\left (b d g^{2} + a c h^{2} - {\left (b c + a d\right )} g h\right )} r \log \left (f\right ) - {\left ({\left (b d g h - b c h^{2}\right )} p r x + {\left (a d g h - a c h^{2}\right )} p r\right )} \log \left (b x + a\right ) - {\left ({\left (b d g h - a d h^{2}\right )} q r x + {\left (b c g h - a c h^{2}\right )} q r\right )} \log \left (d x + c\right ) + {\left ({\left ({\left (b d g h - b c h^{2}\right )} p + {\left (b d g h - a d h^{2}\right )} q\right )} r x + {\left ({\left (b d g^{2} - b c g h\right )} p + {\left (b d g^{2} - a d g h\right )} q\right )} r\right )} \log \left (h x + g\right )}{b d g^{3} h + a c g h^{3} - {\left (b c + a d\right )} g^{2} h^{2} + {\left (b d g^{2} h^{2} + a c h^{4} - {\left (b c + a d\right )} g h^{3}\right )} x} \]

Fricas 1.3.7 via sagemath 9.3 output

\[ \text {Timed out} \]