### 3.2 $$\int \frac{\log ^{-1+q}(c x^n) (a x^m+b \log ^q(c x^n))^3}{x} \, dx$$

Optimal. Leaf size=231 $-\frac{3 a^2 b 4^{-q} x^{2 m} \left (c x^n\right )^{-\frac{2 m}{n}} \log ^{2 q}\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-2 q} \text{Gamma}\left (2 q,-\frac{2 m \log \left (c x^n\right )}{n}\right )}{n}-\frac{a^3 3^{-q} x^{3 m} \left (c x^n\right )^{-\frac{3 m}{n}} \log ^q\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-q} \text{Gamma}\left (q,-\frac{3 m \log \left (c x^n\right )}{n}\right )}{n}-\frac{3 a b^2 x^m \left (c x^n\right )^{-\frac{m}{n}} \log ^{3 q}\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-3 q} \text{Gamma}\left (3 q,-\frac{m \log \left (c x^n\right )}{n}\right )}{n}+\frac{b^3 \log ^{4 q}\left (c x^n\right )}{4 n q}$

[Out]

(b^3*Log[c*x^n]^(4*q))/(4*n*q) - (3*a*b^2*x^m*Gamma[3*q, -((m*Log[c*x^n])/n)]*Log[c*x^n]^(3*q))/(n*(c*x^n)^(m/
n)*(-((m*Log[c*x^n])/n))^(3*q)) - (3*a^2*b*x^(2*m)*Gamma[2*q, (-2*m*Log[c*x^n])/n]*Log[c*x^n]^(2*q))/(4^q*n*(c
*x^n)^((2*m)/n)*(-((m*Log[c*x^n])/n))^(2*q)) - (a^3*x^(3*m)*Gamma[q, (-3*m*Log[c*x^n])/n]*Log[c*x^n]^q)/(3^q*n
*(c*x^n)^((3*m)/n)*(-((m*Log[c*x^n])/n))^q)

________________________________________________________________________________________

Rubi [A]  time = 0.348353, antiderivative size = 231, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 5, integrand size = 32, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.156, Rules used = {2539, 2310, 2181, 2302, 30} $-\frac{3 a^2 b 4^{-q} x^{2 m} \left (c x^n\right )^{-\frac{2 m}{n}} \log ^{2 q}\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-2 q} \text{Gamma}\left (2 q,-\frac{2 m \log \left (c x^n\right )}{n}\right )}{n}-\frac{a^3 3^{-q} x^{3 m} \left (c x^n\right )^{-\frac{3 m}{n}} \log ^q\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-q} \text{Gamma}\left (q,-\frac{3 m \log \left (c x^n\right )}{n}\right )}{n}-\frac{3 a b^2 x^m \left (c x^n\right )^{-\frac{m}{n}} \log ^{3 q}\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-3 q} \text{Gamma}\left (3 q,-\frac{m \log \left (c x^n\right )}{n}\right )}{n}+\frac{b^3 \log ^{4 q}\left (c x^n\right )}{4 n q}$

Antiderivative was successfully veriﬁed.

[In]

Int[(Log[c*x^n]^(-1 + q)*(a*x^m + b*Log[c*x^n]^q)^3)/x,x]

[Out]

(b^3*Log[c*x^n]^(4*q))/(4*n*q) - (3*a*b^2*x^m*Gamma[3*q, -((m*Log[c*x^n])/n)]*Log[c*x^n]^(3*q))/(n*(c*x^n)^(m/
n)*(-((m*Log[c*x^n])/n))^(3*q)) - (3*a^2*b*x^(2*m)*Gamma[2*q, (-2*m*Log[c*x^n])/n]*Log[c*x^n]^(2*q))/(4^q*n*(c
*x^n)^((2*m)/n)*(-((m*Log[c*x^n])/n))^(2*q)) - (a^3*x^(3*m)*Gamma[q, (-3*m*Log[c*x^n])/n]*Log[c*x^n]^q)/(3^q*n
*(c*x^n)^((3*m)/n)*(-((m*Log[c*x^n])/n))^q)

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 2310

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

Rule 2181

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> -Simp[(F^(g*(e - (c*f)/d))*(c +
d*x)^FracPart[m]*Gamma[m + 1, (-((f*g*Log[F])/d))*(c + d*x)])/(d*(-((f*g*Log[F])/d))^(IntPart[m] + 1)*(-((f*g*
Log[F]*(c + d*x))/d))^FracPart[m]), x] /; FreeQ[{F, c, d, e, f, g, m}, x] &&  !IntegerQ[m]

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

Mathematica [A]  time = 0.738538, size = 223, normalized size = 0.97 $\frac{\log ^q\left (c x^n\right ) \left (-3 a^2 b 4^{1-q} x^{2 m} \left (c x^n\right )^{-\frac{2 m}{n}} \log ^q\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-2 q} \text{Gamma}\left (2 q,-\frac{2 m \log \left (c x^n\right )}{n}\right )-4 a^3 3^{-q} x^{3 m} \left (c x^n\right )^{-\frac{3 m}{n}} \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-q} \text{Gamma}\left (q,-\frac{3 m \log \left (c x^n\right )}{n}\right )-12 a b^2 x^m \left (c x^n\right )^{-\frac{m}{n}} \log ^{2 q}\left (c x^n\right ) \left (-\frac{m \log \left (c x^n\right )}{n}\right )^{-3 q} \text{Gamma}\left (3 q,-\frac{m \log \left (c x^n\right )}{n}\right )+\frac{b^3 \log ^{3 q}\left (c x^n\right )}{q}\right )}{4 n}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(Log[c*x^n]^(-1 + q)*(a*x^m + b*Log[c*x^n]^q)^3)/x,x]

[Out]

(Log[c*x^n]^q*((b^3*Log[c*x^n]^(3*q))/q - (12*a*b^2*x^m*Gamma[3*q, -((m*Log[c*x^n])/n)]*Log[c*x^n]^(2*q))/((c*
x^n)^(m/n)*(-((m*Log[c*x^n])/n))^(3*q)) - (3*4^(1 - q)*a^2*b*x^(2*m)*Gamma[2*q, (-2*m*Log[c*x^n])/n]*Log[c*x^n
]^q)/((c*x^n)^((2*m)/n)*(-((m*Log[c*x^n])/n))^(2*q)) - (4*a^3*x^(3*m)*Gamma[q, (-3*m*Log[c*x^n])/n])/(3^q*(c*x
^n)^((3*m)/n)*(-((m*Log[c*x^n])/n))^q)))/(4*n)

________________________________________________________________________________________

Maple [F]  time = 2.418, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( \ln \left ( c{x}^{n} \right ) \right ) ^{-1+q} \left ( a{x}^{m}+b \left ( \ln \left ( c{x}^{n} \right ) \right ) ^{q} \right ) ^{3}}{x}}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*x^n)^(-1+q)*(a*x^m+b*ln(c*x^n)^q)^3/x,x)

[Out]

int(ln(c*x^n)^(-1+q)*(a*x^m+b*ln(c*x^n)^q)^3/x,x)

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x^n)^(-1+q)*(a*x^m+b*log(c*x^n)^q)^3/x,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{3 \, a b^{2} x^{m} \log \left (c x^{n}\right )^{2 \, q} \log \left (c x^{n}\right )^{q - 1} + 3 \, a^{2} b x^{2 \, m} \log \left (c x^{n}\right )^{q - 1} \log \left (c x^{n}\right )^{q} + a^{3} x^{3 \, m} \log \left (c x^{n}\right )^{q - 1} + b^{3} \log \left (c x^{n}\right )^{3 \, q} \log \left (c x^{n}\right )^{q - 1}}{x}, x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x^n)^(-1+q)*(a*x^m+b*log(c*x^n)^q)^3/x,x, algorithm="fricas")

[Out]

integral((3*a*b^2*x^m*log(c*x^n)^(2*q)*log(c*x^n)^(q - 1) + 3*a^2*b*x^(2*m)*log(c*x^n)^(q - 1)*log(c*x^n)^q +
a^3*x^(3*m)*log(c*x^n)^(q - 1) + b^3*log(c*x^n)^(3*q)*log(c*x^n)^(q - 1))/x, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*x**n)**(-1+q)*(a*x**m+b*ln(c*x**n)**q)**3/x,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (a x^{m} + b \log \left (c x^{n}\right )^{q}\right )}^{3} \log \left (c x^{n}\right )^{q - 1}}{x}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x^n)^(-1+q)*(a*x^m+b*log(c*x^n)^q)^3/x,x, algorithm="giac")

[Out]

integrate((a*x^m + b*log(c*x^n)^q)^3*log(c*x^n)^(q - 1)/x, x)