3.16.23 \(\int \frac {-16 x^3+54 x^4-66 x^5+26 x^6+2 x^7}{-64+336 x-540 x^2+175 x^3+135 x^4+21 x^5+x^6} \, dx\)

Optimal. Leaf size=31 \[ \frac {x^2}{\left (\frac {4}{x}-\frac {3+x}{1-x}\right )^2}-\log ^2(2) \]

________________________________________________________________________________________

Rubi [B]  time = 0.18, antiderivative size = 68, normalized size of antiderivative = 2.19, number of steps used = 11, number of rules used = 5, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {2074, 638, 614, 618, 206} \begin {gather*} x^2-\frac {17424 (2 x+7)}{13 \left (-x^2-7 x+4\right )}+\frac {56 (1055 x+1112)}{13 \left (-x^2-7 x+4\right )}+\frac {16 (964-1815 x)}{\left (-x^2-7 x+4\right )^2}-16 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-16*x^3 + 54*x^4 - 66*x^5 + 26*x^6 + 2*x^7)/(-64 + 336*x - 540*x^2 + 175*x^3 + 135*x^4 + 21*x^5 + x^6),x]

[Out]

-16*x + x^2 + (16*(964 - 1815*x))/(4 - 7*x - x^2)^2 - (17424*(7 + 2*x))/(13*(4 - 7*x - x^2)) + (56*(1112 + 105
5*x))/(13*(4 - 7*x - x^2))

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 614

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((b + 2*c*x)*(a + b*x + c*x^2)^(p + 1))/((p +
1)*(b^2 - 4*a*c)), x] - Dist[(2*c*(2*p + 3))/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1), x], x] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2] && IntegerQ[4*p]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 638

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((b*d - 2*a*e + (2*c*d -
b*e)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c)), x] - Dist[((2*p + 3)*(2*c*d - b*e))/((p + 1)*(b^2
- 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^
2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2]

Rule 2074

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-16+2 x-\frac {32 (-7772+14633 x)}{\left (-4+7 x+x^2\right )^3}-\frac {56 (-1248+397 x)}{\left (-4+7 x+x^2\right )^2}+\frac {1864}{-4+7 x+x^2}\right ) \, dx\\ &=-16 x+x^2-32 \int \frac {-7772+14633 x}{\left (-4+7 x+x^2\right )^3} \, dx-56 \int \frac {-1248+397 x}{\left (-4+7 x+x^2\right )^2} \, dx+1864 \int \frac {1}{-4+7 x+x^2} \, dx\\ &=-16 x+x^2+\frac {16 (964-1815 x)}{\left (4-7 x-x^2\right )^2}+\frac {56 (1112+1055 x)}{13 \left (4-7 x-x^2\right )}-3728 \operatorname {Subst}\left (\int \frac {1}{65-x^2} \, dx,x,7+2 x\right )-\frac {59080}{13} \int \frac {1}{-4+7 x+x^2} \, dx-87120 \int \frac {1}{\left (-4+7 x+x^2\right )^2} \, dx\\ &=-16 x+x^2+\frac {16 (964-1815 x)}{\left (4-7 x-x^2\right )^2}-\frac {17424 (7+2 x)}{13 \left (4-7 x-x^2\right )}+\frac {56 (1112+1055 x)}{13 \left (4-7 x-x^2\right )}-\frac {3728 \tanh ^{-1}\left (\frac {7+2 x}{\sqrt {65}}\right )}{\sqrt {65}}+\frac {34848}{13} \int \frac {1}{-4+7 x+x^2} \, dx+\frac {118160}{13} \operatorname {Subst}\left (\int \frac {1}{65-x^2} \, dx,x,7+2 x\right )\\ &=-16 x+x^2+\frac {16 (964-1815 x)}{\left (4-7 x-x^2\right )^2}-\frac {17424 (7+2 x)}{13 \left (4-7 x-x^2\right )}+\frac {56 (1112+1055 x)}{13 \left (4-7 x-x^2\right )}+\frac {23632}{13} \sqrt {\frac {5}{13}} \tanh ^{-1}\left (\frac {7+2 x}{\sqrt {65}}\right )-\frac {3728 \tanh ^{-1}\left (\frac {7+2 x}{\sqrt {65}}\right )}{\sqrt {65}}-\frac {69696}{13} \operatorname {Subst}\left (\int \frac {1}{65-x^2} \, dx,x,7+2 x\right )\\ &=-16 x+x^2+\frac {16 (964-1815 x)}{\left (4-7 x-x^2\right )^2}-\frac {17424 (7+2 x)}{13 \left (4-7 x-x^2\right )}+\frac {56 (1112+1055 x)}{13 \left (4-7 x-x^2\right )}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 47, normalized size = 1.52 \begin {gather*} 2 \left (-8 x+\frac {x^2}{2}-\frac {8 (-964+1815 x)}{\left (-4+7 x+x^2\right )^2}-\frac {4 (-574+233 x)}{-4+7 x+x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-16*x^3 + 54*x^4 - 66*x^5 + 26*x^6 + 2*x^7)/(-64 + 336*x - 540*x^2 + 175*x^3 + 135*x^4 + 21*x^5 + x
^6),x]

[Out]

2*(-8*x + x^2/2 - (8*(-964 + 1815*x))/(-4 + 7*x + x^2)^2 - (4*(-574 + 233*x))/(-4 + 7*x + x^2))

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 49, normalized size = 1.58 \begin {gather*} \frac {x^{6} - 2 \, x^{5} - 183 \, x^{4} - 2576 \, x^{3} - 7544 \, x^{2} + 10304 \, x - 2944}{x^{4} + 14 \, x^{3} + 41 \, x^{2} - 56 \, x + 16} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^7+26*x^6-66*x^5+54*x^4-16*x^3)/(x^6+21*x^5+135*x^4+175*x^3-540*x^2+336*x-64),x, algorithm="fric
as")

[Out]

(x^6 - 2*x^5 - 183*x^4 - 2576*x^3 - 7544*x^2 + 10304*x - 2944)/(x^4 + 14*x^3 + 41*x^2 - 56*x + 16)

________________________________________________________________________________________

giac [A]  time = 0.18, size = 34, normalized size = 1.10 \begin {gather*} x^{2} - 16 \, x - \frac {8 \, {\left (233 \, x^{3} + 1057 \, x^{2} - 1320 \, x + 368\right )}}{{\left (x^{2} + 7 \, x - 4\right )}^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^7+26*x^6-66*x^5+54*x^4-16*x^3)/(x^6+21*x^5+135*x^4+175*x^3-540*x^2+336*x-64),x, algorithm="giac
")

[Out]

x^2 - 16*x - 8*(233*x^3 + 1057*x^2 - 1320*x + 368)/(x^2 + 7*x - 4)^2

________________________________________________________________________________________

maple [A]  time = 0.03, size = 35, normalized size = 1.13




method result size



default \(-16 x +x^{2}+\frac {-1864 x^{3}-8456 x^{2}+10560 x -2944}{\left (x^{2}+7 x -4\right )^{2}}\) \(35\)
norman \(\frac {x^{6}-2 x^{5}-14 x^{3}-41 x^{2}+56 x -16}{\left (x^{2}+7 x -4\right )^{2}}\) \(35\)
risch \(x^{2}-16 x +\frac {-1864 x^{3}-8456 x^{2}+10560 x -2944}{x^{4}+14 x^{3}+41 x^{2}-56 x +16}\) \(44\)
gosper \(\frac {x^{6}-2 x^{5}-14 x^{3}-41 x^{2}+56 x -16}{x^{4}+14 x^{3}+41 x^{2}-56 x +16}\) \(45\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^7+26*x^6-66*x^5+54*x^4-16*x^3)/(x^6+21*x^5+135*x^4+175*x^3-540*x^2+336*x-64),x,method=_RETURNVERBOSE)

[Out]

-16*x+x^2+8*(-233*x^3-1057*x^2+1320*x-368)/(x^2+7*x-4)^2

________________________________________________________________________________________

maxima [A]  time = 0.66, size = 44, normalized size = 1.42 \begin {gather*} x^{2} - 16 \, x - \frac {8 \, {\left (233 \, x^{3} + 1057 \, x^{2} - 1320 \, x + 368\right )}}{x^{4} + 14 \, x^{3} + 41 \, x^{2} - 56 \, x + 16} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^7+26*x^6-66*x^5+54*x^4-16*x^3)/(x^6+21*x^5+135*x^4+175*x^3-540*x^2+336*x-64),x, algorithm="maxi
ma")

[Out]

x^2 - 16*x - 8*(233*x^3 + 1057*x^2 - 1320*x + 368)/(x^4 + 14*x^3 + 41*x^2 - 56*x + 16)

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 34, normalized size = 1.10 \begin {gather*} x^2-\frac {1864\,x^3+8456\,x^2-10560\,x+2944}{{\left (x^2+7\,x-4\right )}^2}-16\,x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((54*x^4 - 16*x^3 - 66*x^5 + 26*x^6 + 2*x^7)/(336*x - 540*x^2 + 175*x^3 + 135*x^4 + 21*x^5 + x^6 - 64),x)

[Out]

x^2 - (8456*x^2 - 10560*x + 1864*x^3 + 2944)/(7*x + x^2 - 4)^2 - 16*x

________________________________________________________________________________________

sympy [B]  time = 0.12, size = 39, normalized size = 1.26 \begin {gather*} x^{2} - 16 x + \frac {- 1864 x^{3} - 8456 x^{2} + 10560 x - 2944}{x^{4} + 14 x^{3} + 41 x^{2} - 56 x + 16} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**7+26*x**6-66*x**5+54*x**4-16*x**3)/(x**6+21*x**5+135*x**4+175*x**3-540*x**2+336*x-64),x)

[Out]

x**2 - 16*x + (-1864*x**3 - 8456*x**2 + 10560*x - 2944)/(x**4 + 14*x**3 + 41*x**2 - 56*x + 16)

________________________________________________________________________________________