Optimal. Leaf size=93 \[ \frac {1}{4} \sqrt {x^4-2 x^3+x^2-2} \left (x^2-x+1\right )-\frac {7}{8} \log \left (x^2+\sqrt {x^4-2 x^3+x^2-2}-x\right )-\frac {1}{4} \tanh ^{-1}\left (2 x^2+2 \sqrt {x^4-2 x^3+x^2-2}-2 x+3\right ) \]
________________________________________________________________________________________
Rubi [F] time = 1.83, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {(-1+2 x) \left (2-x+x^2\right ) \sqrt {-2+x^2-2 x^3+x^4}}{3-2 x+2 x^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {align*} \int \frac {(-1+2 x) \left (2-x+x^2\right ) \sqrt {-2+x^2-2 x^3+x^4}}{3-2 x+2 x^2} \, dx &=\int \left (-\frac {1}{2} \sqrt {-2+x^2-2 x^3+x^4}+x \sqrt {-2+x^2-2 x^3+x^4}-\frac {(1-2 x) \sqrt {-2+x^2-2 x^3+x^4}}{2 \left (3-2 x+2 x^2\right )}\right ) \, dx\\ &=-\left (\frac {1}{2} \int \sqrt {-2+x^2-2 x^3+x^4} \, dx\right )-\frac {1}{2} \int \frac {(1-2 x) \sqrt {-2+x^2-2 x^3+x^4}}{3-2 x+2 x^2} \, dx+\int x \sqrt {-2+x^2-2 x^3+x^4} \, dx\\ &=-\left (\frac {1}{2} \int \left (-\frac {2 \sqrt {-2+x^2-2 x^3+x^4}}{-2-2 i \sqrt {5}+4 x}-\frac {2 \sqrt {-2+x^2-2 x^3+x^4}}{-2+2 i \sqrt {5}+4 x}\right ) \, dx\right )-\frac {1}{2} \operatorname {Subst}\left (\int \sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4} \, dx,x,-\frac {1}{2}+x\right )+\operatorname {Subst}\left (\int \left (\frac {1}{2}+x\right ) \sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4} \, dx,x,-\frac {1}{2}+x\right )\\ &=\frac {1}{12} (1-2 x) \sqrt {-2+x^2-2 x^3+x^4}-\frac {1}{6} \operatorname {Subst}\left (\int \frac {-\frac {31}{8}-\frac {x^2}{2}}{\sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4}} \, dx,x,-\frac {1}{2}+x\right )+\int \frac {\sqrt {-2+x^2-2 x^3+x^4}}{-2-2 i \sqrt {5}+4 x} \, dx+\int \frac {\sqrt {-2+x^2-2 x^3+x^4}}{-2+2 i \sqrt {5}+4 x} \, dx+\operatorname {Subst}\left (\int \frac {1}{2} \sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4} \, dx,x,-\frac {1}{2}+x\right )+\operatorname {Subst}\left (\int x \sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4} \, dx,x,-\frac {1}{2}+x\right )\\ &=\frac {1}{12} (1-2 x) \sqrt {-2+x^2-2 x^3+x^4}+\frac {1}{24} \operatorname {Subst}\left (\int \frac {-\frac {1}{2}-2 \sqrt {2}+2 x^2}{\sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4}} \, dx,x,-\frac {1}{2}+x\right )+\frac {1}{2} \operatorname {Subst}\left (\int \sqrt {-\frac {31}{16}-\frac {x}{2}+x^2} \, dx,x,\left (-\frac {1}{2}+x\right )^2\right )+\frac {1}{2} \operatorname {Subst}\left (\int \sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4} \, dx,x,-\frac {1}{2}+x\right )+\frac {1}{12} \left (8+\sqrt {2}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4}} \, dx,x,-\frac {1}{2}+x\right )+\int \frac {\sqrt {-2+x^2-2 x^3+x^4}}{-2-2 i \sqrt {5}+4 x} \, dx+\int \frac {\sqrt {-2+x^2-2 x^3+x^4}}{-2+2 i \sqrt {5}+4 x} \, dx\\ &=-\frac {(1-2 x) \left (\sqrt {2}-x+x^2\right )}{24 \sqrt {-2+x^2-2 x^3+x^4}}-\frac {1}{4} (1-x) x \sqrt {-2+x^2-2 x^3+x^4}+\frac {\sqrt {-31-\left (1-4 \sqrt {2}\right ) (1-2 x)^2} \sqrt {\frac {31+\left (1+4 \sqrt {2}\right ) (1-2 x)^2}{31+\left (1-4 \sqrt {2}\right ) (1-2 x)^2}} E\left (\sin ^{-1}\left (\frac {2\ 2^{3/4} (1-2 x)}{\sqrt {-31-\left (1-4 \sqrt {2}\right ) (1-2 x)^2}}\right )|\frac {1}{16} \left (8-\sqrt {2}\right )\right )}{24 \sqrt [4]{2} \sqrt {31} \sqrt {\frac {1}{31+\left (1-4 \sqrt {2}\right ) (1-2 x)^2}} \sqrt {-2+x^2-2 x^3+x^4}}-\frac {\left (1+4 \sqrt {2}\right ) \sqrt {-31-\left (1-4 \sqrt {2}\right ) (1-2 x)^2} \sqrt {\frac {31+\left (1+4 \sqrt {2}\right ) (1-2 x)^2}{31+\left (1-4 \sqrt {2}\right ) (1-2 x)^2}} F\left (\sin ^{-1}\left (\frac {2\ 2^{3/4} (1-2 x)}{\sqrt {-31-\left (1-4 \sqrt {2}\right ) (1-2 x)^2}}\right )|\frac {1}{16} \left (8-\sqrt {2}\right )\right )}{48 \sqrt [4]{2} \sqrt {31} \sqrt {\frac {1}{31+\left (1-4 \sqrt {2}\right ) (1-2 x)^2}} \sqrt {-2+x^2-2 x^3+x^4}}+\frac {1}{6} \operatorname {Subst}\left (\int \frac {-\frac {31}{8}-\frac {x^2}{2}}{\sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4}} \, dx,x,-\frac {1}{2}+x\right )-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{\sqrt {-\frac {31}{16}-\frac {x}{2}+x^2}} \, dx,x,\left (-\frac {1}{2}+x\right )^2\right )+\int \frac {\sqrt {-2+x^2-2 x^3+x^4}}{-2-2 i \sqrt {5}+4 x} \, dx+\int \frac {\sqrt {-2+x^2-2 x^3+x^4}}{-2+2 i \sqrt {5}+4 x} \, dx\\ &=-\frac {(1-2 x) \left (\sqrt {2}-x+x^2\right )}{24 \sqrt {-2+x^2-2 x^3+x^4}}-\frac {1}{4} (1-x) x \sqrt {-2+x^2-2 x^3+x^4}+\frac {\sqrt {-31-\left (1-4 \sqrt {2}\right ) (1-2 x)^2} \sqrt {\frac {31+\left (1+4 \sqrt {2}\right ) (1-2 x)^2}{31+\left (1-4 \sqrt {2}\right ) (1-2 x)^2}} E\left (\sin ^{-1}\left (\frac {2\ 2^{3/4} (1-2 x)}{\sqrt {-31-\left (1-4 \sqrt {2}\right ) (1-2 x)^2}}\right )|\frac {1}{16} \left (8-\sqrt {2}\right )\right )}{24 \sqrt [4]{2} \sqrt {31} \sqrt {\frac {1}{31+\left (1-4 \sqrt {2}\right ) (1-2 x)^2}} \sqrt {-2+x^2-2 x^3+x^4}}-\frac {\left (1+4 \sqrt {2}\right ) \sqrt {-31-\left (1-4 \sqrt {2}\right ) (1-2 x)^2} \sqrt {\frac {31+\left (1+4 \sqrt {2}\right ) (1-2 x)^2}{31+\left (1-4 \sqrt {2}\right ) (1-2 x)^2}} F\left (\sin ^{-1}\left (\frac {2\ 2^{3/4} (1-2 x)}{\sqrt {-31-\left (1-4 \sqrt {2}\right ) (1-2 x)^2}}\right )|\frac {1}{16} \left (8-\sqrt {2}\right )\right )}{48 \sqrt [4]{2} \sqrt {31} \sqrt {\frac {1}{31+\left (1-4 \sqrt {2}\right ) (1-2 x)^2}} \sqrt {-2+x^2-2 x^3+x^4}}-\frac {1}{24} \operatorname {Subst}\left (\int \frac {-\frac {1}{2}-2 \sqrt {2}+2 x^2}{\sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4}} \, dx,x,-\frac {1}{2}+x\right )-\frac {1}{12} \left (8+\sqrt {2}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-\frac {31}{16}-\frac {x^2}{2}+x^4}} \, dx,x,-\frac {1}{2}+x\right )+\int \frac {\sqrt {-2+x^2-2 x^3+x^4}}{-2-2 i \sqrt {5}+4 x} \, dx+\int \frac {\sqrt {-2+x^2-2 x^3+x^4}}{-2+2 i \sqrt {5}+4 x} \, dx-\operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {2 (-1+x) x}{\sqrt {-2+x^2-2 x^3+x^4}}\right )\\ &=-\frac {1}{4} (1-x) x \sqrt {-2+x^2-2 x^3+x^4}-\frac {1}{2} \tanh ^{-1}\left (\frac {(-1+x) x}{\sqrt {-2+x^2-2 x^3+x^4}}\right )+\int \frac {\sqrt {-2+x^2-2 x^3+x^4}}{-2-2 i \sqrt {5}+4 x} \, dx+\int \frac {\sqrt {-2+x^2-2 x^3+x^4}}{-2+2 i \sqrt {5}+4 x} \, dx\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 88, normalized size = 0.95 \begin {gather*} \frac {1}{8} \left (2 \sqrt {x^4-2 x^3+x^2-2} \left (x^2-x+1\right )-7 \tanh ^{-1}\left (\frac {(x-1) x}{\sqrt {x^4-2 x^3+x^2-2}}\right )-\tanh ^{-1}\left (\frac {-3 x^2+3 x-4}{\sqrt {x^4-2 x^3+x^2-2}}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.30, size = 93, normalized size = 1.00 \begin {gather*} \frac {1}{4} \left (1-x+x^2\right ) \sqrt {-2+x^2-2 x^3+x^4}-\frac {1}{4} \tanh ^{-1}\left (3-2 x+2 x^2+2 \sqrt {-2+x^2-2 x^3+x^4}\right )-\frac {7}{8} \log \left (-x+x^2+\sqrt {-2+x^2-2 x^3+x^4}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 92, normalized size = 0.99 \begin {gather*} \frac {1}{4} \, \sqrt {x^{4} - 2 \, x^{3} + x^{2} - 2} {\left (x^{2} - x + 1\right )} + \frac {7}{8} \, \log \left (-x^{2} + x + \sqrt {x^{4} - 2 \, x^{3} + x^{2} - 2}\right ) + \frac {1}{8} \, \log \left (\frac {3 \, x^{2} - 3 \, x + \sqrt {x^{4} - 2 \, x^{3} + x^{2} - 2} + 4}{2 \, x^{2} - 2 \, x + 3}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.35, size = 100, normalized size = 1.08 \begin {gather*} \frac {1}{4} \, \sqrt {{\left (x^{2} - x\right )}^{2} - 2} {\left (x^{2} - x + 1\right )} + \frac {1}{8} \, \log \left (x^{2} - x - \sqrt {{\left (x^{2} - x\right )}^{2} - 2} + 2\right ) - \frac {1}{8} \, \log \left (x^{2} - x - \sqrt {{\left (x^{2} - x\right )}^{2} - 2} + 1\right ) + \frac {7}{8} \, \log \left ({\left | -x^{2} + x + \sqrt {{\left (x^{2} - x\right )}^{2} - 2} \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.70, size = 420, normalized size = 4.52
method | result | size |
trager | \(\left (\frac {1}{4}-\frac {1}{4} x +\frac {1}{4} x^{2}\right ) \sqrt {x^{4}-2 x^{3}+x^{2}-2}-\frac {\ln \left (-\frac {-1+14 x +26 x^{2} \sqrt {x^{4}-2 x^{3}+x^{2}-2}-2 x \sqrt {x^{4}-2 x^{3}+x^{2}-2}-2 \sqrt {x^{4}-2 x^{3}+x^{2}-2}+360 x^{9}+368 x^{10}+624 x^{7}-176 x^{5}-152 x^{6}-12 x^{2}-60 x^{3}-784 x^{8}+186 x^{4}-864 x^{11}+872 x^{12}+8 x^{16}-64 x^{15}+240 x^{14}-560 x^{13}+8 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{14}-56 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{13}+184 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{12}-376 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{11}+504 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{10}-408 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{9}+96 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{8}+216 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{7}-300 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{6}+164 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{5}-4 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{4}-52 \sqrt {x^{4}-2 x^{3}+x^{2}-2}\, x^{3}}{2 x^{2}-2 x +3}\right )}{8}\) | \(420\) |
risch | \(\text {Expression too large to display}\) | \(3445\) |
default | \(\text {Expression too large to display}\) | \(3475\) |
elliptic | \(\text {Expression too large to display}\) | \(3475\) |
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*} \int \frac {\sqrt {x^{4} - 2 \, x^{3} + x^{2} - 2} {\left (x^{2} - x + 2\right )} {\left (2 \, x - 1\right )}}{2 \, x^{2} - 2 \, x + 3}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (2\,x-1\right )\,\left (x^2-x+2\right )\,\sqrt {x^4-2\,x^3+x^2-2}}{2\,x^2-2\,x+3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (2 x - 1\right ) \left (x^{2} - x + 2\right ) \sqrt {x^{4} - 2 x^{3} + x^{2} - 2}}{2 x^{2} - 2 x + 3}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________