### 3.2180 $$\int \frac{9+6 x+x^2}{x^2} \, dx$$

Optimal. Leaf size=11 $x-\frac{9}{x}+6 \log (x)$

[Out]

-9/x + x + 6*Log[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0048209, antiderivative size = 11, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 12, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.083, Rules used = {14} $x-\frac{9}{x}+6 \log (x)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-9/x + x + 6*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{align*} \int \frac{9+6 x+x^2}{x^2} \, dx &=\int \left (1+\frac{9}{x^2}+\frac{6}{x}\right ) \, dx\\ &=-\frac{9}{x}+x+6 \log (x)\\ \end{align*}

Mathematica [A]  time = 0.0006919, size = 11, normalized size = 1. $x-\frac{9}{x}+6 \log (x)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-9/x + x + 6*Log[x]

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 12, normalized size = 1.1 \begin{align*} -9\,{x}^{-1}+x+6\,\ln \left ( x \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+6*x+9)/x^2,x)

[Out]

-9/x+x+6*ln(x)

________________________________________________________________________________________

Maxima [A]  time = 0.975769, size = 15, normalized size = 1.36 \begin{align*} x - \frac{9}{x} + 6 \, \log \left (x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 9/x + 6*log(x)

________________________________________________________________________________________

Fricas [A]  time = 1.74804, size = 35, normalized size = 3.18 \begin{align*} \frac{x^{2} + 6 \, x \log \left (x\right ) - 9}{x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2 + 6*x*log(x) - 9)/x

________________________________________________________________________________________

Sympy [A]  time = 0.091302, size = 8, normalized size = 0.73 \begin{align*} x + 6 \log{\left (x \right )} - \frac{9}{x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+6*x+9)/x**2,x)

[Out]

x + 6*log(x) - 9/x

________________________________________________________________________________________

Giac [A]  time = 1.13119, size = 16, normalized size = 1.45 \begin{align*} x - \frac{9}{x} + 6 \, \log \left ({\left | x \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 9/x + 6*log(abs(x))