Optimal. Leaf size=89 \[ -\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}}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {1120, 1107,
210} \begin {gather*} \frac {\text {ArcTan}\left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{2 \sqrt {a+4} \sqrt {\sqrt {a+4}+1}}-\frac {\text {ArcTan}\left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{2 \sqrt {a+4} \sqrt {1-\sqrt {a+4}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 1107
Rule 1120
Rubi steps
\begin {align*} \int \frac {1}{a+8 x-8 x^2+4 x^3-x^4} \, dx &=\text {Subst}\left (\int \frac {1}{3+a-2 x^2-x^4} \, dx,x,-1+x\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}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.01, size = 57, normalized size = 0.64 \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})}{-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 = 51, normalized size = 0.57
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 {\ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{4}\) | \(51\) |
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 {\ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{4}\) | \(51\) |
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 [B] Leaf count of result is larger than twice the leaf count of optimal. 457 vs.
\(2 (65) = 130\).
time = 0.41, size = 457, normalized size = 5.13 \begin {gather*} \frac {1}{4} \, \sqrt {\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 1}{a^{2} + 7 \, a + 12}} \log \left ({\left (a - \frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 4\right )} \sqrt {\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 1}{a^{2} + 7 \, a + 12}} + x - 1\right ) - \frac {1}{4} \, \sqrt {\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 1}{a^{2} + 7 \, a + 12}} \log \left (-{\left (a - \frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 4\right )} \sqrt {\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 1}{a^{2} + 7 \, a + 12}} + x - 1\right ) + \frac {1}{4} \, \sqrt {-\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} - 1}{a^{2} + 7 \, a + 12}} \log \left ({\left (a + \frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 4\right )} \sqrt {-\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} - 1}{a^{2} + 7 \, a + 12}} + x - 1\right ) - \frac {1}{4} \, \sqrt {-\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} - 1}{a^{2} + 7 \, a + 12}} \log \left (-{\left (a + \frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 4\right )} \sqrt {-\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} - 1}{a^{2} + 7 \, a + 12}} + x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.61, size = 66, normalized size = 0.74 \begin {gather*} - \operatorname {RootSum} {\left (t^{4} \cdot \left (256 a^{3} + 2816 a^{2} + 10240 a + 12288\right ) + t^{2} \left (- 32 a - 128\right ) - 1, \left ( t \mapsto t \log {\left (64 t^{3} a^{2} + 448 t^{3} a + 768 t^{3} - 4 t a - 20 t + x - 1 \right )} \right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.58, size = 571, normalized size = 6.42 \begin {gather*} -\mathrm {atan}\left (-\frac {a\,8{}\mathrm {i}-x\,16{}\mathrm {i}+x\,\sqrt {a^3+12\,a^2+48\,a+64}\,1{}\mathrm {i}-a\,x\,8{}\mathrm {i}-\sqrt {a^3+12\,a^2+48\,a+64}\,1{}\mathrm {i}-a^2\,x\,1{}\mathrm {i}+a^2\,1{}\mathrm {i}+16{}\mathrm {i}}{44\,a^2\,\sqrt {\frac {a-\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+4\,a^3\,\sqrt {\frac {a-\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+160\,a\,\sqrt {\frac {a-\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+192\,\sqrt {\frac {a-\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}}\right )\,\sqrt {\frac {a-\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}\,2{}\mathrm {i}-\mathrm {atan}\left (-\frac {a\,8{}\mathrm {i}-x\,16{}\mathrm {i}-x\,\sqrt {a^3+12\,a^2+48\,a+64}\,1{}\mathrm {i}-a\,x\,8{}\mathrm {i}+\sqrt {a^3+12\,a^2+48\,a+64}\,1{}\mathrm {i}-a^2\,x\,1{}\mathrm {i}+a^2\,1{}\mathrm {i}+16{}\mathrm {i}}{160\,a\,\sqrt {\frac {a+\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+192\,\sqrt {\frac {a+\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+44\,a^2\,\sqrt {\frac {a+\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+4\,a^3\,\sqrt {\frac {a+\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}}\right )\,\sqrt {\frac {a+\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}\,2{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________