36.1 Problem number 26

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

Optimal antiderivative \[ \ln \! \left (a x +b \ln \! \left (c \,x^{n}\right )^{2}\right ) \]

command

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

Sympy 1.10.1 under Python 3.10.4 output

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

Sympy 1.8 under Python 3.8.8 output

\[ \begin {cases} \log {\left (x + \frac {b n^{2} \log {\left (x \right )}^{2}}{a} + \frac {2 b n \log {\left (c \right )} \log {\left (x \right )}}{a} + \frac {b \log {\left (c \right )}^{2}}{a} \right )} & \text {for}\: a \neq 0 \\2 \log {\left (n \log {\left (x \right )} + \log {\left (c \right )} \right )} & \text {otherwise} \end {cases} \]