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

Optimal. Leaf size=99 \[ -\frac {\tan ^{-1}\left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{2 \sqrt {1-\sqrt {a+4}}}-\frac {\tan ^{-1}\left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{2 \sqrt {\sqrt {a+4}+1}}+\frac {\tanh ^{-1}\left (\frac {(x-1)^2+1}{\sqrt {a+4}}\right )}{\sqrt {a+4}} \]

[Out]

arctanh((1+(-1+x)^2)/(4+a)^(1/2))/(4+a)^(1/2)-1/2*arctan((-1+x)/(1-(4+a)^(1/2))^(1/2))/(1-(4+a)^(1/2))^(1/2)-1
/2*arctan((-1+x)/(1+(4+a)^(1/2))^(1/2))/(1+(4+a)^(1/2))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {1680, 1673, 1166, 204, 12, 1107, 618, 206} \[ -\frac {\tan ^{-1}\left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{2 \sqrt {1-\sqrt {a+4}}}-\frac {\tan ^{-1}\left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{2 \sqrt {\sqrt {a+4}+1}}+\frac {\tanh ^{-1}\left (\frac {(x-1)^2+1}{\sqrt {a+4}}\right )}{\sqrt {a+4}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-ArcTan[(-1 + x)/Sqrt[1 - Sqrt[4 + a]]]/(2*Sqrt[1 - Sqrt[4 + a]]) - ArcTan[(-1 + x)/Sqrt[1 + Sqrt[4 + a]]]/(2*
Sqrt[1 + Sqrt[4 + a]]) + ArcTanh[(1 + (-1 + x)^2)/Sqrt[4 + a]]/Sqrt[4 + a]

Rule 12

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

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [C]  time = 0.02, size = 61, normalized size = 0.62 \[ -\frac {1}{4} \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})}{\text {$\#$1}^3-3 \text {$\#$1}^2+4 \text {$\#$1}-2}\& \right ] \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int -\frac {x^{2}}{x^{4} - 4 \, x^{3} + 8 \, x^{2} - a - 8 \, x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.00, size = 52, normalized size = 0.53 \[ -\frac {\RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )^{2} \ln \left (-\RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )+x \right )}{4 \left (\RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )^{3}-3 \RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )^{2}+4 \RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )-2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\int \frac {x^{2}}{x^{4} - 4 \, x^{3} + 8 \, x^{2} - a - 8 \, x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.78, size = 878, normalized size = 8.87 \[ \sum _{k=1}^4\ln \left (64\,\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )-a-8\,x+\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )\,a\,20-{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^2\,a\,48+{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^3\,a\,64+{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^2\,x\,128-{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^3\,x\,256-192\,{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^2+256\,{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^3-\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )\,a\,x\,4+{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^2\,a\,x\,32-{\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right )}^3\,a\,x\,64\right )\,\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-160\,a^2\,z^2-1152\,a\,z^2-2048\,z^2+32\,a^2\,z+256\,a\,z+512\,z-a^2,z,k\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

symsum(log(64*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2
+ 32*a^2*z + 256*a*z + 512*z - a^2, z, k) - a - 8*x + 20*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288
*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)*a - 48*root(2816*a^2*z^4
+ 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a
^2, z, k)^2*a + 64*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048
*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)^3*a + 128*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288
*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)^2*x - 256*root(2816*a^2*z
^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z
- a^2, z, k)^3*x - 192*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 -
2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)^2 + 256*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 122
88*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)^3 - 4*root(2816*a^2*z^4
 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z -
a^2, z, k)*a*x + 32*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 204
8*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)^2*a*x - 64*root(2816*a^2*z^4 + 256*a^3*z^4 + 10240*a*z^4 + 122
88*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z - a^2, z, k)^3*a*x)*root(2816*a^2*z^
4 + 256*a^3*z^4 + 10240*a*z^4 + 12288*z^4 - 160*a^2*z^2 - 1152*a*z^2 - 2048*z^2 + 32*a^2*z + 256*a*z + 512*z -
 a^2, z, k), k, 1, 4)

________________________________________________________________________________________

sympy [B]  time = 7.61, size = 172, normalized size = 1.74 \[ - \operatorname {RootSum} {\left (t^{4} \left (256 a^{3} + 2816 a^{2} + 10240 a + 12288\right ) + t^{2} \left (- 160 a^{2} - 1152 a - 2048\right ) + t \left (- 32 a^{2} - 256 a - 512\right ) - a^{2}, \left (t \mapsto t \log {\left (x + \frac {- 64 t^{3} a^{4} - 448 t^{3} a^{3} - 256 t^{3} a^{2} + 3584 t^{3} a + 6144 t^{3} - 224 t^{2} a^{3} - 2208 t^{2} a^{2} - 7168 t^{2} a - 7680 t^{2} + 56 t a^{3} + 400 t a^{2} + 864 t a + 512 t + 5 a^{3} + 34 a^{2} + 56 a}{a^{3} + 60 a^{2} + 320 a + 448} \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-RootSum(_t**4*(256*a**3 + 2816*a**2 + 10240*a + 12288) + _t**2*(-160*a**2 - 1152*a - 2048) + _t*(-32*a**2 - 2
56*a - 512) - a**2, Lambda(_t, _t*log(x + (-64*_t**3*a**4 - 448*_t**3*a**3 - 256*_t**3*a**2 + 3584*_t**3*a + 6
144*_t**3 - 224*_t**2*a**3 - 2208*_t**2*a**2 - 7168*_t**2*a - 7680*_t**2 + 56*_t*a**3 + 400*_t*a**2 + 864*_t*a
 + 512*_t + 5*a**3 + 34*a**2 + 56*a)/(a**3 + 60*a**2 + 320*a + 448))))

________________________________________________________________________________________