3.6.93 \(\int \frac {-x+x^2}{\sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}} \, dx\)

Optimal. Leaf size=46 \[ \frac {2}{3} \tanh ^{-1}\left (\frac {(x-1) \left (x^3-2\right )}{x \sqrt {x^6-2 x^5+x^4-2 x^3+4 x^2-2 x}}\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.61, antiderivative size = 113, normalized size of antiderivative = 2.46, number of steps used = 8, number of rules used = 8, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.216, Rules used = {1593, 2056, 6688, 6719, 329, 275, 217, 206} \begin {gather*} -\frac {2 (1-x) \sqrt {x} \sqrt {x^3-2} \sqrt {x^5-2 x^4+x^3-2 x^2+4 x-2} \tanh ^{-1}\left (\frac {x^{3/2}}{\sqrt {x^3-2}}\right )}{3 \sqrt {-(1-x)^2 \left (2-x^3\right )} \sqrt {x^6-2 x^5+x^4-2 x^3+4 x^2-2 x}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-x + x^2)/Sqrt[-2*x + 4*x^2 - 2*x^3 + x^4 - 2*x^5 + x^6],x]

[Out]

(-2*(1 - x)*Sqrt[x]*Sqrt[-2 + x^3]*Sqrt[-2 + 4*x - 2*x^2 + x^3 - 2*x^4 + x^5]*ArcTanh[x^(3/2)/Sqrt[-2 + x^3]])
/(3*Sqrt[-((1 - x)^2*(2 - x^3))]*Sqrt[-2*x + 4*x^2 - 2*x^3 + x^4 - 2*x^5 + x^6])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 275

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = GCD[m + 1, n]}, Dist[1/k, Subst[Int[x^((m
 + 1)/k - 1)*(a + b*x^(n/k))^p, x], x, x^k], x] /; k != 1] /; FreeQ[{a, b, p}, x] && IGtQ[n, 0] && IntegerQ[m]

Rule 329

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k/c, Subst[I
nt[x^(k*(m + 1) - 1)*(a + (b*x^(k*n))/c^n)^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0]
 && FractionQ[m] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 2056

Int[(u_.)*(P_)^(p_.), x_Symbol] :> With[{m = MinimumMonomialExponent[P, x]}, Dist[P^FracPart[p]/(x^(m*FracPart
[p])*Distrib[1/x^m, P]^FracPart[p]), Int[u*x^(m*p)*Distrib[1/x^m, P]^p, x], x]] /; FreeQ[p, x] &&  !IntegerQ[p
] && SumQ[P] && EveryQ[BinomialQ[#1, x] & , P] &&  !PolyQ[P, x, 2]

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 6719

Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a*v^m*w^n)^FracPart[p])/(v^(m*F
racPart[p])*w^(n*FracPart[p])), Int[u*v^(m*p)*w^(n*p), x], x] /; FreeQ[{a, m, n, p}, x] &&  !IntegerQ[p] &&  !
FreeQ[v, x] &&  !FreeQ[w, x]

Rubi steps

\begin {align*} \int \frac {-x+x^2}{\sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}} \, dx &=\int \frac {(-1+x) x}{\sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}} \, dx\\ &=\frac {\left (\sqrt {x} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \int \frac {(-1+x) \sqrt {x}}{\sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}} \, dx}{\sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=\frac {\left (\sqrt {x} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \int \frac {(-1+x) \sqrt {x}}{\sqrt {(-1+x)^2 \left (-2+x^3\right )}} \, dx}{\sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=\frac {\left ((-1+x) \sqrt {x} \sqrt {-2+x^3} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \int \frac {\sqrt {x}}{\sqrt {-2+x^3}} \, dx}{\sqrt {(-1+x)^2 \left (-2+x^3\right )} \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=\frac {\left (2 (-1+x) \sqrt {x} \sqrt {-2+x^3} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \operatorname {Subst}\left (\int \frac {x^2}{\sqrt {-2+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {(-1+x)^2 \left (-2+x^3\right )} \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=\frac {\left (2 (-1+x) \sqrt {x} \sqrt {-2+x^3} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-2+x^2}} \, dx,x,x^{3/2}\right )}{3 \sqrt {(-1+x)^2 \left (-2+x^3\right )} \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=\frac {\left (2 (-1+x) \sqrt {x} \sqrt {-2+x^3} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5}\right ) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x^{3/2}}{\sqrt {-2+x^3}}\right )}{3 \sqrt {(-1+x)^2 \left (-2+x^3\right )} \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ &=-\frac {2 (1-x) \sqrt {x} \sqrt {-2+x^3} \sqrt {-2+4 x-2 x^2+x^3-2 x^4+x^5} \tanh ^{-1}\left (\frac {x^{3/2}}{\sqrt {-2+x^3}}\right )}{3 \sqrt {-(1-x)^2 \left (2-x^3\right )} \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 53, normalized size = 1.15 \begin {gather*} \frac {2 (x-1) \sqrt {x} \sqrt {x^3-2} \tanh ^{-1}\left (\frac {x^{3/2}}{\sqrt {x^3-2}}\right )}{3 \sqrt {(x-1)^2 x \left (x^3-2\right )}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-x + x^2)/Sqrt[-2*x + 4*x^2 - 2*x^3 + x^4 - 2*x^5 + x^6],x]

[Out]

(2*(-1 + x)*Sqrt[x]*Sqrt[-2 + x^3]*ArcTanh[x^(3/2)/Sqrt[-2 + x^3]])/(3*Sqrt[(-1 + x)^2*x*(-2 + x^3)])

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.39, size = 46, normalized size = 1.00 \begin {gather*} \frac {2}{3} \tanh ^{-1}\left (\frac {(-1+x) \left (-2+x^3\right )}{x \sqrt {-2 x+4 x^2-2 x^3+x^4-2 x^5+x^6}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(-x + x^2)/Sqrt[-2*x + 4*x^2 - 2*x^3 + x^4 - 2*x^5 + x^6],x]

[Out]

(2*ArcTanh[((-1 + x)*(-2 + x^3))/(x*Sqrt[-2*x + 4*x^2 - 2*x^3 + x^4 - 2*x^5 + x^6])])/3

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 52, normalized size = 1.13 \begin {gather*} \frac {1}{3} \, \log \left (-\frac {x^{4} - x^{3} + \sqrt {x^{6} - 2 \, x^{5} + x^{4} - 2 \, x^{3} + 4 \, x^{2} - 2 \, x} x - x + 1}{x - 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2-x)/(x^6-2*x^5+x^4-2*x^3+4*x^2-2*x)^(1/2),x, algorithm="fricas")

[Out]

1/3*log(-(x^4 - x^3 + sqrt(x^6 - 2*x^5 + x^4 - 2*x^3 + 4*x^2 - 2*x)*x - x + 1)/(x - 1))

________________________________________________________________________________________

giac [A]  time = 0.17, size = 42, normalized size = 0.91 \begin {gather*} \frac {\log \left (\sqrt {-\frac {2}{x^{3}} + 1} + 1\right ) - \log \left ({\left | \sqrt {-\frac {2}{x^{3}} + 1} - 1 \right |}\right )}{3 \, \mathrm {sgn}\left (\frac {1}{x^{3}} - \frac {1}{x^{4}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2-x)/(x^6-2*x^5+x^4-2*x^3+4*x^2-2*x)^(1/2),x, algorithm="giac")

[Out]

1/3*(log(sqrt(-2/x^3 + 1) + 1) - log(abs(sqrt(-2/x^3 + 1) - 1)))/sgn(1/x^3 - 1/x^4)

________________________________________________________________________________________

maple [A]  time = 0.50, size = 53, normalized size = 1.15

method result size
trager \(\frac {\ln \left (-\frac {x^{4}-x^{3}+x \sqrt {x^{6}-2 x^{5}+x^{4}-2 x^{3}+4 x^{2}-2 x}-x +1}{-1+x}\right )}{3}\) \(53\)
default \(-\frac {4 \left (-1+x \right ) \sqrt {x \left (x^{3}-2\right )}\, \left (1+i \sqrt {3}\right ) \sqrt {-\frac {\left (3+i \sqrt {3}\right ) x}{\left (1+i \sqrt {3}\right ) \left (-x +2^{\frac {1}{3}}\right )}}\, \left (-x +2^{\frac {1}{3}}\right )^{2} \sqrt {\frac {i \sqrt {3}\, 2^{\frac {1}{3}}-2^{\frac {1}{3}}-2 x}{\left (i \sqrt {3}-1\right ) \left (-x +2^{\frac {1}{3}}\right )}}\, \sqrt {\frac {i \sqrt {3}\, 2^{\frac {1}{3}}+2^{\frac {1}{3}}+2 x}{\left (1+i \sqrt {3}\right ) \left (-x +2^{\frac {1}{3}}\right )}}\, \left (\EllipticF \left (\sqrt {-\frac {\left (3+i \sqrt {3}\right ) x}{\left (1+i \sqrt {3}\right ) \left (-x +2^{\frac {1}{3}}\right )}}, \sqrt {\frac {\left (-3+i \sqrt {3}\right ) \left (1+i \sqrt {3}\right )}{\left (i \sqrt {3}-1\right ) \left (3+i \sqrt {3}\right )}}\right )-\EllipticPi \left (\sqrt {-\frac {\left (3+i \sqrt {3}\right ) x}{\left (1+i \sqrt {3}\right ) \left (-x +2^{\frac {1}{3}}\right )}}, \frac {1+i \sqrt {3}}{3+i \sqrt {3}}, \sqrt {\frac {\left (-3+i \sqrt {3}\right ) \left (1+i \sqrt {3}\right )}{\left (i \sqrt {3}-1\right ) \left (3+i \sqrt {3}\right )}}\right )\right )}{\sqrt {x^{6}-2 x^{5}+x^{4}-2 x^{3}+4 x^{2}-2 x}\, \left (3+i \sqrt {3}\right ) \sqrt {x \left (-x +2^{\frac {1}{3}}\right ) \left (i \sqrt {3}\, 2^{\frac {1}{3}}-2^{\frac {1}{3}}-2 x \right ) \left (i \sqrt {3}\, 2^{\frac {1}{3}}+2^{\frac {1}{3}}+2 x \right )}}\) \(390\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2-x)/(x^6-2*x^5+x^4-2*x^3+4*x^2-2*x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/3*ln(-(x^4-x^3+x*(x^6-2*x^5+x^4-2*x^3+4*x^2-2*x)^(1/2)-x+1)/(-1+x))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} - x}{\sqrt {x^{6} - 2 \, x^{5} + x^{4} - 2 \, x^{3} + 4 \, x^{2} - 2 \, x}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2-x)/(x^6-2*x^5+x^4-2*x^3+4*x^2-2*x)^(1/2),x, algorithm="maxima")

[Out]

integrate((x^2 - x)/sqrt(x^6 - 2*x^5 + x^4 - 2*x^3 + 4*x^2 - 2*x), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int -\frac {x-x^2}{\sqrt {x^6-2\,x^5+x^4-2\,x^3+4\,x^2-2\,x}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(x - x^2)/(4*x^2 - 2*x - 2*x^3 + x^4 - 2*x^5 + x^6)^(1/2),x)

[Out]

int(-(x - x^2)/(4*x^2 - 2*x - 2*x^3 + x^4 - 2*x^5 + x^6)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x \left (x - 1\right )}{\sqrt {x \left (x - 1\right )^{2} \left (x^{3} - 2\right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2-x)/(x**6-2*x**5+x**4-2*x**3+4*x**2-2*x)**(1/2),x)

[Out]

Integral(x*(x - 1)/sqrt(x*(x - 1)**2*(x**3 - 2)), x)

________________________________________________________________________________________