Integrand size = 54, antiderivative size = 107 \[ \int \frac {\left (-1+x^2\right ) \left (1-x+x^2-x^3+x^4\right )}{\left (1-x+x^2\right )^2 \left (1+x+x^2\right ) \sqrt {1+3 x^2+x^4}} \, dx=\frac {\sqrt {1+3 x^2+x^4}}{4 \left (1-x+x^2\right )}-\sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} x}{1-x+x^2+\sqrt {1+3 x^2+x^4}}\right )-\frac {\text {arctanh}\left (\frac {\sqrt {2} x}{1+x+x^2+\sqrt {1+3 x^2+x^4}}\right )}{2 \sqrt {2}} \] Output:
(x^4+3*x^2+1)^(1/2)/(4*x^2-4*x+4)-2^(1/2)*arctanh(2^(1/2)*x/(1-x+x^2+(x^4+ 3*x^2+1)^(1/2)))-1/4*2^(1/2)*arctanh(2^(1/2)*x/(1+x+x^2+(x^4+3*x^2+1)^(1/2 )))
Time = 1.61 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.00 \[ \int \frac {\left (-1+x^2\right ) \left (1-x+x^2-x^3+x^4\right )}{\left (1-x+x^2\right )^2 \left (1+x+x^2\right ) \sqrt {1+3 x^2+x^4}} \, dx=\frac {\sqrt {1+3 x^2+x^4}}{4 \left (1-x+x^2\right )}-\sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} x}{1-x+x^2+\sqrt {1+3 x^2+x^4}}\right )-\frac {\text {arctanh}\left (\frac {\sqrt {2} x}{1+x+x^2+\sqrt {1+3 x^2+x^4}}\right )}{2 \sqrt {2}} \] Input:
Integrate[((-1 + x^2)*(1 - x + x^2 - x^3 + x^4))/((1 - x + x^2)^2*(1 + x + x^2)*Sqrt[1 + 3*x^2 + x^4]),x]
Output:
Sqrt[1 + 3*x^2 + x^4]/(4*(1 - x + x^2)) - Sqrt[2]*ArcTanh[(Sqrt[2]*x)/(1 - x + x^2 + Sqrt[1 + 3*x^2 + x^4])] - ArcTanh[(Sqrt[2]*x)/(1 + x + x^2 + Sq rt[1 + 3*x^2 + x^4])]/(2*Sqrt[2])
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 10.13 (sec) , antiderivative size = 5419, normalized size of antiderivative = 50.64, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {7239, 7279, 2009}
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 ) \left (x^4-x^3+x^2-x+1\right )}{\left (x^2-x+1\right )^2 \left (x^2+x+1\right ) \sqrt {x^4+3 x^2+1}} \, dx\) |
\(\Big \downarrow \) 7239 |
\(\displaystyle \int \frac {x^6-x^5+x-1}{\left (x^2-x+1\right )^2 \left (x^2+x+1\right ) \sqrt {x^4+3 x^2+1}}dx\) |
\(\Big \downarrow \) 7279 |
\(\displaystyle \int \left (\frac {-x-2}{4 \left (x^2+x+1\right ) \sqrt {x^4+3 x^2+1}}+\frac {x-8}{4 \left (x^2-x+1\right ) \sqrt {x^4+3 x^2+1}}+\frac {x+1}{2 \left (x^2-x+1\right )^2 \sqrt {x^4+3 x^2+1}}+\frac {1}{\sqrt {x^4+3 x^2+1}}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\left (i+\sqrt {3}\right ) \left (i+3 \sqrt {3}\right ) \sqrt {9-4 \sqrt {5}} \operatorname {EllipticPi}\left (1-\frac {2 \left (3-\sqrt {5}\right )}{\left (i-\sqrt {3}\right )^2},\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right ) \left (2 x^2+\sqrt {5}+3\right )}{24 \left (1-3 i \sqrt {3}+\sqrt {5}+i \sqrt {15}\right ) \sqrt {\frac {2 x^2+\sqrt {5}+3}{2 x^2-\sqrt {5}+3}} \sqrt {x^4+3 x^2+1}}-\frac {\left (i-\sqrt {3}\right ) \left (i+3 \sqrt {3}\right ) \sqrt {9-4 \sqrt {5}} \operatorname {EllipticPi}\left (1-\frac {2 \left (3-\sqrt {5}\right )}{\left (i-\sqrt {3}\right )^2},\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right ) \left (2 x^2+\sqrt {5}+3\right )}{24 \left (1-3 i \sqrt {3}+\sqrt {5}+i \sqrt {15}\right ) \sqrt {\frac {2 x^2+\sqrt {5}+3}{2 x^2-\sqrt {5}+3}} \sqrt {x^4+3 x^2+1}}-\frac {\left (i+\sqrt {3}\right ) \sqrt {9-4 \sqrt {5}} \operatorname {EllipticPi}\left (1-\frac {2 \left (3-\sqrt {5}\right )}{\left (i-\sqrt {3}\right )^2},\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right ) \left (2 x^2+\sqrt {5}+3\right )}{4 \left (5 i+\sqrt {3}-i \sqrt {5}-\sqrt {15}\right ) \sqrt {\frac {2 x^2+\sqrt {5}+3}{2 x^2-\sqrt {5}+3}} \sqrt {x^4+3 x^2+1}}+\frac {\left (i-\sqrt {3}\right ) \left (1+5 i \sqrt {3}\right ) \sqrt {9-4 \sqrt {5}} \operatorname {EllipticPi}\left (1-\frac {2 \left (3-\sqrt {5}\right )}{\left (i-\sqrt {3}\right )^2},\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right ) \left (2 x^2+\sqrt {5}+3\right )}{8 \left (5 i+\sqrt {3}-i \sqrt {5}-\sqrt {15}\right ) \sqrt {\frac {2 x^2+\sqrt {5}+3}{2 x^2-\sqrt {5}+3}} \sqrt {x^4+3 x^2+1}}+\frac {\left (1+i \sqrt {3}\right ) \sqrt {\frac {1}{3} \left (9-4 \sqrt {5}\right )} \operatorname {EllipticPi}\left (1-\frac {2 \left (3-\sqrt {5}\right )}{\left (i-\sqrt {3}\right )^2},\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right ) \left (2 x^2+\sqrt {5}+3\right )}{2 \left (5 i+\sqrt {3}-i \sqrt {5}-\sqrt {15}\right ) \sqrt {\frac {2 x^2+\sqrt {5}+3}{2 x^2-\sqrt {5}+3}} \sqrt {x^4+3 x^2+1}}+\frac {\left (1+3 i \sqrt {3}\right ) \left (i+\sqrt {3}\right ) \sqrt {9-4 \sqrt {5}} \operatorname {EllipticPi}\left (1-\frac {2 \left (3-\sqrt {5}\right )}{\left (i+\sqrt {3}\right )^2},\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right ) \left (2 x^2+\sqrt {5}+3\right )}{24 \left (i-3 \sqrt {3}+i \sqrt {5}+\sqrt {15}\right ) \sqrt {\frac {2 x^2+\sqrt {5}+3}{2 x^2-\sqrt {5}+3}} \sqrt {x^4+3 x^2+1}}-\frac {\left (i-\sqrt {3}\right ) \left (1+3 i \sqrt {3}\right ) \sqrt {9-4 \sqrt {5}} \operatorname {EllipticPi}\left (1-\frac {2 \left (3-\sqrt {5}\right )}{\left (i+\sqrt {3}\right )^2},\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right ) \left (2 x^2+\sqrt {5}+3\right )}{24 \left (i-3 \sqrt {3}+i \sqrt {5}+\sqrt {15}\right ) \sqrt {\frac {2 x^2+\sqrt {5}+3}{2 x^2-\sqrt {5}+3}} \sqrt {x^4+3 x^2+1}}+\frac {\left (1-5 i \sqrt {3}\right ) \left (i+\sqrt {3}\right ) \sqrt {9-4 \sqrt {5}} \operatorname {EllipticPi}\left (1-\frac {2 \left (3-\sqrt {5}\right )}{\left (i+\sqrt {3}\right )^2},\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right ) \left (2 x^2+\sqrt {5}+3\right )}{8 \left (5 i-\sqrt {3}-i \sqrt {5}+\sqrt {15}\right ) \sqrt {\frac {2 x^2+\sqrt {5}+3}{2 x^2-\sqrt {5}+3}} \sqrt {x^4+3 x^2+1}}-\frac {\left (i-\sqrt {3}\right ) \sqrt {9-4 \sqrt {5}} \operatorname {EllipticPi}\left (1-\frac {2 \left (3-\sqrt {5}\right )}{\left (i+\sqrt {3}\right )^2},\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right ) \left (2 x^2+\sqrt {5}+3\right )}{4 \left (5 i-\sqrt {3}-i \sqrt {5}+\sqrt {15}\right ) \sqrt {\frac {2 x^2+\sqrt {5}+3}{2 x^2-\sqrt {5}+3}} \sqrt {x^4+3 x^2+1}}-\frac {\left (1-i \sqrt {3}\right ) \sqrt {\frac {1}{3} \left (9-4 \sqrt {5}\right )} \operatorname {EllipticPi}\left (1-\frac {2 \left (3-\sqrt {5}\right )}{\left (i+\sqrt {3}\right )^2},\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right ) \left (2 x^2+\sqrt {5}+3\right )}{2 \left (5 i-\sqrt {3}-i \sqrt {5}+\sqrt {15}\right ) \sqrt {\frac {2 x^2+\sqrt {5}+3}{2 x^2-\sqrt {5}+3}} \sqrt {x^4+3 x^2+1}}+\frac {\left (i+\sqrt {3}\right ) x \left (2 x^2+\sqrt {5}+3\right )}{24 \left (i-\sqrt {3}\right ) \sqrt {x^4+3 x^2+1}}+\frac {\left (i-\sqrt {3}\right ) x \left (2 x^2+\sqrt {5}+3\right )}{24 \left (i+\sqrt {3}\right ) \sqrt {x^4+3 x^2+1}}+\frac {x \left (2 x^2+\sqrt {5}+3\right )}{12 \left (1+i \sqrt {3}\right ) \sqrt {x^4+3 x^2+1}}+\frac {x \left (2 x^2+\sqrt {5}+3\right )}{12 \left (1-i \sqrt {3}\right ) \sqrt {x^4+3 x^2+1}}-\frac {\left (i-3 \sqrt {3}\right ) \left (i+\sqrt {3}\right ) \arctan \left (\frac {2 \left (2-i \sqrt {3}\right ) x^2-3 i \sqrt {3}+1}{4 \sqrt {1+i \sqrt {3}} \sqrt {x^4+3 x^2+1}}\right )}{48 \left (1+i \sqrt {3}\right )^{3/2}}+\frac {\left (1-5 i \sqrt {3}\right ) \arctan \left (\frac {2 \left (2-i \sqrt {3}\right ) x^2-3 i \sqrt {3}+1}{4 \sqrt {1+i \sqrt {3}} \sqrt {x^4+3 x^2+1}}\right )}{16 \sqrt {1+i \sqrt {3}}}+\frac {\left (1+3 i \sqrt {3}\right ) \arctan \left (\frac {2 \left (2-i \sqrt {3}\right ) x^2-3 i \sqrt {3}+1}{4 \sqrt {1+i \sqrt {3}} \sqrt {x^4+3 x^2+1}}\right )}{24 \left (1+i \sqrt {3}\right )^{3/2}}+\frac {i \arctan \left (\frac {2 \left (2-i \sqrt {3}\right ) x^2-3 i \sqrt {3}+1}{4 \sqrt {1+i \sqrt {3}} \sqrt {x^4+3 x^2+1}}\right )}{4 \sqrt {3 \left (1+i \sqrt {3}\right )}}-\frac {\left (1-i \sqrt {3}\right ) \arctan \left (\frac {2 \left (2-i \sqrt {3}\right ) x^2-3 i \sqrt {3}+1}{4 \sqrt {1+i \sqrt {3}} \sqrt {x^4+3 x^2+1}}\right )}{16 \sqrt {1+i \sqrt {3}}}+\frac {\left (1+5 i \sqrt {3}\right ) \arctan \left (\frac {2 \left (2+i \sqrt {3}\right ) x^2+3 i \sqrt {3}+1}{4 \sqrt {1-i \sqrt {3}} \sqrt {x^4+3 x^2+1}}\right )}{16 \sqrt {1-i \sqrt {3}}}+\frac {\left (1-3 i \sqrt {3}\right ) \arctan \left (\frac {2 \left (2+i \sqrt {3}\right ) x^2+3 i \sqrt {3}+1}{4 \sqrt {1-i \sqrt {3}} \sqrt {x^4+3 x^2+1}}\right )}{24 \left (1-i \sqrt {3}\right )^{3/2}}-\frac {\left (1+i \sqrt {3}\right ) \arctan \left (\frac {2 \left (2+i \sqrt {3}\right ) x^2+3 i \sqrt {3}+1}{4 \sqrt {1-i \sqrt {3}} \sqrt {x^4+3 x^2+1}}\right )}{16 \sqrt {1-i \sqrt {3}}}+\frac {\left (5-i \sqrt {3}\right ) \arctan \left (\frac {2 \left (2+i \sqrt {3}\right ) x^2+3 i \sqrt {3}+1}{4 \sqrt {1-i \sqrt {3}} \sqrt {x^4+3 x^2+1}}\right )}{24 \left (1-i \sqrt {3}\right )^{3/2}}-\frac {i \arctan \left (\frac {2 \left (2+i \sqrt {3}\right ) x^2+3 i \sqrt {3}+1}{4 \sqrt {1-i \sqrt {3}} \sqrt {x^4+3 x^2+1}}\right )}{4 \sqrt {3 \left (1-i \sqrt {3}\right )}}-\frac {\left (i+\sqrt {3}\right ) \sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) E\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right )|\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{24 \left (i-\sqrt {3}\right ) \sqrt {x^4+3 x^2+1}}-\frac {\left (i-\sqrt {3}\right ) \sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) E\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right )|\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{24 \left (i+\sqrt {3}\right ) \sqrt {x^4+3 x^2+1}}-\frac {\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) E\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right )|\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{12 \left (1+i \sqrt {3}\right ) \sqrt {x^4+3 x^2+1}}-\frac {\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) E\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right )|\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{12 \left (1-i \sqrt {3}\right ) \sqrt {x^4+3 x^2+1}}-\frac {\left (5 i+\sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{6 \sqrt {2 \left (3+\sqrt {5}\right )} \left (5 i+\sqrt {3}-i \sqrt {5}-\sqrt {15}\right ) \sqrt {x^4+3 x^2+1}}+\frac {\left (i-\sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{2 \left (2+i \sqrt {3}-\sqrt {5}\right ) \sqrt {6 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}-\frac {\left (i+\sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{2 \left (2-i \sqrt {3}-\sqrt {5}\right ) \sqrt {6 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}+\frac {\left (i-\sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{4 \left (2 i+\sqrt {3}-i \sqrt {5}\right ) \sqrt {2 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}+\frac {\left (7 i-3 \sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{4 \left (2 i+\sqrt {3}-i \sqrt {5}\right ) \sqrt {2 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}+\frac {\left (7 i+3 \sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{4 \left (2 i-\sqrt {3}-i \sqrt {5}\right ) \sqrt {2 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}+\frac {\left (i+\sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{4 \left (2 i-\sqrt {3}-i \sqrt {5}\right ) \sqrt {2 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}-\frac {\left (2 i-\sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{3 \left (i+\sqrt {3}\right ) \left (2+i \sqrt {3}-\sqrt {5}\right ) \sqrt {2 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}-\frac {\left (2 i+\sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{3 \left (i-\sqrt {3}\right ) \left (2-i \sqrt {3}-\sqrt {5}\right ) \sqrt {2 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}-\frac {\left (5 i-\sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{6 \left (i-\sqrt {3}\right ) \left (2-i \sqrt {3}-\sqrt {5}\right ) \sqrt {2 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}+\frac {\left (1+i \sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{24 \sqrt {2 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}+\frac {\left (1-i \sqrt {3}\right ) \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{24 \sqrt {2 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}+\frac {7 \sqrt {\frac {\left (3-\sqrt {5}\right ) x^2+2}{\left (3+\sqrt {5}\right ) x^2+2}} \left (\left (3+\sqrt {5}\right ) x^2+2\right ) \operatorname {EllipticF}\left (\arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x\right ),\frac {1}{2} \left (-5+3 \sqrt {5}\right )\right )}{6 \sqrt {2 \left (3+\sqrt {5}\right )} \sqrt {x^4+3 x^2+1}}+\frac {\left (i+\sqrt {3}\right ) \sqrt {x^4+3 x^2+1}}{6 \left (i-\sqrt {3}\right ) \left (-2 x-i \sqrt {3}+1\right )}+\frac {\sqrt {x^4+3 x^2+1}}{3 \left (1+i \sqrt {3}\right ) \left (-2 x-i \sqrt {3}+1\right )}+\frac {\left (i-\sqrt {3}\right ) \sqrt {x^4+3 x^2+1}}{6 \left (i+\sqrt {3}\right ) \left (-2 x+i \sqrt {3}+1\right )}+\frac {\sqrt {x^4+3 x^2+1}}{3 \left (1-i \sqrt {3}\right ) \left (-2 x+i \sqrt {3}+1\right )}\) |
Input:
Int[((-1 + x^2)*(1 - x + x^2 - x^3 + x^4))/((1 - x + x^2)^2*(1 + x + x^2)* Sqrt[1 + 3*x^2 + x^4]),x]
Output:
(x*(3 + Sqrt[5] + 2*x^2))/(12*(1 - I*Sqrt[3])*Sqrt[1 + 3*x^2 + x^4]) + (x* (3 + Sqrt[5] + 2*x^2))/(12*(1 + I*Sqrt[3])*Sqrt[1 + 3*x^2 + x^4]) + ((I - Sqrt[3])*x*(3 + Sqrt[5] + 2*x^2))/(24*(I + Sqrt[3])*Sqrt[1 + 3*x^2 + x^4]) + ((I + Sqrt[3])*x*(3 + Sqrt[5] + 2*x^2))/(24*(I - Sqrt[3])*Sqrt[1 + 3*x^ 2 + x^4]) + Sqrt[1 + 3*x^2 + x^4]/(3*(1 + I*Sqrt[3])*(1 - I*Sqrt[3] - 2*x) ) + ((I + Sqrt[3])*Sqrt[1 + 3*x^2 + x^4])/(6*(I - Sqrt[3])*(1 - I*Sqrt[3] - 2*x)) + Sqrt[1 + 3*x^2 + x^4]/(3*(1 - I*Sqrt[3])*(1 + I*Sqrt[3] - 2*x)) + ((I - Sqrt[3])*Sqrt[1 + 3*x^2 + x^4])/(6*(I + Sqrt[3])*(1 + I*Sqrt[3] - 2*x)) - ((1 - I*Sqrt[3])*ArcTan[(1 - (3*I)*Sqrt[3] + 2*(2 - I*Sqrt[3])*x^2 )/(4*Sqrt[1 + I*Sqrt[3]]*Sqrt[1 + 3*x^2 + x^4])])/(16*Sqrt[1 + I*Sqrt[3]]) + ((I/4)*ArcTan[(1 - (3*I)*Sqrt[3] + 2*(2 - I*Sqrt[3])*x^2)/(4*Sqrt[1 + I *Sqrt[3]]*Sqrt[1 + 3*x^2 + x^4])])/Sqrt[3*(1 + I*Sqrt[3])] + ((1 + (3*I)*S qrt[3])*ArcTan[(1 - (3*I)*Sqrt[3] + 2*(2 - I*Sqrt[3])*x^2)/(4*Sqrt[1 + I*S qrt[3]]*Sqrt[1 + 3*x^2 + x^4])])/(24*(1 + I*Sqrt[3])^(3/2)) + ((1 - (5*I)* Sqrt[3])*ArcTan[(1 - (3*I)*Sqrt[3] + 2*(2 - I*Sqrt[3])*x^2)/(4*Sqrt[1 + I* Sqrt[3]]*Sqrt[1 + 3*x^2 + x^4])])/(16*Sqrt[1 + I*Sqrt[3]]) - ((I - 3*Sqrt[ 3])*(I + Sqrt[3])*ArcTan[(1 - (3*I)*Sqrt[3] + 2*(2 - I*Sqrt[3])*x^2)/(4*Sq rt[1 + I*Sqrt[3]]*Sqrt[1 + 3*x^2 + x^4])])/(48*(1 + I*Sqrt[3])^(3/2)) - (( I/4)*ArcTan[(1 + (3*I)*Sqrt[3] + 2*(2 + I*Sqrt[3])*x^2)/(4*Sqrt[1 - I*Sqrt [3]]*Sqrt[1 + 3*x^2 + x^4])])/Sqrt[3*(1 - I*Sqrt[3])] + ((5 - I*Sqrt[3]...
Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; Simpl erIntegrandQ[v, u, x]]
Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[ {v = RationalFunctionExpand[u/(a + b*x^n + c*x^(2*n)), x]}, Int[v, x] /; Su mQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]
Time = 5.23 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.80
method | result | size |
risch | \(\frac {\sqrt {x^{4}+3 x^{2}+1}}{4 x^{2}-4 x +4}+\frac {\left (\frac {\operatorname {arctanh}\left (\frac {\left (x^{2}-x +1\right ) \sqrt {2}}{2 \sqrt {x^{4}+3 x^{2}+1}}\right )}{2}-2 \,\operatorname {arctanh}\left (\frac {\left (x^{2}+x +1\right ) \sqrt {2}}{2 \sqrt {x^{4}+3 x^{2}+1}}\right )\right ) \sqrt {2}}{4}\) | \(86\) |
default | \(\frac {\left (x^{2}-x +1\right ) \left (\operatorname {arctanh}\left (\frac {\left (x^{2}-x +1\right ) \sqrt {2}}{2 \sqrt {x^{4}+3 x^{2}+1}}\right )-4 \,\operatorname {arctanh}\left (\frac {\left (x^{2}+x +1\right ) \sqrt {2}}{2 \sqrt {x^{4}+3 x^{2}+1}}\right )\right ) \sqrt {2}+2 \sqrt {x^{4}+3 x^{2}+1}}{8 x^{2}-8 x +8}\) | \(94\) |
pseudoelliptic | \(\frac {\left (x^{2}-x +1\right ) \left (\operatorname {arctanh}\left (\frac {\left (x^{2}-x +1\right ) \sqrt {2}}{2 \sqrt {x^{4}+3 x^{2}+1}}\right )-4 \,\operatorname {arctanh}\left (\frac {\left (x^{2}+x +1\right ) \sqrt {2}}{2 \sqrt {x^{4}+3 x^{2}+1}}\right )\right ) \sqrt {2}+2 \sqrt {x^{4}+3 x^{2}+1}}{8 x^{2}-8 x +8}\) | \(94\) |
trager | \(\frac {\sqrt {x^{4}+3 x^{2}+1}}{4 x^{2}-4 x +4}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) \ln \left (-\frac {-7 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{10}-29 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{9}+10 \sqrt {x^{4}+3 x^{2}+1}\, x^{8}-89 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{8}+40 \sqrt {x^{4}+3 x^{2}+1}\, x^{7}-190 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{7}+116 \sqrt {x^{4}+3 x^{2}+1}\, x^{6}-283 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{6}+192 \sqrt {x^{4}+3 x^{2}+1}\, x^{5}-363 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{5}+270 x^{4} \sqrt {x^{4}+3 x^{2}+1}-283 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{4}+192 \sqrt {x^{4}+3 x^{2}+1}\, x^{3}-190 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{3}+116 \sqrt {x^{4}+3 x^{2}+1}\, x^{2}-89 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x^{2}+40 \sqrt {x^{4}+3 x^{2}+1}\, x -29 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x +10 \sqrt {x^{4}+3 x^{2}+1}-7 \operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right )}{\left (x^{2}+x +1\right ) \left (x^{2}-x +1\right )^{4}}\right )}{8}\) | \(320\) |
elliptic | \(-\frac {\sqrt {-\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+5}\, \left (3 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {-\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+5}\, \sqrt {2}}{4}\right )+\sqrt {6}\, \arctan \left (\frac {2 \sqrt {6}\, \sqrt {-\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+5}\, \left (x^{2}-1\right )}{3 \left (\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}-5\right ) \left (-x^{2}-1\right )}\right )\right )}{12 \sqrt {-\frac {\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}-5}{\left (1+\frac {x^{2}-1}{-x^{2}-1}\right )^{2}}}\, \left (1+\frac {x^{2}-1}{-x^{2}-1}\right )}-\frac {\sqrt {-\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+5}\, \left (\frac {3 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {-\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+5}\, \sqrt {2}}{4}\right ) \left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}-\frac {2 \sqrt {6}\, \arctan \left (\frac {2 \sqrt {6}\, \sqrt {-\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+5}\, \left (x^{2}-1\right )}{3 \left (\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}-5\right ) \left (-x^{2}-1\right )}\right ) \left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+9 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {-\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+5}\, \sqrt {2}}{4}\right )-6 \sqrt {6}\, \arctan \left (\frac {2 \sqrt {6}\, \sqrt {-\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+5}\, \left (x^{2}-1\right )}{3 \left (\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}-5\right ) \left (-x^{2}-1\right )}\right )-12 \sqrt {-\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+5}\right )}{24 \sqrt {-\frac {\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}-5}{\left (1+\frac {x^{2}-1}{-x^{2}-1}\right )^{2}}}\, \left (1+\frac {x^{2}-1}{-x^{2}-1}\right ) \left (\frac {\left (x^{2}-1\right )^{2}}{\left (-x^{2}-1\right )^{2}}+3\right )}+\frac {\left (\frac {1}{8+\frac {4 \sqrt {x^{4}+3 x^{2}+1}\, \sqrt {2}}{x}}-\frac {5 \ln \left (1+\frac {\sqrt {x^{4}+3 x^{2}+1}\, \sqrt {2}}{2 x}\right )}{8}+\frac {1}{-8+\frac {4 \sqrt {x^{4}+3 x^{2}+1}\, \sqrt {2}}{x}}+\frac {5 \ln \left (-1+\frac {\sqrt {x^{4}+3 x^{2}+1}\, \sqrt {2}}{2 x}\right )}{8}\right ) \sqrt {2}}{2}\) | \(661\) |
Input:
int((x^2-1)*(x^4-x^3+x^2-x+1)/(x^2-x+1)^2/(x^2+x+1)/(x^4+3*x^2+1)^(1/2),x, method=_RETURNVERBOSE)
Output:
1/4*(x^4+3*x^2+1)^(1/2)/(x^2-x+1)+1/4*(1/2*arctanh(1/2*(x^2-x+1)*2^(1/2)/( x^4+3*x^2+1)^(1/2))-2*arctanh(1/2*(x^2+x+1)*2^(1/2)/(x^4+3*x^2+1)^(1/2)))* 2^(1/2)
Leaf count of result is larger than twice the leaf count of optimal. 184 vs. \(2 (89) = 178\).
Time = 0.15 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.72 \[ \int \frac {\left (-1+x^2\right ) \left (1-x+x^2-x^3+x^4\right )}{\left (1-x+x^2\right )^2 \left (1+x+x^2\right ) \sqrt {1+3 x^2+x^4}} \, dx=\frac {\sqrt {2} {\left (x^{2} - x + 1\right )} \log \left (\frac {3 \, x^{4} - 2 \, x^{3} + 2 \, \sqrt {2} \sqrt {x^{4} + 3 \, x^{2} + 1} {\left (x^{2} - x + 1\right )} + 9 \, x^{2} - 2 \, x + 3}{x^{4} + 2 \, x^{3} + 3 \, x^{2} + 2 \, x + 1}\right ) + 4 \, \sqrt {2} {\left (x^{2} - x + 1\right )} \log \left (\frac {3 \, x^{4} + 2 \, x^{3} - 2 \, \sqrt {2} \sqrt {x^{4} + 3 \, x^{2} + 1} {\left (x^{2} + x + 1\right )} + 9 \, x^{2} + 2 \, x + 3}{x^{4} - 2 \, x^{3} + 3 \, x^{2} - 2 \, x + 1}\right ) + 4 \, \sqrt {x^{4} + 3 \, x^{2} + 1}}{16 \, {\left (x^{2} - x + 1\right )}} \] Input:
integrate((x^2-1)*(x^4-x^3+x^2-x+1)/(x^2-x+1)^2/(x^2+x+1)/(x^4+3*x^2+1)^(1 /2),x, algorithm="fricas")
Output:
1/16*(sqrt(2)*(x^2 - x + 1)*log((3*x^4 - 2*x^3 + 2*sqrt(2)*sqrt(x^4 + 3*x^ 2 + 1)*(x^2 - x + 1) + 9*x^2 - 2*x + 3)/(x^4 + 2*x^3 + 3*x^2 + 2*x + 1)) + 4*sqrt(2)*(x^2 - x + 1)*log((3*x^4 + 2*x^3 - 2*sqrt(2)*sqrt(x^4 + 3*x^2 + 1)*(x^2 + x + 1) + 9*x^2 + 2*x + 3)/(x^4 - 2*x^3 + 3*x^2 - 2*x + 1)) + 4* sqrt(x^4 + 3*x^2 + 1))/(x^2 - x + 1)
\[ \int \frac {\left (-1+x^2\right ) \left (1-x+x^2-x^3+x^4\right )}{\left (1-x+x^2\right )^2 \left (1+x+x^2\right ) \sqrt {1+3 x^2+x^4}} \, dx=\int \frac {\left (x - 1\right ) \left (x + 1\right ) \left (x^{4} - x^{3} + x^{2} - x + 1\right )}{\left (x^{2} - x + 1\right )^{2} \left (x^{2} + x + 1\right ) \sqrt {x^{4} + 3 x^{2} + 1}}\, dx \] Input:
integrate((x**2-1)*(x**4-x**3+x**2-x+1)/(x**2-x+1)**2/(x**2+x+1)/(x**4+3*x **2+1)**(1/2),x)
Output:
Integral((x - 1)*(x + 1)*(x**4 - x**3 + x**2 - x + 1)/((x**2 - x + 1)**2*( x**2 + x + 1)*sqrt(x**4 + 3*x**2 + 1)), x)
\[ \int \frac {\left (-1+x^2\right ) \left (1-x+x^2-x^3+x^4\right )}{\left (1-x+x^2\right )^2 \left (1+x+x^2\right ) \sqrt {1+3 x^2+x^4}} \, dx=\int { \frac {{\left (x^{4} - x^{3} + x^{2} - x + 1\right )} {\left (x^{2} - 1\right )}}{\sqrt {x^{4} + 3 \, x^{2} + 1} {\left (x^{2} + x + 1\right )} {\left (x^{2} - x + 1\right )}^{2}} \,d x } \] Input:
integrate((x^2-1)*(x^4-x^3+x^2-x+1)/(x^2-x+1)^2/(x^2+x+1)/(x^4+3*x^2+1)^(1 /2),x, algorithm="maxima")
Output:
integrate((x^4 - x^3 + x^2 - x + 1)*(x^2 - 1)/(sqrt(x^4 + 3*x^2 + 1)*(x^2 + x + 1)*(x^2 - x + 1)^2), x)
\[ \int \frac {\left (-1+x^2\right ) \left (1-x+x^2-x^3+x^4\right )}{\left (1-x+x^2\right )^2 \left (1+x+x^2\right ) \sqrt {1+3 x^2+x^4}} \, dx=\int { \frac {{\left (x^{4} - x^{3} + x^{2} - x + 1\right )} {\left (x^{2} - 1\right )}}{\sqrt {x^{4} + 3 \, x^{2} + 1} {\left (x^{2} + x + 1\right )} {\left (x^{2} - x + 1\right )}^{2}} \,d x } \] Input:
integrate((x^2-1)*(x^4-x^3+x^2-x+1)/(x^2-x+1)^2/(x^2+x+1)/(x^4+3*x^2+1)^(1 /2),x, algorithm="giac")
Output:
integrate((x^4 - x^3 + x^2 - x + 1)*(x^2 - 1)/(sqrt(x^4 + 3*x^2 + 1)*(x^2 + x + 1)*(x^2 - x + 1)^2), x)
Timed out. \[ \int \frac {\left (-1+x^2\right ) \left (1-x+x^2-x^3+x^4\right )}{\left (1-x+x^2\right )^2 \left (1+x+x^2\right ) \sqrt {1+3 x^2+x^4}} \, dx=\int \frac {\left (x^2-1\right )\,\left (x^4-x^3+x^2-x+1\right )}{{\left (x^2-x+1\right )}^2\,\sqrt {x^4+3\,x^2+1}\,\left (x^2+x+1\right )} \,d x \] Input:
int(((x^2 - 1)*(x^2 - x - x^3 + x^4 + 1))/((x^2 - x + 1)^2*(3*x^2 + x^4 + 1)^(1/2)*(x + x^2 + 1)),x)
Output:
int(((x^2 - 1)*(x^2 - x - x^3 + x^4 + 1))/((x^2 - x + 1)^2*(3*x^2 + x^4 + 1)^(1/2)*(x + x^2 + 1)), x)
\[ \int \frac {\left (-1+x^2\right ) \left (1-x+x^2-x^3+x^4\right )}{\left (1-x+x^2\right )^2 \left (1+x+x^2\right ) \sqrt {1+3 x^2+x^4}} \, dx=\frac {\sqrt {x^{4}+3 x^{2}+1}-3 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right ) x^{2}+3 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right ) x -3 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right )+3 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}\, x^{6}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right ) x^{2}-3 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}\, x^{6}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right ) x +3 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}\, x^{6}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right )+2 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}\, x^{4}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right ) x^{2}-2 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}\, x^{4}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right ) x +2 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}\, x^{4}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right )-2 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}\, x^{2}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right ) x^{2}+2 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}\, x^{2}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right ) x -2 \left (\int \frac {\sqrt {x^{4}+3 x^{2}+1}\, x^{2}}{x^{10}-x^{9}+5 x^{8}-4 x^{7}+9 x^{6}-5 x^{5}+9 x^{4}-4 x^{3}+5 x^{2}-x +1}d x \right )}{2 x^{2}-2 x +2} \] Input:
int((x^2-1)*(x^4-x^3+x^2-x+1)/(x^2-x+1)^2/(x^2+x+1)/(x^4+3*x^2+1)^(1/2),x)
Output:
(sqrt(x**4 + 3*x**2 + 1) - 3*int(sqrt(x**4 + 3*x**2 + 1)/(x**10 - x**9 + 5 *x**8 - 4*x**7 + 9*x**6 - 5*x**5 + 9*x**4 - 4*x**3 + 5*x**2 - x + 1),x)*x* *2 + 3*int(sqrt(x**4 + 3*x**2 + 1)/(x**10 - x**9 + 5*x**8 - 4*x**7 + 9*x** 6 - 5*x**5 + 9*x**4 - 4*x**3 + 5*x**2 - x + 1),x)*x - 3*int(sqrt(x**4 + 3* x**2 + 1)/(x**10 - x**9 + 5*x**8 - 4*x**7 + 9*x**6 - 5*x**5 + 9*x**4 - 4*x **3 + 5*x**2 - x + 1),x) + 3*int((sqrt(x**4 + 3*x**2 + 1)*x**6)/(x**10 - x **9 + 5*x**8 - 4*x**7 + 9*x**6 - 5*x**5 + 9*x**4 - 4*x**3 + 5*x**2 - x + 1 ),x)*x**2 - 3*int((sqrt(x**4 + 3*x**2 + 1)*x**6)/(x**10 - x**9 + 5*x**8 - 4*x**7 + 9*x**6 - 5*x**5 + 9*x**4 - 4*x**3 + 5*x**2 - x + 1),x)*x + 3*int( (sqrt(x**4 + 3*x**2 + 1)*x**6)/(x**10 - x**9 + 5*x**8 - 4*x**7 + 9*x**6 - 5*x**5 + 9*x**4 - 4*x**3 + 5*x**2 - x + 1),x) + 2*int((sqrt(x**4 + 3*x**2 + 1)*x**4)/(x**10 - x**9 + 5*x**8 - 4*x**7 + 9*x**6 - 5*x**5 + 9*x**4 - 4* x**3 + 5*x**2 - x + 1),x)*x**2 - 2*int((sqrt(x**4 + 3*x**2 + 1)*x**4)/(x** 10 - x**9 + 5*x**8 - 4*x**7 + 9*x**6 - 5*x**5 + 9*x**4 - 4*x**3 + 5*x**2 - x + 1),x)*x + 2*int((sqrt(x**4 + 3*x**2 + 1)*x**4)/(x**10 - x**9 + 5*x**8 - 4*x**7 + 9*x**6 - 5*x**5 + 9*x**4 - 4*x**3 + 5*x**2 - x + 1),x) - 2*int ((sqrt(x**4 + 3*x**2 + 1)*x**2)/(x**10 - x**9 + 5*x**8 - 4*x**7 + 9*x**6 - 5*x**5 + 9*x**4 - 4*x**3 + 5*x**2 - x + 1),x)*x**2 + 2*int((sqrt(x**4 + 3 *x**2 + 1)*x**2)/(x**10 - x**9 + 5*x**8 - 4*x**7 + 9*x**6 - 5*x**5 + 9*x** 4 - 4*x**3 + 5*x**2 - x + 1),x)*x - 2*int((sqrt(x**4 + 3*x**2 + 1)*x**2...