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

Optimal. Leaf size=20 \[ -2+(7-x)^2+\frac {4}{x}+x-x \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-13 x+\frac {4}{x}-x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

4/x - 13*x + x^2 - 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-7 x^2+x^3\right )}{x^2}-\log (x)\right ) \, dx\\ &=2 \int \frac {-2-7 x^2+x^3}{x^2} \, dx-\int \log (x) \, dx\\ &=x-x \log (x)+2 \int \left (-7-\frac {2}{x^2}+x\right ) \, dx\\ &=\frac {4}{x}-13 x+x^2-x \log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 14, normalized size = 0.70 \begin {gather*} x^{2} - x \log {\relax (x )} - 13 x + \frac {4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________