\(\int \frac {-9-9 x+2 x^2}{-9 x+x^3} \, dx\) [259]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 17 \[ \int \frac {-9-9 x+2 x^2}{-9 x+x^3} \, dx=-\log (3-x)+\log (x)+2 \log (3+x) \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {1607, 1816} \[ \int \frac {-9-9 x+2 x^2}{-9 x+x^3} \, dx=-\log (3-x)+\log (x)+2 \log (x+3) \]

[In]

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

[Out]

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

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1816

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps \begin{align*} \text {integral}& = \int \frac {-9-9 x+2 x^2}{x \left (-9+x^2\right )} \, dx \\ & = \int \left (\frac {1}{3-x}+\frac {1}{x}+\frac {2}{3+x}\right ) \, dx \\ & = -\log (3-x)+\log (x)+2 \log (3+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00 \[ \int \frac {-9-9 x+2 x^2}{-9 x+x^3} \, dx=-\log (3-x)+\log (x)+2 \log (3+x) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.79 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.94

method result size
default \(\ln \left (x \right )-\ln \left (-3+x \right )+2 \ln \left (3+x \right )\) \(16\)
norman \(\ln \left (x \right )-\ln \left (-3+x \right )+2 \ln \left (3+x \right )\) \(16\)
risch \(\ln \left (x \right )-\ln \left (-3+x \right )+2 \ln \left (3+x \right )\) \(16\)
parallelrisch \(\ln \left (x \right )-\ln \left (-3+x \right )+2 \ln \left (3+x \right )\) \(16\)
meijerg \(\frac {\ln \left (1-\frac {x^{2}}{9}\right )}{2}+\ln \left (x \right )-\ln \left (3\right )+\frac {i \pi }{2}+3 \,\operatorname {arctanh}\left (\frac {x}{3}\right )\) \(28\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \frac {-9-9 x+2 x^2}{-9 x+x^3} \, dx=2 \, \log \left (x + 3\right ) - \log \left (x - 3\right ) + \log \left (x\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.82 \[ \int \frac {-9-9 x+2 x^2}{-9 x+x^3} \, dx=\log {\left (x \right )} - \log {\left (x - 3 \right )} + 2 \log {\left (x + 3 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \frac {-9-9 x+2 x^2}{-9 x+x^3} \, dx=2 \, \log \left (x + 3\right ) - \log \left (x - 3\right ) + \log \left (x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.06 \[ \int \frac {-9-9 x+2 x^2}{-9 x+x^3} \, dx=2 \, \log \left ({\left | x + 3 \right |}\right ) - \log \left ({\left | x - 3 \right |}\right ) + \log \left ({\left | x \right |}\right ) \]

[In]

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

[Out]

2*log(abs(x + 3)) - log(abs(x - 3)) + log(abs(x))

Mupad [B] (verification not implemented)

Time = 10.43 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.24 \[ \int \frac {-9-9 x+2 x^2}{-9 x+x^3} \, dx=2\,\ln \left (x+3\right )-2\,\mathrm {atanh}\left (\frac {1296}{18\,x+162}-7\right ) \]

[In]

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

[Out]

2*log(x + 3) - 2*atanh(1296/(18*x + 162) - 7)