3.1.48 \(\int -\tan ^{-1}(\sqrt {x}-\sqrt {1+x}) \, dx\) [48]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 37, normalized size of antiderivative = 1.19, number of steps used = 6, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5267, 8, 4930, 52, 65, 209} \begin {gather*} -\frac {1}{2} x \text {ArcTan}\left (\sqrt {x}\right )-\frac {\text {ArcTan}\left (\sqrt {x}\right )}{2}+\frac {\pi x}{4}+\frac {\sqrt {x}}{2} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Int[-ArcTan[Sqrt[x] - Sqrt[1 + x]],x]

[Out]

Sqrt[x]/2 + (Pi*x)/4 - ArcTan[Sqrt[x]]/2 - (x*ArcTan[Sqrt[x]])/2

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 52

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 65

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 209

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

Rule 4930

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x^n])^p, x] - Dist[b*c
*n*p, Int[x^n*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p, 0
] && (EqQ[n, 1] || EqQ[p, 1])

Rule 5267

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 -\tan ^{-1}\left (\sqrt {x}-\sqrt {1+x}\right ) \, dx &=-\left (\frac {1}{2} \int \tan ^{-1}\left (\sqrt {x}\right ) \, dx\right )+\frac {1}{4} \pi \int 1 \, dx\\ &=\frac {\pi x}{4}-\frac {1}{2} x \tan ^{-1}\left (\sqrt {x}\right )+\frac {1}{4} \int \frac {\sqrt {x}}{1+x} \, dx\\ &=\frac {\sqrt {x}}{2}+\frac {\pi x}{4}-\frac {1}{2} x \tan ^{-1}\left (\sqrt {x}\right )-\frac {1}{4} \int \frac {1}{\sqrt {x} (1+x)} \, dx\\ &=\frac {\sqrt {x}}{2}+\frac {\pi x}{4}-\frac {1}{2} x \tan ^{-1}\left (\sqrt {x}\right )-\frac {1}{2} \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {x}\right )\\ &=\frac {\sqrt {x}}{2}+\frac {\pi x}{4}-\frac {1}{2} \tan ^{-1}\left (\sqrt {x}\right )-\frac {1}{2} x \tan ^{-1}\left (\sqrt {x}\right )\\ \end {align*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[-ArcTan[Sqrt[x] - Sqrt[1 + x]],x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 28, normalized size = 0.90

method result size
default \(-x \arctan \left (\sqrt {x}-\sqrt {1+x}\right )+\frac {\sqrt {x}}{2}-\frac {\arctan \left (\sqrt {x}\right )}{2}\) \(28\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 3.10, size = 26, normalized size = 0.84 \begin {gather*} x \arctan \left (\sqrt {x + 1} - \sqrt {x}\right ) + \frac {1}{2} \, \sqrt {x} - \frac {1}{2} \, \arctan \left (\sqrt {x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*arctan(sqrt(x + 1) - sqrt(x)) + 1/2*sqrt(x) - 1/2*arctan(sqrt(x))

________________________________________________________________________________________

Fricas [A]
time = 1.47, size = 22, normalized size = 0.71 \begin {gather*} {\left (x + 1\right )} \arctan \left (\sqrt {x + 1} - \sqrt {x}\right ) + \frac {1}{2} \, \sqrt {x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + 1)*arctan(sqrt(x + 1) - sqrt(x)) + 1/2*sqrt(x)

________________________________________________________________________________________

Sympy [A]
time = 42.57, size = 29, normalized size = 0.94 \begin {gather*} \frac {\sqrt {x}}{2} - x \operatorname {atan}{\left (\sqrt {x} - \sqrt {x + 1} \right )} - \frac {\operatorname {atan}{\left (\sqrt {x} \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.58, size = 27, normalized size = 0.87 \begin {gather*} -x \arctan \left (-\sqrt {x + 1} + \sqrt {x}\right ) + \frac {1}{2} \, \sqrt {x} - \frac {1}{2} \, \arctan \left (\sqrt {x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x*arctan(-sqrt(x + 1) + sqrt(x)) + 1/2*sqrt(x) - 1/2*arctan(sqrt(x))

________________________________________________________________________________________

Mupad [B]
time = 0.80, size = 40, normalized size = 1.29 \begin {gather*} x\,\mathrm {atan}\left (\sqrt {x+1}-\sqrt {x}\right )+\frac {\sqrt {x}}{2}-\frac {\ln \left (\frac {{\left (-1+\sqrt {x}\,1{}\mathrm {i}\right )}^2}{x+1}\right )\,1{}\mathrm {i}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*atan((x + 1)^(1/2) - x^(1/2)) - (log((x^(1/2)*1i - 1)^2/(x + 1))*1i)/4 + x^(1/2)/2

________________________________________________________________________________________