3.10 \(\int \frac{\log (c x^n) (a x^m+b \log ^2(c x^n))^2}{x} \, dx\)

Optimal. Leaf size=125 \[ \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} \]

[Out]

(-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)

________________________________________________________________________________________

Rubi [A]  time = 0.165895, antiderivative size = 125, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {2539, 2304, 2305, 2302, 30} \[ \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} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-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)

Rule 2539

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]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \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 \left (a^2 x^{-1+2 m} \log \left (c x^n\right )+2 a b x^{-1+m} \log ^3\left (c x^n\right )+\frac{b^2 \log ^5\left (c x^n\right )}{x}\right ) \, dx\\ &=a^2 \int x^{-1+2 m} \log \left (c x^n\right ) \, dx+(2 a b) \int x^{-1+m} \log ^3\left (c x^n\right ) \, dx+b^2 \int \frac{\log ^5\left (c x^n\right )}{x} \, dx\\ &=-\frac{a^2 n x^{2 m}}{4 m^2}+\frac{a^2 x^{2 m} \log \left (c x^n\right )}{2 m}+\frac{2 a b x^m \log ^3\left (c x^n\right )}{m}+\frac{b^2 \operatorname{Subst}\left (\int x^5 \, dx,x,\log \left (c x^n\right )\right )}{n}-\frac{(6 a b n) \int x^{-1+m} \log ^2\left (c x^n\right ) \, dx}{m}\\ &=-\frac{a^2 n x^{2 m}}{4 m^2}+\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}+\frac{\left (12 a b n^2\right ) \int x^{-1+m} \log \left (c x^n\right ) \, dx}{m^2}\\ &=-\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}\\ \end{align*}

Mathematica [A]  time = 0.104551, size = 115, normalized size = 0.92 \[ \frac{a x^m \log \left (c x^n\right ) \left (a m^2 x^m+24 b n^2\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{a n x^m \left (a m^2 x^m+48 b n^2\right )}{4 m^4}+\frac{b^2 \log ^6\left (c x^n\right )}{6 n} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(a*n*x^m*(48*b*n^2 + a*m^2*x^m))/(4*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*L
og[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)

________________________________________________________________________________________

Maple [C]  time = 1.375, size = 14983, normalized size = 119.9 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*x^n)*(a*x^m+b*ln(c*x^n)^2)^2/x,x)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.85593, size = 659, normalized size = 5.27 \begin{align*} \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}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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*log(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*log(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

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [B]  time = 1.65729, size = 386, normalized size = 3.09 \begin{align*} \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}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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