3.41.40 \(\int \frac {-6+5 x+2 x^2+x \log (x^2)}{x} \, dx\)

Optimal. Leaf size=19 \[ 4+3 x+x^2-(3-x) \log \left (x^2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 17, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {14, 2295} \begin {gather*} x^2+x \log \left (x^2\right )+3 x-6 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-6 + 5*x + 2*x^2 + x*Log[x^2])/x,x]

[Out]

3*x + x^2 - 6*Log[x] + x*Log[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 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 {-6+5 x+2 x^2}{x}+\log \left (x^2\right )\right ) \, dx\\ &=\int \frac {-6+5 x+2 x^2}{x} \, dx+\int \log \left (x^2\right ) \, dx\\ &=-2 x+x \log \left (x^2\right )+\int \left (5-\frac {6}{x}+2 x\right ) \, dx\\ &=3 x+x^2-6 \log (x)+x \log \left (x^2\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 17, normalized size = 0.89 \begin {gather*} 3 x+x^2-6 \log (x)+x \log \left (x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-6 + 5*x + 2*x^2 + x*Log[x^2])/x,x]

[Out]

3*x + x^2 - 6*Log[x] + x*Log[x^2]

________________________________________________________________________________________

fricas [A]  time = 0.98, size = 15, normalized size = 0.79 \begin {gather*} x^{2} + {\left (x - 3\right )} \log \left (x^{2}\right ) + 3 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 + (x - 3)*log(x^2) + 3*x

________________________________________________________________________________________

giac [A]  time = 0.15, size = 17, normalized size = 0.89 \begin {gather*} x^{2} + x \log \left (x^{2}\right ) + 3 \, x - 6 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 + x*log(x^2) + 3*x - 6*log(x)

________________________________________________________________________________________

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




method result size



default \(3 x +x^{2}-6 \ln \relax (x )+x \ln \left (x^{2}\right )\) \(18\)
norman \(3 x +x^{2}-6 \ln \relax (x )+x \ln \left (x^{2}\right )\) \(18\)
risch \(3 x +x^{2}-6 \ln \relax (x )+x \ln \left (x^{2}\right )\) \(18\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*ln(x^2)+2*x^2+5*x-6)/x,x,method=_RETURNVERBOSE)

[Out]

3*x+x^2-6*ln(x)+x*ln(x^2)

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 17, normalized size = 0.89 \begin {gather*} x^{2} + x \log \left (x^{2}\right ) + 3 \, x - 6 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 + x*log(x^2) + 3*x - 6*log(x)

________________________________________________________________________________________

mupad [B]  time = 3.01, size = 19, normalized size = 1.00 \begin {gather*} 3\,x-3\,\ln \left (x^2\right )+x\,\ln \left (x^2\right )+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x + x*log(x^2) + 2*x^2 - 6)/x,x)

[Out]

3*x - 3*log(x^2) + x*log(x^2) + x^2

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 17, normalized size = 0.89 \begin {gather*} x^{2} + x \log {\left (x^{2} \right )} + 3 x - 6 \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x*ln(x**2)+2*x**2+5*x-6)/x,x)

[Out]

x**2 + x*log(x**2) + 3*x - 6*log(x)

________________________________________________________________________________________