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