Integrand size = 28, antiderivative size = 125 \[ \int \frac {\log \left (c x^n\right ) \left (a x^m+b \log ^2\left (c x^n\right )\right )^2}{x} \, dx=-\frac {12 a b n^3 x^m}{m^4}-\frac {a^2 n x^{2 m}}{4 m^2}+\frac {12 a b n^2 x^m \log \left (c x^n\right )}{m^3}+\frac {a^2 x^{2 m} \log \left (c x^n\right )}{2 m}-\frac {6 a b n x^m \log ^2\left (c x^n\right )}{m^2}+\frac {2 a b x^m \log ^3\left (c x^n\right )}{m}+\frac {b^2 \log ^6\left (c x^n\right )}{6 n} \]
-12*a*b*n^3*x^m/m^4-1/4*a^2*n*x^(2*m)/m^2+12*a*b*n^2*x^m*ln(c*x^n)/m^3+1/2 *a^2*x^(2*m)*ln(c*x^n)/m-6*a*b*n*x^m*ln(c*x^n)^2/m^2+2*a*b*x^m*ln(c*x^n)^3 /m+1/6*b^2*ln(c*x^n)^6/n
Time = 0.07 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.92 \[ \int \frac {\log \left (c x^n\right ) \left (a x^m+b \log ^2\left (c x^n\right )\right )^2}{x} \, dx=-\frac {a n x^m \left (48 b n^2+a m^2 x^m\right )}{4 m^4}+\frac {a x^m \left (24 b n^2+a m^2 x^m\right ) \log \left (c x^n\right )}{2 m^3}-\frac {6 a b n x^m \log ^2\left (c x^n\right )}{m^2}+\frac {2 a b x^m \log ^3\left (c x^n\right )}{m}+\frac {b^2 \log ^6\left (c x^n\right )}{6 n} \]
-1/4*(a*n*x^m*(48*b*n^2 + a*m^2*x^m))/m^4 + (a*x^m*(24*b*n^2 + a*m^2*x^m)* Log[c*x^n])/(2*m^3) - (6*a*b*n*x^m*Log[c*x^n]^2)/m^2 + (2*a*b*x^m*Log[c*x^ n]^3)/m + (b^2*Log[c*x^n]^6)/(6*n)
Time = 0.34 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3019, 2009}
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 {\log \left (c x^n\right ) \left (a x^m+b \log ^2\left (c x^n\right )\right )^2}{x} \, dx\) |
\(\Big \downarrow \) 3019 |
\(\displaystyle \int \left (a^2 x^{2 m-1} \log \left (c x^n\right )+2 a b x^{m-1} \log ^3\left (c x^n\right )+\frac {b^2 \log ^5\left (c x^n\right )}{x}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 x^{2 m} \log \left (c x^n\right )}{2 m}-\frac {a^2 n x^{2 m}}{4 m^2}+\frac {12 a b n^2 x^m \log \left (c x^n\right )}{m^3}-\frac {6 a b n x^m \log ^2\left (c x^n\right )}{m^2}+\frac {2 a b x^m \log ^3\left (c x^n\right )}{m}-\frac {12 a b n^3 x^m}{m^4}+\frac {b^2 \log ^6\left (c x^n\right )}{6 n}\) |
(-12*a*b*n^3*x^m)/m^4 - (a^2*n*x^(2*m))/(4*m^2) + (12*a*b*n^2*x^m*Log[c*x^ n])/m^3 + (a^2*x^(2*m)*Log[c*x^n])/(2*m) - (6*a*b*n*x^m*Log[c*x^n]^2)/m^2 + (2*a*b*x^m*Log[c*x^n]^3)/m + (b^2*Log[c*x^n]^6)/(6*n)
3.1.10.3.1 Defintions of rubi rules used
Int[(Log[(c_.)*(x_)^(n_.)]^(r_.)*(Log[(c_.)*(x_)^(n_.)]^(q_)*(b_.) + (a_.)* (x_)^(m_.))^(p_.))/(x_), x_Symbol] :> Int[ExpandIntegrand[Log[c*x^n]^r/x, ( a*x^m + b*Log[c*x^n]^q)^p, x], x] /; FreeQ[{a, b, c, m, n, p, q, r}, x] && EqQ[r, q - 1] && IGtQ[p, 0]
Time = 2.97 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.03
method | result | size |
parallelrisch | \(-\frac {-2 b^{2} \ln \left (c \,x^{n}\right )^{6} m^{4}-24 x^{m} \ln \left (c \,x^{n}\right )^{3} a b \,m^{3} n -6 x^{2 m} \ln \left (c \,x^{n}\right ) a^{2} m^{3} n +72 a b \,n^{2} \ln \left (c \,x^{n}\right )^{2} x^{m} m^{2}+3 a^{2} n^{2} x^{2 m} m^{2}-144 a b \,n^{3} \ln \left (c \,x^{n}\right ) x^{m} m +144 a b \,n^{4} x^{m}}{12 m^{4} n}\) | \(129\) |
risch | \(\text {Expression too large to display}\) | \(14983\) |
-1/12*(-2*b^2*ln(c*x^n)^6*m^4-24*x^m*ln(c*x^n)^3*a*b*m^3*n-6*(x^m)^2*ln(c* x^n)*a^2*m^3*n+72*a*b*n^2*ln(c*x^n)^2*x^m*m^2+3*a^2*n^2*(x^m)^2*m^2-144*a* b*n^3*ln(c*x^n)*x^m*m+144*a*b*n^4*x^m)/m^4/n
Leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (119) = 238\).
Time = 0.32 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.14 \[ \int \frac {\log \left (c x^n\right ) \left (a x^m+b \log ^2\left (c x^n\right )\right )^2}{x} \, dx=\frac {2 \, b^{2} m^{4} n^{5} \log \left (x\right )^{6} + 12 \, b^{2} m^{4} n^{4} \log \left (c\right ) \log \left (x\right )^{5} + 30 \, b^{2} m^{4} n^{3} \log \left (c\right )^{2} \log \left (x\right )^{4} + 40 \, b^{2} m^{4} n^{2} \log \left (c\right )^{3} \log \left (x\right )^{3} + 30 \, b^{2} m^{4} n \log \left (c\right )^{4} \log \left (x\right )^{2} + 12 \, b^{2} m^{4} \log \left (c\right )^{5} \log \left (x\right ) + 3 \, {\left (2 \, a^{2} m^{3} n \log \left (x\right ) + 2 \, a^{2} m^{3} \log \left (c\right ) - a^{2} m^{2} n\right )} x^{2 \, m} + 24 \, {\left (a b m^{3} n^{3} \log \left (x\right )^{3} + a b m^{3} \log \left (c\right )^{3} - 3 \, a b m^{2} n \log \left (c\right )^{2} + 6 \, a b m n^{2} \log \left (c\right ) - 6 \, a b n^{3} + 3 \, {\left (a b m^{3} n^{2} \log \left (c\right ) - a b m^{2} n^{3}\right )} \log \left (x\right )^{2} + 3 \, {\left (a b m^{3} n \log \left (c\right )^{2} - 2 \, a b m^{2} n^{2} \log \left (c\right ) + 2 \, a b m n^{3}\right )} \log \left (x\right )\right )} x^{m}}{12 \, m^{4}} \]
1/12*(2*b^2*m^4*n^5*log(x)^6 + 12*b^2*m^4*n^4*log(c)*log(x)^5 + 30*b^2*m^4 *n^3*log(c)^2*log(x)^4 + 40*b^2*m^4*n^2*log(c)^3*log(x)^3 + 30*b^2*m^4*n*l og(c)^4*log(x)^2 + 12*b^2*m^4*log(c)^5*log(x) + 3*(2*a^2*m^3*n*log(x) + 2* a^2*m^3*log(c) - a^2*m^2*n)*x^(2*m) + 24*(a*b*m^3*n^3*log(x)^3 + a*b*m^3*l og(c)^3 - 3*a*b*m^2*n*log(c)^2 + 6*a*b*m*n^2*log(c) - 6*a*b*n^3 + 3*(a*b*m ^3*n^2*log(c) - a*b*m^2*n^3)*log(x)^2 + 3*(a*b*m^3*n*log(c)^2 - 2*a*b*m^2* n^2*log(c) + 2*a*b*m*n^3)*log(x))*x^m)/m^4
Time = 13.32 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.73 \[ \int \frac {\log \left (c x^n\right ) \left (a x^m+b \log ^2\left (c x^n\right )\right )^2}{x} \, dx=- a^{2} n \left (\begin {cases} \frac {\begin {cases} \frac {x^{2 m}}{2 m} & \text {for}\: m \neq 0 \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{2 m} & \text {for}\: m > -\infty \wedge m < \infty \wedge m \neq 0 \\\frac {\log {\left (x \right )}^{2}}{2} & \text {otherwise} \end {cases}\right ) + a^{2} \left (\begin {cases} \frac {x^{2 m}}{2 m} & \text {for}\: m \neq 0 \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} + 2 a b \left (\begin {cases} \frac {x^{m} \log {\left (c x^{n} \right )}^{3}}{m} - \frac {3 n x^{m} \log {\left (c x^{n} \right )}^{2}}{m^{2}} + \frac {6 n^{2} x^{m} \log {\left (c x^{n} \right )}}{m^{3}} - \frac {6 n^{3} x^{m}}{m^{4}} & \text {for}\: m \neq 0 \\\begin {cases} 0 & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \wedge \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (c x^{n} \right )}^{4}}{4 n} & \text {for}\: \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (\frac {x^{- n}}{c} \right )}^{4}}{4 n} & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \\\frac {6 {G_{5, 5}^{5, 0}\left (\begin {matrix} & 1, 1, 1, 1, 1 \\0, 0, 0, 0, 0 & \end {matrix} \middle | {c x^{n}} \right )}}{n} + \frac {6 {G_{5, 5}^{0, 5}\left (\begin {matrix} 1, 1, 1, 1, 1 & \\ & 0, 0, 0, 0, 0 \end {matrix} \middle | {c x^{n}} \right )}}{n} & \text {otherwise} \end {cases} & \text {otherwise} \end {cases}\right ) - b^{2} \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 ) \]
-a**2*n*Piecewise((Piecewise((x**(2*m)/(2*m), Ne(m, 0)), (log(x), True))/( 2*m), (m > -oo) & (m < oo) & Ne(m, 0)), (log(x)**2/2, True)) + a**2*Piecew ise((x**(2*m)/(2*m), Ne(m, 0)), (log(x), True))*log(c*x**n) + 2*a*b*Piecew ise((x**m*log(c*x**n)**3/m - 3*n*x**m*log(c*x**n)**2/m**2 + 6*n**2*x**m*lo g(c*x**n)/m**3 - 6*n**3*x**m/m**4, Ne(m, 0)), (Piecewise((0, (Abs(c*x**n) < 1) & (1/Abs(c*x**n) < 1)), (log(c*x**n)**4/(4*n), Abs(c*x**n) < 1), (log (1/(c*x**n))**4/(4*n), 1/Abs(c*x**n) < 1), (6*meijerg(((), (1, 1, 1, 1, 1) ), ((0, 0, 0, 0, 0), ()), c*x**n)/n + 6*meijerg(((1, 1, 1, 1, 1), ()), (() , (0, 0, 0, 0, 0)), c*x**n)/n, True)), True)) - b**2*Piecewise((-log(c)**5 *log(x), Eq(n, 0)), (-log(c*x**n)**6/(6*n), True))
Leaf count of result is larger than twice the leaf count of optimal. 530 vs. \(2 (119) = 238\).
Time = 0.23 (sec) , antiderivative size = 530, normalized size of antiderivative = 4.24 \[ \int \frac {\log \left (c x^n\right ) \left (a x^m+b \log ^2\left (c x^n\right )\right )^2}{x} \, dx=\frac {1}{10} \, {\left (\frac {2 \, b^{2} \log \left (c x^{n}\right )^{5}}{n} + \frac {20 \, a b x^{m} \log \left (c x^{n}\right )^{2}}{m} - 40 \, a b {\left (\frac {n x^{m} \log \left (c x^{n}\right )}{m^{2}} - \frac {n^{2} x^{m}}{m^{3}}\right )} + \frac {5 \, a^{2} x^{2 \, m}}{m}\right )} \log \left (c x^{n}\right ) + \frac {2 \, b^{2} m^{4} n^{5} \log \left (x\right )^{6} - 12 \, b^{2} m^{4} n^{4} \log \left (c\right ) \log \left (x\right )^{5} + 30 \, b^{2} m^{4} n^{3} \log \left (c\right )^{2} \log \left (x\right )^{4} - 40 \, b^{2} m^{4} n^{2} \log \left (c\right )^{3} \log \left (x\right )^{3} + 30 \, b^{2} m^{4} n \log \left (c\right )^{4} \log \left (x\right )^{2} - 12 \, b^{2} m^{4} \log \left (c\right )^{5} \log \left (x\right ) - 12 \, b^{2} m^{4} \log \left (x\right ) \log \left (x^{n}\right )^{5} - 15 \, a^{2} m^{2} n x^{2 \, m} + 30 \, {\left (b^{2} m^{4} n \log \left (x\right )^{2} - 2 \, b^{2} m^{4} \log \left (c\right ) \log \left (x\right )\right )} \log \left (x^{n}\right )^{4} - 120 \, {\left (m^{2} n \log \left (c\right )^{2} - 4 \, m n^{2} \log \left (c\right ) + 6 \, n^{3}\right )} a b x^{m} - 40 \, {\left (b^{2} m^{4} n^{2} \log \left (x\right )^{3} - 3 \, b^{2} m^{4} n \log \left (c\right ) \log \left (x\right )^{2} + 3 \, b^{2} m^{4} \log \left (c\right )^{2} \log \left (x\right )\right )} \log \left (x^{n}\right )^{3} + 30 \, {\left (b^{2} m^{4} n^{3} \log \left (x\right )^{4} - 4 \, b^{2} m^{4} n^{2} \log \left (c\right ) \log \left (x\right )^{3} + 6 \, b^{2} m^{4} n \log \left (c\right )^{2} \log \left (x\right )^{2} - 4 \, b^{2} m^{4} \log \left (c\right )^{3} \log \left (x\right ) - 4 \, a b m^{2} n x^{m}\right )} \log \left (x^{n}\right )^{2} - 12 \, {\left (b^{2} m^{4} n^{4} \log \left (x\right )^{5} - 5 \, b^{2} m^{4} n^{3} \log \left (c\right ) \log \left (x\right )^{4} + 10 \, b^{2} m^{4} n^{2} \log \left (c\right )^{2} \log \left (x\right )^{3} - 10 \, b^{2} m^{4} n \log \left (c\right )^{3} \log \left (x\right )^{2} + 5 \, b^{2} m^{4} \log \left (c\right )^{4} \log \left (x\right ) + 20 \, {\left (m^{2} n \log \left (c\right ) - 2 \, m n^{2}\right )} a b x^{m}\right )} \log \left (x^{n}\right )}{60 \, m^{4}} \]
1/10*(2*b^2*log(c*x^n)^5/n + 20*a*b*x^m*log(c*x^n)^2/m - 40*a*b*(n*x^m*log (c*x^n)/m^2 - n^2*x^m/m^3) + 5*a^2*x^(2*m)/m)*log(c*x^n) + 1/60*(2*b^2*m^4 *n^5*log(x)^6 - 12*b^2*m^4*n^4*log(c)*log(x)^5 + 30*b^2*m^4*n^3*log(c)^2*l og(x)^4 - 40*b^2*m^4*n^2*log(c)^3*log(x)^3 + 30*b^2*m^4*n*log(c)^4*log(x)^ 2 - 12*b^2*m^4*log(c)^5*log(x) - 12*b^2*m^4*log(x)*log(x^n)^5 - 15*a^2*m^2 *n*x^(2*m) + 30*(b^2*m^4*n*log(x)^2 - 2*b^2*m^4*log(c)*log(x))*log(x^n)^4 - 120*(m^2*n*log(c)^2 - 4*m*n^2*log(c) + 6*n^3)*a*b*x^m - 40*(b^2*m^4*n^2* log(x)^3 - 3*b^2*m^4*n*log(c)*log(x)^2 + 3*b^2*m^4*log(c)^2*log(x))*log(x^ n)^3 + 30*(b^2*m^4*n^3*log(x)^4 - 4*b^2*m^4*n^2*log(c)*log(x)^3 + 6*b^2*m^ 4*n*log(c)^2*log(x)^2 - 4*b^2*m^4*log(c)^3*log(x) - 4*a*b*m^2*n*x^m)*log(x ^n)^2 - 12*(b^2*m^4*n^4*log(x)^5 - 5*b^2*m^4*n^3*log(c)*log(x)^4 + 10*b^2* m^4*n^2*log(c)^2*log(x)^3 - 10*b^2*m^4*n*log(c)^3*log(x)^2 + 5*b^2*m^4*log (c)^4*log(x) + 20*(m^2*n*log(c) - 2*m*n^2)*a*b*x^m)*log(x^n))/m^4
Leaf count of result is larger than twice the leaf count of optimal. 286 vs. \(2 (119) = 238\).
Time = 0.32 (sec) , antiderivative size = 286, normalized size of antiderivative = 2.29 \[ \int \frac {\log \left (c x^n\right ) \left (a x^m+b \log ^2\left (c x^n\right )\right )^2}{x} \, dx=\frac {1}{6} \, b^{2} n^{5} \log \left (x\right )^{6} + b^{2} n^{4} \log \left (c\right ) \log \left (x\right )^{5} + \frac {5}{2} \, b^{2} n^{3} \log \left (c\right )^{2} \log \left (x\right )^{4} + \frac {10}{3} \, b^{2} n^{2} \log \left (c\right )^{3} \log \left (x\right )^{3} + \frac {5}{2} \, b^{2} n \log \left (c\right )^{4} \log \left (x\right )^{2} + b^{2} \log \left (c\right )^{5} \log \left (x\right ) + \frac {2 \, a b n^{3} x^{m} \log \left (x\right )^{3}}{m} + \frac {6 \, a b n^{2} x^{m} \log \left (c\right ) \log \left (x\right )^{2}}{m} + \frac {6 \, a b n x^{m} \log \left (c\right )^{2} \log \left (x\right )}{m} - \frac {6 \, a b n^{3} x^{m} \log \left (x\right )^{2}}{m^{2}} + \frac {2 \, a b x^{m} \log \left (c\right )^{3}}{m} - \frac {12 \, a b n^{2} x^{m} \log \left (c\right ) \log \left (x\right )}{m^{2}} - \frac {6 \, a b n x^{m} \log \left (c\right )^{2}}{m^{2}} + \frac {a^{2} n x^{2 \, m} \log \left (x\right )}{2 \, m} + \frac {12 \, a b n^{3} x^{m} \log \left (x\right )}{m^{3}} + \frac {a^{2} x^{2 \, m} \log \left (c\right )}{2 \, m} + \frac {12 \, a b n^{2} x^{m} \log \left (c\right )}{m^{3}} - \frac {a^{2} n x^{2 \, m}}{4 \, m^{2}} - \frac {12 \, a b n^{3} x^{m}}{m^{4}} \]
1/6*b^2*n^5*log(x)^6 + b^2*n^4*log(c)*log(x)^5 + 5/2*b^2*n^3*log(c)^2*log( x)^4 + 10/3*b^2*n^2*log(c)^3*log(x)^3 + 5/2*b^2*n*log(c)^4*log(x)^2 + b^2* log(c)^5*log(x) + 2*a*b*n^3*x^m*log(x)^3/m + 6*a*b*n^2*x^m*log(c)*log(x)^2 /m + 6*a*b*n*x^m*log(c)^2*log(x)/m - 6*a*b*n^3*x^m*log(x)^2/m^2 + 2*a*b*x^ m*log(c)^3/m - 12*a*b*n^2*x^m*log(c)*log(x)/m^2 - 6*a*b*n*x^m*log(c)^2/m^2 + 1/2*a^2*n*x^(2*m)*log(x)/m + 12*a*b*n^3*x^m*log(x)/m^3 + 1/2*a^2*x^(2*m )*log(c)/m + 12*a*b*n^2*x^m*log(c)/m^3 - 1/4*a^2*n*x^(2*m)/m^2 - 12*a*b*n^ 3*x^m/m^4
Timed out. \[ \int \frac {\log \left (c x^n\right ) \left (a x^m+b \log ^2\left (c x^n\right )\right )^2}{x} \, dx=\int \frac {\ln \left (c\,x^n\right )\,{\left (a\,x^m+b\,{\ln \left (c\,x^n\right )}^2\right )}^2}{x} \,d x \]