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

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 24, normalized size of antiderivative = 1.14, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {6, 14} \begin {gather*} x^3-2 x^2 \log (3)+\frac {2}{x}+x \left (1+\log ^2(3)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, 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]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 23, normalized size = 1.10 \begin {gather*} \frac {2}{x}+x+x^3-2 x^2 \log (3)+x \log ^2(3) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.24, size = 23, normalized size = 1.10 \begin {gather*} x^{3} - 2 \, x^{2} \log \relax (3) + x \log \relax (3)^{2} + x + \frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 24, normalized size = 1.14




method result size



default \(x^{3}-2 x^{2} \ln \relax (3)+x \ln \relax (3)^{2}+x +\frac {2}{x}\) \(24\)
risch \(x^{3}-2 x^{2} \ln \relax (3)+x \ln \relax (3)^{2}+x +\frac {2}{x}\) \(24\)
norman \(\frac {x^{4}-2 x^{3} \ln \relax (3)+\left (\ln \relax (3)^{2}+1\right ) x^{2}+2}{x}\) \(27\)
gosper \(\frac {x^{2} \ln \relax (3)^{2}-2 x^{3} \ln \relax (3)+x^{4}+x^{2}+2}{x}\) \(28\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.46, size = 24, normalized size = 1.14 \begin {gather*} x^{3} - 2 \, x^{2} \log \relax (3) + {\left (\log \relax (3)^{2} + 1\right )} x + \frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 24, normalized size = 1.14 \begin {gather*} x\,\left ({\ln \relax (3)}^2+1\right )-2\,x^2\,\ln \relax (3)+\frac {2}{x}+x^3 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 22, normalized size = 1.05 \begin {gather*} x^{3} - 2 x^{2} \log {\relax (3 )} + x \left (1 + \log {\relax (3 )}^{2}\right ) + \frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________