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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [C] (warning: unable to verify)
Fricas [F]
Sympy [C] (verification not implemented)
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 44 \[ \int \frac {a+b \log \left (c x^n\right )}{\left (d+\frac {e}{x}\right ) x^2} \, dx=-\frac {\log \left (1+\frac {e}{d x}\right ) \left (a+b \log \left (c x^n\right )\right )}{e}+\frac {b n \operatorname {PolyLog}\left (2,-\frac {e}{d x}\right )}{e} \] Output:

-ln(1+e/d/x)*(a+b*ln(c*x^n))/e+b*n*polylog(2,-e/d/x)/e
 

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.43 \[ \int \frac {a+b \log \left (c x^n\right )}{\left (d+\frac {e}{x}\right ) x^2} \, dx=\frac {\left (a+b \log \left (c x^n\right )\right ) \left (a+b \log \left (c x^n\right )-2 b n \log \left (1+\frac {d x}{e}\right )\right )}{2 b e n}-\frac {b n \operatorname {PolyLog}\left (2,-\frac {d x}{e}\right )}{e} \] Input:

Integrate[(a + b*Log[c*x^n])/((d + e/x)*x^2),x]
 

Output:

((a + b*Log[c*x^n])*(a + b*Log[c*x^n] - 2*b*n*Log[1 + (d*x)/e]))/(2*b*e*n) 
 - (b*n*PolyLog[2, -((d*x)/e)])/e
 

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2005, 2779, 2838}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 2005

\(\displaystyle \int \frac {a+b \log \left (c x^n\right )}{x (d x+e)}dx\)

\(\Big \downarrow \) 2779

\(\displaystyle \frac {b n \int \frac {\log \left (\frac {e}{d x}+1\right )}{x}dx}{e}-\frac {\log \left (\frac {e}{d x}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{e}\)

\(\Big \downarrow \) 2838

\(\displaystyle \frac {b n \operatorname {PolyLog}\left (2,-\frac {e}{d x}\right )}{e}-\frac {\log \left (\frac {e}{d x}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{e}\)

Input:

Int[(a + b*Log[c*x^n])/((d + e/x)*x^2),x]
 

Output:

-((Log[1 + e/(d*x)]*(a + b*Log[c*x^n]))/e) + (b*n*PolyLog[2, -(e/(d*x))])/ 
e
 

Defintions of rubi rules used

rule 2005
Int[(Fx_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[x^(m 
+ n*p)*(b + a/x^n)^p*Fx, x] /; FreeQ[{a, b, m, n}, x] && IntegerQ[p] && Neg 
Q[n]
 

rule 2779
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r 
_.))), x_Symbol] :> Simp[(-Log[1 + d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)) 
, x] + Simp[b*n*(p/(d*r))   Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^(p - 
 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.20 (sec) , antiderivative size = 181, normalized size of antiderivative = 4.11

method result size
risch \(-\frac {b \ln \left (x^{n}\right ) \ln \left (d x +e \right )}{e}+\frac {b \ln \left (x^{n}\right ) \ln \left (x \right )}{e}-\frac {b n \ln \left (x \right )^{2}}{2 e}+\frac {b n \ln \left (d x +e \right ) \ln \left (-\frac {d x}{e}\right )}{e}+\frac {b n \operatorname {dilog}\left (-\frac {d x}{e}\right )}{e}+\left (\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{2}-\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}+\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{2}+b \ln \left (c \right )+a \right ) \left (-\frac {\ln \left (d x +e \right )}{e}+\frac {\ln \left (x \right )}{e}\right )\) \(181\)

Input:

int((a+b*ln(c*x^n))/(d+e/x)/x^2,x,method=_RETURNVERBOSE)
 

Output:

-b*ln(x^n)/e*ln(d*x+e)+b*ln(x^n)/e*ln(x)-1/2*b*n/e*ln(x)^2+b*n/e*ln(d*x+e) 
*ln(-d*x/e)+b*n/e*dilog(-d*x/e)+(1/2*I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/ 
2*I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/2*I*Pi*b*csgn(I*c*x^n)^3+1/ 
2*I*Pi*b*csgn(I*c*x^n)^2*csgn(I*c)+b*ln(c)+a)*(-1/e*ln(d*x+e)+1/e*ln(x))
 

Fricas [F]

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

integrate((a+b*log(c*x^n))/(d+e/x)/x^2,x, algorithm="fricas")
 

Output:

integral((b*log(c*x^n) + a)/(d*x^2 + e*x), x)
 

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 5.50 (sec) , antiderivative size = 173, normalized size of antiderivative = 3.93 \[ \int \frac {a+b \log \left (c x^n\right )}{\left (d+\frac {e}{x}\right ) x^2} \, dx=\frac {2 a d \left (\begin {cases} - \frac {x}{e} - \frac {1}{2 d} & \text {for}\: d = 0 \\\frac {\log {\left (2 d x \right )}}{2 d} & \text {otherwise} \end {cases}\right )}{e} - \frac {2 a d \left (\begin {cases} \frac {x}{e} + \frac {1}{2 d} & \text {for}\: d = 0 \\\frac {\log {\left (2 d x + 2 e \right )}}{2 d} & \text {otherwise} \end {cases}\right )}{e} + b n \left (\begin {cases} - \frac {1}{d x} & \text {for}\: e = 0 \\\frac {\begin {cases} \operatorname {Li}_{2}\left (\frac {e e^{i \pi }}{d x}\right ) & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \wedge \left |{x}\right | < 1 \\\log {\left (d \right )} \log {\left (x \right )} + \operatorname {Li}_{2}\left (\frac {e e^{i \pi }}{d x}\right ) & \text {for}\: \left |{x}\right | < 1 \\- \log {\left (d \right )} \log {\left (\frac {1}{x} \right )} + \operatorname {Li}_{2}\left (\frac {e e^{i \pi }}{d x}\right ) & \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 )} + \operatorname {Li}_{2}\left (\frac {e e^{i \pi }}{d x}\right ) & \text {otherwise} \end {cases}}{e} & \text {otherwise} \end {cases}\right ) - b \left (\begin {cases} \frac {1}{d x} & \text {for}\: e = 0 \\\frac {\log {\left (d + \frac {e}{x} \right )}}{e} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} \] Input:

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

Output:

2*a*d*Piecewise((-x/e - 1/(2*d), Eq(d, 0)), (log(2*d*x)/(2*d), True))/e - 
2*a*d*Piecewise((x/e + 1/(2*d), Eq(d, 0)), (log(2*d*x + 2*e)/(2*d), True)) 
/e + b*n*Piecewise((-1/(d*x), Eq(e, 0)), (Piecewise((polylog(2, e*exp_pola 
r(I*pi)/(d*x)), (Abs(x) < 1) & (1/Abs(x) < 1)), (log(d)*log(x) + polylog(2 
, e*exp_polar(I*pi)/(d*x)), Abs(x) < 1), (-log(d)*log(1/x) + polylog(2, e* 
exp_polar(I*pi)/(d*x)), 1/Abs(x) < 1), (-meijerg(((), (1, 1)), ((0, 0), () 
), x)*log(d) + meijerg(((1, 1), ()), ((), (0, 0)), x)*log(d) + polylog(2, 
e*exp_polar(I*pi)/(d*x)), True))/e, True)) - b*Piecewise((1/(d*x), Eq(e, 0 
)), (log(d + e/x)/e, True))*log(c*x**n)
 

Maxima [F]

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

integrate((a+b*log(c*x^n))/(d+e/x)/x^2,x, algorithm="maxima")
 

Output:

-a*(log(d*x + e)/e - log(x)/e) + b*integrate((log(c) + log(x^n))/(d*x^2 + 
e*x), x)
 

Giac [F]

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

integrate((a+b*log(c*x^n))/(d+e/x)/x^2,x, algorithm="giac")
 

Output:

integrate((b*log(c*x^n) + a)/((d + e/x)*x^2), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {a+b \log \left (c x^n\right )}{\left (d+\frac {e}{x}\right ) x^2} \, dx=\int \frac {a+b\,\ln \left (c\,x^n\right )}{x^2\,\left (d+\frac {e}{x}\right )} \,d x \] Input:

int((a + b*log(c*x^n))/(x^2*(d + e/x)),x)
 

Output:

int((a + b*log(c*x^n))/(x^2*(d + e/x)), x)
 

Reduce [F]

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

int((a+b*log(c*x^n))/(d+e/x)/x^2,x)
                                                                                    
                                                                                    
 

Output:

(int(log(x**n*c)/(d*x**2 + e*x),x)*b*e - log(d*x + e)*a + log(x)*a)/e