41.18 Problem number 630

\[ \int \log \left (c \left (d+e (f+g x)^2\right )^q\right ) \, dx \]

Optimal antiderivative \[ -2 q x +\frac {\left (g x +f \right ) \ln \left (c \left (d +e \left (g x +f \right )^{2}\right )^{q}\right )}{g}+\frac {2 q \arctan \left (\frac {\left (g x +f \right ) \sqrt {e}}{\sqrt {d}}\right ) \sqrt {d}}{g \sqrt {e}} \]

command

integrate(ln(c*(d+e*(g*x+f)**2)**q),x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \begin {cases} x \log {\left (0^{q} c \right )} & \text {for}\: d = 0 \wedge e = 0 \wedge g = 0 \\x \log {\left (c d^{q} \right )} & \text {for}\: e = 0 \\x \log {\left (c \left (d + e f^{2}\right )^{q} \right )} & \text {for}\: g = 0 \\\frac {f \log {\left (c \left (e f^{2} + 2 e f g x + e g^{2} x^{2}\right )^{q} \right )}}{g} - 2 q x + x \log {\left (c \left (e f^{2} + 2 e f g x + e g^{2} x^{2}\right )^{q} \right )} & \text {for}\: d = 0 \\\frac {2 d q \log {\left (\frac {f}{g} + x - \frac {\sqrt {- d e}}{e g} \right )}}{g \sqrt {- d e}} - \frac {d \log {\left (c \left (d + e f^{2} + 2 e f g x + e g^{2} x^{2}\right )^{q} \right )}}{g \sqrt {- d e}} + \frac {f \log {\left (c \left (d + e f^{2} + 2 e f g x + e g^{2} x^{2}\right )^{q} \right )}}{g} - 2 q x + x \log {\left (c \left (d + e f^{2} + 2 e f g x + e g^{2} x^{2}\right )^{q} \right )} & \text {otherwise} \end {cases} \]

Sympy 1.8 under Python 3.8.8 output

\[ \text {Timed out} \]________________________________________________________________________________________