3.45.19 \(\int \frac {3 x+2 x^2+(-18+6 x) \log (\frac {1}{x})}{9 x} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 24, normalized size of antiderivative = 1.71, number of steps used = 6, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {12, 14, 2346, 2301, 2295} \begin {gather*} \frac {x^2}{9}+x+\log ^2\left (\frac {1}{x}\right )+\frac {2}{3} x \log \left (\frac {1}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2346

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[((d
 + e*x)^(q - 1)*(a + b*Log[c*x^n])^p)/x, x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 24, normalized size = 1.71 \begin {gather*} x+\frac {x^2}{9}+\frac {2}{3} x \log \left (\frac {1}{x}\right )+\log ^2\left (\frac {1}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 20, normalized size = 1.43 \begin {gather*} \frac {1}{9} \, x^{2} + \frac {2}{3} \, x \log \left (\frac {1}{x}\right ) + \log \left (\frac {1}{x}\right )^{2} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.17, size = 16, normalized size = 1.14 \begin {gather*} \frac {1}{9} \, x^{2} - \frac {2}{3} \, x \log \relax (x) + \log \relax (x)^{2} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 21, normalized size = 1.50




method result size



derivativedivides \(\ln \left (\frac {1}{x}\right )^{2}+\frac {2 x \ln \left (\frac {1}{x}\right )}{3}+x +\frac {x^{2}}{9}\) \(21\)
default \(\ln \left (\frac {1}{x}\right )^{2}+\frac {2 x \ln \left (\frac {1}{x}\right )}{3}+x +\frac {x^{2}}{9}\) \(21\)
norman \(\ln \left (\frac {1}{x}\right )^{2}+\frac {2 x \ln \left (\frac {1}{x}\right )}{3}+x +\frac {x^{2}}{9}\) \(21\)
risch \(\ln \left (\frac {1}{x}\right )^{2}+\frac {2 x \ln \left (\frac {1}{x}\right )}{3}+x +\frac {x^{2}}{9}\) \(21\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 16, normalized size = 1.14 \begin {gather*} \frac {1}{9} \, x^{2} - \frac {2}{3} \, x \log \relax (x) + \log \relax (x)^{2} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.23, size = 20, normalized size = 1.43 \begin {gather*} \frac {x^2}{9}+\frac {2\,x\,\ln \left (\frac {1}{x}\right )}{3}+x+{\ln \left (\frac {1}{x}\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.10, size = 22, normalized size = 1.57 \begin {gather*} \frac {x^{2}}{9} + \frac {2 x \log {\left (\frac {1}{x} \right )}}{3} + x + \log {\left (\frac {1}{x} \right )}^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________