Integrand size = 26, antiderivative size = 99 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=-\frac {\arctan \left (\frac {-1+x}{\sqrt {1-\sqrt {4+a}}}\right )}{2 \sqrt {1-\sqrt {4+a}}}-\frac {\arctan \left (\frac {-1+x}{\sqrt {1+\sqrt {4+a}}}\right )}{2 \sqrt {1+\sqrt {4+a}}}+\frac {\text {arctanh}\left (\frac {1+(-1+x)^2}{\sqrt {4+a}}\right )}{\sqrt {4+a}} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {1694, 1687, 1180, 210, 12, 1121, 632, 212} \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=-\frac {\arctan \left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{2 \sqrt {1-\sqrt {a+4}}}-\frac {\arctan \left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{2 \sqrt {\sqrt {a+4}+1}}+\frac {\text {arctanh}\left (\frac {(x-1)^2+1}{\sqrt {a+4}}\right )}{\sqrt {a+4}} \]
[In]
[Out]
Rule 12
Rule 210
Rule 212
Rule 632
Rule 1121
Rule 1180
Rule 1687
Rule 1694
Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {(1+x)^2}{3+a-2 x^2-x^4} \, dx,x,-1+x\right ) \\ & = \text {Subst}\left (\int \frac {2 x}{3+a-2 x^2-x^4} \, dx,x,-1+x\right )+\text {Subst}\left (\int \frac {1+x^2}{3+a-2 x^2-x^4} \, dx,x,-1+x\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {1}{-1-\sqrt {4+a}-x^2} \, dx,x,-1+x\right )+\frac {1}{2} \text {Subst}\left (\int \frac {1}{-1+\sqrt {4+a}-x^2} \, dx,x,-1+x\right )+2 \text {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}}}+\text {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 \text {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*}
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.02 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.62 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=-\frac {1}{4} \text {RootSum}\left [a+8 \text {$\#$1}-8 \text {$\#$1}^2+4 \text {$\#$1}^3-\text {$\#$1}^4\&,\frac {\log (x-\text {$\#$1}) \text {$\#$1}^2}{-2+4 \text {$\#$1}-3 \text {$\#$1}^2+\text {$\#$1}^3}\&\right ] \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.04 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.55
method | result | size |
default | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{4}\) | \(54\) |
risch | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{4}\) | \(54\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 17.66 (sec) , antiderivative size = 1515766, normalized size of antiderivative = 15310.77 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\text {Too large to display} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (82) = 164\).
Time = 4.08 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.74 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=- \operatorname {RootSum} {\left (t^{4} \cdot \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 )} \]
[In]
[Out]
\[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\int { -\frac {x^{2}}{x^{4} - 4 \, x^{3} + 8 \, x^{2} - a - 8 \, x} \,d x } \]
[In]
[Out]
\[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\int { -\frac {x^{2}}{x^{4} - 4 \, x^{3} + 8 \, x^{2} - a - 8 \, x} \,d x } \]
[In]
[Out]
Time = 0.40 (sec) , antiderivative size = 878, normalized size of antiderivative = 8.87 \[ \int \frac {x^2}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\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 ) \]
[In]
[Out]