41.8 Problem number 315

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

Optimal antiderivative \[ -\frac {e f p}{4 d \,x^{2}}-\frac {e \left (-2 d g +e f \right ) p \ln \left (x \right )}{2 d^{2}}+\frac {\left (-d g +e f \right )^{2} p \ln \left (e \,x^{2}+d \right )}{4 d^{2} f}-\frac {\left (g \,x^{2}+f \right )^{2} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{4 f \,x^{4}} \]

command

integrate((g*x**2+f)*ln(c*(e*x**2+d)**p)/x**5,x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \begin {cases} - \frac {f \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{4 x^{4}} - \frac {g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{2 x^{2}} - \frac {e f p}{4 d x^{2}} + \frac {e g p \log {\left (x \right )}}{d} - \frac {e g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{2 d} - \frac {e^{2} f p \log {\left (x \right )}}{2 d^{2}} + \frac {e^{2} f \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{4 d^{2}} & \text {for}\: d \neq 0 \\- \frac {f p}{8 x^{4}} - \frac {f \log {\left (c \left (e x^{2}\right )^{p} \right )}}{4 x^{4}} - \frac {g p}{2 x^{2}} - \frac {g \log {\left (c \left (e x^{2}\right )^{p} \right )}}{2 x^{2}} & \text {otherwise} \end {cases} \]

Sympy 1.8 under Python 3.8.8 output

\[ \text {Timed out} \]________________________________________________________________________________________