\(\int \frac {\sqrt {\log ^2(a x^n)}}{x} \, dx\) [151]

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

Optimal result

Integrand size = 16, antiderivative size = 25 \[ \int \frac {\sqrt {\log ^2\left (a x^n\right )}}{x} \, dx=\frac {\log \left (a x^n\right ) \sqrt {\log ^2\left (a x^n\right )}}{2 n} \]

[Out]

1/2*ln(a*x^n)*(ln(a*x^n)^2)^(1/2)/n

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {15, 30} \[ \int \frac {\sqrt {\log ^2\left (a x^n\right )}}{x} \, dx=\frac {\log \left (a x^n\right ) \sqrt {\log ^2\left (a x^n\right )}}{2 n} \]

[In]

Int[Sqrt[Log[a*x^n]^2]/x,x]

[Out]

(Log[a*x^n]*Sqrt[Log[a*x^n]^2])/(2*n)

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {\log ^2\left (a x^n\right )}}{x} \, dx=\frac {\log \left (a x^n\right ) \sqrt {\log ^2\left (a x^n\right )}}{2 n} \]

[In]

Integrate[Sqrt[Log[a*x^n]^2]/x,x]

[Out]

(Log[a*x^n]*Sqrt[Log[a*x^n]^2])/(2*n)

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 3.31 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84

method result size
derivativedivides \(\frac {\operatorname {csgn}\left (\ln \left (a \,x^{n}\right )\right ) \ln \left (a \,x^{n}\right )^{2}}{2 n}\) \(21\)
default \(\frac {\operatorname {csgn}\left (\ln \left (a \,x^{n}\right )\right ) \ln \left (a \,x^{n}\right )^{2}}{2 n}\) \(21\)

[In]

int((ln(a*x^n)^2)^(1/2)/x,x,method=_RETURNVERBOSE)

[Out]

1/2/n*csgn(ln(a*x^n))*ln(a*x^n)^2

Fricas [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.52 \[ \int \frac {\sqrt {\log ^2\left (a x^n\right )}}{x} \, dx=\frac {1}{2} \, n \log \left (x\right )^{2} + \log \left (a\right ) \log \left (x\right ) \]

[In]

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

[Out]

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

Sympy [F]

\[ \int \frac {\sqrt {\log ^2\left (a x^n\right )}}{x} \, dx=\int \frac {\sqrt {\log {\left (a x^{n} \right )}^{2}}}{x}\, dx \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {\sqrt {\log ^2\left (a x^n\right )}}{x} \, dx=-\frac {1}{2} \, n \log \left (x\right )^{2} + \log \left (a\right ) \log \left (x\right ) + \log \left (x\right ) \log \left (x^{n}\right ) \]

[In]

integrate((log(a*x^n)^2)^(1/2)/x,x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.08 \[ \int \frac {\sqrt {\log ^2\left (a x^n\right )}}{x} \, dx=\frac {1}{2} \, n \log \left (x\right )^{2} \mathrm {sgn}\left (\log \left (a x^{n}\right )\right ) + \log \left (a\right ) \log \left (x\right ) \mathrm {sgn}\left (\log \left (a x^{n}\right )\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 1.43 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84 \[ \int \frac {\sqrt {\log ^2\left (a x^n\right )}}{x} \, dx=\frac {\ln \left (a\,x^n\right )\,\sqrt {{\ln \left (a\,x^n\right )}^2}}{2\,n} \]

[In]

int((log(a*x^n)^2)^(1/2)/x,x)

[Out]

(log(a*x^n)*(log(a*x^n)^2)^(1/2))/(2*n)