3.24.41 \(\int \frac {1+2 x^2}{x} \, dx\)

Optimal. Leaf size=12 \[ -8+e^3+x^2+\log (5)+\log (x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 6, normalized size of antiderivative = 0.50, number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {14} \begin {gather*} x^2+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + 2*x^2)/x,x]

[Out]

x^2 + 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]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 6, normalized size = 0.50 \begin {gather*} x^2+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + 2*x^2)/x,x]

[Out]

x^2 + Log[x]

________________________________________________________________________________________

fricas [A]  time = 1.10, size = 6, normalized size = 0.50 \begin {gather*} x^{2} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2+1)/x,x, algorithm="fricas")

[Out]

x^2 + log(x)

________________________________________________________________________________________

giac [A]  time = 0.31, size = 10, normalized size = 0.83 \begin {gather*} x^{2} + \frac {1}{2} \, \log \left (x^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2+1)/x,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 7, normalized size = 0.58




method result size



default \(\ln \relax (x )+x^{2}\) \(7\)
norman \(\ln \relax (x )+x^{2}\) \(7\)
risch \(\ln \relax (x )+x^{2}\) \(7\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2+1)/x,x,method=_RETURNVERBOSE)

[Out]

ln(x)+x^2

________________________________________________________________________________________

maxima [A]  time = 0.52, size = 10, normalized size = 0.83 \begin {gather*} x^{2} + \frac {1}{2} \, \log \left (x^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2+1)/x,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 6, normalized size = 0.50 \begin {gather*} \ln \relax (x)+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2 + 1)/x,x)

[Out]

log(x) + x^2

________________________________________________________________________________________

sympy [A]  time = 0.06, size = 5, normalized size = 0.42 \begin {gather*} x^{2} + \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**2+1)/x,x)

[Out]

x**2 + log(x)

________________________________________________________________________________________