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

Optimal. Leaf size=16 \[ \log \left (5 e^{\frac {\log ^2(3 x)}{x^2}} x\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 13, normalized size of antiderivative = 0.81, number of steps used = 5, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {14, 2304, 2305} \begin {gather*} \frac {\log ^2(3 x)}{x^2}+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[x] + Log[3*x]^2/x^2

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {1}{x}+\frac {2 \log (3 x)}{x^3}-\frac {2 \log ^2(3 x)}{x^3}\right ) \, dx\\ &=\log (x)+2 \int \frac {\log (3 x)}{x^3} \, dx-2 \int \frac {\log ^2(3 x)}{x^3} \, dx\\ &=-\frac {1}{2 x^2}+\log (x)-\frac {\log (3 x)}{x^2}+\frac {\log ^2(3 x)}{x^2}-2 \int \frac {\log (3 x)}{x^3} \, dx\\ &=\log (x)+\frac {\log ^2(3 x)}{x^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 13, normalized size = 0.81 \begin {gather*} \log (x)+\frac {\log ^2(3 x)}{x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[x] + Log[3*x]^2/x^2

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 19, normalized size = 1.19 \begin {gather*} \frac {x^{2} \log \left (3 \, x\right ) + \log \left (3 \, x\right )^{2}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2*log(3*x) + log(3*x)^2)/x^2

________________________________________________________________________________________

giac [A]  time = 0.30, size = 13, normalized size = 0.81 \begin {gather*} \frac {\log \left (3 \, x\right )^{2}}{x^{2}} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(3*x)^2/x^2 + log(x)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 14, normalized size = 0.88




method result size



risch \(\frac {\ln \left (3 x \right )^{2}}{x^{2}}+\ln \relax (x )\) \(14\)
derivativedivides \(\frac {\ln \left (3 x \right )^{2}}{x^{2}}+\ln \left (3 x \right )\) \(16\)
default \(\frac {\ln \left (3 x \right )^{2}}{x^{2}}+\ln \left (3 x \right )\) \(16\)
norman \(\frac {\ln \left (3 x \right )^{2}+x^{2} \ln \left (3 x \right )}{x^{2}}\) \(20\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-2*ln(3*x)^2+2*ln(3*x)+x^2)/x^3,x,method=_RETURNVERBOSE)

[Out]

ln(3*x)^2/x^2+ln(x)

________________________________________________________________________________________

maxima [B]  time = 0.62, size = 38, normalized size = 2.38 \begin {gather*} \frac {2 \, \log \left (3 \, x\right )^{2} + 2 \, \log \left (3 \, x\right ) + 1}{2 \, x^{2}} - \frac {\log \left (3 \, x\right )}{x^{2}} - \frac {1}{2 \, x^{2}} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.44, size = 13, normalized size = 0.81 \begin {gather*} \ln \relax (x)+\frac {{\ln \left (3\,x\right )}^2}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x) + log(3*x)^2/x^2

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 12, normalized size = 0.75 \begin {gather*} \log {\relax (x )} + \frac {\log {\left (3 x \right )}^{2}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x) + log(3*x)**2/x**2

________________________________________________________________________________________