Optimal. Leaf size=31 \[ \frac {\sqrt {x}}{2}-(x+1) \tan ^{-1}\left (\sqrt {x}-\sqrt {x+1}\right ) \]
[Out]
________________________________________________________________________________________
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 = {5159, 8, 5027, 50, 63, 203} \[ \frac {\pi x}{4}+\frac {\sqrt {x}}{2}-\frac {1}{2} x \tan ^{-1}\left (\sqrt {x}\right )-\frac {1}{2} \tan ^{-1}\left (\sqrt {x}\right ) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
Rule 8
Rule 50
Rule 63
Rule 203
Rule 5027
Rule 5159
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} \operatorname {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.39, size = 39, normalized size = 1.26 \[ \frac {\sqrt {x}}{2}-\frac {1}{2} \tan ^{-1}\left (\sqrt {x}\right )-x \tan ^{-1}\left (\sqrt {x}-\sqrt {x+1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 22, normalized size = 0.71 \[ {\left (x + 1\right )} \arctan \left (\sqrt {x + 1} - \sqrt {x}\right ) + \frac {1}{2} \, \sqrt {x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.06, size = 27, normalized size = 0.87 \[ -x \arctan \left (-\sqrt {x + 1} + \sqrt {x}\right ) + \frac {1}{2} \, \sqrt {x} - \frac {1}{2} \, \arctan \left (\sqrt {x}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 28, normalized size = 0.90 \[ -x \arctan \left (\sqrt {x}-\sqrt {x +1}\right )-\frac {\arctan \left (\sqrt {x}\right )}{2}+\frac {\sqrt {x}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.13, size = 26, normalized size = 0.84 \[ x \arctan \left (\sqrt {x + 1} - \sqrt {x}\right ) + \frac {1}{2} \, \sqrt {x} - \frac {1}{2} \, \arctan \left (\sqrt {x}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.80, size = 40, normalized size = 1.29 \[ 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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 89.16, size = 29, normalized size = 0.94 \[ \frac {\sqrt {x}}{2} - x \operatorname {atan}{\left (\sqrt {x} - \sqrt {x + 1} \right )} - \frac {\operatorname {atan}{\left (\sqrt {x} \right )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________