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

Optimal. Leaf size=19 \[ x^6+\log \left (\frac {e^{-x^2} (-4+x)}{x}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {1593, 1620} \begin {gather*} x^6-x^2+\log (4-x)-\log (x) \end {gather*}

Antiderivative was successfully verified.

[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 1593

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 1620

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 {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 19, normalized size = 1.00 \begin {gather*} -x^2+x^6+\log (4-x)-\log (x) \end {gather*}

Antiderivative was successfully verified.

[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]

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 17, normalized size = 0.89 \begin {gather*} x^{6} - x^{2} + \log \left (x - 4\right ) - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

giac [A]  time = 1.16, size = 19, normalized size = 1.00 \begin {gather*} x^{6} - x^{2} + \log \left ({\left | x - 4 \right |}\right ) - \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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))

________________________________________________________________________________________

maple [A]  time = 0.10, size = 18, normalized size = 0.95




method result size



default \(x^{6}-x^{2}-\ln \relax (x )+\ln \left (x -4\right )\) \(18\)
norman \(x^{6}-x^{2}-\ln \relax (x )+\ln \left (x -4\right )\) \(18\)
risch \(x^{6}-x^{2}-\ln \relax (x )+\ln \left (x -4\right )\) \(18\)
meijerg \(-\ln \relax (x )+2 \ln \relax (2)-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\)



Verification of antiderivative is not currently implemented for this CAS.

[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)+ln(x-4)

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 17, normalized size = 0.89 \begin {gather*} x^{6} - x^{2} + \log \left (x - 4\right ) - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

mupad [B]  time = 4.14, size = 17, normalized size = 0.89 \begin {gather*} x^6-x^2-2\,\mathrm {atanh}\left (\frac {x}{2}-1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 14, normalized size = 0.74 \begin {gather*} x^{6} - x^{2} - \log {\relax (x )} + \log {\left (x - 4 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________