3.128 \(\int \frac{x}{(a+8 x-8 x^2+4 x^3-x^4)^2} \, dx\)

Optimal. Leaf size=231 \[ \frac{(x-1) \left (a+(x-1)^2+5\right )}{4 \left (a^2+7 a+12\right ) \left (a-(x-1)^4-2 (x-1)^2+3\right )}+\frac{(x-1)^2+1}{4 (a+4) \left (a-(x-1)^4-2 (x-1)^2+3\right )}-\frac{\left (3 a+\sqrt{a+4}+10\right ) \tan ^{-1}\left (\frac{x-1}{\sqrt{1-\sqrt{a+4}}}\right )}{8 (a+3) (a+4)^{3/2} \sqrt{1-\sqrt{a+4}}}+\frac{\left (3 a-\sqrt{a+4}+10\right ) \tan ^{-1}\left (\frac{x-1}{\sqrt{\sqrt{a+4}+1}}\right )}{8 (a+3) (a+4)^{3/2} \sqrt{\sqrt{a+4}+1}}+\frac{\tanh ^{-1}\left (\frac{(x-1)^2+1}{\sqrt{a+4}}\right )}{4 (a+4)^{3/2}} \]

[Out]

(1 + (-1 + x)^2)/(4*(4 + a)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) + ((5 + a + (-1 + x)^2)*(-1 + x))/(4*(12 + 7*
a + a^2)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) - ((10 + 3*a + Sqrt[4 + a])*ArcTan[(-1 + x)/Sqrt[1 - Sqrt[4 + a]
]])/(8*(3 + a)*(4 + a)^(3/2)*Sqrt[1 - Sqrt[4 + a]]) + ((10 + 3*a - Sqrt[4 + a])*ArcTan[(-1 + x)/Sqrt[1 + Sqrt[
4 + a]]])/(8*(3 + a)*(4 + a)^(3/2)*Sqrt[1 + Sqrt[4 + a]]) + ArcTanh[(1 + (-1 + x)^2)/Sqrt[4 + a]]/(4*(4 + a)^(
3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.2405, antiderivative size = 231, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 9, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375, Rules used = {1680, 1673, 1092, 1166, 204, 1107, 614, 618, 206} \[ \frac{(x-1) \left (a+(x-1)^2+5\right )}{4 \left (a^2+7 a+12\right ) \left (a-(x-1)^4-2 (x-1)^2+3\right )}+\frac{(x-1)^2+1}{4 (a+4) \left (a-(x-1)^4-2 (x-1)^2+3\right )}-\frac{\left (3 a+\sqrt{a+4}+10\right ) \tan ^{-1}\left (\frac{x-1}{\sqrt{1-\sqrt{a+4}}}\right )}{8 (a+3) (a+4)^{3/2} \sqrt{1-\sqrt{a+4}}}+\frac{\left (3 a-\sqrt{a+4}+10\right ) \tan ^{-1}\left (\frac{x-1}{\sqrt{\sqrt{a+4}+1}}\right )}{8 (a+3) (a+4)^{3/2} \sqrt{\sqrt{a+4}+1}}+\frac{\tanh ^{-1}\left (\frac{(x-1)^2+1}{\sqrt{a+4}}\right )}{4 (a+4)^{3/2}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(1 + (-1 + x)^2)/(4*(4 + a)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) + ((5 + a + (-1 + x)^2)*(-1 + x))/(4*(12 + 7*
a + a^2)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) - ((10 + 3*a + Sqrt[4 + a])*ArcTan[(-1 + x)/Sqrt[1 - Sqrt[4 + a]
]])/(8*(3 + a)*(4 + a)^(3/2)*Sqrt[1 - Sqrt[4 + a]]) + ((10 + 3*a - Sqrt[4 + a])*ArcTan[(-1 + x)/Sqrt[1 + Sqrt[
4 + a]]])/(8*(3 + a)*(4 + a)^(3/2)*Sqrt[1 + Sqrt[4 + a]]) + ArcTanh[(1 + (-1 + x)^2)/Sqrt[4 + a]]/(4*(4 + a)^(
3/2))

Rule 1680

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 1673

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rule 1092

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

Rule 1166

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 204

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

Rule 1107

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

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

Rubi steps

\begin{align*} \int \frac{x}{\left (a+8 x-8 x^2+4 x^3-x^4\right )^2} \, dx &=\operatorname{Subst}\left (\int \frac{1+x}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )\\ &=\operatorname{Subst}\left (\int \frac{1}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )+\operatorname{Subst}\left (\int \frac{x}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )\\ &=\frac{\left (5+a+(-1+x)^2\right ) (-1+x)}{4 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{\left (3+a-2 x-x^2\right )^2} \, dx,x,(-1+x)^2\right )-\frac{\operatorname{Subst}\left (\int \frac{4+2 (3+a)-2 (4+4 (3+a))-2 x^2}{3+a-2 x^2-x^4} \, dx,x,-1+x\right )}{8 \left (12+7 a+a^2\right )}\\ &=\frac{1+(-1+x)^2}{4 (4+a) \left (3+a-2 (1-x)^2-(1-x)^4\right )}+\frac{\left (5+a+(-1+x)^2\right ) (-1+x)}{4 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac{\operatorname{Subst}\left (\int \frac{1}{3+a-2 x-x^2} \, dx,x,(-1+x)^2\right )}{4 (4+a)}-\frac{\left (10+3 a-\sqrt{4+a}\right ) \operatorname{Subst}\left (\int \frac{1}{-1-\sqrt{4+a}-x^2} \, dx,x,-1+x\right )}{8 (3+a) (4+a)^{3/2}}+\frac{\left (10+3 a+\sqrt{4+a}\right ) \operatorname{Subst}\left (\int \frac{1}{-1+\sqrt{4+a}-x^2} \, dx,x,-1+x\right )}{8 (3+a) (4+a)^{3/2}}\\ &=\frac{1+(-1+x)^2}{4 (4+a) \left (3+a-2 (1-x)^2-(1-x)^4\right )}+\frac{\left (5+a+(-1+x)^2\right ) (-1+x)}{4 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac{\left (10+3 a+\sqrt{4+a}\right ) \tan ^{-1}\left (\frac{1-x}{\sqrt{1-\sqrt{4+a}}}\right )}{8 (3+a) (4+a)^{3/2} \sqrt{1-\sqrt{4+a}}}-\frac{\left (10+3 a-\sqrt{4+a}\right ) \tan ^{-1}\left (\frac{1-x}{\sqrt{1+\sqrt{4+a}}}\right )}{8 (3+a) (4+a)^{3/2} \sqrt{1+\sqrt{4+a}}}-\frac{\operatorname{Subst}\left (\int \frac{1}{4 (4+a)-x^2} \, dx,x,-2 \left (1+(-1+x)^2\right )\right )}{2 (4+a)}\\ &=\frac{1+(-1+x)^2}{4 (4+a) \left (3+a-2 (1-x)^2-(1-x)^4\right )}+\frac{\left (5+a+(-1+x)^2\right ) (-1+x)}{4 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac{\left (10+3 a+\sqrt{4+a}\right ) \tan ^{-1}\left (\frac{1-x}{\sqrt{1-\sqrt{4+a}}}\right )}{8 (3+a) (4+a)^{3/2} \sqrt{1-\sqrt{4+a}}}-\frac{\left (10+3 a-\sqrt{4+a}\right ) \tan ^{-1}\left (\frac{1-x}{\sqrt{1+\sqrt{4+a}}}\right )}{8 (3+a) (4+a)^{3/2} \sqrt{1+\sqrt{4+a}}}+\frac{\tanh ^{-1}\left (\frac{1+(-1+x)^2}{\sqrt{4+a}}\right )}{4 (4+a)^{3/2}}\\ \end{align*}

Mathematica [C]  time = 0.0595318, size = 166, normalized size = 0.72 \[ \frac{a x^2-a x+a+x^3+2 x}{4 (a+3) (a+4) \left (a-x \left (x^3-4 x^2+8 x-8\right )\right )}-\frac{\text{RootSum}\left [-\text{$\#$1}^4+4 \text{$\#$1}^3-8 \text{$\#$1}^2+8 \text{$\#$1}+a\& ,\frac{\text{$\#$1}^2 \log (x-\text{$\#$1})+2 \text{$\#$1} a \log (x-\text{$\#$1})+a \log (x-\text{$\#$1})+4 \text{$\#$1} \log (x-\text{$\#$1})+6 \log (x-\text{$\#$1})}{\text{$\#$1}^3-3 \text{$\#$1}^2+4 \text{$\#$1}-2}\& \right ]}{16 \left (a^2+7 a+12\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(a + 2*x - a*x + a*x^2 + x^3)/(4*(3 + a)*(4 + a)*(a - x*(-8 + 8*x - 4*x^2 + x^3))) - RootSum[a + 8*#1 - 8*#1^2
 + 4*#1^3 - #1^4 & , (6*Log[x - #1] + a*Log[x - #1] + 4*Log[x - #1]*#1 + 2*a*Log[x - #1]*#1 + Log[x - #1]*#1^2
)/(-2 + 4*#1 - 3*#1^2 + #1^3) & ]/(16*(12 + 7*a + a^2))

________________________________________________________________________________________

Maple [C]  time = 0.01, size = 162, normalized size = 0.7 \begin{align*}{\frac{1}{{x}^{4}-4\,{x}^{3}+8\,{x}^{2}-a-8\,x} \left ( -{\frac{{x}^{3}}{4\,{a}^{2}+28\,a+48}}-{\frac{a{x}^{2}}{4\,{a}^{2}+28\,a+48}}+{\frac{ \left ( a-2 \right ) x}{4\,{a}^{2}+28\,a+48}}-{\frac{a}{4\,{a}^{2}+28\,a+48}} \right ) }+{\frac{1}{16\,{a}^{2}+112\,a+192}\sum _{{\it \_R}={\it RootOf} \left ({{\it \_Z}}^{4}-4\,{{\it \_Z}}^{3}+8\,{{\it \_Z}}^{2}-8\,{\it \_Z}-a \right ) }{\frac{ \left ( -6-{{\it \_R}}^{2}+2\, \left ( -a-2 \right ){\it \_R}-a \right ) \ln \left ( x-{\it \_R} \right ) }{{{\it \_R}}^{3}-3\,{{\it \_R}}^{2}+4\,{\it \_R}-2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x/(-x^4+4*x^3-8*x^2+a+8*x)^2,x)

[Out]

(-1/4/(a^2+7*a+12)*x^3-1/4*a/(a^2+7*a+12)*x^2+1/4*(a-2)/(a^2+7*a+12)*x-1/4*a/(a^2+7*a+12))/(x^4-4*x^3+8*x^2-a-
8*x)+1/16/(a^2+7*a+12)*sum((-6-_R^2+2*(-a-2)*_R-a)/(_R^3-3*_R^2+4*_R-2)*ln(x-_R),_R=RootOf(_Z^4-4*_Z^3+8*_Z^2-
8*_Z-a))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Sympy [B]  time = 16.4623, size = 539, normalized size = 2.33 \begin{align*} - \frac{a x^{2} + a + x^{3} + x \left (2 - a\right )}{- 4 a^{3} - 28 a^{2} - 48 a + x^{4} \left (4 a^{2} + 28 a + 48\right ) + x^{3} \left (- 16 a^{2} - 112 a - 192\right ) + x^{2} \left (32 a^{2} + 224 a + 384\right ) + x \left (- 32 a^{2} - 224 a - 384\right )} + \operatorname{RootSum}{\left (t^{4} \left (65536 a^{9} + 2162688 a^{8} + 31653888 a^{7} + 269680640 a^{6} + 1473773568 a^{5} + 5357174784 a^{4} + 12952010752 a^{3} + 20082327552 a^{2} + 18119393280 a + 7247757312\right ) + t^{2} \left (- 2048 a^{6} - 50688 a^{5} - 520704 a^{4} - 2842624 a^{3} - 8699904 a^{2} - 14155776 a - 9568256\right ) + t \left (1152 a^{4} + 17792 a^{3} + 102912 a^{2} + 264192 a + 253952\right ) + 16 a^{3} - 57 a^{2} - 984 a - 2064, \left ( t \mapsto t \log{\left (x + \frac{98304 t^{3} a^{12} + 3948544 t^{3} a^{11} + 72196096 t^{3} a^{10} + 793837568 t^{3} a^{9} + 5839372288 t^{3} a^{8} + 30226464768 t^{3} a^{7} + 112668450816 t^{3} a^{6} + 303864643584 t^{3} a^{5} + 586157391872 t^{3} a^{4} + 784017129472 t^{3} a^{3} + 683648483328 t^{3} a^{2} + 343136010240 t^{3} a + 72477573120 t^{3} + 30208 t^{2} a^{10} + 986624 t^{2} a^{9} + 14420992 t^{2} a^{8} + 124156928 t^{2} a^{7} + 696815104 t^{2} a^{6} + 2661758464 t^{2} a^{5} + 7001485312 t^{2} a^{4} + 12506562560 t^{2} a^{3} + 14494924800 t^{2} a^{2} + 9820569600 t^{2} a + 2944401408 t^{2} - 1536 t a^{9} - 52048 t a^{8} - 757040 t a^{7} - 6200656 t a^{6} - 31380496 t a^{5} - 100736416 t a^{4} - 200813696 t a^{3} - 228144640 t a^{2} - 114632704 t a - 2490368 t + 248 a^{7} + 6797 a^{6} + 71132 a^{5} + 369745 a^{4} + 987758 a^{3} + 1128896 a^{2} - 129568 a - 956416}{576 a^{7} + 10985 a^{6} + 88746 a^{5} + 396609 a^{4} + 1076268 a^{3} + 1826304 a^{2} + 1867776 a + 917504} \right )} \right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x/(-x**4+4*x**3-8*x**2+a+8*x)**2,x)

[Out]

-(a*x**2 + a + x**3 + x*(2 - a))/(-4*a**3 - 28*a**2 - 48*a + x**4*(4*a**2 + 28*a + 48) + x**3*(-16*a**2 - 112*
a - 192) + x**2*(32*a**2 + 224*a + 384) + x*(-32*a**2 - 224*a - 384)) + RootSum(_t**4*(65536*a**9 + 2162688*a*
*8 + 31653888*a**7 + 269680640*a**6 + 1473773568*a**5 + 5357174784*a**4 + 12952010752*a**3 + 20082327552*a**2
+ 18119393280*a + 7247757312) + _t**2*(-2048*a**6 - 50688*a**5 - 520704*a**4 - 2842624*a**3 - 8699904*a**2 - 1
4155776*a - 9568256) + _t*(1152*a**4 + 17792*a**3 + 102912*a**2 + 264192*a + 253952) + 16*a**3 - 57*a**2 - 984
*a - 2064, Lambda(_t, _t*log(x + (98304*_t**3*a**12 + 3948544*_t**3*a**11 + 72196096*_t**3*a**10 + 793837568*_
t**3*a**9 + 5839372288*_t**3*a**8 + 30226464768*_t**3*a**7 + 112668450816*_t**3*a**6 + 303864643584*_t**3*a**5
 + 586157391872*_t**3*a**4 + 784017129472*_t**3*a**3 + 683648483328*_t**3*a**2 + 343136010240*_t**3*a + 724775
73120*_t**3 + 30208*_t**2*a**10 + 986624*_t**2*a**9 + 14420992*_t**2*a**8 + 124156928*_t**2*a**7 + 696815104*_
t**2*a**6 + 2661758464*_t**2*a**5 + 7001485312*_t**2*a**4 + 12506562560*_t**2*a**3 + 14494924800*_t**2*a**2 +
9820569600*_t**2*a + 2944401408*_t**2 - 1536*_t*a**9 - 52048*_t*a**8 - 757040*_t*a**7 - 6200656*_t*a**6 - 3138
0496*_t*a**5 - 100736416*_t*a**4 - 200813696*_t*a**3 - 228144640*_t*a**2 - 114632704*_t*a - 2490368*_t + 248*a
**7 + 6797*a**6 + 71132*a**5 + 369745*a**4 + 987758*a**3 + 1128896*a**2 - 129568*a - 956416)/(576*a**7 + 10985
*a**6 + 88746*a**5 + 396609*a**4 + 1076268*a**3 + 1826304*a**2 + 1867776*a + 917504))))

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: RuntimeError