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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 13 \[ \int \frac {36-12 x+x^2+\left (-36+x^2\right ) \log (x)}{x^2} \, dx=\frac {(6-x)^2 \log (x)}{x} \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.23, number of steps used = 6, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {14, 45, 2372} \[ \int \frac {36-12 x+x^2+\left (-36+x^2\right ) \log (x)}{x^2} \, dx=x \log (x)+\frac {36 \log (x)}{x}-12 \log (x) \]

[In]

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

[Out]

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

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 2372

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]}, Dist[a + b*Log[c*x^n], u, 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{align*} \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 \\ & = \frac {36 \log (x)}{x}+x \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)+\frac {36 \log (x)}{x}+x \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.23 \[ \int \frac {36-12 x+x^2+\left (-36+x^2\right ) \log (x)}{x^2} \, dx=-12 \log (x)+\frac {36 \log (x)}{x}+x \log (x) \]

[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]

Maple [A] (verified)

Time = 0.32 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.31

method result size
default \(x \ln \left (x \right )+\frac {36 \ln \left (x \right )}{x}-12 \ln \left (x \right )\) \(17\)
risch \(\frac {\left (x^{2}+36\right ) \ln \left (x \right )}{x}-12 \ln \left (x \right )\) \(17\)
parts \(x \ln \left (x \right )+\frac {36 \ln \left (x \right )}{x}-12 \ln \left (x \right )\) \(17\)
norman \(\frac {x^{2} \ln \left (x \right )-12 x \ln \left (x \right )+36 \ln \left (x \right )}{x}\) \(21\)
parallelrisch \(\frac {x^{2} \ln \left (x \right )-12 x \ln \left (x \right )+36 \ln \left (x \right )}{x}\) \(21\)

[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)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.08 \[ \int \frac {36-12 x+x^2+\left (-36+x^2\right ) \log (x)}{x^2} \, dx=\frac {{\left (x^{2} - 12 \, x + 36\right )} \log \left (x\right )}{x} \]

[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

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.08 \[ \int \frac {36-12 x+x^2+\left (-36+x^2\right ) \log (x)}{x^2} \, dx=- 12 \log {\left (x \right )} + \frac {\left (x^{2} + 36\right ) \log {\left (x \right )}}{x} \]

[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

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.23 \[ \int \frac {36-12 x+x^2+\left (-36+x^2\right ) \log (x)}{x^2} \, dx=x \log \left (x\right ) + \frac {36 \, \log \left (x\right )}{x} - 12 \, \log \left (x\right ) \]

[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)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.15 \[ \int \frac {36-12 x+x^2+\left (-36+x^2\right ) \log (x)}{x^2} \, dx={\left (x + \frac {36}{x}\right )} \log \left (x\right ) - 12 \, \log \left (x\right ) \]

[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)

Mupad [B] (verification not implemented)

Time = 9.94 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.85 \[ \int \frac {36-12 x+x^2+\left (-36+x^2\right ) \log (x)}{x^2} \, dx=\frac {\ln \left (x\right )\,{\left (x-6\right )}^2}{x} \]

[In]

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

[Out]

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