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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {1816, 841, 1176, 631, 210} \begin {gather*} \sqrt {2} \text {ArcTan}\left (1-\sqrt {2} \sqrt {x}\right )-\sqrt {2} \text {ArcTan}\left (\sqrt {2} \sqrt {x}+1\right )+\frac {2 x^{3/2}}{3} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 210

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

Rule 631

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[a*(c/b^2)]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b)], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 841

Int[((f_.) + (g_.)*(x_))/(Sqrt[(d_.) + (e_.)*(x_)]*((a_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[2, Subst[Int[(e*f
 - d*g + g*x^2)/(c*d^2 + a*e^2 - 2*c*d*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, c, d, e, f, g}, x]
 && NeQ[c*d^2 + a*e^2, 0]

Rule 1176

Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[2*(d/e), 2]}, Dist[e/(2*c), Int[1/S
imp[d/e + q*x + x^2, x], x], x] + Dist[e/(2*c), Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; FreeQ[{a, c, d, e},
 x] && EqQ[c*d^2 - a*e^2, 0] && PosQ[d*e]

Rule 1816

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 32, normalized size = 0.62 \begin {gather*} \frac {2 x^{3/2}}{3}-\sqrt {2} \tan ^{-1}\left (\frac {-1+x}{\sqrt {2} \sqrt {x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(116\) vs. \(2(36)=72\).
time = 0.36, size = 117, normalized size = 2.25

method result size
trager \(\frac {2 x^{\frac {3}{2}}}{3}+\frac {\RootOf \left (\textit {\_Z}^{2}+2\right ) \ln \left (\frac {\RootOf \left (\textit {\_Z}^{2}+2\right ) x^{2}+4 x^{\frac {3}{2}}-4 \RootOf \left (\textit {\_Z}^{2}+2\right ) x -4 \sqrt {x}+\RootOf \left (\textit {\_Z}^{2}+2\right )}{x^{2}+1}\right )}{2}\) \(60\)
risch \(\frac {2 x^{\frac {3}{2}}}{3}-\arctan \left (1+\sqrt {2}\, \sqrt {x}\right ) \sqrt {2}-\arctan \left (-1+\sqrt {2}\, \sqrt {x}\right ) \sqrt {2}-\frac {\sqrt {2}\, \ln \left (\frac {x +\sqrt {2}\, \sqrt {x}+1}{x -\sqrt {2}\, \sqrt {x}+1}\right )}{4}-\frac {\sqrt {2}\, \ln \left (\frac {x -\sqrt {2}\, \sqrt {x}+1}{x +\sqrt {2}\, \sqrt {x}+1}\right )}{4}\) \(97\)
derivativedivides \(\frac {2 x^{\frac {3}{2}}}{3}-\frac {\sqrt {2}\, \left (\ln \left (\frac {x +\sqrt {2}\, \sqrt {x}+1}{x -\sqrt {2}\, \sqrt {x}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {x}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {x}\right )\right )}{4}-\frac {\sqrt {2}\, \left (\ln \left (\frac {x -\sqrt {2}\, \sqrt {x}+1}{x +\sqrt {2}\, \sqrt {x}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {x}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {x}\right )\right )}{4}\) \(117\)
default \(\frac {2 x^{\frac {3}{2}}}{3}-\frac {\sqrt {2}\, \left (\ln \left (\frac {x +\sqrt {2}\, \sqrt {x}+1}{x -\sqrt {2}\, \sqrt {x}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {x}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {x}\right )\right )}{4}-\frac {\sqrt {2}\, \left (\ln \left (\frac {x -\sqrt {2}\, \sqrt {x}+1}{x +\sqrt {2}\, \sqrt {x}+1}\right )+2 \arctan \left (1+\sqrt {2}\, \sqrt {x}\right )+2 \arctan \left (-1+\sqrt {2}\, \sqrt {x}\right )\right )}{4}\) \(117\)
meijerg \(\frac {2 x^{\frac {3}{2}}}{3}-\frac {x^{\frac {3}{2}} \left (\frac {\sqrt {2}\, \ln \left (1-\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}+\sqrt {x^{2}}\right )}{2 \left (x^{2}\right )^{\frac {3}{4}}}+\frac {\sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}{2-\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}\right )}{\left (x^{2}\right )^{\frac {3}{4}}}-\frac {\sqrt {2}\, \ln \left (1+\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}+\sqrt {x^{2}}\right )}{2 \left (x^{2}\right )^{\frac {3}{4}}}+\frac {\sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}{2+\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}\right )}{\left (x^{2}\right )^{\frac {3}{4}}}\right )}{2}+\frac {\sqrt {x}\, \sqrt {2}\, \ln \left (1-\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}+\sqrt {x^{2}}\right )}{4 \left (x^{2}\right )^{\frac {1}{4}}}-\frac {\sqrt {x}\, \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}{2-\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}\right )}{2 \left (x^{2}\right )^{\frac {1}{4}}}-\frac {\sqrt {x}\, \sqrt {2}\, \ln \left (1+\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}+\sqrt {x^{2}}\right )}{4 \left (x^{2}\right )^{\frac {1}{4}}}-\frac {\sqrt {x}\, \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}{2+\sqrt {2}\, \left (x^{2}\right )^{\frac {1}{4}}}\right )}{2 \left (x^{2}\right )^{\frac {1}{4}}}\) \(273\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 46, normalized size = 0.88 \begin {gather*} \frac {2}{3} \, x^{\frac {3}{2}} - \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + 2 \, \sqrt {x}\right )}\right ) - \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - 2 \, \sqrt {x}\right )}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 23, normalized size = 0.44 \begin {gather*} \frac {2}{3} \, x^{\frac {3}{2}} - \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (x - 1\right )}}{2 \, \sqrt {x}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.21, size = 44, normalized size = 0.85 \begin {gather*} \frac {2 x^{\frac {3}{2}}}{3} - \sqrt {2} \operatorname {atan}{\left (\sqrt {2} \sqrt {x} - 1 \right )} - \sqrt {2} \operatorname {atan}{\left (\sqrt {2} \sqrt {x} + 1 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 2.91, size = 46, normalized size = 0.88 \begin {gather*} \frac {2}{3} \, x^{\frac {3}{2}} - \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + 2 \, \sqrt {x}\right )}\right ) - \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - 2 \, \sqrt {x}\right )}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 3.17, size = 43, normalized size = 0.83 \begin {gather*} \frac {2\,x^{3/2}}{3}-\frac {\sqrt {2}\,\left (2\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {x}}{2}+\frac {\sqrt {2}\,x^{3/2}}{2}\right )+2\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {x}}{2}\right )\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________