### 3.149 $$\int \frac{\log ^2(a x^n)^p}{x} \, dx$$

Optimal. Leaf size=27 $\frac{\log \left (a x^n\right ) \log ^2\left (a x^n\right )^p}{n (2 p+1)}$

[Out]

(Log[a*x^n]*(Log[a*x^n]^2)^p)/(n*(1 + 2*p))

________________________________________________________________________________________

Rubi [A]  time = 0.026034, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 14, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.143, Rules used = {15, 30} $\frac{\log \left (a x^n\right ) \log ^2\left (a x^n\right )^p}{n (2 p+1)}$

Antiderivative was successfully veriﬁed.

[In]

Int[(Log[a*x^n]^2)^p/x,x]

[Out]

(Log[a*x^n]*(Log[a*x^n]^2)^p)/(n*(1 + 2*p))

Rule 15

Int[(u_.)*((a_.)*(x_)^(n_))^(m_), x_Symbol] :> Dist[(a^IntPart[m]*(a*x^n)^FracPart[m])/x^(n*FracPart[m]), Int[
u*x^(m*n), x], x] /; FreeQ[{a, m, n}, x] &&  !IntegerQ[m]

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 ^2\left (a x^n\right )^p}{x} \, dx &=\frac{\operatorname{Subst}\left (\int \left (x^2\right )^p \, dx,x,\log \left (a x^n\right )\right )}{n}\\ &=\frac{\left (\log ^{-2 p}\left (a x^n\right ) \log ^2\left (a x^n\right )^p\right ) \operatorname{Subst}\left (\int x^{2 p} \, dx,x,\log \left (a x^n\right )\right )}{n}\\ &=\frac{\log \left (a x^n\right ) \log ^2\left (a x^n\right )^p}{n (1+2 p)}\\ \end{align*}

Mathematica [A]  time = 0.01064, size = 27, normalized size = 1. $\frac{\log \left (a x^n\right ) \log ^2\left (a x^n\right )^p}{n (2 p+1)}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(Log[a*x^n]^2)^p/x,x]

[Out]

(Log[a*x^n]*(Log[a*x^n]^2)^p)/(n*(1 + 2*p))

________________________________________________________________________________________

Maple [F]  time = 0.181, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( \left ( \ln \left ( a{x}^{n} \right ) \right ) ^{2} \right ) ^{p}}{x}}\, dx \end{align*}

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

[In]

int((ln(a*x^n)^2)^p/x,x)

[Out]

int((ln(a*x^n)^2)^p/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(a*x^n)^2)^p/x,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 2.13831, size = 109, normalized size = 4.04 \begin{align*} \frac{{\left (n \log \left (x\right ) + \log \left (a\right )\right )}{\left (n^{2} \log \left (x\right )^{2} + 2 \, n \log \left (a\right ) \log \left (x\right ) + \log \left (a\right )^{2}\right )}^{p}}{2 \, n p + n} \end{align*}

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

[In]

integrate((log(a*x^n)^2)^p/x,x, algorithm="fricas")

[Out]

(n*log(x) + log(a))*(n^2*log(x)^2 + 2*n*log(a)*log(x) + log(a)^2)^p/(2*n*p + n)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (\log{\left (a x^{n} \right )}^{2}\right )^{p}}{x}\, dx \end{align*}

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

[In]

integrate((ln(a*x**n)**2)**p/x,x)

[Out]

Integral((log(a*x**n)**2)**p/x, x)

________________________________________________________________________________________

Giac [B]  time = 1.59817, size = 92, normalized size = 3.41 \begin{align*} \frac{{\left (n \log \left (x\right ) \mathrm{sgn}\left (\log \left (a x^{n}\right )\right ) + \log \left (a\right ) \mathrm{sgn}\left (\log \left (a x^{n}\right )\right )\right )}{\left (n \log \left (x\right ) \mathrm{sgn}\left (\log \left (a x^{n}\right )\right ) + \log \left (a\right ) \mathrm{sgn}\left (\log \left (a x^{n}\right )\right )\right )}^{2 \, p}}{n{\left (2 \, p + 1\right )} \mathrm{sgn}\left (\log \left (a x^{n}\right )\right )} \end{align*}

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

[In]

integrate((log(a*x^n)^2)^p/x,x, algorithm="giac")

[Out]

(n*log(x)*sgn(log(a*x^n)) + log(a)*sgn(log(a*x^n)))*(n*log(x)*sgn(log(a*x^n)) + log(a)*sgn(log(a*x^n)))^(2*p)/
(n*(2*p + 1)*sgn(log(a*x^n)))