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

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

Optimal result

Integrand size = 39, antiderivative size = 20 \[ \int \left (\frac {a}{x^2}+\frac {2 b n \log \left (c x^n\right )}{x^3}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2 \, dx=\frac {1}{3} \left (a x+b \log ^2\left (c x^n\right )\right )^3 \] Output:

1/3*(a*x+b*ln(c*x^n)^2)^3
 

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \left (\frac {a}{x^2}+\frac {2 b n \log \left (c x^n\right )}{x^3}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2 \, dx=\frac {1}{3} \left (a x+b \log ^2\left (c x^n\right )\right )^3 \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 20, 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.077, Rules used = {3041, 3041, 3024}

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 \left (\frac {a}{x^2}+\frac {2 b n \log \left (c x^n\right )}{x^3}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2 \, dx\)

\(\Big \downarrow \) 3041

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

\(\Big \downarrow \) 3041

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

\(\Big \downarrow \) 3024

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 3024
Int[((Log[(c_.)*(x_)^(n_.)]^(q_)*(b_.) + (a_.)*(x_)^(m_.))^(p_.)*(Log[(c_.) 
*(x_)^(n_.)]^(r_.)*(e_.) + (d_.)*(x_)^(m_.)))/(x_), x_Symbol] :> Simp[e*((a 
*x^m + b*Log[c*x^n]^q)^(p + 1)/(b*n*q*(p + 1))), x] /; FreeQ[{a, b, c, d, e 
, m, n, p, q, r}, x] && EqQ[r, q - 1] && NeQ[p, -1] && EqQ[a*e*m - b*d*n*q, 
 0]
 

rule 3041
Int[(u_.)*((a_.)*(x_)^(m_.) + Log[(c_.)*(x_)^(n_.)]^(q_.)*(b_.)*(x_)^(r_.)) 
^(p_.), x_Symbol] :> Int[u*x^(p*r)*(a*x^(m - r) + b*Log[c*x^n]^q)^p, x] /; 
FreeQ[{a, b, c, m, n, p, q, r}, x] && IntegerQ[p]
 
Maple [B] (warning: unable to verify)

Leaf count of result is larger than twice the leaf count of optimal. \(52\) vs. \(2(18)=36\).

Time = 1.90 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.65

method result size
parallelrisch \(\frac {b^{3} \ln \left (c \,x^{n}\right )^{6}}{3}+a x \,b^{2} \ln \left (c \,x^{n}\right )^{4}+a^{2} x^{2} b \ln \left (c \,x^{n}\right )^{2}+\frac {a^{3} x^{3}}{3}\) \(53\)
risch \(\text {Expression too large to display}\) \(20850\)

Input:

int((a/x^2+2*b*n*ln(c*x^n)/x^3)*(a*x^2+b*x*ln(c*x^n)^2)^2,x,method=_RETURN 
VERBOSE)
 

Output:

1/3*b^3*ln(c*x^n)^6+a*x*b^2*ln(c*x^n)^4+a^2*x^2*b*ln(c*x^n)^2+1/3*a^3*x^3
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 195 vs. \(2 (18) = 36\).

Time = 0.08 (sec) , antiderivative size = 195, normalized size of antiderivative = 9.75 \[ \int \left (\frac {a}{x^2}+\frac {2 b n \log \left (c x^n\right )}{x^3}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2 \, dx=\frac {1}{3} \, b^{3} n^{6} \log \left (x\right )^{6} + 2 \, b^{3} n^{5} \log \left (c\right ) \log \left (x\right )^{5} + a b^{2} x \log \left (c\right )^{4} + a^{2} b x^{2} \log \left (c\right )^{2} + \frac {1}{3} \, a^{3} x^{3} + {\left (5 \, b^{3} n^{4} \log \left (c\right )^{2} + a b^{2} n^{4} x\right )} \log \left (x\right )^{4} + \frac {4}{3} \, {\left (5 \, b^{3} n^{3} \log \left (c\right )^{3} + 3 \, a b^{2} n^{3} x \log \left (c\right )\right )} \log \left (x\right )^{3} + {\left (5 \, b^{3} n^{2} \log \left (c\right )^{4} + 6 \, a b^{2} n^{2} x \log \left (c\right )^{2} + a^{2} b n^{2} x^{2}\right )} \log \left (x\right )^{2} + 2 \, {\left (b^{3} n \log \left (c\right )^{5} + 2 \, a b^{2} n x \log \left (c\right )^{3} + a^{2} b n x^{2} \log \left (c\right )\right )} \log \left (x\right ) \] Input:

integrate((a/x^2+2*b*n*log(c*x^n)/x^3)*(a*x^2+b*x*log(c*x^n)^2)^2,x, algor 
ithm="fricas")
 

Output:

1/3*b^3*n^6*log(x)^6 + 2*b^3*n^5*log(c)*log(x)^5 + a*b^2*x*log(c)^4 + a^2* 
b*x^2*log(c)^2 + 1/3*a^3*x^3 + (5*b^3*n^4*log(c)^2 + a*b^2*n^4*x)*log(x)^4 
 + 4/3*(5*b^3*n^3*log(c)^3 + 3*a*b^2*n^3*x*log(c))*log(x)^3 + (5*b^3*n^2*l 
og(c)^4 + 6*a*b^2*n^2*x*log(c)^2 + a^2*b*n^2*x^2)*log(x)^2 + 2*(b^3*n*log( 
c)^5 + 2*a*b^2*n*x*log(c)^3 + a^2*b*n*x^2*log(c))*log(x)
 

Sympy [A] (verification not implemented)

Time = 4.80 (sec) , antiderivative size = 70, normalized size of antiderivative = 3.50 \[ \int \left (\frac {a}{x^2}+\frac {2 b n \log \left (c x^n\right )}{x^3}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2 \, dx=\frac {a^{3} x^{3}}{3} + a^{2} b x^{2} \log {\left (c x^{n} \right )}^{2} + a b^{2} x \log {\left (c x^{n} \right )}^{4} - 2 b^{3} n \left (\begin {cases} - \log {\left (c \right )}^{5} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{6}}{6 n} & \text {otherwise} \end {cases}\right ) \] Input:

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

Output:

a**3*x**3/3 + a**2*b*x**2*log(c*x**n)**2 + a*b**2*x*log(c*x**n)**4 - 2*b** 
3*n*Piecewise((-log(c)**5*log(x), Eq(n, 0)), (-log(c*x**n)**6/(6*n), True) 
)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 211 vs. \(2 (18) = 36\).

Time = 0.04 (sec) , antiderivative size = 211, normalized size of antiderivative = 10.55 \[ \int \left (\frac {a}{x^2}+\frac {2 b n \log \left (c x^n\right )}{x^3}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2 \, dx=\frac {1}{3} \, b^{3} \log \left (c x^{n}\right )^{6} + 4 \, a b^{2} n x \log \left (c x^{n}\right )^{3} + a b^{2} x \log \left (c x^{n}\right )^{4} - \frac {1}{2} \, a^{2} b n^{2} x^{2} + a^{2} b n x^{2} \log \left (c x^{n}\right ) + a^{2} b x^{2} \log \left (c x^{n}\right )^{2} + \frac {1}{3} \, a^{3} x^{3} - 12 \, {\left (n x \log \left (c x^{n}\right )^{2} + 2 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} n\right )} a b^{2} n + \frac {1}{2} \, {\left (n^{2} x^{2} - 2 \, n x^{2} \log \left (c x^{n}\right )\right )} a^{2} b - 4 \, {\left (n x \log \left (c x^{n}\right )^{3} - 3 \, {\left (n x \log \left (c x^{n}\right )^{2} + 2 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} n\right )} n\right )} a b^{2} \] Input:

integrate((a/x^2+2*b*n*log(c*x^n)/x^3)*(a*x^2+b*x*log(c*x^n)^2)^2,x, algor 
ithm="maxima")
 

Output:

1/3*b^3*log(c*x^n)^6 + 4*a*b^2*n*x*log(c*x^n)^3 + a*b^2*x*log(c*x^n)^4 - 1 
/2*a^2*b*n^2*x^2 + a^2*b*n*x^2*log(c*x^n) + a^2*b*x^2*log(c*x^n)^2 + 1/3*a 
^3*x^3 - 12*(n*x*log(c*x^n)^2 + 2*(n^2*x - n*x*log(c*x^n))*n)*a*b^2*n + 1/ 
2*(n^2*x^2 - 2*n*x^2*log(c*x^n))*a^2*b - 4*(n*x*log(c*x^n)^3 - 3*(n*x*log( 
c*x^n)^2 + 2*(n^2*x - n*x*log(c*x^n))*n)*n)*a*b^2
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 198 vs. \(2 (18) = 36\).

Time = 0.13 (sec) , antiderivative size = 198, normalized size of antiderivative = 9.90 \[ \int \left (\frac {a}{x^2}+\frac {2 b n \log \left (c x^n\right )}{x^3}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2 \, dx=\frac {1}{3} \, b^{3} n^{6} \log \left (x\right )^{6} + 2 \, b^{3} n^{5} \log \left (c\right ) \log \left (x\right )^{5} + 2 \, b^{3} n \log \left (c\right )^{5} \log \left (x\right ) + a b^{2} x \log \left (c\right )^{4} + a^{2} b x^{2} \log \left (c\right )^{2} + \frac {1}{3} \, a^{3} x^{3} + {\left (5 \, b^{3} n^{4} \log \left (c\right )^{2} + a b^{2} n^{4} x\right )} \log \left (x\right )^{4} + \frac {4}{3} \, {\left (5 \, b^{3} n^{3} \log \left (c\right )^{3} + 3 \, a b^{2} n^{3} x \log \left (c\right )\right )} \log \left (x\right )^{3} + {\left (5 \, b^{3} n^{2} \log \left (c\right )^{4} + 6 \, a b^{2} n^{2} x \log \left (c\right )^{2} + a^{2} b n^{2} x^{2}\right )} \log \left (x\right )^{2} + 2 \, {\left (2 \, a b^{2} n x \log \left (c\right )^{3} + a^{2} b n x^{2} \log \left (c\right )\right )} \log \left (x\right ) \] Input:

integrate((a/x^2+2*b*n*log(c*x^n)/x^3)*(a*x^2+b*x*log(c*x^n)^2)^2,x, algor 
ithm="giac")
 

Output:

1/3*b^3*n^6*log(x)^6 + 2*b^3*n^5*log(c)*log(x)^5 + 2*b^3*n*log(c)^5*log(x) 
 + a*b^2*x*log(c)^4 + a^2*b*x^2*log(c)^2 + 1/3*a^3*x^3 + (5*b^3*n^4*log(c) 
^2 + a*b^2*n^4*x)*log(x)^4 + 4/3*(5*b^3*n^3*log(c)^3 + 3*a*b^2*n^3*x*log(c 
))*log(x)^3 + (5*b^3*n^2*log(c)^4 + 6*a*b^2*n^2*x*log(c)^2 + a^2*b*n^2*x^2 
)*log(x)^2 + 2*(2*a*b^2*n*x*log(c)^3 + a^2*b*n*x^2*log(c))*log(x)
 

Mupad [B] (verification not implemented)

Time = 25.63 (sec) , antiderivative size = 52, normalized size of antiderivative = 2.60 \[ \int \left (\frac {a}{x^2}+\frac {2 b n \log \left (c x^n\right )}{x^3}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2 \, dx=\frac {a^3\,x^3}{3}+a^2\,b\,x^2\,{\ln \left (c\,x^n\right )}^2+a\,b^2\,x\,{\ln \left (c\,x^n\right )}^4+\frac {b^3\,{\ln \left (c\,x^n\right )}^6}{3} \] Input:

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

Output:

(b^3*log(c*x^n)^6)/3 + (a^3*x^3)/3 + a^2*b*x^2*log(c*x^n)^2 + a*b^2*x*log( 
c*x^n)^4
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 52, normalized size of antiderivative = 2.60 \[ \int \left (\frac {a}{x^2}+\frac {2 b n \log \left (c x^n\right )}{x^3}\right ) \left (a x^2+b x \log ^2\left (c x^n\right )\right )^2 \, dx=\frac {\mathrm {log}\left (x^{n} c \right )^{6} b^{3}}{3}+\mathrm {log}\left (x^{n} c \right )^{4} a \,b^{2} x +\mathrm {log}\left (x^{n} c \right )^{2} a^{2} b \,x^{2}+\frac {a^{3} x^{3}}{3} \] Input:

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

Output:

(log(x**n*c)**6*b**3 + 3*log(x**n*c)**4*a*b**2*x + 3*log(x**n*c)**2*a**2*b 
*x**2 + a**3*x**3)/3