Integrand size = 39, antiderivative size = 133 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=-2 \arctan \left (\frac {\sqrt {1+x^2+x^4}}{1-x+x^2}\right )+\sqrt {\frac {1}{5} \left (2+2 \sqrt {5}\right )} \arctan \left (\frac {\sqrt {1+x^2+x^4}}{\sqrt {2+\sqrt {5}} \left (1-x+x^2\right )}\right )+\sqrt {\frac {1}{5} \left (-2+2 \sqrt {5}\right )} \text {arctanh}\left (\frac {\sqrt {1+x^2+x^4}}{\sqrt {-2+\sqrt {5}} \left (1-x+x^2\right )}\right ) \] Output:
-2*arctan((x^4+x^2+1)^(1/2)/(x^2-x+1))+1/5*(10+10*5^(1/2))^(1/2)*arctan((x ^4+x^2+1)^(1/2)/(2+5^(1/2))^(1/2)/(x^2-x+1))+1/5*(-10+10*5^(1/2))^(1/2)*ar ctanh((x^4+x^2+1)^(1/2)/(-2+5^(1/2))^(1/2)/(x^2-x+1))
Time = 1.00 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.97 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=-2 \arctan \left (\frac {\sqrt {1+x^2+x^4}}{1-x+x^2}\right )+\sqrt {\frac {2}{5} \left (1+\sqrt {5}\right )} \arctan \left (\frac {\sqrt {-2+\sqrt {5}} \sqrt {1+x^2+x^4}}{1-x+x^2}\right )+\sqrt {\frac {2}{5} \left (-1+\sqrt {5}\right )} \text {arctanh}\left (\frac {\sqrt {2+\sqrt {5}} \sqrt {1+x^2+x^4}}{1-x+x^2}\right ) \] Input:
Integrate[((-1 + x^2)*Sqrt[1 + x^2 + x^4])/((1 + x^2)*(1 + x + x^2 + x^3 + x^4)),x]
Output:
-2*ArcTan[Sqrt[1 + x^2 + x^4]/(1 - x + x^2)] + Sqrt[(2*(1 + Sqrt[5]))/5]*A rcTan[(Sqrt[-2 + Sqrt[5]]*Sqrt[1 + x^2 + x^4])/(1 - x + x^2)] + Sqrt[(2*(- 1 + Sqrt[5]))/5]*ArcTanh[(Sqrt[2 + Sqrt[5]]*Sqrt[1 + x^2 + x^4])/(1 - x + x^2)]
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (x^2-1\right ) \sqrt {x^4+x^2+1}}{\left (x^2+1\right ) \left (x^4+x^3+x^2+x+1\right )} \, dx\) |
\(\Big \downarrow \) 7276 |
\(\displaystyle \int \left (\frac {\left (2 x^2+2 x+1\right ) \sqrt {x^4+x^2+1}}{x^4+x^3+x^2+x+1}-\frac {2 \sqrt {x^4+x^2+1}}{x^2+1}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \int \frac {\sqrt {x^4+x^2+1}}{x^4+x^3+x^2+x+1}dx+2 \int \frac {x \sqrt {x^4+x^2+1}}{x^4+x^3+x^2+x+1}dx+2 \int \frac {x^2 \sqrt {x^4+x^2+1}}{x^4+x^3+x^2+x+1}dx-\arctan \left (\frac {x}{\sqrt {x^4+x^2+1}}\right )-\frac {3 \left (x^2+1\right ) \sqrt {\frac {x^4+x^2+1}{\left (x^2+1\right )^2}} \operatorname {EllipticF}\left (2 \arctan (x),\frac {1}{4}\right )}{2 \sqrt {x^4+x^2+1}}+\frac {2 \left (x^2+1\right ) \sqrt {\frac {x^4+x^2+1}{\left (x^2+1\right )^2}} E\left (2 \arctan (x)\left |\frac {1}{4}\right .\right )}{\sqrt {x^4+x^2+1}}-\frac {2 \sqrt {x^4+x^2+1} x}{x^2+1}\) |
Input:
Int[((-1 + x^2)*Sqrt[1 + x^2 + x^4])/((1 + x^2)*(1 + x + x^2 + x^3 + x^4)) ,x]
Output:
$Aborted
Time = 4.16 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.89
method | result | size |
default | \(\frac {\sqrt {5}\, \sqrt {-2+2 \sqrt {5}}\, \operatorname {arctanh}\left (\frac {\left (x^{2}+1\right ) \sqrt {5}+\left (1+x \right )^{2}}{\sqrt {x^{4}+x^{2}+1}\, \sqrt {2+2 \sqrt {5}}}\right )}{10}-\frac {\sqrt {5}\, \sqrt {2+2 \sqrt {5}}\, \arctan \left (\frac {\left (x^{2}+1\right ) \sqrt {5}-\left (1+x \right )^{2}}{\sqrt {x^{4}+x^{2}+1}\, \sqrt {-2+2 \sqrt {5}}}\right )}{10}-\arctan \left (\frac {x}{\sqrt {x^{4}+x^{2}+1}}\right )\) | \(119\) |
pseudoelliptic | \(\frac {\sqrt {5}\, \sqrt {-2+2 \sqrt {5}}\, \operatorname {arctanh}\left (\frac {\left (x^{2}+1\right ) \sqrt {5}+\left (1+x \right )^{2}}{\sqrt {x^{4}+x^{2}+1}\, \sqrt {2+2 \sqrt {5}}}\right )}{10}-\frac {\sqrt {5}\, \sqrt {2+2 \sqrt {5}}\, \arctan \left (\frac {\left (x^{2}+1\right ) \sqrt {5}-\left (1+x \right )^{2}}{\sqrt {x^{4}+x^{2}+1}\, \sqrt {-2+2 \sqrt {5}}}\right )}{10}-\arctan \left (\frac {x}{\sqrt {x^{4}+x^{2}+1}}\right )\) | \(119\) |
elliptic | \(-\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )}{\sum }\textit {\_R} \ln \left (\left (\sqrt {x^{4}+x^{2}+1}-x^{2}\right )^{2}+\left (-15 \textit {\_R}^{3}+5 \textit {\_R}^{2}-4 \textit {\_R} \right ) \left (\sqrt {x^{4}+x^{2}+1}-x^{2}\right )-15 \textit {\_R}^{3}+5 \textit {\_R}^{2}-4 \textit {\_R} +2\right )\right )}{2}+\frac {\left (-\frac {2 \sqrt {5}\, \operatorname {arctanh}\left (\frac {\sqrt {x^{4}+x^{2}+1}\, \sqrt {2}}{x \sqrt {\sqrt {5}+1}}\right )}{5 \sqrt {\sqrt {5}+1}}-\frac {2 \sqrt {5}\, \arctan \left (\frac {\sqrt {x^{4}+x^{2}+1}\, \sqrt {2}}{x \sqrt {\sqrt {5}-1}}\right )}{5 \sqrt {\sqrt {5}-1}}+\sqrt {2}\, \arctan \left (\frac {\sqrt {x^{4}+x^{2}+1}}{x}\right )\right ) \sqrt {2}}{2}\) | \(186\) |
trager | \(-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+5\right ) \ln \left (-\frac {-25 \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+5\right ) \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{4} x +5 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+5\right ) x^{2}+5 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+5\right ) x +5 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+5\right )-2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+5\right ) x^{2}+2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+5\right ) x +5 \sqrt {x^{4}+x^{2}+1}-2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+5\right )}{5 x \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}-x^{2}-1}\right )}{5}-\operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right ) \ln \left (-\frac {-25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{5} x -5 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{3} x^{2}-15 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{3} x -5 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{3}-3 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right ) x^{2}+\sqrt {x^{4}+x^{2}+1}-3 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )}{5 x \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+x^{2}+x +1}\right )+\operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right ) \operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+5\right ) \ln \left (\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+25 \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )^{2}+5\right ) \operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right ) x +\sqrt {x^{4}+x^{2}+1}}{x^{2}+1}\right )\) | \(570\) |
Input:
int((x^2-1)*(x^4+x^2+1)^(1/2)/(x^2+1)/(x^4+x^3+x^2+x+1),x,method=_RETURNVE RBOSE)
Output:
1/10*5^(1/2)*(-2+2*5^(1/2))^(1/2)*arctanh(((x^2+1)*5^(1/2)+(1+x)^2)/(x^4+x ^2+1)^(1/2)/(2+2*5^(1/2))^(1/2))-1/10*5^(1/2)*(2+2*5^(1/2))^(1/2)*arctan(1 /(x^4+x^2+1)^(1/2)/(-2+2*5^(1/2))^(1/2)*((x^2+1)*5^(1/2)-(1+x)^2))-arctan( x/(x^4+x^2+1)^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 265 vs. \(2 (105) = 210\).
Time = 0.22 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.99 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=\sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{10}} \arctan \left (\frac {\sqrt {x^{4} + x^{2} + 1} {\left (\sqrt {5} {\left (2 \, x^{2} - x + 2\right )} + 5 \, x\right )} \sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{10}}}{2 \, {\left (x^{4} - x^{3} + x^{2} - x + 1\right )}}\right ) + \frac {1}{2} \, \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} \log \left (-\frac {\sqrt {x^{4} + x^{2} + 1} {\left (2 \, x^{2} - \sqrt {5} x + x + 2\right )} + {\left (5 \, x^{4} + 5 \, x^{2} + \sqrt {5} {\left (x^{4} + 3 \, x^{2} + 1\right )} + 5\right )} \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}}}{x^{4} + x^{3} + x^{2} + x + 1}\right ) - \frac {1}{2} \, \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} \log \left (-\frac {\sqrt {x^{4} + x^{2} + 1} {\left (2 \, x^{2} - \sqrt {5} x + x + 2\right )} - {\left (5 \, x^{4} + 5 \, x^{2} + \sqrt {5} {\left (x^{4} + 3 \, x^{2} + 1\right )} + 5\right )} \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}}}{x^{4} + x^{3} + x^{2} + x + 1}\right ) - \arctan \left (\frac {x}{\sqrt {x^{4} + x^{2} + 1}}\right ) \] Input:
integrate((x^2-1)*(x^4+x^2+1)^(1/2)/(x^2+1)/(x^4+x^3+x^2+x+1),x, algorithm ="fricas")
Output:
sqrt(1/10*sqrt(5) + 1/10)*arctan(1/2*sqrt(x^4 + x^2 + 1)*(sqrt(5)*(2*x^2 - x + 2) + 5*x)*sqrt(1/10*sqrt(5) + 1/10)/(x^4 - x^3 + x^2 - x + 1)) + 1/2* sqrt(1/10*sqrt(5) - 1/10)*log(-(sqrt(x^4 + x^2 + 1)*(2*x^2 - sqrt(5)*x + x + 2) + (5*x^4 + 5*x^2 + sqrt(5)*(x^4 + 3*x^2 + 1) + 5)*sqrt(1/10*sqrt(5) - 1/10))/(x^4 + x^3 + x^2 + x + 1)) - 1/2*sqrt(1/10*sqrt(5) - 1/10)*log(-( sqrt(x^4 + x^2 + 1)*(2*x^2 - sqrt(5)*x + x + 2) - (5*x^4 + 5*x^2 + sqrt(5) *(x^4 + 3*x^2 + 1) + 5)*sqrt(1/10*sqrt(5) - 1/10))/(x^4 + x^3 + x^2 + x + 1)) - arctan(x/sqrt(x^4 + x^2 + 1))
\[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=\int \frac {\sqrt {\left (x^{2} - x + 1\right ) \left (x^{2} + x + 1\right )} \left (x - 1\right ) \left (x + 1\right )}{\left (x^{2} + 1\right ) \left (x^{4} + x^{3} + x^{2} + x + 1\right )}\, dx \] Input:
integrate((x**2-1)*(x**4+x**2+1)**(1/2)/(x**2+1)/(x**4+x**3+x**2+x+1),x)
Output:
Integral(sqrt((x**2 - x + 1)*(x**2 + x + 1))*(x - 1)*(x + 1)/((x**2 + 1)*( x**4 + x**3 + x**2 + x + 1)), x)
\[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=\int { \frac {\sqrt {x^{4} + x^{2} + 1} {\left (x^{2} - 1\right )}}{{\left (x^{4} + x^{3} + x^{2} + x + 1\right )} {\left (x^{2} + 1\right )}} \,d x } \] Input:
integrate((x^2-1)*(x^4+x^2+1)^(1/2)/(x^2+1)/(x^4+x^3+x^2+x+1),x, algorithm ="maxima")
Output:
integrate(sqrt(x^4 + x^2 + 1)*(x^2 - 1)/((x^4 + x^3 + x^2 + x + 1)*(x^2 + 1)), x)
\[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=\int { \frac {\sqrt {x^{4} + x^{2} + 1} {\left (x^{2} - 1\right )}}{{\left (x^{4} + x^{3} + x^{2} + x + 1\right )} {\left (x^{2} + 1\right )}} \,d x } \] Input:
integrate((x^2-1)*(x^4+x^2+1)^(1/2)/(x^2+1)/(x^4+x^3+x^2+x+1),x, algorithm ="giac")
Output:
integrate(sqrt(x^4 + x^2 + 1)*(x^2 - 1)/((x^4 + x^3 + x^2 + x + 1)*(x^2 + 1)), x)
Timed out. \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=\int \frac {\left (x^2-1\right )\,\sqrt {x^4+x^2+1}}{\left (x^2+1\right )\,\left (x^4+x^3+x^2+x+1\right )} \,d x \] Input:
int(((x^2 - 1)*(x^2 + x^4 + 1)^(1/2))/((x^2 + 1)*(x + x^2 + x^3 + x^4 + 1) ),x)
Output:
int(((x^2 - 1)*(x^2 + x^4 + 1)^(1/2))/((x^2 + 1)*(x + x^2 + x^3 + x^4 + 1) ), x)
\[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=-\left (\int \frac {\sqrt {x^{4}+x^{2}+1}}{x^{6}+x^{5}+2 x^{4}+2 x^{3}+2 x^{2}+x +1}d x \right )+\int \frac {\sqrt {x^{4}+x^{2}+1}\, x^{2}}{x^{6}+x^{5}+2 x^{4}+2 x^{3}+2 x^{2}+x +1}d x \] Input:
int((x^2-1)*(x^4+x^2+1)^(1/2)/(x^2+1)/(x^4+x^3+x^2+x+1),x)
Output:
- int(sqrt(x**4 + x**2 + 1)/(x**6 + x**5 + 2*x**4 + 2*x**3 + 2*x**2 + x + 1),x) + int((sqrt(x**4 + x**2 + 1)*x**2)/(x**6 + x**5 + 2*x**4 + 2*x**3 + 2*x**2 + x + 1),x)