3.3.39 \(\int \frac {-1+x}{(1+x) \sqrt {x+x^2+x^3}} \, dx\) [239]

3.3.39.1 Optimal result
3.3.39.2 Mathematica [A] (verified)
3.3.39.3 Rubi [A] (verified)
3.3.39.4 Maple [A] (verified)
3.3.39.5 Fricas [A] (verification not implemented)
3.3.39.6 Sympy [F]
3.3.39.7 Maxima [F]
3.3.39.8 Giac [F]
3.3.39.9 Mupad [B] (verification not implemented)

3.3.39.1 Optimal result

Integrand size = 21, antiderivative size = 24 \[ \int \frac {-1+x}{(1+x) \sqrt {x+x^2+x^3}} \, dx=-2 \arctan \left (\frac {\sqrt {x+x^2+x^3}}{1+x+x^2}\right ) \]

output
-2*arctan((x^3+x^2+x)^(1/2)/(x^2+x+1))
 
3.3.39.2 Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.92 \[ \int \frac {-1+x}{(1+x) \sqrt {x+x^2+x^3}} \, dx=-\frac {2 \sqrt {x} \sqrt {1+x+x^2} \arctan \left (\frac {\sqrt {x}}{\sqrt {1+x+x^2}}\right )}{\sqrt {x \left (1+x+x^2\right )}} \]

input
Integrate[(-1 + x)/((1 + x)*Sqrt[x + x^2 + x^3]),x]
 
output
(-2*Sqrt[x]*Sqrt[1 + x + x^2]*ArcTan[Sqrt[x]/Sqrt[1 + x + x^2]])/Sqrt[x*(1 
 + x + x^2)]
 
3.3.39.3 Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.92, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2467, 25, 2035, 2212, 216}

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}{(x+1) \sqrt {x^3+x^2+x}} \, dx\)

\(\Big \downarrow \) 2467

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 2035

\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^2+x+1} \int \frac {1-x}{(x+1) \sqrt {x^2+x+1}}d\sqrt {x}}{\sqrt {x^3+x^2+x}}\)

\(\Big \downarrow \) 2212

\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^2+x+1} \int \frac {1}{x+1}d\frac {\sqrt {x}}{\sqrt {x^2+x+1}}}{\sqrt {x^3+x^2+x}}\)

\(\Big \downarrow \) 216

\(\displaystyle -\frac {2 \sqrt {x} \sqrt {x^2+x+1} \arctan \left (\frac {\sqrt {x}}{\sqrt {x^2+x+1}}\right )}{\sqrt {x^3+x^2+x}}\)

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

3.3.39.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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

rule 2035
Int[(Fx_)*(x_)^(m_), x_Symbol] :> With[{k = Denominator[m]}, Simp[k   Subst 
[Int[x^(k*(m + 1) - 1)*SubstPower[Fx, x, k], x], x, x^(1/k)], x]] /; Fracti 
onQ[m] && AlgebraicFunctionQ[Fx, x]
 

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

rule 2467
Int[(Fx_.)*(Px_)^(p_), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Simp[Px^F 
racPart[p]/(x^(r*FracPart[p])*ExpandToSum[Px/x^r, x]^FracPart[p])   Int[x^( 
p*r)*ExpandToSum[Px/x^r, x]^p*Fx, x], x] /; IGtQ[r, 0]] /; FreeQ[p, x] && P 
olyQ[Px, x] &&  !IntegerQ[p] &&  !MonomialQ[Px, x] &&  !PolyQ[Fx, x]
 
3.3.39.4 Maple [A] (verified)

Time = 3.53 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.75

method result size
default \(2 \arctan \left (\frac {\sqrt {x \left (x^{2}+x +1\right )}}{x}\right )\) \(18\)
pseudoelliptic \(2 \arctan \left (\frac {\sqrt {x \left (x^{2}+x +1\right )}}{x}\right )\) \(18\)
trager \(\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{2}+\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right )-2 \sqrt {x^{3}+x^{2}+x}}{\left (1+x \right )^{2}}\right )\) \(45\)
elliptic \(\frac {2 \left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}\, \sqrt {3}\, \sqrt {i \left (x +\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}\, \sqrt {\frac {x}{-\frac {1}{2}-\frac {i \sqrt {3}}{2}}}\, \operatorname {EllipticF}\left (\sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}, \frac {\sqrt {3}\, \sqrt {i \left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}}{3}\right )}{3 \sqrt {x^{3}+x^{2}+x}}-\frac {4 \left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}\, \sqrt {3}\, \sqrt {i \left (x +\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}\, \sqrt {\frac {x}{-\frac {1}{2}-\frac {i \sqrt {3}}{2}}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}, \frac {-\frac {1}{2}-\frac {i \sqrt {3}}{2}}{\frac {1}{2}-\frac {i \sqrt {3}}{2}}, \frac {\sqrt {3}\, \sqrt {i \left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}}{3}\right )}{3 \sqrt {x^{3}+x^{2}+x}\, \left (\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}\) \(271\)

input
int((x-1)/(1+x)/(x^3+x^2+x)^(1/2),x,method=_RETURNVERBOSE)
 
output
2*arctan((x*(x^2+x+1))^(1/2)/x)
 
3.3.39.5 Fricas [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.75 \[ \int \frac {-1+x}{(1+x) \sqrt {x+x^2+x^3}} \, dx=\arctan \left (\frac {x^{2} + 1}{2 \, \sqrt {x^{3} + x^{2} + x}}\right ) \]

input
integrate((-1+x)/(1+x)/(x^3+x^2+x)^(1/2),x, algorithm="fricas")
 
output
arctan(1/2*(x^2 + 1)/sqrt(x^3 + x^2 + x))
 
3.3.39.6 Sympy [F]

\[ \int \frac {-1+x}{(1+x) \sqrt {x+x^2+x^3}} \, dx=\int \frac {x - 1}{\sqrt {x \left (x^{2} + x + 1\right )} \left (x + 1\right )}\, dx \]

input
integrate((-1+x)/(1+x)/(x**3+x**2+x)**(1/2),x)
 
output
Integral((x - 1)/(sqrt(x*(x**2 + x + 1))*(x + 1)), x)
 
3.3.39.7 Maxima [F]

\[ \int \frac {-1+x}{(1+x) \sqrt {x+x^2+x^3}} \, dx=\int { \frac {x - 1}{\sqrt {x^{3} + x^{2} + x} {\left (x + 1\right )}} \,d x } \]

input
integrate((-1+x)/(1+x)/(x^3+x^2+x)^(1/2),x, algorithm="maxima")
 
output
integrate((x - 1)/(sqrt(x^3 + x^2 + x)*(x + 1)), x)
 
3.3.39.8 Giac [F]

\[ \int \frac {-1+x}{(1+x) \sqrt {x+x^2+x^3}} \, dx=\int { \frac {x - 1}{\sqrt {x^{3} + x^{2} + x} {\left (x + 1\right )}} \,d x } \]

input
integrate((-1+x)/(1+x)/(x^3+x^2+x)^(1/2),x, algorithm="giac")
 
output
integrate((x - 1)/(sqrt(x^3 + x^2 + x)*(x + 1)), x)
 
3.3.39.9 Mupad [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 179, normalized size of antiderivative = 7.46 \[ \int \frac {-1+x}{(1+x) \sqrt {x+x^2+x^3}} \, dx=\frac {\sqrt {\frac {x}{-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {-\frac {x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {\frac {x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\left (\sqrt {3}+1{}\mathrm {i}\right )\,\left (\mathrm {F}\left (\mathrm {asin}\left (\sqrt {\frac {x}{-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )-2\,\Pi \left (\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2};\mathrm {asin}\left (\sqrt {\frac {x}{-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )\right )\,1{}\mathrm {i}}{\sqrt {x^3+x^2-\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,x}} \]

input
int((x - 1)/((x + 1)*(x + x^2 + x^3)^(1/2)),x)
 
output
((x/((3^(1/2)*1i)/2 - 1/2))^(1/2)*(-(x - (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1 
i)/2 - 1/2))^(1/2)*((x + (3^(1/2)*1i)/2 + 1/2)/((3^(1/2)*1i)/2 + 1/2))^(1/ 
2)*(3^(1/2) + 1i)*(ellipticF(asin((x/((3^(1/2)*1i)/2 - 1/2))^(1/2)), -((3^ 
(1/2)*1i)/2 - 1/2)/((3^(1/2)*1i)/2 + 1/2)) - 2*ellipticPi(1/2 - (3^(1/2)*1 
i)/2, asin((x/((3^(1/2)*1i)/2 - 1/2))^(1/2)), -((3^(1/2)*1i)/2 - 1/2)/((3^ 
(1/2)*1i)/2 + 1/2)))*1i)/(x^2 + x^3 - x*((3^(1/2)*1i)/2 - 1/2)*((3^(1/2)*1 
i)/2 + 1/2))^(1/2)