15.2 Problem number 263

\[ \int (f+g x)^3 \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \, dx \]

Optimal antiderivative \[ -\frac {B \left (-a d +b c \right ) g \left (a^{2} d^{2} g^{2}-a b d g \left (-c g +4 d f \right )+b^{2} \left (c^{2} g^{2}-4 c d f g +6 d^{2} f^{2}\right )\right ) x}{2 b^{3} d^{3}}-\frac {B \left (-a d +b c \right ) g^{2} \left (-a d g -b c g +4 b d f \right ) x^{2}}{4 b^{2} d^{2}}-\frac {B \left (-a d +b c \right ) g^{3} x^{3}}{6 b d}-\frac {B \left (-a g +b f \right )^{4} \ln \! \left (b x +a \right )}{2 b^{4} g}+\frac {\left (g x +f \right )^{4} \left (A +B \ln \! \left (\frac {e \left (b x +a \right )^{2}}{\left (d x +c \right )^{2}}\right )\right )}{4 g}+\frac {B \left (-c g +d f \right )^{4} \ln \! \left (d x +c \right )}{2 d^{4} g} \]

command

integrate((g*x+f)^3*(A+B*log(e*(b*x+a)^2/(d*x+c)^2)),x, algorithm="giac")

Giac 1.9.0-11 via sagemath 9.6 output

\[ \text {Timed out} \]

Giac 1.7.0 via sagemath 9.3 output

\[ \frac {1}{4} \, {\left (A g^{3} + B g^{3}\right )} x^{4} + \frac {{\left (6 \, A b d f g^{2} + 6 \, B b d f g^{2} - B b c g^{3} + B a d g^{3}\right )} x^{3}}{6 \, b d} + \frac {1}{4} \, {\left (B g^{3} x^{4} + 4 \, B f g^{2} x^{3} + 6 \, B f^{2} g x^{2} + 4 \, B f^{3} x\right )} \log \left (\frac {b^{2} x^{2} + 2 \, a b x + a^{2}}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right ) + \frac {{\left (6 \, A b^{2} d^{2} f^{2} g + 6 \, B b^{2} d^{2} f^{2} g - 4 \, B b^{2} c d f g^{2} + 4 \, B a b d^{2} f g^{2} + B b^{2} c^{2} g^{3} - B a^{2} d^{2} g^{3}\right )} x^{2}}{4 \, b^{2} d^{2}} + \frac {{\left (4 \, B a b^{3} f^{3} - 6 \, B a^{2} b^{2} f^{2} g + 4 \, B a^{3} b f g^{2} - B a^{4} g^{3}\right )} \log \left (b x + a\right )}{2 \, b^{4}} - \frac {{\left (4 \, B c d^{3} f^{3} - 6 \, B c^{2} d^{2} f^{2} g + 4 \, B c^{3} d f g^{2} - B c^{4} g^{3}\right )} \log \left (-d x - c\right )}{2 \, d^{4}} + \frac {{\left (2 \, A b^{3} d^{3} f^{3} + 2 \, B b^{3} d^{3} f^{3} - 6 \, B b^{3} c d^{2} f^{2} g + 6 \, B a b^{2} d^{3} f^{2} g + 4 \, B b^{3} c^{2} d f g^{2} - 4 \, B a^{2} b d^{3} f g^{2} - B b^{3} c^{3} g^{3} + B a^{3} d^{3} g^{3}\right )} x}{2 \, b^{3} d^{3}} \]