37.28 Problem number 425

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

Optimal antiderivative \[ -\frac {e \,x^{r} \left (a +b \ln \left (c \,x^{n}\right )\right )}{d^{2} r \left (d +e \,x^{r}\right )}-\frac {\left (a +b \ln \left (c \,x^{n}\right )\right ) \ln \left (1+\frac {d \,x^{-r}}{e}\right )}{d^{2} r}+\frac {b n \ln \left (d +e \,x^{r}\right )}{d^{2} r^{2}}+\frac {b n \polylog \left (2, -\frac {d \,x^{-r}}{e}\right )}{d^{2} r^{2}} \]

command

integrate((a+b*ln(c*x**n))/x/(d+e*x**r)**2,x)

Sympy 1.10.1 under Python 3.10.4 output

\[ - \frac {a e \left (\begin {cases} \frac {x^{r}}{d^{2}} & \text {for}\: e = 0 \\- \frac {1}{d e + e^{2} x^{r}} & \text {otherwise} \end {cases}\right )}{d r} - \frac {a e \left (\begin {cases} \frac {x^{r}}{d} & \text {for}\: e = 0 \\\frac {\log {\left (d + e x^{r} \right )}}{e} & \text {otherwise} \end {cases}\right )}{d^{2} r} + \frac {a \log {\left (x^{r} \right )}}{d^{2} r} + \frac {b e n \left (\begin {cases} \frac {\begin {cases} \frac {x^{r}}{r} & \text {for}\: r \neq 0 \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{d^{2}} & \text {for}\: e = 0 \\- \begin {cases} \frac {\log {\left (x \right )}}{e^{2}} & \text {for}\: d = 0 \wedge r = 0 \\- \frac {x^{- r}}{e^{2} r} & \text {for}\: d = 0 \\\frac {\log {\left (x \right )}}{d e + e^{2}} & \text {for}\: r = 0 \\\frac {\log {\left (x \right )}}{d e} - \frac {\log {\left (\frac {d}{e} + x^{r} \right )}}{d e r} & \text {otherwise} \end {cases} & \text {otherwise} \end {cases}\right )}{d r} - \frac {b e \left (\begin {cases} \frac {x^{r}}{d^{2}} & \text {for}\: e = 0 \\- \frac {1}{d e + e^{2} x^{r}} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )}}{d r} + \frac {b e n \left (\begin {cases} \frac {\begin {cases} \frac {x^{r}}{r} & \text {for}\: r \neq 0 \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{d} & \text {for}\: e = 0 \\\frac {\begin {cases} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \wedge \left |{x}\right | < 1 \\\log {\left (d \right )} \log {\left (x \right )} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {for}\: \left |{x}\right | < 1 \\- \log {\left (d \right )} \log {\left (\frac {1}{x} \right )} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \\- {G_{2, 2}^{2, 0}\left (\begin {matrix} & 1, 1 \\0, 0 & \end {matrix} \middle | {x} \right )} \log {\left (d \right )} + {G_{2, 2}^{0, 2}\left (\begin {matrix} 1, 1 & \\ & 0, 0 \end {matrix} \middle | {x} \right )} \log {\left (d \right )} - \frac {\operatorname {Li}_{2}\left (\frac {e x^{r} e^{i \pi }}{d}\right )}{r} & \text {otherwise} \end {cases}}{e} & \text {otherwise} \end {cases}\right )}{d^{2} r} - \frac {b e \left (\begin {cases} \frac {x^{r}}{d} & \text {for}\: e = 0 \\\frac {\log {\left (d + e x^{r} \right )}}{e} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )}}{d^{2} r} + \frac {b n \left (\begin {cases} 0 & \text {for}\: r = 0 \\- \frac {\log {\left (x^{r} \right )}^{2}}{2 r} & \text {otherwise} \end {cases}\right )}{d^{2} r} + \frac {b \log {\left (x^{r} \right )} \log {\left (c x^{n} \right )}}{d^{2} r} \]

Sympy 1.8 under Python 3.8.8 output

\[ \text {Timed out} \]________________________________________________________________________________________