\[ \int \frac {1}{(a+b x) (c+d x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )} \, dx \]
Optimal antiderivative \[ \frac {\ln \! \left (\ln \! \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}{\left (-a d +b c \right ) n} \]
command
integrate(1/(b*x+a)/(d*x+c)/ln(e*((b*x+a)/(d*x+c))**n),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {Timed out} \]
Sympy 1.8 under Python 3.8.8 output
\[ \begin {cases} - \frac {1}{\left (b c + b d x\right ) \log {\left (e \right )}} & \text {for}\: a = \frac {b c}{d} \wedge n = 0 \\- \frac {1}{b c n \log {\left (\frac {b c}{c d + d^{2} x} + \frac {b x}{c + d x} \right )} + b c \log {\left (e \right )} + b d n x \log {\left (\frac {b c}{c d + d^{2} x} + \frac {b x}{c + d x} \right )} + b d x \log {\left (e \right )}} & \text {for}\: a = \frac {b c}{d} \\\frac {- \frac {\log {\left (\frac {a}{b} + x \right )}}{a d - b c} + \frac {\log {\left (\frac {c}{d} + x \right )}}{a d - b c}}{\log {\left (e \right )}} & \text {for}\: n = 0 \\- \frac {\log {\left (n \log {\left (\frac {a}{c + d x} + \frac {b x}{c + d x} \right )} + \log {\left (e \right )} \right )}}{a d n - b c n} & \text {otherwise} \end {cases} \]