Optimal. Leaf size=41 \[ \frac{1}{2 \sqrt{x}}-\frac{\pi }{4 x}+\frac{\tan ^{-1}\left (\sqrt{x}\right )}{2 x}+\frac{1}{2} \tan ^{-1}\left (\sqrt{x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0221297, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {5159, 30, 5033, 51, 63, 203} \[ \frac{1}{2 \sqrt{x}}-\frac{\pi }{4 x}+\frac{\tan ^{-1}\left (\sqrt{x}\right )}{2 x}+\frac{1}{2} \tan ^{-1}\left (\sqrt{x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5159
Rule 30
Rule 5033
Rule 51
Rule 63
Rule 203
Rubi steps
\begin{align*} \int -\frac{\tan ^{-1}\left (\sqrt{x}-\sqrt{1+x}\right )}{x^2} \, dx &=-\left (\frac{1}{2} \int \frac{\tan ^{-1}\left (\sqrt{x}\right )}{x^2} \, dx\right )+\frac{1}{4} \pi \int \frac{1}{x^2} \, dx\\ &=-\frac{\pi }{4 x}+\frac{\tan ^{-1}\left (\sqrt{x}\right )}{2 x}-\frac{1}{4} \int \frac{1}{x^{3/2} (1+x)} \, dx\\ &=-\frac{\pi }{4 x}+\frac{1}{2 \sqrt{x}}+\frac{\tan ^{-1}\left (\sqrt{x}\right )}{2 x}+\frac{1}{4} \int \frac{1}{\sqrt{x} (1+x)} \, dx\\ &=-\frac{\pi }{4 x}+\frac{1}{2 \sqrt{x}}+\frac{\tan ^{-1}\left (\sqrt{x}\right )}{2 x}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\sqrt{x}\right )\\ &=-\frac{\pi }{4 x}+\frac{1}{2 \sqrt{x}}+\frac{1}{2} \tan ^{-1}\left (\sqrt{x}\right )+\frac{\tan ^{-1}\left (\sqrt{x}\right )}{2 x}\\ \end{align*}
Mathematica [A] time = 0.0322639, size = 40, normalized size = 0.98 \[ \frac{1}{2 \sqrt{x}}+\frac{1}{2} \tan ^{-1}\left (\sqrt{x}\right )+\frac{\tan ^{-1}\left (\sqrt{x}-\sqrt{x+1}\right )}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.055, size = 57, normalized size = 1.4 \begin{align*}{\frac{1}{x}\arctan \left ( \sqrt{x}-\sqrt{x+1} \right ) }+{\frac{1}{2}{\frac{1}{\sqrt{x}}}}+{\frac{1}{2}{\it Artanh} \left ( \sqrt{x+1} \right ) }+{\frac{1}{2}\arctan \left ( \sqrt{x} \right ) }+{\frac{1}{4}\ln \left ( \sqrt{x+1}-1 \right ) }-{\frac{1}{4}\ln \left ( \sqrt{x+1}+1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.62095, size = 39, normalized size = 0.95 \begin{align*} -\frac{\arctan \left (\sqrt{x + 1} - \sqrt{x}\right )}{x} + \frac{1}{2 \, \sqrt{x}} + \frac{1}{2} \, \arctan \left (\sqrt{x}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.02482, size = 81, normalized size = 1.98 \begin{align*} -\frac{2 \,{\left (x + 1\right )} \arctan \left (\sqrt{x + 1} - \sqrt{x}\right ) - \sqrt{x}}{2 \, x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11505, size = 38, normalized size = 0.93 \begin{align*} \frac{\arctan \left (-\sqrt{x + 1} + \sqrt{x}\right )}{x} + \frac{1}{2 \, \sqrt{x}} + \frac{1}{2} \, \arctan \left (\sqrt{x}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]