3.127 \(\int -x^2 \tan ^{-1}(\sqrt {x}-\sqrt {1+x}) \, dx\)

Optimal. Leaf size=59 \[ \frac {x^{5/2}}{30}-\frac {x^{3/2}}{18}+\frac {\pi x^3}{12}-\frac {1}{6} x^3 \tan ^{-1}\left (\sqrt {x}\right )+\frac {\sqrt {x}}{6}-\frac {1}{6} \tan ^{-1}\left (\sqrt {x}\right ) \]

[Out]

-1/18*x^(3/2)+1/30*x^(5/2)+1/12*Pi*x^3-1/6*arctan(x^(1/2))-1/6*x^3*arctan(x^(1/2))+1/6*x^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {5159, 30, 5033, 50, 63, 203} \[ \frac {\pi x^3}{12}+\frac {x^{5/2}}{30}-\frac {x^{3/2}}{18}-\frac {1}{6} x^3 \tan ^{-1}\left (\sqrt {x}\right )+\frac {\sqrt {x}}{6}-\frac {1}{6} \tan ^{-1}\left (\sqrt {x}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

Sqrt[x]/6 - x^(3/2)/18 + x^(5/2)/30 + (Pi*x^3)/12 - ArcTan[Sqrt[x]]/6 - (x^3*ArcTan[Sqrt[x]])/6

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 203

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

Rule 5033

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

Rule 5159

Int[ArcTan[(v_) + (s_.)*Sqrt[w_]]*(u_.), x_Symbol] :> Dist[(Pi*s)/4, Int[u, x], x] + Dist[1/2, Int[u*ArcTan[v]
, x], x] /; EqQ[s^2, 1] && EqQ[w, v^2 + 1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 53, normalized size = 0.90 \[ \frac {1}{90} \left (-\sqrt {x} \left (30 x^{5/2} \tan ^{-1}\left (\sqrt {x}-\sqrt {x+1}\right )-3 x^2+5 x-15\right )-15 \tan ^{-1}\left (\sqrt {x}\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-15*ArcTan[Sqrt[x]] - Sqrt[x]*(-15 + 5*x - 3*x^2 + 30*x^(5/2)*ArcTan[Sqrt[x] - Sqrt[1 + x]]))/90

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 35, normalized size = 0.59 \[ \frac {1}{3} \, {\left (x^{3} + 1\right )} \arctan \left (\sqrt {x + 1} - \sqrt {x}\right ) + \frac {1}{90} \, {\left (3 \, x^{2} - 5 \, x + 15\right )} \sqrt {x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 39, normalized size = 0.66 \[ -\frac {1}{3} \, x^{3} \arctan \left (-\sqrt {x + 1} + \sqrt {x}\right ) + \frac {1}{30} \, x^{\frac {5}{2}} - \frac {1}{18} \, x^{\frac {3}{2}} + \frac {1}{6} \, \sqrt {x} - \frac {1}{6} \, \arctan \left (\sqrt {x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*x^3*arctan(-sqrt(x + 1) + sqrt(x)) + 1/30*x^(5/2) - 1/18*x^(3/2) + 1/6*sqrt(x) - 1/6*arctan(sqrt(x))

________________________________________________________________________________________

maple [A]  time = 0.06, size = 40, normalized size = 0.68 \[ -\frac {x^{3} \arctan \left (\sqrt {x}-\sqrt {x +1}\right )}{3}+\frac {x^{\frac {5}{2}}}{30}-\frac {x^{\frac {3}{2}}}{18}+\frac {\sqrt {x}}{6}-\frac {\arctan \left (\sqrt {x}\right )}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*x^3*arctan(x^(1/2)-(x+1)^(1/2))+1/30*x^(5/2)-1/18*x^(3/2)+1/6*x^(1/2)-1/6*arctan(x^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.46, size = 39, normalized size = 0.66 \[ \frac {1}{3} \, x^{3} \arctan \left (\sqrt {x + 1} - \sqrt {x}\right ) + \frac {1}{30} \, x^{\frac {5}{2}} - \frac {1}{18} \, x^{\frac {3}{2}} + \frac {1}{6} \, \sqrt {x} - \frac {1}{6} \, \arctan \left (\sqrt {x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*x^3*arctan(sqrt(x + 1) - sqrt(x)) + 1/30*x^(5/2) - 1/18*x^(3/2) + 1/6*sqrt(x) - 1/6*arctan(sqrt(x))

________________________________________________________________________________________

mupad [B]  time = 0.94, size = 65, normalized size = 1.10 \[ \frac {\sqrt {x}}{6}-\frac {x^{3/2}}{18}+\frac {x^{5/2}}{30}+\frac {\mathrm {atan}\left (\sqrt {x+1}-\sqrt {x}\right )\,\left (\frac {2\,x^4}{3}+\frac {2\,x^3}{3}\right )}{2\,x+2}+\frac {\ln \left (\frac {{\left (\sqrt {x}-\mathrm {i}\right )}^2}{x+1}\right )\,1{}\mathrm {i}}{12} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log((x^(1/2) - 1i)^2/(x + 1))*1i)/12 + x^(1/2)/6 - x^(3/2)/18 + x^(5/2)/30 + (atan((x + 1)^(1/2) - x^(1/2))*(
(2*x^3)/3 + (2*x^4)/3))/(2*x + 2)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________