\(\int \frac {4+8 x^2-2 x^3-24 x^6+6 x^7}{-4 x+x^2} \, dx\) [6651]

   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 = 32, antiderivative size = 19 \[ \int \frac {4+8 x^2-2 x^3-24 x^6+6 x^7}{-4 x+x^2} \, dx=x^6+\log \left (\frac {e^{-x^2} (-4+x)}{x}\right ) \]

[Out]

x^6+ln((x-4)/x/exp(x^2))

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 19, 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.062, Rules used = {1607, 1634} \[ \int \frac {4+8 x^2-2 x^3-24 x^6+6 x^7}{-4 x+x^2} \, dx=x^6-x^2+\log (4-x)-\log (x) \]

[In]

Int[(4 + 8*x^2 - 2*x^3 - 24*x^6 + 6*x^7)/(-4*x + x^2),x]

[Out]

-x^2 + x^6 + Log[4 - x] - Log[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 1634

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {4+8 x^2-2 x^3-24 x^6+6 x^7}{-4 x+x^2} \, dx=-x^2+x^6+\log (4-x)-\log (x) \]

[In]

Integrate[(4 + 8*x^2 - 2*x^3 - 24*x^6 + 6*x^7)/(-4*x + x^2),x]

[Out]

-x^2 + x^6 + Log[4 - x] - Log[x]

Maple [A] (verified)

Time = 0.42 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.95

method result size
default \(x^{6}-x^{2}+\ln \left (x -4\right )-\ln \left (x \right )\) \(18\)
norman \(x^{6}-x^{2}+\ln \left (x -4\right )-\ln \left (x \right )\) \(18\)
risch \(x^{6}-x^{2}+\ln \left (x -4\right )-\ln \left (x \right )\) \(18\)
parallelrisch \(x^{6}-x^{2}+\ln \left (x -4\right )-\ln \left (x \right )\) \(18\)
meijerg \(-\ln \left (x \right )+2 \ln \left (2\right )-i \pi +\ln \left (-\frac {x}{4}+1\right )+\frac {512 x \left (\frac {35}{512} x^{5}+\frac {21}{64} x^{4}+\frac {105}{64} x^{3}+\frac {35}{4} x^{2}+\frac {105}{2} x +420\right )}{35}-\frac {512 x \left (\frac {3}{64} x^{4}+\frac {15}{64} x^{3}+\frac {5}{4} x^{2}+\frac {15}{2} x +60\right )}{5}-\frac {4 x \left (\frac {3 x}{4}+6\right )}{3}+8 x\) \(82\)

[In]

int((6*x^7-24*x^6-2*x^3+8*x^2+4)/(x^2-4*x),x,method=_RETURNVERBOSE)

[Out]

x^6-x^2+ln(x-4)-ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int \frac {4+8 x^2-2 x^3-24 x^6+6 x^7}{-4 x+x^2} \, dx=x^{6} - x^{2} + \log \left (x - 4\right ) - \log \left (x\right ) \]

[In]

integrate((6*x^7-24*x^6-2*x^3+8*x^2+4)/(x^2-4*x),x, algorithm="fricas")

[Out]

x^6 - x^2 + log(x - 4) - log(x)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.74 \[ \int \frac {4+8 x^2-2 x^3-24 x^6+6 x^7}{-4 x+x^2} \, dx=x^{6} - x^{2} - \log {\left (x \right )} + \log {\left (x - 4 \right )} \]

[In]

integrate((6*x**7-24*x**6-2*x**3+8*x**2+4)/(x**2-4*x),x)

[Out]

x**6 - x**2 - log(x) + log(x - 4)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int \frac {4+8 x^2-2 x^3-24 x^6+6 x^7}{-4 x+x^2} \, dx=x^{6} - x^{2} + \log \left (x - 4\right ) - \log \left (x\right ) \]

[In]

integrate((6*x^7-24*x^6-2*x^3+8*x^2+4)/(x^2-4*x),x, algorithm="maxima")

[Out]

x^6 - x^2 + log(x - 4) - log(x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {4+8 x^2-2 x^3-24 x^6+6 x^7}{-4 x+x^2} \, dx=x^{6} - x^{2} + \log \left ({\left | x - 4 \right |}\right ) - \log \left ({\left | x \right |}\right ) \]

[In]

integrate((6*x^7-24*x^6-2*x^3+8*x^2+4)/(x^2-4*x),x, algorithm="giac")

[Out]

x^6 - x^2 + log(abs(x - 4)) - log(abs(x))

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int \frac {4+8 x^2-2 x^3-24 x^6+6 x^7}{-4 x+x^2} \, dx=x^6-x^2-2\,\mathrm {atanh}\left (\frac {x}{2}-1\right ) \]

[In]

int(-(8*x^2 - 2*x^3 - 24*x^6 + 6*x^7 + 4)/(4*x - x^2),x)

[Out]

x^6 - x^2 - 2*atanh(x/2 - 1)