\(\int \frac {-96768+5 x^2+7040 \log (x)-128 \log ^2(x)}{x^3} \, dx\) [7941]

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

Optimal result

Integrand size = 21, antiderivative size = 18 \[ \int \frac {-96768+5 x^2+7040 \log (x)-128 \log ^2(x)}{x^3} \, dx=\frac {16 (54-2 \log (x))^2}{x^2}+5 \log (x) \]

[Out]

5*ln(x)+16*(54-2*ln(x))^2/x^2

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.44, number of steps used = 7, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {14, 2341, 2342} \[ \int \frac {-96768+5 x^2+7040 \log (x)-128 \log ^2(x)}{x^3} \, dx=\frac {46656}{x^2}+\frac {64 \log ^2(x)}{x^2}-\frac {3456 \log (x)}{x^2}+5 \log (x) \]

[In]

Int[(-96768 + 5*x^2 + 7040*Log[x] - 128*Log[x]^2)/x^3,x]

[Out]

46656/x^2 + 5*Log[x] - (3456*Log[x])/x^2 + (64*Log[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 2341

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 2342

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{align*} \text {integral}& = \int \left (\frac {-96768+5 x^2}{x^3}+\frac {7040 \log (x)}{x^3}-\frac {128 \log ^2(x)}{x^3}\right ) \, dx \\ & = -\left (128 \int \frac {\log ^2(x)}{x^3} \, dx\right )+7040 \int \frac {\log (x)}{x^3} \, dx+\int \frac {-96768+5 x^2}{x^3} \, dx \\ & = -\frac {1760}{x^2}-\frac {3520 \log (x)}{x^2}+\frac {64 \log ^2(x)}{x^2}-128 \int \frac {\log (x)}{x^3} \, dx+\int \left (-\frac {96768}{x^3}+\frac {5}{x}\right ) \, dx \\ & = \frac {46656}{x^2}+5 \log (x)-\frac {3456 \log (x)}{x^2}+\frac {64 \log ^2(x)}{x^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.44 \[ \int \frac {-96768+5 x^2+7040 \log (x)-128 \log ^2(x)}{x^3} \, dx=\frac {46656}{x^2}+5 \log (x)-\frac {3456 \log (x)}{x^2}+\frac {64 \log ^2(x)}{x^2} \]

[In]

Integrate[(-96768 + 5*x^2 + 7040*Log[x] - 128*Log[x]^2)/x^3,x]

[Out]

46656/x^2 + 5*Log[x] - (3456*Log[x])/x^2 + (64*Log[x]^2)/x^2

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.33

method result size
norman \(\frac {46656+5 x^{2} \ln \left (x \right )+64 \ln \left (x \right )^{2}-3456 \ln \left (x \right )}{x^{2}}\) \(24\)
parallelrisch \(\frac {46656+5 x^{2} \ln \left (x \right )+64 \ln \left (x \right )^{2}-3456 \ln \left (x \right )}{x^{2}}\) \(24\)
default \(\frac {64 \ln \left (x \right )^{2}}{x^{2}}-\frac {3456 \ln \left (x \right )}{x^{2}}+\frac {46656}{x^{2}}+5 \ln \left (x \right )\) \(27\)
parts \(\frac {64 \ln \left (x \right )^{2}}{x^{2}}-\frac {3456 \ln \left (x \right )}{x^{2}}+\frac {46656}{x^{2}}+5 \ln \left (x \right )\) \(27\)
risch \(\frac {64 \ln \left (x \right )^{2}}{x^{2}}-\frac {3456 \ln \left (x \right )}{x^{2}}+\frac {5 x^{2} \ln \left (x \right )+46656}{x^{2}}\) \(31\)

[In]

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

[Out]

(46656+5*x^2*ln(x)+64*ln(x)^2-3456*ln(x))/x^2

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.22 \[ \int \frac {-96768+5 x^2+7040 \log (x)-128 \log ^2(x)}{x^3} \, dx=\frac {{\left (5 \, x^{2} - 3456\right )} \log \left (x\right ) + 64 \, \log \left (x\right )^{2} + 46656}{x^{2}} \]

[In]

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

[Out]

((5*x^2 - 3456)*log(x) + 64*log(x)^2 + 46656)/x^2

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.50 \[ \int \frac {-96768+5 x^2+7040 \log (x)-128 \log ^2(x)}{x^3} \, dx=5 \log {\left (x \right )} + \frac {64 \log {\left (x \right )}^{2}}{x^{2}} - \frac {3456 \log {\left (x \right )}}{x^{2}} + \frac {46656}{x^{2}} \]

[In]

integrate((-128*ln(x)**2+7040*ln(x)+5*x**2-96768)/x**3,x)

[Out]

5*log(x) + 64*log(x)**2/x**2 - 3456*log(x)/x**2 + 46656/x**2

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 34 vs. \(2 (16) = 32\).

Time = 0.19 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.89 \[ \int \frac {-96768+5 x^2+7040 \log (x)-128 \log ^2(x)}{x^3} \, dx=\frac {32 \, {\left (2 \, \log \left (x\right )^{2} + 2 \, \log \left (x\right ) + 1\right )}}{x^{2}} - \frac {3520 \, \log \left (x\right )}{x^{2}} + \frac {46624}{x^{2}} + 5 \, \log \left (x\right ) \]

[In]

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

[Out]

32*(2*log(x)^2 + 2*log(x) + 1)/x^2 - 3520*log(x)/x^2 + 46624/x^2 + 5*log(x)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.44 \[ \int \frac {-96768+5 x^2+7040 \log (x)-128 \log ^2(x)}{x^3} \, dx=\frac {64 \, \log \left (x\right )^{2}}{x^{2}} - \frac {3456 \, \log \left (x\right )}{x^{2}} + \frac {46656}{x^{2}} + 5 \, \log \left (x\right ) \]

[In]

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

[Out]

64*log(x)^2/x^2 - 3456*log(x)/x^2 + 46656/x^2 + 5*log(x)

Mupad [B] (verification not implemented)

Time = 13.28 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89 \[ \int \frac {-96768+5 x^2+7040 \log (x)-128 \log ^2(x)}{x^3} \, dx=5\,\ln \left (x\right )+\frac {64\,{\left (\ln \left (x\right )-27\right )}^2}{x^2} \]

[In]

int((7040*log(x) - 128*log(x)^2 + 5*x^2 - 96768)/x^3,x)

[Out]

5*log(x) + (64*(log(x) - 27)^2)/x^2