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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.67, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2081, 460} \[ \int \frac {-1+x^2}{\left (1+x^2\right ) \sqrt {x+x^3}} \, dx=-\frac {2 x}{\sqrt {x^3+x}} \]

[In]

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

[Out]

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

Rule 460

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(a*e*(m + 1))), x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[
a*d*(m + 1) - b*c*(m + n*(p + 1) + 1), 0] && NeQ[m, -1]

Rule 2081

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]

Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {x} \sqrt {1+x^2}\right ) \int \frac {-1+x^2}{\sqrt {x} \left (1+x^2\right )^{3/2}} \, dx}{\sqrt {x+x^3}} \\ & = -\frac {2 x}{\sqrt {x+x^3}} \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.98 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.61

method result size
gosper \(-\frac {2 x}{\sqrt {x^{3}+x}}\) \(11\)
default \(-\frac {2 x}{\sqrt {\left (x^{2}+1\right ) x}}\) \(13\)
risch \(-\frac {2 x}{\sqrt {\left (x^{2}+1\right ) x}}\) \(13\)
elliptic \(-\frac {2 x}{\sqrt {\left (x^{2}+1\right ) x}}\) \(13\)
pseudoelliptic \(-\frac {2 x}{\sqrt {\left (x^{2}+1\right ) x}}\) \(13\)
trager \(-\frac {2 \sqrt {x^{3}+x}}{x^{2}+1}\) \(17\)
meijerg \(\frac {2 x^{\frac {5}{2}} \operatorname {hypergeom}\left (\left [\frac {5}{4}, \frac {3}{2}\right ], \left [\frac {9}{4}\right ], -x^{2}\right )}{5}-2 \sqrt {x}\, \operatorname {hypergeom}\left (\left [\frac {1}{4}, \frac {3}{2}\right ], \left [\frac {5}{4}\right ], -x^{2}\right )\) \(34\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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