3.42.87 \(\int \frac {36-12 x+x^2+(-36+x^2) \log (x)}{x^2} \, dx\)

Optimal. Leaf size=13 \[ \frac {(6-x)^2 \log (x)}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 15, normalized size of antiderivative = 1.15, number of steps used = 6, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {14, 43, 2334} \begin {gather*} \left (x+\frac {36}{x}\right ) \log (x)-12 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-12*Log[x] + (36/x + x)*Log[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 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 16, normalized size = 1.23 \begin {gather*} -12 \log (x)+\frac {36 \log (x)}{x}+x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-12*Log[x] + (36*Log[x])/x + x*Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.73, size = 14, normalized size = 1.08 \begin {gather*} \frac {{\left (x^{2} - 12 \, x + 36\right )} \log \relax (x)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2 - 12*x + 36)*log(x)/x

________________________________________________________________________________________

giac [A]  time = 0.21, size = 15, normalized size = 1.15 \begin {gather*} {\left (x + \frac {36}{x}\right )} \log \relax (x) - 12 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + 36/x)*log(x) - 12*log(x)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 17, normalized size = 1.31




method result size



default \(x \ln \relax (x )+\frac {36 \ln \relax (x )}{x}-12 \ln \relax (x )\) \(17\)
risch \(\frac {\left (x^{2}+36\right ) \ln \relax (x )}{x}-12 \ln \relax (x )\) \(17\)
norman \(\frac {x^{2} \ln \relax (x )-12 x \ln \relax (x )+36 \ln \relax (x )}{x}\) \(21\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*ln(x)+36*ln(x)/x-12*ln(x)

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 16, normalized size = 1.23 \begin {gather*} x \log \relax (x) + \frac {36 \, \log \relax (x)}{x} - 12 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*log(x) + 36*log(x)/x - 12*log(x)

________________________________________________________________________________________

mupad [B]  time = 2.90, size = 11, normalized size = 0.85 \begin {gather*} \frac {\ln \relax (x)\,{\left (x-6\right )}^2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log(x)*(x - 6)^2)/x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**2-36)*ln(x)+x**2-12*x+36)/x**2,x)

[Out]

-12*log(x) + (x**2 + 36)*log(x)/x

________________________________________________________________________________________