Optimal. Leaf size=225 \[ \frac {(a+4) \left ((x-1)^2+2\right ) (x-1)}{4 \left (a^2+7 a+12\right ) \left (a-(x-1)^4-2 (x-1)^2+3\right )}+\frac {(x-1)^2+1}{2 (a+4) \left (a-(x-1)^4-2 (x-1)^2+3\right )}-\frac {\left (a+\sqrt {a+4}+4\right ) \tan ^{-1}\left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{8 (a+3) (a+4) \sqrt {1-\sqrt {a+4}}}-\frac {\left (a-\sqrt {a+4}+4\right ) \tan ^{-1}\left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{8 (a+3) (a+4) \sqrt {\sqrt {a+4}+1}}+\frac {\tanh ^{-1}\left (\frac {(x-1)^2+1}{\sqrt {a+4}}\right )}{2 (a+4)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 225, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 10, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {1680, 1673, 1178, 1166, 204, 12, 1107, 614, 618, 206} \[ \frac {(a+4) \left ((x-1)^2+2\right ) (x-1)}{4 \left (a^2+7 a+12\right ) \left (a-(x-1)^4-2 (x-1)^2+3\right )}+\frac {(x-1)^2+1}{2 (a+4) \left (a-(x-1)^4-2 (x-1)^2+3\right )}-\frac {\left (a+\sqrt {a+4}+4\right ) \tan ^{-1}\left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{8 (a+3) (a+4) \sqrt {1-\sqrt {a+4}}}-\frac {\left (a-\sqrt {a+4}+4\right ) \tan ^{-1}\left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{8 (a+3) (a+4) \sqrt {\sqrt {a+4}+1}}+\frac {\tanh ^{-1}\left (\frac {(x-1)^2+1}{\sqrt {a+4}}\right )}{2 (a+4)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 204
Rule 206
Rule 614
Rule 618
Rule 1107
Rule 1166
Rule 1178
Rule 1673
Rule 1680
Rubi steps
\begin {align*} \int \frac {x^2}{\left (a+8 x-8 x^2+4 x^3-x^4\right )^2} \, dx &=\operatorname {Subst}\left (\int \frac {(1+x)^2}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )\\ &=\operatorname {Subst}\left (\int \frac {2 x}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )+\operatorname {Subst}\left (\int \frac {1+x^2}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )\\ &=\frac {(4+a) \left (2+(-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 )}+2 \operatorname {Subst}\left (\int \frac {x}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )-\frac {\operatorname {Subst}\left (\int \frac {-4 (4+a)-2 (4+a) x^2}{3+a-2 x^2-x^4} \, dx,x,-1+x\right )}{8 \left (12+7 a+a^2\right )}\\ &=\frac {(4+a) \left (2+(-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 (4+a-\sqrt {4+a}\right ) \operatorname {Subst}\left (\int \frac {1}{-1-\sqrt {4+a}-x^2} \, dx,x,-1+x\right )}{8 \left (12+7 a+a^2\right )}+\frac {\left (4+a+\sqrt {4+a}\right ) \operatorname {Subst}\left (\int \frac {1}{-1+\sqrt {4+a}-x^2} \, dx,x,-1+x\right )}{8 \left (12+7 a+a^2\right )}+\operatorname {Subst}\left (\int \frac {1}{\left (3+a-2 x-x^2\right )^2} \, dx,x,(-1+x)^2\right )\\ &=\frac {1+(-1+x)^2}{2 (4+a) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac {(4+a) \left (2+(-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 (4+a+\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1-\sqrt {4+a}}}\right )}{8 \left (12+7 a+a^2\right ) \sqrt {1-\sqrt {4+a}}}+\frac {\left (4+a-\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{8 \left (12+7 a+a^2\right ) \sqrt {1+\sqrt {4+a}}}+\frac {\operatorname {Subst}\left (\int \frac {1}{3+a-2 x-x^2} \, dx,x,(-1+x)^2\right )}{2 (4+a)}\\ &=\frac {1+(-1+x)^2}{2 (4+a) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac {(4+a) \left (2+(-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 (4+a+\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1-\sqrt {4+a}}}\right )}{8 \left (12+7 a+a^2\right ) \sqrt {1-\sqrt {4+a}}}+\frac {\left (4+a-\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{8 \left (12+7 a+a^2\right ) \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 )}{4+a}\\ &=\frac {1+(-1+x)^2}{2 (4+a) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac {(4+a) \left (2+(-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 (4+a+\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1-\sqrt {4+a}}}\right )}{8 \left (12+7 a+a^2\right ) \sqrt {1-\sqrt {4+a}}}+\frac {\left (4+a-\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{8 \left (12+7 a+a^2\right ) \sqrt {1+\sqrt {4+a}}}+\frac {\tanh ^{-1}\left (\frac {1+(-1+x)^2}{\sqrt {4+a}}\right )}{2 (4+a)^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.08, size = 182, normalized size = 0.81 \[ \frac {a \left (x^3-x^2+x+1\right )+2 x \left (2 x^2-3 x+4\right )}{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 a \log (x-\text {$\#$1})+4 \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})}{\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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x^{2}}{{\left (x^{4} - 4 \, x^{3} + 8 \, x^{2} - a - 8 \, x\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.01, size = 160, normalized size = 0.71 \[ \frac {\left (\left (-a -4\right ) \RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )^{2}+2 \left (-a -2\right ) \RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )+a \right ) \ln \left (-\RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )+x \right )}{16 \left (a +3\right ) \left (a +4\right ) \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 )}+\frac {-\frac {x^{3}}{4 \left (a +3\right )}+\frac {\left (a +6\right ) x^{2}}{4 \left (a +3\right ) \left (a +4\right )}-\frac {a}{4 \left (a +3\right ) \left (a +4\right )}-\frac {\left (a +8\right ) x}{4 \left (a +3\right ) \left (a +4\right )}}{x^{4}-4 x^{3}+8 x^{2}-a -8 x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {{\left (a + 4\right )} x^{3} - {\left (a + 6\right )} x^{2} + {\left (a + 8\right )} x + a}{4 \, {\left ({\left (a^{2} + 7 \, a + 12\right )} x^{4} - 4 \, {\left (a^{2} + 7 \, a + 12\right )} x^{3} - a^{3} + 8 \, {\left (a^{2} + 7 \, a + 12\right )} x^{2} - 7 \, a^{2} - 8 \, {\left (a^{2} + 7 \, a + 12\right )} x - 12 \, a\right )}} - \frac {\int \frac {{\left (a + 4\right )} x^{2} + 2 \, {\left (a + 2\right )} x - a}{x^{4} - 4 \, x^{3} + 8 \, x^{2} - a - 8 \, x}\,{d x}}{4 \, {\left (a^{2} + 7 \, a + 12\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.85, size = 1218, normalized size = 5.41 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 43.73, size = 561, normalized size = 2.49 \[ \frac {- a + x^{3} \left (- a - 4\right ) + x^{2} \left (a + 6\right ) + x \left (- a - 8\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 (- 9728 a^{6} - 209408 a^{5} - 1878016 a^{4} - 8986624 a^{3} - 24215552 a^{2} - 34865152 a - 20971520\right ) + t \left (256 a^{5} + 5888 a^{4} + 53248 a^{3} + 237568 a^{2} + 524288 a + 458752\right ) - a^{4} + 144 a^{3} + 1024 a^{2} + 1792 a, \left (t \mapsto t \log {\left (x + \frac {4096 t^{3} a^{12} - 61440 t^{3} a^{11} - 5480448 t^{3} a^{10} - 111403008 t^{3} a^{9} - 1227173888 t^{3} a^{8} - 8682876928 t^{3} a^{7} - 42187440128 t^{3} a^{6} - 144630284288 t^{3} a^{5} - 350972280832 t^{3} a^{4} - 591750234112 t^{3} a^{3} - 660716126208 t^{3} a^{2} - 439848271872 t^{3} a - 132271570944 t^{3} - 28672 t^{2} a^{10} - 993280 t^{2} a^{9} - 15400960 t^{2} a^{8} - 140742656 t^{2} a^{7} - 839462912 t^{2} a^{6} - 3414427648 t^{2} a^{5} - 9590087680 t^{2} a^{4} - 18363547648 t^{2} a^{3} - 22938255360 t^{2} a^{2} - 16873684992 t^{2} a - 5549064192 t^{2} - 848 t a^{9} - 6096 t a^{8} + 174608 t a^{7} + 3323792 t a^{6} + 26276224 t a^{5} + 119009280 t a^{4} + 332017664 t a^{3} + 566497280 t a^{2} + 544112640 t a + 225837056 t + 11 a^{8} + 958 a^{7} + 17419 a^{6} + 142964 a^{5} + 632632 a^{4} + 1567552 a^{3} + 2049792 a^{2} + 1100800 a}{a^{8} + 870 a^{7} + 18289 a^{6} + 165176 a^{5} + 824560 a^{4} + 2452288 a^{3} + 4340224 a^{2} + 4229120 a + 1748992} \right )} \right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________