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

Optimal. Leaf size=20 \[ -1+e-\frac {2}{x^2}+x^2+\log (3)-4 x (-4+\log (x)) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 17, normalized size of antiderivative = 0.85, number of steps used = 5, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {14, 2295} \begin {gather*} x^2-\frac {2}{x^2}+16 x-4 x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-2/x^2 + 16*x + x^2 - 4*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 2295

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 17, normalized size = 0.85 \begin {gather*} -\frac {2}{x^2}+16 x+x^2-4 x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-2/x^2 + 16*x + x^2 - 4*x*Log[x]

________________________________________________________________________________________

fricas [A]  time = 1.02, size = 21, normalized size = 1.05 \begin {gather*} \frac {x^{4} - 4 \, x^{3} \log \relax (x) + 16 \, x^{3} - 2}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^4 - 4*x^3*log(x) + 16*x^3 - 2)/x^2

________________________________________________________________________________________

giac [A]  time = 0.15, size = 17, normalized size = 0.85 \begin {gather*} x^{2} - 4 \, x \log \relax (x) + 16 \, x - \frac {2}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - 4*x*log(x) + 16*x - 2/x^2

________________________________________________________________________________________

maple [A]  time = 0.02, size = 18, normalized size = 0.90




method result size



default \(-4 x \ln \relax (x )+16 x +x^{2}-\frac {2}{x^{2}}\) \(18\)
risch \(-4 x \ln \relax (x )+\frac {x^{4}+16 x^{3}-2}{x^{2}}\) \(21\)
norman \(\frac {-2+x^{4}+16 x^{3}-4 x^{3} \ln \relax (x )}{x^{2}}\) \(22\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*x*ln(x)+16*x+x^2-2/x^2

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 17, normalized size = 0.85 \begin {gather*} x^{2} - 4 \, x \log \relax (x) + 16 \, x - \frac {2}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - 4*x*log(x) + 16*x - 2/x^2

________________________________________________________________________________________

mupad [B]  time = 7.82, size = 18, normalized size = 0.90 \begin {gather*} x^2-\frac {2}{x^2}-x\,\left (4\,\ln \relax (x)-16\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - 2/x^2 - x*(4*log(x) - 16)

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 17, normalized size = 0.85 \begin {gather*} x^{2} - 4 x \log {\relax (x )} + 16 x - \frac {2}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2 - 4*x*log(x) + 16*x - 2/x**2

________________________________________________________________________________________