3.42.84 \(\int \frac {3+2 x^2-8 x^3+(-3+2 x^2) \log (x)+x^2 \log ^2(x)}{x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 32, normalized size of antiderivative = 1.28, number of steps used = 8, number of rules used = 4, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {14, 2334, 2296, 2295} \begin {gather*} -4 x^2+2 x+x \log ^2(x)-2 x \log (x)+\left (2 x+\frac {3}{x}\right ) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2*x - 4*x^2 - 2*x*Log[x] + (3/x + 2*x)*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]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2334

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]}, Simp[u*(a + b*Log[c*x^n]), 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 {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {3+2 x^2-8 x^3}{x^2}+\frac {\left (-3+2 x^2\right ) \log (x)}{x^2}+\log ^2(x)\right ) \, dx\\ &=\int \frac {3+2 x^2-8 x^3}{x^2} \, dx+\int \frac {\left (-3+2 x^2\right ) \log (x)}{x^2} \, dx+\int \log ^2(x) \, dx\\ &=\left (\frac {3}{x}+2 x\right ) \log (x)+x \log ^2(x)-2 \int \log (x) \, dx-\int \left (2+\frac {3}{x^2}\right ) \, dx+\int \left (2+\frac {3}{x^2}-8 x\right ) \, dx\\ &=2 x-4 x^2-2 x \log (x)+\left (\frac {3}{x}+2 x\right ) \log (x)+x \log ^2(x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 22, normalized size = 0.88 \begin {gather*} x \log \relax (x)^{2} - 4 \, x^{2} + 2 \, x + \frac {3 \, \log \relax (x)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 23, normalized size = 0.92




method result size



default \(x \ln \relax (x )^{2}+2 x -4 x^{2}+\frac {3 \ln \relax (x )}{x}\) \(23\)
risch \(x \ln \relax (x )^{2}+2 x -4 x^{2}+\frac {3 \ln \relax (x )}{x}\) \(23\)
norman \(\frac {x^{2} \ln \relax (x )^{2}+2 x^{2}-4 x^{3}+3 \ln \relax (x )}{x}\) \(28\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 30, normalized size = 1.20 \begin {gather*} {\left (\log \relax (x)^{2} - 2 \, \log \relax (x) + 2\right )} x - 4 \, x^{2} + 2 \, x \log \relax (x) + \frac {3 \, \log \relax (x)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.91, size = 21, normalized size = 0.84 \begin {gather*} \frac {3\,\ln \relax (x)}{x}+x\,\left ({\ln \relax (x)}^2+2\right )-4\,x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 20, normalized size = 0.80 \begin {gather*} - 4 x^{2} + x \log {\relax (x )}^{2} + 2 x + \frac {3 \log {\relax (x )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________