\(\int \frac {5696-3328 x+2560 x^2-512 x^3+256 x^4}{81-36 x+40 x^2-8 x^3+4 x^4} \, dx\) [2879]

   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 = 43, antiderivative size = 25 \[ \int \frac {5696-3328 x+2560 x^2-512 x^3+256 x^4}{81-36 x+40 x^2-8 x^3+4 x^4} \, dx=4 x \left (16+\log \left (e^{\frac {32}{x \left (\frac {9}{2}-x+x^2\right )}}\right )\right ) \]

[Out]

4*x*(16+ln(exp(16/x/(x^2+9/2-x))^2))

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {1694, 12, 1828, 21, 8} \[ \int \frac {5696-3328 x+2560 x^2-512 x^3+256 x^4}{81-36 x+40 x^2-8 x^3+4 x^4} \, dx=64 x+\frac {512}{4 \left (x-\frac {1}{2}\right )^2+17} \]

[In]

Int[(5696 - 3328*x + 2560*x^2 - 512*x^3 + 256*x^4)/(81 - 36*x + 40*x^2 - 8*x^3 + 4*x^4),x]

[Out]

512/(17 + 4*(-1/2 + x)^2) + 64*x

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 1694

Int[(Pq_)*(Q4_)^(p_), x_Symbol] :> With[{a = Coeff[Q4, x, 0], b = Coeff[Q4, x, 1], c = Coeff[Q4, x, 2], d = Co
eff[Q4, x, 3], e = Coeff[Q4, x, 4]}, Subst[Int[SimplifyIntegrand[(Pq /. x -> -d/(4*e) + x)*(a + d^4/(256*e^3)
- b*(d/(8*e)) + (c - 3*(d^2/(8*e)))*x^2 + e*x^4)^p, x], x], x, d/(4*e) + x] /; EqQ[d^3 - 4*c*d*e + 8*b*e^2, 0]
 && NeQ[d, 0]] /; FreeQ[p, x] && PolyQ[Pq, x] && PolyQ[Q4, x, 4] &&  !IGtQ[p, 0]

Rule 1828

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*
g - b*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {64 \left (289-64 x+136 x^2+16 x^4\right )}{\left (17+4 x^2\right )^2} \, dx,x,-\frac {1}{2}+x\right ) \\ & = 64 \text {Subst}\left (\int \frac {289-64 x+136 x^2+16 x^4}{\left (17+4 x^2\right )^2} \, dx,x,-\frac {1}{2}+x\right ) \\ & = \frac {512}{17+(-1+2 x)^2}-\frac {32}{17} \text {Subst}\left (\int \frac {-578-136 x^2}{17+4 x^2} \, dx,x,-\frac {1}{2}+x\right ) \\ & = \frac {512}{17+(-1+2 x)^2}+64 \text {Subst}\left (\int 1 \, dx,x,-\frac {1}{2}+x\right ) \\ & = 64 x+\frac {512}{17+(-1+2 x)^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {5696-3328 x+2560 x^2-512 x^3+256 x^4}{81-36 x+40 x^2-8 x^3+4 x^4} \, dx=64 \left (x+\frac {4}{9-2 x+2 x^2}\right ) \]

[In]

Integrate[(5696 - 3328*x + 2560*x^2 - 512*x^3 + 256*x^4)/(81 - 36*x + 40*x^2 - 8*x^3 + 4*x^4),x]

[Out]

64*(x + 4/(9 - 2*x + 2*x^2))

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68

method result size
risch \(64 x +\frac {128}{x^{2}+\frac {9}{2}-x}\) \(17\)
default \(64 x +\frac {256}{2 x^{2}-2 x +9}\) \(19\)
norman \(\frac {128 x^{3}+448 x +832}{2 x^{2}-2 x +9}\) \(24\)
gosper \(\frac {128 x^{3}+448 x +832}{2 x^{2}-2 x +9}\) \(25\)
parallelrisch \(\frac {256 x^{3}+896 x +1664}{4 x^{2}-4 x +18}\) \(25\)

[In]

int((256*x^4-512*x^3+2560*x^2-3328*x+5696)/(4*x^4-8*x^3+40*x^2-36*x+81),x,method=_RETURNVERBOSE)

[Out]

64*x+128/(x^2+9/2-x)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.16 \[ \int \frac {5696-3328 x+2560 x^2-512 x^3+256 x^4}{81-36 x+40 x^2-8 x^3+4 x^4} \, dx=\frac {64 \, {\left (2 \, x^{3} - 2 \, x^{2} + 9 \, x + 4\right )}}{2 \, x^{2} - 2 \, x + 9} \]

[In]

integrate((256*x^4-512*x^3+2560*x^2-3328*x+5696)/(4*x^4-8*x^3+40*x^2-36*x+81),x, algorithm="fricas")

[Out]

64*(2*x^3 - 2*x^2 + 9*x + 4)/(2*x^2 - 2*x + 9)

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.56 \[ \int \frac {5696-3328 x+2560 x^2-512 x^3+256 x^4}{81-36 x+40 x^2-8 x^3+4 x^4} \, dx=64 x + \frac {256}{2 x^{2} - 2 x + 9} \]

[In]

integrate((256*x**4-512*x**3+2560*x**2-3328*x+5696)/(4*x**4-8*x**3+40*x**2-36*x+81),x)

[Out]

64*x + 256/(2*x**2 - 2*x + 9)

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {5696-3328 x+2560 x^2-512 x^3+256 x^4}{81-36 x+40 x^2-8 x^3+4 x^4} \, dx=64 \, x + \frac {256}{2 \, x^{2} - 2 \, x + 9} \]

[In]

integrate((256*x^4-512*x^3+2560*x^2-3328*x+5696)/(4*x^4-8*x^3+40*x^2-36*x+81),x, algorithm="maxima")

[Out]

64*x + 256/(2*x^2 - 2*x + 9)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {5696-3328 x+2560 x^2-512 x^3+256 x^4}{81-36 x+40 x^2-8 x^3+4 x^4} \, dx=64 \, x + \frac {256}{2 \, x^{2} - 2 \, x + 9} \]

[In]

integrate((256*x^4-512*x^3+2560*x^2-3328*x+5696)/(4*x^4-8*x^3+40*x^2-36*x+81),x, algorithm="giac")

[Out]

64*x + 256/(2*x^2 - 2*x + 9)

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.64 \[ \int \frac {5696-3328 x+2560 x^2-512 x^3+256 x^4}{81-36 x+40 x^2-8 x^3+4 x^4} \, dx=64\,x+\frac {128}{x^2-x+\frac {9}{2}} \]

[In]

int((2560*x^2 - 3328*x - 512*x^3 + 256*x^4 + 5696)/(40*x^2 - 36*x - 8*x^3 + 4*x^4 + 81),x)

[Out]

64*x + 128/(x^2 - x + 9/2)