Optimal. Leaf size=73 \[ \left (1-\sqrt {x+1}\right )^2-4 \sqrt {1-\sqrt {x+1}}+2 \sqrt {x+1}+\frac {8 \tanh ^{-1}\left (\frac {2 \sqrt {1-\sqrt {x+1}}+1}{\sqrt {5}}\right )}{\sqrt {5}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {1628, 618, 206} \[ \left (1-\sqrt {x+1}\right )^2-4 \sqrt {1-\sqrt {x+1}}+2 \sqrt {x+1}+\frac {8 \tanh ^{-1}\left (\frac {2 \sqrt {1-\sqrt {x+1}}+1}{\sqrt {5}}\right )}{\sqrt {5}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 1628
Rubi steps
\begin {align*} \int \frac {x}{x+\sqrt {1-\sqrt {1+x}}} \, dx &=2 \operatorname {Subst}\left (\int \frac {x \left (-1+x^2\right )}{-1+\sqrt {1-x}+x^2} \, dx,x,\sqrt {1+x}\right )\\ &=4 \operatorname {Subst}\left (\int \frac {x^2 (1+x) \left (-2+x^2\right )}{-1+x+x^2} \, dx,x,\sqrt {1-\sqrt {1+x}}\right )\\ &=4 \operatorname {Subst}\left (\int \left (-1-x+x^3-\frac {1}{-1+x+x^2}\right ) \, dx,x,\sqrt {1-\sqrt {1+x}}\right )\\ &=2 \sqrt {1+x}-4 \sqrt {1-\sqrt {1+x}}+\left (1-\sqrt {1+x}\right )^2-4 \operatorname {Subst}\left (\int \frac {1}{-1+x+x^2} \, dx,x,\sqrt {1-\sqrt {1+x}}\right )\\ &=2 \sqrt {1+x}-4 \sqrt {1-\sqrt {1+x}}+\left (1-\sqrt {1+x}\right )^2+8 \operatorname {Subst}\left (\int \frac {1}{5-x^2} \, dx,x,1+2 \sqrt {1-\sqrt {1+x}}\right )\\ &=2 \sqrt {1+x}-4 \sqrt {1-\sqrt {1+x}}+\left (1-\sqrt {1+x}\right )^2+\frac {8 \tanh ^{-1}\left (\frac {1+2 \sqrt {1-\sqrt {1+x}}}{\sqrt {5}}\right )}{\sqrt {5}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 52, normalized size = 0.71 \[ x-4 \sqrt {1-\sqrt {x+1}}+\frac {8 \tanh ^{-1}\left (\frac {2 \sqrt {1-\sqrt {x+1}}+1}{\sqrt {5}}\right )}{\sqrt {5}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.41, size = 110, normalized size = 1.51 \[ \frac {4}{5} \, \sqrt {5} \log \left (\frac {2 \, x^{2} - \sqrt {5} {\left (3 \, x + 1\right )} + {\left (\sqrt {5} {\left (x + 2\right )} - 5 \, x\right )} \sqrt {x + 1} + {\left (\sqrt {5} {\left (x + 2\right )} - {\left (\sqrt {5} {\left (2 \, x - 1\right )} - 5\right )} \sqrt {x + 1} - 5 \, x\right )} \sqrt {-\sqrt {x + 1} + 1} + 3 \, x + 3}{x^{2} - x - 1}\right ) + x - 4 \, \sqrt {-\sqrt {x + 1} + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.71, size = 79, normalized size = 1.08 \[ {\left (\sqrt {x + 1} - 1\right )}^{2} - \frac {4}{5} \, \sqrt {5} \log \left (\frac {{\left | -\sqrt {5} + 2 \, \sqrt {-\sqrt {x + 1} + 1} + 1 \right |}}{\sqrt {5} + 2 \, \sqrt {-\sqrt {x + 1} + 1} + 1}\right ) + 2 \, \sqrt {x + 1} - 4 \, \sqrt {-\sqrt {x + 1} + 1} - 2 \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 60, normalized size = 0.82 \[ \frac {8 \sqrt {5}\, \arctanh \left (\frac {\left (1+2 \sqrt {1-\sqrt {x +1}}\right ) \sqrt {5}}{5}\right )}{5}+\left (1-\sqrt {x +1}\right )^{2}-2+2 \sqrt {x +1}-4 \sqrt {1-\sqrt {x +1}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.47, size = 77, normalized size = 1.05 \[ {\left (\sqrt {x + 1} - 1\right )}^{2} - \frac {4}{5} \, \sqrt {5} \log \left (-\frac {\sqrt {5} - 2 \, \sqrt {-\sqrt {x + 1} + 1} - 1}{\sqrt {5} + 2 \, \sqrt {-\sqrt {x + 1} + 1} + 1}\right ) + 2 \, \sqrt {x + 1} - 4 \, \sqrt {-\sqrt {x + 1} + 1} - 2 \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {x}{x+\sqrt {1-\sqrt {x+1}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x}{x + \sqrt {1 - \sqrt {x + 1}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________