Optimal. Leaf size=116 \[ -\frac {\tan ^{-1}\left (\frac {-1+x}{\sqrt {1-\sqrt {4+a}}}\right )}{2 \sqrt {4+a} \sqrt {1-\sqrt {4+a}}}+\frac {\tan ^{-1}\left (\frac {-1+x}{\sqrt {1+\sqrt {4+a}}}\right )}{2 \sqrt {4+a} \sqrt {1+\sqrt {4+a}}}+\frac {\tanh ^{-1}\left (\frac {1+(-1+x)^2}{\sqrt {4+a}}\right )}{2 \sqrt {4+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {1694, 1687,
1107, 210, 1121, 632, 212} \begin {gather*} -\frac {\text {ArcTan}\left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{2 \sqrt {a+4} \sqrt {1-\sqrt {a+4}}}+\frac {\text {ArcTan}\left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{2 \sqrt {a+4} \sqrt {\sqrt {a+4}+1}}+\frac {\tanh ^{-1}\left (\frac {(x-1)^2+1}{\sqrt {a+4}}\right )}{2 \sqrt {a+4}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 212
Rule 632
Rule 1107
Rule 1121
Rule 1687
Rule 1694
Rubi steps
\begin {align*} \int \frac {x}{a+8 x-8 x^2+4 x^3-x^4} \, dx &=\text {Subst}\left (\int \frac {1+x}{3+a-2 x^2-x^4} \, dx,x,-1+x\right )\\ &=\text {Subst}\left (\int \frac {1}{3+a-2 x^2-x^4} \, dx,x,-1+x\right )+\text {Subst}\left (\int \frac {x}{3+a-2 x^2-x^4} \, dx,x,-1+x\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {1}{3+a-2 x-x^2} \, dx,x,(-1+x)^2\right )-\frac {\text {Subst}\left (\int \frac {1}{-1-\sqrt {4+a}-x^2} \, dx,x,-1+x\right )}{2 \sqrt {4+a}}+\frac {\text {Subst}\left (\int \frac {1}{-1+\sqrt {4+a}-x^2} \, dx,x,-1+x\right )}{2 \sqrt {4+a}}\\ &=\frac {\tan ^{-1}\left (\frac {1-x}{\sqrt {1-\sqrt {4+a}}}\right )}{2 \sqrt {4+a} \sqrt {1-\sqrt {4+a}}}-\frac {\tan ^{-1}\left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{2 \sqrt {4+a} \sqrt {1+\sqrt {4+a}}}-\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 {4+a} \sqrt {1-\sqrt {4+a}}}-\frac {\tan ^{-1}\left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{2 \sqrt {4+a} \sqrt {1+\sqrt {4+a}}}+\frac {\tanh ^{-1}\left (\frac {1+(-1+x)^2}{\sqrt {4+a}}\right )}{2 \sqrt {4+a}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.01, size = 59, normalized size = 0.51 \begin {gather*} -\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+4 \text {$\#$1}-3 \text {$\#$1}^2+\text {$\#$1}^3}\&\right ] \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.03, size = 52, normalized size = 0.45
method | result | size |
default | \(\frac {\left (\munderset {\textit {\_R} =\RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\textit {\_R} \ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{4}\) | \(52\) |
risch | \(\frac {\left (\munderset {\textit {\_R} =\RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\textit {\_R} \ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{4}\) | \(52\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 1.69, size = 140500, normalized size = 1211.21 \begin {gather*} \text {too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 2.82, size = 155, normalized size = 1.34 \begin {gather*} - \operatorname {RootSum} {\left (t^{4} \cdot \left (256 a^{3} + 2816 a^{2} + 10240 a + 12288\right ) + t^{2} \left (- 32 a^{2} - 256 a - 512\right ) + t \left (- 16 a - 64\right ) + a, \left ( t \mapsto t \log {\left (x + \frac {- 128 t^{3} a^{4} - 1728 t^{3} a^{3} - 8640 t^{3} a^{2} - 18944 t^{3} a - 15360 t^{3} + 48 t^{2} a^{3} + 464 t^{2} a^{2} + 1472 t^{2} a + 1536 t^{2} + 8 t a^{3} + 88 t a^{2} + 312 t a + 352 t - a^{2} - 2 a}{4 a^{2} + 21 a + 28} \right )} \right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.58, size = 275, normalized size = 2.37 \begin {gather*} \sum _{k=1}^4\ln \left (-x-\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-32\,a^2\,z^2-256\,a\,z^2-512\,z^2+16\,a\,z+64\,z+a,z,k\right )\,\left (\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-32\,a^2\,z^2-256\,a\,z^2-512\,z^2+16\,a\,z+64\,z+a,z,k\right )\,\left (32\,a-\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-32\,a^2\,z^2-256\,a\,z^2-512\,z^2+16\,a\,z+64\,z+a,z,k\right )\,\left (64\,a-x\,\left (64\,a+256\right )+256\right )-x\,\left (16\,a+64\right )+128\right )-8\right )\right )\,\mathrm {root}\left (2816\,a^2\,z^4+256\,a^3\,z^4+10240\,a\,z^4+12288\,z^4-32\,a^2\,z^2-256\,a\,z^2-512\,z^2+16\,a\,z+64\,z+a,z,k\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________