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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.08, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2784, 2784, 2754, 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 {x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx\)

\(\Big \downarrow \) 2784

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

\(\Big \downarrow \) 2784

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

\(\Big \downarrow \) 2754

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

\(\Big \downarrow \) 2838

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

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 2784
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)* 
(x_))^(q_.), x_Symbol] :> Simp[(f*x)^m*(d + e*x)^(q + 1)*((a + b*Log[c*x^n] 
)/(e*(q + 1))), x] - Simp[f/(e*(q + 1))   Int[(f*x)^(m - 1)*(d + e*x)^(q + 
1)*(a*m + b*n + b*m*Log[c*x^n]), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, 
x] && ILtQ[q, -1] && GtQ[m, 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.59 (sec) , antiderivative size = 258, normalized size of antiderivative = 2.41

method result size
risch \(\frac {2 b \ln \left (x^{n}\right ) d}{e^{3} \left (e x +d \right )}+\frac {b \ln \left (x^{n}\right ) \ln \left (e x +d \right )}{e^{3}}-\frac {b \ln \left (x^{n}\right ) d^{2}}{2 e^{3} \left (e x +d \right )^{2}}+\frac {b n d}{2 e^{3} \left (e x +d \right )}+\frac {3 b n \ln \left (e x +d \right )}{2 e^{3}}-\frac {3 b n \ln \left (e x \right )}{2 e^{3}}-\frac {b n \ln \left (e x +d \right ) \ln \left (-\frac {e x}{d}\right )}{e^{3}}-\frac {b n \operatorname {dilog}\left (-\frac {e x}{d}\right )}{e^{3}}+\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 {2 d}{e^{3} \left (e x +d \right )}+\frac {\ln \left (e x +d \right )}{e^{3}}-\frac {d^{2}}{2 e^{3} \left (e x +d \right )^{2}}\right )\) \(258\)

Input:

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

Output:

2*b*ln(x^n)/e^3*d/(e*x+d)+b*ln(x^n)/e^3*ln(e*x+d)-1/2*b*ln(x^n)/e^3*d^2/(e 
*x+d)^2+1/2*b*n/e^3*d/(e*x+d)+3/2*b*n/e^3*ln(e*x+d)-3/2*b*n/e^3*ln(e*x)-b* 
n/e^3*ln(e*x+d)*ln(-e*x/d)-b*n/e^3*dilog(-e*x/d)+(1/2*I*Pi*b*csgn(I*x^n)*c 
sgn(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*c 
sgn(I*c*x^n)^3+1/2*I*Pi*b*csgn(I*c*x^n)^2*csgn(I*c)+b*ln(c)+a)*(2/e^3*d/(e 
*x+d)+1/e^3*ln(e*x+d)-1/2/e^3*d^2/(e*x+d)^2)
 

Fricas [F]

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

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

Output:

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

Sympy [A] (verification not implemented)

Time = 23.74 (sec) , antiderivative size = 347, normalized size of antiderivative = 3.24 \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx =\text {Too large to display} \] Input:

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

Output:

a*d**2*Piecewise((x/d**3, Eq(e, 0)), (-1/(2*e*(d + e*x)**2), True))/e**2 - 
 2*a*d*Piecewise((x/d**2, Eq(e, 0)), (-1/(d*e + e**2*x), True))/e**2 + a*P 
iecewise((x/d, Eq(e, 0)), (log(d + e*x)/e, True))/e**2 - b*d**2*n*Piecewis 
e((x/d**3, Eq(e, 0)), (-1/(2*d**2*e + 2*d*e**2*x) - log(x)/(2*d**2*e) + lo 
g(d/e + x)/(2*d**2*e), True))/e**2 + b*d**2*Piecewise((x/d**3, Eq(e, 0)), 
(-1/(2*e*(d + e*x)**2), True))*log(c*x**n)/e**2 + 2*b*d*n*Piecewise((x/d** 
2, Eq(e, 0)), (-log(x)/(d*e) + log(d/e + x)/(d*e), True))/e**2 - 2*b*d*Pie 
cewise((x/d**2, Eq(e, 0)), (-1/(d*e + e**2*x), True))*log(c*x**n)/e**2 - b 
*n*Piecewise((x/d, Eq(e, 0)), (Piecewise((-polylog(2, e*x*exp_polar(I*pi)/ 
d), (Abs(x) < 1) & (1/Abs(x) < 1)), (log(d)*log(x) - polylog(2, e*x*exp_po 
lar(I*pi)/d), Abs(x) < 1), (-log(d)*log(1/x) - polylog(2, e*x*exp_polar(I* 
pi)/d), 1/Abs(x) < 1), (-meijerg(((), (1, 1)), ((0, 0), ()), x)*log(d) + m 
eijerg(((1, 1), ()), ((), (0, 0)), x)*log(d) - polylog(2, e*x*exp_polar(I* 
pi)/d), True))/e, True))/e**2 + b*Piecewise((x/d, Eq(e, 0)), (log(d + e*x) 
/e, True))*log(c*x**n)/e**2
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

( - 2*int(log(x**n*c)/(d**3*x + 3*d**2*e*x**2 + 3*d*e**2*x**3 + e**3*x**4) 
,x)*b*d**5*n - 4*int(log(x**n*c)/(d**3*x + 3*d**2*e*x**2 + 3*d*e**2*x**3 + 
 e**3*x**4),x)*b*d**4*e*n*x - 2*int(log(x**n*c)/(d**3*x + 3*d**2*e*x**2 + 
3*d*e**2*x**3 + e**3*x**4),x)*b*d**3*e**2*n*x**2 + 2*log(d + e*x)*a*d**2*n 
 + 4*log(d + e*x)*a*d*e*n*x + 2*log(d + e*x)*a*e**2*n*x**2 + 6*log(d + e*x 
)*b*d**2*n**2 + 12*log(d + e*x)*b*d*e*n**2*x + 6*log(d + e*x)*b*e**2*n**2* 
x**2 + log(x**n*c)**2*b*d**2 + 2*log(x**n*c)**2*b*d*e*x + log(x**n*c)**2*b 
*e**2*x**2 + 3*log(x**n*c)*b*d**2*n - 3*log(x**n*c)*b*e**2*n*x**2 - 3*log( 
x)*b*d**2*n**2 - 6*log(x)*b*d*e*n**2*x - 3*log(x)*b*e**2*n**2*x**2 + a*d** 
2*n - 2*a*e**2*n*x**2)/(2*e**3*n*(d**2 + 2*d*e*x + e**2*x**2))