3.1.75 \(\int \frac {-3+x^2}{x^2} \, dx\)

Optimal. Leaf size=23 \[ x+\frac {3-5 (x+4 x (i \pi +\log (2)))}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 7, normalized size of antiderivative = 0.30, number of steps used = 2, number of rules used = 1, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {14} \begin {gather*} x+\frac {3}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 7, normalized size = 0.30 \begin {gather*} \frac {3}{x}+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

3/x + x

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 9, normalized size = 0.39 \begin {gather*} \frac {x^{2} + 3}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2-3)/x^2,x, algorithm="fricas")

[Out]

(x^2 + 3)/x

________________________________________________________________________________________

giac [A]  time = 0.50, size = 7, normalized size = 0.30 \begin {gather*} x + \frac {3}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2-3)/x^2,x, algorithm="giac")

[Out]

x + 3/x

________________________________________________________________________________________

maple [A]  time = 0.01, size = 8, normalized size = 0.35




method result size



default \(x +\frac {3}{x}\) \(8\)
risch \(x +\frac {3}{x}\) \(8\)
gosper \(\frac {x^{2}+3}{x}\) \(10\)
norman \(\frac {x^{2}+3}{x}\) \(10\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2-3)/x^2,x,method=_RETURNVERBOSE)

[Out]

x+3/x

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 7, normalized size = 0.30 \begin {gather*} x + \frac {3}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2-3)/x^2,x, algorithm="maxima")

[Out]

x + 3/x

________________________________________________________________________________________

mupad [B]  time = 0.02, size = 7, normalized size = 0.30 \begin {gather*} x+\frac {3}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2 - 3)/x^2,x)

[Out]

x + 3/x

________________________________________________________________________________________

sympy [A]  time = 0.05, size = 3, normalized size = 0.13 \begin {gather*} x + \frac {3}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2-3)/x**2,x)

[Out]

x + 3/x

________________________________________________________________________________________