3.260 \(\int \frac {-1+\log ^2(3 x)}{x+x \log ^3(3 x)} \, dx\)

Optimal. Leaf size=41 \[ \frac {1}{2} \log \left (\log ^2(3 x)-\log (3 x)+1\right )+\frac {\tan ^{-1}\left (\frac {1-2 \log (3 x)}{\sqrt {3}}\right )}{\sqrt {3}} \]

[Out]

1/2*ln(1-ln(3*x)+ln(3*x)^2)+1/3*arctan(1/3*(1-2*ln(3*x))*3^(1/2))*3^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {634, 618, 204, 628} \[ \frac {1}{2} \log \left (\log ^2(3 x)-\log (3 x)+1\right )+\frac {\tan ^{-1}\left (\frac {1-2 \log (3 x)}{\sqrt {3}}\right )}{\sqrt {3}} \]

Antiderivative was successfully verified.

[In]

Int[(-1 + Log[3*x]^2)/(x + x*Log[3*x]^3),x]

[Out]

ArcTan[(1 - 2*Log[3*x])/Sqrt[3]]/Sqrt[3] + Log[1 - Log[3*x] + Log[3*x]^2]/2

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rubi steps

\begin {align*} \int \frac {-1+\log ^2(3 x)}{x+x \log ^3(3 x)} \, dx &=\operatorname {Subst}\left (\int \frac {-1+x}{1-x+x^2} \, dx,x,\log (3 x)\right )\\ &=-\left (\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{1-x+x^2} \, dx,x,\log (3 x)\right )\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {-1+2 x}{1-x+x^2} \, dx,x,\log (3 x)\right )\\ &=\frac {1}{2} \log \left (1-\log (3 x)+\log ^2(3 x)\right )+\operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 \log (3 x)\right )\\ &=-\frac {\tan ^{-1}\left (\frac {-1+2 \log (3 x)}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {1}{2} \log \left (1-\log (3 x)+\log ^2(3 x)\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 42, normalized size = 1.02 \[ \frac {1}{2} \log \left (\log ^2(3 x)-\log (3 x)+1\right )-\frac {\tan ^{-1}\left (\frac {2 \log (3 x)-1}{\sqrt {3}}\right )}{\sqrt {3}} \]

Antiderivative was successfully verified.

[In]

Integrate[(-1 + Log[3*x]^2)/(x + x*Log[3*x]^3),x]

[Out]

-(ArcTan[(-1 + 2*Log[3*x])/Sqrt[3]]/Sqrt[3]) + Log[1 - Log[3*x] + Log[3*x]^2]/2

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 39, normalized size = 0.95 \[ -\frac {1}{3} \, \sqrt {3} \arctan \left (\frac {2}{3} \, \sqrt {3} \log \left (3 \, x\right ) - \frac {1}{3} \, \sqrt {3}\right ) + \frac {1}{2} \, \log \left (\log \left (3 \, x\right )^{2} - \log \left (3 \, x\right ) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+log(3*x)^2)/(x+x*log(3*x)^3),x, algorithm="fricas")

[Out]

-1/3*sqrt(3)*arctan(2/3*sqrt(3)*log(3*x) - 1/3*sqrt(3)) + 1/2*log(log(3*x)^2 - log(3*x) + 1)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\log \left (3 \, x\right )^{2} - 1}{x \log \left (3 \, x\right )^{3} + x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+log(3*x)^2)/(x+x*log(3*x)^3),x, algorithm="giac")

[Out]

integrate((log(3*x)^2 - 1)/(x*log(3*x)^3 + x), x)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 38, normalized size = 0.93 \[ -\frac {\sqrt {3}\, \arctan \left (\frac {\left (2 \ln \left (3 x \right )-1\right ) \sqrt {3}}{3}\right )}{3}+\frac {\ln \left (\ln \left (3 x \right )^{2}-\ln \left (3 x \right )+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-1+ln(3*x)^2)/(x+x*ln(3*x)^3),x)

[Out]

-1/3*3^(1/2)*arctan(1/3*(2*ln(3*x)-1)*3^(1/2))+1/2*ln(ln(3*x)^2-ln(3*x)+1)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\log \left (3 \, x\right )^{2} - 1}{x \log \left (3 \, x\right )^{3} + x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+log(3*x)^2)/(x+x*log(3*x)^3),x, algorithm="maxima")

[Out]

integrate((log(3*x)^2 - 1)/(x*log(3*x)^3 + x), x)

________________________________________________________________________________________

mupad [B]  time = 0.35, size = 37, normalized size = 0.90 \[ \frac {\ln \left ({\ln \left (3\,x\right )}^2-\ln \left (3\,x\right )+1\right )}{2}-\frac {\sqrt {3}\,\mathrm {atan}\left (\frac {\sqrt {3}\,\left (2\,\ln \left (3\,x\right )-1\right )}{3}\right )}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(3*x)^2 - 1)/(x + x*log(3*x)^3),x)

[Out]

log(log(3*x)^2 - log(3*x) + 1)/2 - (3^(1/2)*atan((3^(1/2)*(2*log(3*x) - 1))/3))/3

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 22, normalized size = 0.54 \[ \operatorname {RootSum} {\left (3 z^{2} - 3 z + 1, \left (i \mapsto i \log {\left (- 3 i + \log {\left (3 x \right )} + 1 \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+ln(3*x)**2)/(x+x*ln(3*x)**3),x)

[Out]

RootSum(3*_z**2 - 3*_z + 1, Lambda(_i, _i*log(-3*_i + log(3*x) + 1)))

________________________________________________________________________________________