Integrand size = 66, antiderivative size = 89 \[ \int \frac {(-1+x)^2 \left (x-2 x^2+2 x^3\right )}{(-1+2 x) \sqrt {\frac {1-2 x}{1+2 x^2}} \left (-2+4 x+3 x^2-4 x^3+2 x^4\right )} \, dx=\frac {\sqrt {\frac {1-2 x}{1+2 x^2}} \left (1-x+2 x^2-2 x^3\right )}{3 (-1+2 x)}-\frac {\text {arctanh}\left (\frac {-\frac {1}{\sqrt {3}}+\frac {x}{\sqrt {3}}}{\sqrt {\frac {1-2 x}{1+2 x^2}}}\right )}{\sqrt {3}} \]
((1-2*x)/(2*x^2+1))^(1/2)*(-2*x^3+2*x^2-x+1)/(-3+6*x)-1/3*arctanh((-1/3*3^ (1/2)+1/3*x*3^(1/2))/((1-2*x)/(2*x^2+1))^(1/2))*3^(1/2)
Time = 10.85 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.81 \[ \int \frac {(-1+x)^2 \left (x-2 x^2+2 x^3\right )}{(-1+2 x) \sqrt {\frac {1-2 x}{1+2 x^2}} \left (-2+4 x+3 x^2-4 x^3+2 x^4\right )} \, dx=\frac {\sqrt {\frac {1-2 x}{1+2 x^2}} \left (-1+x-2 x^2+2 x^3\right )}{3-6 x}-\frac {\text {arctanh}\left (\frac {-1+x}{\sqrt {\frac {3-6 x}{1+2 x^2}}}\right )}{\sqrt {3}} \]
Integrate[((-1 + x)^2*(x - 2*x^2 + 2*x^3))/((-1 + 2*x)*Sqrt[(1 - 2*x)/(1 + 2*x^2)]*(-2 + 4*x + 3*x^2 - 4*x^3 + 2*x^4)),x]
(Sqrt[(1 - 2*x)/(1 + 2*x^2)]*(-1 + x - 2*x^2 + 2*x^3))/(3 - 6*x) - ArcTanh [(-1 + x)/Sqrt[(3 - 6*x)/(1 + 2*x^2)]]/Sqrt[3]
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 {(x-1)^2 \left (2 x^3-2 x^2+x\right )}{(2 x-1) \sqrt {\frac {1-2 x}{2 x^2+1}} \left (2 x^4-4 x^3+3 x^2+4 x-2\right )} \, dx\) |
\(\Big \downarrow \) 2028 |
\(\displaystyle \int \frac {(x-1)^2 x \left (2 x^2-2 x+1\right )}{(2 x-1) \sqrt {\frac {1-2 x}{2 x^2+1}} \left (2 x^4-4 x^3+3 x^2+4 x-2\right )}dx\) |
\(\Big \downarrow \) 7270 |
\(\displaystyle \frac {\sqrt {1-2 x} \int \frac {(1-x)^2 x \sqrt {2 x^2+1} \left (2 x^2-2 x+1\right )}{(1-2 x)^{3/2} \left (-2 x^4+4 x^3-3 x^2-4 x+2\right )}dx}{\sqrt {\frac {1-2 x}{2 x^2+1}} \sqrt {2 x^2+1}}\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \frac {\sqrt {1-2 x} \int \left (-\frac {\sqrt {2 x^2+1} x}{(1-2 x)^{3/2}}+\frac {\sqrt {2 x^2+1}}{(1-2 x)^{3/2}}-\frac {\sqrt {2 x^2+1} \left (5 x^2-7 x+2\right )}{(1-2 x)^{3/2} \left (-2 x^4+4 x^3-3 x^2-4 x+2\right )}\right )dx}{\sqrt {\frac {1-2 x}{2 x^2+1}} \sqrt {2 x^2+1}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\sqrt {1-2 x} \left (\frac {8}{3} \sqrt {2} \text {Subst}\left (\int \frac {\sqrt {x^4-2 x^2+3}}{x^8-20 x^2+3}dx,x,\sqrt {1-2 x}\right )-5 \sqrt {2} \text {Subst}\left (\int \frac {x^2 \sqrt {x^4-2 x^2+3}}{x^8-20 x^2+3}dx,x,\sqrt {1-2 x}\right )-\frac {1}{3} \sqrt {2} \text {Subst}\left (\int \frac {x^6 \sqrt {x^4-2 x^2+3}}{x^8-20 x^2+3}dx,x,\sqrt {1-2 x}\right )+\frac {\left (2-\sqrt {3}\right ) \left (-2 x+\sqrt {3}+1\right ) \sqrt {\frac {2 x^2+1}{\left (-2 x+\sqrt {3}+1\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt {1-2 x}}{\sqrt [4]{3}}\right ),\frac {1}{6} \left (3+\sqrt {3}\right )\right )}{\sqrt {2} 3^{3/4} \sqrt {2 x^2+1}}-\frac {\sqrt {2} \left (1-\sqrt {3}\right ) \left (-2 x+\sqrt {3}+1\right ) \sqrt {\frac {2 x^2+1}{\left (-2 x+\sqrt {3}+1\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt {1-2 x}}{\sqrt [4]{3}}\right ),\frac {1}{6} \left (3+\sqrt {3}\right )\right )}{3 \sqrt [4]{3} \sqrt {2 x^2+1}}+\frac {\left (1-\sqrt {3}\right ) \left (-2 x+\sqrt {3}+1\right ) \sqrt {\frac {2 x^2+1}{\left (-2 x+\sqrt {3}+1\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt {1-2 x}}{\sqrt [4]{3}}\right ),\frac {1}{6} \left (3+\sqrt {3}\right )\right )}{\sqrt {2} \sqrt [4]{3} \sqrt {2 x^2+1}}+\frac {\sqrt {2} \sqrt [4]{3} \left (-2 x+\sqrt {3}+1\right ) \sqrt {\frac {2 x^2+1}{\left (-2 x+\sqrt {3}+1\right )^2}} E\left (2 \arctan \left (\frac {\sqrt {1-2 x}}{\sqrt [4]{3}}\right )|\frac {1}{6} \left (3+\sqrt {3}\right )\right )}{\sqrt {2 x^2+1}}-\frac {4 \sqrt {2} \left (-2 x+\sqrt {3}+1\right ) \sqrt {\frac {2 x^2+1}{\left (-2 x+\sqrt {3}+1\right )^2}} E\left (2 \arctan \left (\frac {\sqrt {1-2 x}}{\sqrt [4]{3}}\right )|\frac {1}{6} \left (3+\sqrt {3}\right )\right )}{3^{3/4} \sqrt {2 x^2+1}}-\frac {\sqrt {2 x^2+1} (2-x)}{3 \sqrt {1-2 x}}+\frac {\sqrt {2 x^2+1}}{3 \sqrt {1-2 x}}+\frac {2 \sqrt {1-2 x} \sqrt {2 x^2+1}}{3 \left (-2 x+\sqrt {3}+1\right )}\right )}{\sqrt {\frac {1-2 x}{2 x^2+1}} \sqrt {2 x^2+1}}\) |
Int[((-1 + x)^2*(x - 2*x^2 + 2*x^3))/((-1 + 2*x)*Sqrt[(1 - 2*x)/(1 + 2*x^2 )]*(-2 + 4*x + 3*x^2 - 4*x^3 + 2*x^4)),x]
3.13.22.3.1 Defintions of rubi rules used
Int[(Fx_.)*((a_.)*(x_)^(r_.) + (b_.)*(x_)^(s_.) + (c_.)*(x_)^(t_.))^(p_.), x_Symbol] :> Int[x^(p*r)*(a + b*x^(s - r) + c*x^(t - r))^p*Fx, x] /; FreeQ[ {a, b, c, r, s, t}, x] && IntegerQ[p] && PosQ[s - r] && PosQ[t - r] && !(E qQ[p, 1] && EqQ[u, 1])
Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Simp[a^IntPart[p ]*((a*v^m*w^n)^FracPart[p]/(v^(m*FracPart[p])*w^(n*FracPart[p]))) Int[u*v ^(m*p)*w^(n*p), x], x] /; FreeQ[{a, m, n, p}, x] && !IntegerQ[p] && !Free Q[v, x] && !FreeQ[w, x]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 3.49 (sec) , antiderivative size = 209, normalized size of antiderivative = 2.35
method | result | size |
trager | \(-\frac {\left (2 x^{2}+1\right ) \left (x -1\right ) \sqrt {-\frac {-1+2 x}{2 x^{2}+1}}}{3 \left (-1+2 x \right )}-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) \ln \left (\frac {2 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) x^{4}-4 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) x^{3}+12 \sqrt {-\frac {-1+2 x}{2 x^{2}+1}}\, x^{3}+3 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) x^{2}-12 \sqrt {-\frac {-1+2 x}{2 x^{2}+1}}\, x^{2}-8 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right ) x +6 \sqrt {-\frac {-1+2 x}{2 x^{2}+1}}\, x +4 \operatorname {RootOf}\left (\textit {\_Z}^{2}-3\right )-6 \sqrt {-\frac {-1+2 x}{2 x^{2}+1}}}{2 x^{4}-4 x^{3}+3 x^{2}+4 x -2}\right )}{6}\) | \(209\) |
default | \(\frac {i \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (2 \textit {\_Z}^{4}-4 \textit {\_Z}^{3}+3 \textit {\_Z}^{2}+4 \textit {\_Z} -2\right )}{\sum }\frac {\left (2 \underline {\hspace {1.25 ex}}\alpha ^{3}-2 \underline {\hspace {1.25 ex}}\alpha ^{2}+\underline {\hspace {1.25 ex}}\alpha -1\right ) \sqrt {-i \left (i \sqrt {2}+2 x \right )}\, \sqrt {-\frac {-1+2 x}{1+i \sqrt {2}}}\, \sqrt {-i \left (i \sqrt {2}-2 x \right )}\, \left (-2 \underline {\hspace {1.25 ex}}\alpha ^{3}+6 \underline {\hspace {1.25 ex}}\alpha ^{2}-6 \underline {\hspace {1.25 ex}}\alpha -4+i \sqrt {2}\, \left (2 \underline {\hspace {1.25 ex}}\alpha ^{3}-3 \underline {\hspace {1.25 ex}}\alpha ^{2}+7\right )\right ) \operatorname {EllipticPi}\left (\frac {\sqrt {-i \left (i \sqrt {2}+2 x \right ) \sqrt {2}}}{2}, \frac {4 \underline {\hspace {1.25 ex}}\alpha ^{3}}{9}-\frac {2 \underline {\hspace {1.25 ex}}\alpha ^{2}}{3}+\frac {2 i \sqrt {2}\, \underline {\hspace {1.25 ex}}\alpha ^{3}}{9}-\frac {2 i \sqrt {2}\, \underline {\hspace {1.25 ex}}\alpha ^{2}}{3}+\frac {14}{9}+\frac {2 i \underline {\hspace {1.25 ex}}\alpha \sqrt {2}}{3}+\frac {4 i \sqrt {2}}{9}, \sqrt {2}\, \sqrt {\frac {i \sqrt {2}}{1+i \sqrt {2}}}\right )}{\sqrt {-4 x^{3}+2 x^{2}-2 x +1}}\right ) \sqrt {-\left (-1+2 x \right ) \left (2 x^{2}+1\right )}-9 \sqrt {-4 x^{3}+2 x^{2}-2 x +1}\, \sqrt {-\left (-1+2 x \right ) \left (2 x^{2}+1\right )}-18 x^{2}-9}{54 \sqrt {-\frac {-1+2 x}{2 x^{2}+1}}\, \left (2 x^{2}+1\right )}\) | \(314\) |
int((x-1)^2*(2*x^3-2*x^2+x)/(-1+2*x)/((1-2*x)/(2*x^2+1))^(1/2)/(2*x^4-4*x^ 3+3*x^2+4*x-2),x,method=_RETURNVERBOSE)
-1/3*(2*x^2+1)*(x-1)/(-1+2*x)*(-(-1+2*x)/(2*x^2+1))^(1/2)-1/6*RootOf(_Z^2- 3)*ln((2*RootOf(_Z^2-3)*x^4-4*RootOf(_Z^2-3)*x^3+12*(-(-1+2*x)/(2*x^2+1))^ (1/2)*x^3+3*RootOf(_Z^2-3)*x^2-12*(-(-1+2*x)/(2*x^2+1))^(1/2)*x^2-8*RootOf (_Z^2-3)*x+6*(-(-1+2*x)/(2*x^2+1))^(1/2)*x+4*RootOf(_Z^2-3)-6*(-(-1+2*x)/( 2*x^2+1))^(1/2))/(2*x^4-4*x^3+3*x^2+4*x-2))
Leaf count of result is larger than twice the leaf count of optimal. 195 vs. \(2 (78) = 156\).
Time = 0.33 (sec) , antiderivative size = 195, normalized size of antiderivative = 2.19 \[ \int \frac {(-1+x)^2 \left (x-2 x^2+2 x^3\right )}{(-1+2 x) \sqrt {\frac {1-2 x}{1+2 x^2}} \left (-2+4 x+3 x^2-4 x^3+2 x^4\right )} \, dx=\frac {\sqrt {3} {\left (2 \, x - 1\right )} \log \left (-\frac {4 \, x^{8} - 16 \, x^{7} + 28 \, x^{6} - 104 \, x^{5} + 209 \, x^{4} - 200 \, x^{3} + 172 \, x^{2} - 4 \, \sqrt {3} {\left (4 \, x^{7} - 12 \, x^{6} + 16 \, x^{5} - 28 \, x^{4} + 31 \, x^{3} - 19 \, x^{2} + 12 \, x - 4\right )} \sqrt {-\frac {2 \, x - 1}{2 \, x^{2} + 1}} - 112 \, x + 28}{4 \, x^{8} - 16 \, x^{7} + 28 \, x^{6} - 8 \, x^{5} - 31 \, x^{4} + 40 \, x^{3} + 4 \, x^{2} - 16 \, x + 4}\right ) - 4 \, {\left (2 \, x^{3} - 2 \, x^{2} + x - 1\right )} \sqrt {-\frac {2 \, x - 1}{2 \, x^{2} + 1}}}{12 \, {\left (2 \, x - 1\right )}} \]
integrate((-1+x)^2*(2*x^3-2*x^2+x)/(-1+2*x)/((1-2*x)/(2*x^2+1))^(1/2)/(2*x ^4-4*x^3+3*x^2+4*x-2),x, algorithm="fricas")
1/12*(sqrt(3)*(2*x - 1)*log(-(4*x^8 - 16*x^7 + 28*x^6 - 104*x^5 + 209*x^4 - 200*x^3 + 172*x^2 - 4*sqrt(3)*(4*x^7 - 12*x^6 + 16*x^5 - 28*x^4 + 31*x^3 - 19*x^2 + 12*x - 4)*sqrt(-(2*x - 1)/(2*x^2 + 1)) - 112*x + 28)/(4*x^8 - 16*x^7 + 28*x^6 - 8*x^5 - 31*x^4 + 40*x^3 + 4*x^2 - 16*x + 4)) - 4*(2*x^3 - 2*x^2 + x - 1)*sqrt(-(2*x - 1)/(2*x^2 + 1)))/(2*x - 1)
Timed out. \[ \int \frac {(-1+x)^2 \left (x-2 x^2+2 x^3\right )}{(-1+2 x) \sqrt {\frac {1-2 x}{1+2 x^2}} \left (-2+4 x+3 x^2-4 x^3+2 x^4\right )} \, dx=\text {Timed out} \]
integrate((-1+x)**2*(2*x**3-2*x**2+x)/(-1+2*x)/((1-2*x)/(2*x**2+1))**(1/2) /(2*x**4-4*x**3+3*x**2+4*x-2),x)
\[ \int \frac {(-1+x)^2 \left (x-2 x^2+2 x^3\right )}{(-1+2 x) \sqrt {\frac {1-2 x}{1+2 x^2}} \left (-2+4 x+3 x^2-4 x^3+2 x^4\right )} \, dx=\int { \frac {{\left (2 \, x^{3} - 2 \, x^{2} + x\right )} {\left (x - 1\right )}^{2}}{{\left (2 \, x^{4} - 4 \, x^{3} + 3 \, x^{2} + 4 \, x - 2\right )} {\left (2 \, x - 1\right )} \sqrt {-\frac {2 \, x - 1}{2 \, x^{2} + 1}}} \,d x } \]
integrate((-1+x)^2*(2*x^3-2*x^2+x)/(-1+2*x)/((1-2*x)/(2*x^2+1))^(1/2)/(2*x ^4-4*x^3+3*x^2+4*x-2),x, algorithm="maxima")
integrate((2*x^3 - 2*x^2 + x)*(x - 1)^2/((2*x^4 - 4*x^3 + 3*x^2 + 4*x - 2) *(2*x - 1)*sqrt(-(2*x - 1)/(2*x^2 + 1))), x)
\[ \int \frac {(-1+x)^2 \left (x-2 x^2+2 x^3\right )}{(-1+2 x) \sqrt {\frac {1-2 x}{1+2 x^2}} \left (-2+4 x+3 x^2-4 x^3+2 x^4\right )} \, dx=\int { \frac {{\left (2 \, x^{3} - 2 \, x^{2} + x\right )} {\left (x - 1\right )}^{2}}{{\left (2 \, x^{4} - 4 \, x^{3} + 3 \, x^{2} + 4 \, x - 2\right )} {\left (2 \, x - 1\right )} \sqrt {-\frac {2 \, x - 1}{2 \, x^{2} + 1}}} \,d x } \]
integrate((-1+x)^2*(2*x^3-2*x^2+x)/(-1+2*x)/((1-2*x)/(2*x^2+1))^(1/2)/(2*x ^4-4*x^3+3*x^2+4*x-2),x, algorithm="giac")
integrate((2*x^3 - 2*x^2 + x)*(x - 1)^2/((2*x^4 - 4*x^3 + 3*x^2 + 4*x - 2) *(2*x - 1)*sqrt(-(2*x - 1)/(2*x^2 + 1))), x)
Timed out. \[ \int \frac {(-1+x)^2 \left (x-2 x^2+2 x^3\right )}{(-1+2 x) \sqrt {\frac {1-2 x}{1+2 x^2}} \left (-2+4 x+3 x^2-4 x^3+2 x^4\right )} \, dx=\int \frac {{\left (x-1\right )}^2\,\left (2\,x^3-2\,x^2+x\right )}{\left (2\,x-1\right )\,\sqrt {-\frac {2\,x-1}{2\,x^2+1}}\,\left (2\,x^4-4\,x^3+3\,x^2+4\,x-2\right )} \,d x \]
int(((x - 1)^2*(x - 2*x^2 + 2*x^3))/((2*x - 1)*(-(2*x - 1)/(2*x^2 + 1))^(1 /2)*(4*x + 3*x^2 - 4*x^3 + 2*x^4 - 2)),x)