3.4.13 \(\int \frac {2+x}{(-1+x) \sqrt {-x-x^2+x^3}} \, dx\)

Optimal. Leaf size=28 \[ -2 \tan ^{-1}\left (\frac {\sqrt {x^3-x^2-x}}{(x-2) x}\right ) \]

________________________________________________________________________________________

Rubi [C]  time = 0.89, antiderivative size = 533, normalized size of antiderivative = 19.04, number of steps used = 12, number of rules used = 11, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.440, Rules used = {2056, 6733, 1710, 1098, 1214, 1456, 540, 421, 419, 538, 537} \begin {gather*} \frac {3 \sqrt {2} \left (1+\sqrt {5}\right ) \sqrt {x} \sqrt {2 x+\sqrt {5}-1} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} F\left (\sin ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{\left (1-\sqrt {5}\right ) \sqrt {x^3-x^2-x}}-\frac {6 \sqrt {x} \sqrt {-\left (\left (1-\sqrt {5}\right ) x\right )-2} \sqrt {\frac {\left (1+\sqrt {5}\right ) x+2}{\left (1-\sqrt {5}\right ) x+2}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-\left (\left (1-\sqrt {5}\right ) x\right )-2}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \left (1-\sqrt {5}\right ) \sqrt {\frac {1}{\left (1-\sqrt {5}\right ) x+2}} \sqrt {x^3-x^2-x}}+\frac {\sqrt {x} \sqrt {-\left (\left (1-\sqrt {5}\right ) x\right )-2} \sqrt {\frac {\left (1+\sqrt {5}\right ) x+2}{\left (1-\sqrt {5}\right ) x+2}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-\left (\left (1-\sqrt {5}\right ) x\right )-2}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \sqrt {\frac {1}{\left (1-\sqrt {5}\right ) x+2}} \sqrt {x^3-x^2-x}}+\frac {6 \sqrt {2} \sqrt {x} \sqrt {2 x+\sqrt {5}-1} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} \Pi \left (\frac {1}{2} \left (1+\sqrt {5}\right );\sin ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{\left (1-\sqrt {5}\right ) \sqrt {x^3-x^2-x}} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

(3*Sqrt[2]*(1 + Sqrt[5])*Sqrt[x]*Sqrt[-1 + Sqrt[5] + 2*x]*Sqrt[1 - (2*x)/(1 + Sqrt[5])]*EllipticF[ArcSin[Sqrt[
2/(1 + Sqrt[5])]*Sqrt[x]], (-3 - Sqrt[5])/2])/((1 - Sqrt[5])*Sqrt[-x - x^2 + x^3]) + (Sqrt[x]*Sqrt[-2 - (1 - S
qrt[5])*x]*Sqrt[(2 + (1 + Sqrt[5])*x)/(2 + (1 - Sqrt[5])*x)]*EllipticF[ArcSin[(Sqrt[2]*5^(1/4)*Sqrt[x])/Sqrt[-
2 - (1 - Sqrt[5])*x]], (5 - Sqrt[5])/10])/(5^(1/4)*Sqrt[(2 + (1 - Sqrt[5])*x)^(-1)]*Sqrt[-x - x^2 + x^3]) - (6
*Sqrt[x]*Sqrt[-2 - (1 - Sqrt[5])*x]*Sqrt[(2 + (1 + Sqrt[5])*x)/(2 + (1 - Sqrt[5])*x)]*EllipticF[ArcSin[(Sqrt[2
]*5^(1/4)*Sqrt[x])/Sqrt[-2 - (1 - Sqrt[5])*x]], (5 - Sqrt[5])/10])/(5^(1/4)*(1 - Sqrt[5])*Sqrt[(2 + (1 - Sqrt[
5])*x)^(-1)]*Sqrt[-x - x^2 + x^3]) + (6*Sqrt[2]*Sqrt[x]*Sqrt[-1 + Sqrt[5] + 2*x]*Sqrt[1 - (2*x)/(1 + Sqrt[5])]
*EllipticPi[(1 + Sqrt[5])/2, ArcSin[Sqrt[2/(1 + Sqrt[5])]*Sqrt[x]], (-3 - Sqrt[5])/2])/((1 - Sqrt[5])*Sqrt[-x
- x^2 + x^3])

Rule 419

Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> Simp[(1*EllipticF[ArcSin[Rt[-(d/c),
2]*x], (b*c)/(a*d)])/(Sqrt[a]*Sqrt[c]*Rt[-(d/c), 2]), x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] &
& GtQ[a, 0] &&  !(NegQ[b/a] && SimplerSqrtQ[-(b/a), -(d/c)])

Rule 421

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

Rule 537

Int[1/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]*Sqrt[(e_) + (f_.)*(x_)^2]), x_Symbol] :> Simp[(1*Ellipt
icPi[(b*c)/(a*d), ArcSin[Rt[-(d/c), 2]*x], (c*f)/(d*e)])/(a*Sqrt[c]*Sqrt[e]*Rt[-(d/c), 2]), x] /; FreeQ[{a, b,
 c, d, e, f}, x] &&  !GtQ[d/c, 0] && GtQ[c, 0] && GtQ[e, 0] &&  !( !GtQ[f/e, 0] && SimplerSqrtQ[-(f/e), -(d/c)
])

Rule 538

Int[1/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]*Sqrt[(e_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[Sqrt[1 +
(d*x^2)/c]/Sqrt[c + d*x^2], Int[1/((a + b*x^2)*Sqrt[1 + (d*x^2)/c]*Sqrt[e + f*x^2]), x], x] /; FreeQ[{a, b, c,
 d, e, f}, x] &&  !GtQ[c, 0]

Rule 540

Int[Sqrt[(c_) + (d_.)*(x_)^2]/(((a_) + (b_.)*(x_)^2)*Sqrt[(e_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[d/b, Int[1/
(Sqrt[c + d*x^2]*Sqrt[e + f*x^2]), x], x] + Dist[(b*c - a*d)/b, Int[1/((a + b*x^2)*Sqrt[c + d*x^2]*Sqrt[e + f*
x^2]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NegQ[d/c]

Rule 1098

Int[1/Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(Sqrt[(2*a +
(b - q)*x^2)/(2*a + (b + q)*x^2)]*Sqrt[(2*a + (b + q)*x^2)/q]*EllipticF[ArcSin[x/Sqrt[(2*a + (b + q)*x^2)/(2*q
)]], (b + q)/(2*q)])/(2*Sqrt[a + b*x^2 + c*x^4]*Sqrt[a/(2*a + (b + q)*x^2)]), x]] /; FreeQ[{a, b, c}, x] && Gt
Q[b^2 - 4*a*c, 0] && LtQ[a, 0] && GtQ[c, 0]

Rule 1214

Int[1/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4]), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c,
 2]}, Dist[(2*c)/(2*c*d - e*(b - q)), Int[1/Sqrt[a + b*x^2 + c*x^4], x], x] - Dist[e/(2*c*d - e*(b - q)), Int[
(b - q + 2*c*x^2)/((d + e*x^2)*Sqrt[a + b*x^2 + c*x^4]), x], x]] /; FreeQ[{a, b, c, d, e}, x] && GtQ[b^2 - 4*a
*c, 0] &&  !LtQ[c, 0]

Rule 1456

Int[((d_) + (e_.)*(x_)^(n_))^(q_.)*((f_) + (g_.)*(x_)^(n_))^(r_.)*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_))^
(p_), x_Symbol] :> Dist[(a + b*x^n + c*x^(2*n))^FracPart[p]/((d + e*x^n)^FracPart[p]*(a/d + (c*x^n)/e)^FracPar
t[p]), Int[(d + e*x^n)^(p + q)*(f + g*x^n)^r*(a/d + (c*x^n)/e)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p,
q, r}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - b*d*e + a*e^2, 0] &&  !IntegerQ[p]

Rule 1710

Int[((A_.) + (B_.)*(x_)^2)/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4]), x_Symbol] :> Dist
[B/e, Int[1/Sqrt[a + b*x^2 + c*x^4], x], x] + Dist[(e*A - d*B)/e, Int[1/((d + e*x^2)*Sqrt[a + b*x^2 + c*x^4]),
 x], x] /; FreeQ[{a, b, c, d, e, A, B}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[c*d^
2 - a*e^2, 0] && NegQ[c/a]

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 6733

Int[(u_)*(x_)^(m_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k, Subst[Int[x^(k*(m + 1) - 1)*(u /. x -> x^k
), x], x, x^(1/k)], x]] /; FractionQ[m]

Rubi steps

\begin {align*} \int \frac {2+x}{(-1+x) \sqrt {-x-x^2+x^3}} \, dx &=\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {2+x}{(-1+x) \sqrt {x} \sqrt {-1-x+x^2}} \, dx}{\sqrt {-x-x^2+x^3}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-1-x+x^2}\right ) \operatorname {Subst}\left (\int \frac {2+x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x-x^2+x^3}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-1-x+x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-1-x^2+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x-x^2+x^3}}+\frac {\left (6 \sqrt {x} \sqrt {-1-x+x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x-x^2+x^3}}\\ &=\frac {\sqrt {x} \sqrt {-2-\left (1-\sqrt {5}\right ) x} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x}{2+\left (1-\sqrt {5}\right ) x}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-2-\left (1-\sqrt {5}\right ) x}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x}} \sqrt {-x-x^2+x^3}}-\frac {\left (6 \sqrt {x} \sqrt {-1-x+x^2}\right ) \operatorname {Subst}\left (\int \frac {-1-\sqrt {5}+2 x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx,x,\sqrt {x}\right )}{\left (-1+\sqrt {5}\right ) \sqrt {-x-x^2+x^3}}+\frac {\left (12 \sqrt {x} \sqrt {-1-x+x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-1-x^2+x^4}} \, dx,x,\sqrt {x}\right )}{\left (-1+\sqrt {5}\right ) \sqrt {-x-x^2+x^3}}\\ &=\frac {\sqrt {x} \sqrt {-2-\left (1-\sqrt {5}\right ) x} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x}{2+\left (1-\sqrt {5}\right ) x}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-2-\left (1-\sqrt {5}\right ) x}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x}} \sqrt {-x-x^2+x^3}}-\frac {6 \sqrt {x} \sqrt {-2-\left (1-\sqrt {5}\right ) x} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x}{2+\left (1-\sqrt {5}\right ) x}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-2-\left (1-\sqrt {5}\right ) x}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \left (1-\sqrt {5}\right ) \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x}} \sqrt {-x-x^2+x^3}}-\frac {\left (3 \sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {-1-\sqrt {5}+2 x^2}}{\sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \left (-1+x^2\right )} \, dx,x,\sqrt {x}\right )}{\left (-1+\sqrt {5}\right ) \sqrt {-x-x^2+x^3}}\\ &=\frac {\sqrt {x} \sqrt {-2-\left (1-\sqrt {5}\right ) x} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x}{2+\left (1-\sqrt {5}\right ) x}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-2-\left (1-\sqrt {5}\right ) x}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x}} \sqrt {-x-x^2+x^3}}-\frac {6 \sqrt {x} \sqrt {-2-\left (1-\sqrt {5}\right ) x} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x}{2+\left (1-\sqrt {5}\right ) x}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-2-\left (1-\sqrt {5}\right ) x}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \left (1-\sqrt {5}\right ) \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x}} \sqrt {-x-x^2+x^3}}-\frac {\left (6 \sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \sqrt {-1-\sqrt {5}+2 x^2}} \, dx,x,\sqrt {x}\right )}{\left (-1+\sqrt {5}\right ) \sqrt {-x-x^2+x^3}}-\frac {\left (3 \left (1-\sqrt {5}\right ) \sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \left (-1+x^2\right ) \sqrt {-1-\sqrt {5}+2 x^2}} \, dx,x,\sqrt {x}\right )}{\left (-1+\sqrt {5}\right ) \sqrt {-x-x^2+x^3}}\\ &=\frac {\sqrt {x} \sqrt {-2-\left (1-\sqrt {5}\right ) x} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x}{2+\left (1-\sqrt {5}\right ) x}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-2-\left (1-\sqrt {5}\right ) x}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x}} \sqrt {-x-x^2+x^3}}-\frac {6 \sqrt {x} \sqrt {-2-\left (1-\sqrt {5}\right ) x} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x}{2+\left (1-\sqrt {5}\right ) x}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-2-\left (1-\sqrt {5}\right ) x}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \left (1-\sqrt {5}\right ) \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x}} \sqrt {-x-x^2+x^3}}-\frac {\left (6 \sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \sqrt {1+\frac {2 x^2}{-1-\sqrt {5}}}} \, dx,x,\sqrt {x}\right )}{\left (-1+\sqrt {5}\right ) \sqrt {-x-x^2+x^3}}-\frac {\left (3 \left (1-\sqrt {5}\right ) \sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \left (-1+x^2\right ) \sqrt {1+\frac {2 x^2}{-1-\sqrt {5}}}} \, dx,x,\sqrt {x}\right )}{\left (-1+\sqrt {5}\right ) \sqrt {-x-x^2+x^3}}\\ &=\frac {3 \sqrt {2} \left (1+\sqrt {5}\right ) \sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} F\left (\sin ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{\left (1-\sqrt {5}\right ) \sqrt {-x-x^2+x^3}}+\frac {\sqrt {x} \sqrt {-2-\left (1-\sqrt {5}\right ) x} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x}{2+\left (1-\sqrt {5}\right ) x}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-2-\left (1-\sqrt {5}\right ) x}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x}} \sqrt {-x-x^2+x^3}}-\frac {6 \sqrt {x} \sqrt {-2-\left (1-\sqrt {5}\right ) x} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x}{2+\left (1-\sqrt {5}\right ) x}} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{5} \sqrt {x}}{\sqrt {-2-\left (1-\sqrt {5}\right ) x}}\right )|\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \left (1-\sqrt {5}\right ) \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x}} \sqrt {-x-x^2+x^3}}-\frac {3 \left (1+\sqrt {5}\right ) \sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} \Pi \left (\frac {1}{2} \left (1+\sqrt {5}\right );\sin ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{\sqrt {2} \sqrt {-x-x^2+x^3}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 7.31, size = 1600, normalized size = 57.14

result too large to display

Warning: Unable to verify antiderivative.

[In]

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

[Out]

(-2*Sqrt[2]*(-1 + x^(-1))*x^(3/2)*(2 + x)*(((-2*I)*Sqrt[1 - x^(-2) - x^(-1)]*EllipticF[I*ArcSinh[Sqrt[2/(1 + S
qrt[5])]/Sqrt[x]], -3/2 - Sqrt[5]/2])/Sqrt[-1 + Sqrt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(Sqrt[-1 +
Sqrt[5]] + I*Sqrt[1 + Sqrt[5]]))/((-2 + Sqrt[2*(-1 + Sqrt[5])])*(Sqrt[-1 + Sqrt[5]] - I*Sqrt[1 + Sqrt[5]])), A
rcSin[Sqrt[((Sqrt[-1 + Sqrt[5]] - I*Sqrt[1 + Sqrt[5]])*(Sqrt[2*(-1 + Sqrt[5])] + 2/Sqrt[x]))/((Sqrt[-1 + Sqrt[
5]] + I*Sqrt[1 + Sqrt[5]])*(Sqrt[2*(-1 + Sqrt[5])] - 2/Sqrt[x]))]], -3/5 - (4*I)/5]))/(2*(-2 + Sqrt[2*(-1 + Sq
rt[5])])*(2 + Sqrt[2*(-1 + Sqrt[5])])*(Sqrt[-1 + Sqrt[5]] - I*Sqrt[1 + Sqrt[5]]))))/((1 - 2/x + x)*Sqrt[x*(-1
- x + x^2)])

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.11, size = 28, normalized size = 1.00 \begin {gather*} -2 \tan ^{-1}\left (\frac {\sqrt {-x-x^2+x^3}}{(-2+x) x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 47, normalized size = 1.68 \begin {gather*} \arctan \left (\frac {\sqrt {x^{3} - x^{2} - x} {\left (x^{3} - 5 \, x^{2} + 5 \, x + 1\right )}}{2 \, {\left (x^{4} - 3 \, x^{3} + x^{2} + 2 \, x\right )}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((x + 2)/(sqrt(x^3 - x^2 - x)*(x - 1)), x)

________________________________________________________________________________________

maple [C]  time = 0.37, size = 86, normalized size = 3.07

method result size
trager \(-\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) x^{3}-5 \RootOf \left (\textit {\_Z}^{2}+1\right ) x^{2}+2 \sqrt {x^{3}-x^{2}-x}\, x +5 \RootOf \left (\textit {\_Z}^{2}+1\right ) x -4 \sqrt {x^{3}-x^{2}-x}+\RootOf \left (\textit {\_Z}^{2}+1\right )}{\left (-1+x \right )^{3}}\right )\) \(86\)
default \(\frac {2 \left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right ) \sqrt {\frac {x -\frac {1}{2}+\frac {\sqrt {5}}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\, \sqrt {-5 \left (x -\frac {1}{2}-\frac {\sqrt {5}}{2}\right ) \sqrt {5}}\, \sqrt {-\frac {x}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\, \EllipticF \left (\sqrt {\frac {x -\frac {1}{2}+\frac {\sqrt {5}}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}, \frac {\sqrt {5}\, \sqrt {\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right ) \sqrt {5}}}{5}\right )}{5 \sqrt {x^{3}-x^{2}-x}}+\frac {6 \left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right ) \sqrt {\frac {x -\frac {1}{2}+\frac {\sqrt {5}}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\, \sqrt {-5 \left (x -\frac {1}{2}-\frac {\sqrt {5}}{2}\right ) \sqrt {5}}\, \sqrt {-\frac {x}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\, \EllipticPi \left (\sqrt {\frac {x -\frac {1}{2}+\frac {\sqrt {5}}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}, \frac {\frac {1}{2}-\frac {\sqrt {5}}{2}}{-\frac {1}{2}-\frac {\sqrt {5}}{2}}, \frac {\sqrt {5}\, \sqrt {\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right ) \sqrt {5}}}{5}\right )}{5 \sqrt {x^{3}-x^{2}-x}\, \left (-\frac {1}{2}-\frac {\sqrt {5}}{2}\right )}\) \(250\)
elliptic \(\frac {2 \left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right ) \sqrt {\frac {x -\frac {1}{2}+\frac {\sqrt {5}}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\, \sqrt {-5 \left (x -\frac {1}{2}-\frac {\sqrt {5}}{2}\right ) \sqrt {5}}\, \sqrt {-\frac {x}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\, \EllipticF \left (\sqrt {\frac {x -\frac {1}{2}+\frac {\sqrt {5}}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}, \frac {\sqrt {5}\, \sqrt {\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right ) \sqrt {5}}}{5}\right )}{5 \sqrt {x^{3}-x^{2}-x}}+\frac {6 \left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right ) \sqrt {\frac {x -\frac {1}{2}+\frac {\sqrt {5}}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\, \sqrt {-5 \left (x -\frac {1}{2}-\frac {\sqrt {5}}{2}\right ) \sqrt {5}}\, \sqrt {-\frac {x}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\, \EllipticPi \left (\sqrt {\frac {x -\frac {1}{2}+\frac {\sqrt {5}}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}, \frac {\frac {1}{2}-\frac {\sqrt {5}}{2}}{-\frac {1}{2}-\frac {\sqrt {5}}{2}}, \frac {\sqrt {5}\, \sqrt {\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right ) \sqrt {5}}}{5}\right )}{5 \sqrt {x^{3}-x^{2}-x}\, \left (-\frac {1}{2}-\frac {\sqrt {5}}{2}\right )}\) \(250\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2+x)/(-1+x)/(x^3-x^2-x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((x + 2)/(sqrt(x^3 - x^2 - x)*(x - 1)), x)

________________________________________________________________________________________

mupad [B]  time = 0.25, size = 165, normalized size = 5.89 \begin {gather*} \frac {\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\sqrt {\frac {x+\frac {\sqrt {5}}{2}-\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\,\left (\sqrt {5}+1\right )\,\left (\mathrm {F}\left (\mathrm {asin}\left (\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\right )\middle |-\frac {\frac {\sqrt {5}}{2}+\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}\right )-3\,\Pi \left (\frac {\sqrt {5}}{2}+\frac {1}{2};\mathrm {asin}\left (\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\right )\middle |-\frac {\frac {\sqrt {5}}{2}+\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}\right )\right )\,\sqrt {\frac {\frac {\sqrt {5}}{2}-x+\frac {1}{2}}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}}{\sqrt {x^3-x^2-\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )\,\left (\frac {\sqrt {5}}{2}+\frac {1}{2}\right )\,x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((x/(5^(1/2)/2 + 1/2))^(1/2)*((x + 5^(1/2)/2 - 1/2)/(5^(1/2)/2 - 1/2))^(1/2)*(5^(1/2) + 1)*(ellipticF(asin((x/
(5^(1/2)/2 + 1/2))^(1/2)), -(5^(1/2)/2 + 1/2)/(5^(1/2)/2 - 1/2)) - 3*ellipticPi(5^(1/2)/2 + 1/2, asin((x/(5^(1
/2)/2 + 1/2))^(1/2)), -(5^(1/2)/2 + 1/2)/(5^(1/2)/2 - 1/2)))*((5^(1/2)/2 - x + 1/2)/(5^(1/2)/2 + 1/2))^(1/2))/
(x^3 - x^2 - x*(5^(1/2)/2 - 1/2)*(5^(1/2)/2 + 1/2))^(1/2)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________