Optimal. Leaf size=41 \[ 2 \sqrt {1+x}+\frac {8 \tanh ^{-1}\left (\frac {1+2 \sqrt {1+\sqrt {1+x}}}{\sqrt {5}}\right )}{\sqrt {5}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {814, 632, 212}
\begin {gather*} 2 \sqrt {x+1}+\frac {8 \tanh ^{-1}\left (\frac {2 \sqrt {\sqrt {x+1}+1}+1}{\sqrt {5}}\right )}{\sqrt {5}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 814
Rubi steps
\begin {align*} \int \frac {\sqrt {1+x}}{x+\sqrt {1+\sqrt {1+x}}} \, dx &=2 \text {Subst}\left (\int \frac {x^2}{-1+x^2+\sqrt {1+x}} \, dx,x,\sqrt {1+x}\right )\\ &=4 \text {Subst}\left (\int \frac {(-1+x) (1+x)^2}{-1+x+x^2} \, dx,x,\sqrt {1+\sqrt {1+x}}\right )\\ &=4 \text {Subst}\left (\int \left (x-\frac {1}{-1+x+x^2}\right ) \, dx,x,\sqrt {1+\sqrt {1+x}}\right )\\ &=2 \sqrt {1+x}-4 \text {Subst}\left (\int \frac {1}{-1+x+x^2} \, dx,x,\sqrt {1+\sqrt {1+x}}\right )\\ &=2 \sqrt {1+x}+8 \text {Subst}\left (\int \frac {1}{5-x^2} \, dx,x,1+2 \sqrt {1+\sqrt {1+x}}\right )\\ &=2 \sqrt {1+x}+\frac {8 \tanh ^{-1}\left (\frac {1+2 \sqrt {1+\sqrt {1+x}}}{\sqrt {5}}\right )}{\sqrt {5}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 41, normalized size = 1.00 \begin {gather*} 2 \sqrt {1+x}+\frac {8 \tanh ^{-1}\left (\frac {1+2 \sqrt {1+\sqrt {1+x}}}{\sqrt {5}}\right )}{\sqrt {5}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: AttributeError} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 34, normalized size = 0.83
method | result | size |
derivativedivides | \(2 \sqrt {1+x}+2+\frac {8 \arctanh \left (\frac {\left (1+2 \sqrt {1+\sqrt {1+x}}\right ) \sqrt {5}}{5}\right ) \sqrt {5}}{5}\) | \(34\) |
default | \(2 \sqrt {1+x}+2+\frac {8 \arctanh \left (\frac {\left (1+2 \sqrt {1+\sqrt {1+x}}\right ) \sqrt {5}}{5}\right ) \sqrt {5}}{5}\) | \(34\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.34, size = 51, normalized size = 1.24 \begin {gather*} -\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} + 2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 101 vs.
\(2 (32) = 64\).
time = 0.35, size = 101, normalized size = 2.46 \begin {gather*} \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 ) + 2 \, \sqrt {x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 8.04, size = 112, normalized size = 2.73 \begin {gather*} 2 \sqrt {x + 1} - 16 \left (\begin {cases} - \frac {\sqrt {5} \operatorname {acoth}{\left (\frac {2 \sqrt {5} \left (\sqrt {\sqrt {x + 1} + 1} + \frac {1}{2}\right )}{5} \right )}}{10} & \text {for}\: \left (\sqrt {\sqrt {x + 1} + 1} + \frac {1}{2}\right )^{2} > \frac {5}{4} \\- \frac {\sqrt {5} \operatorname {atanh}{\left (\frac {2 \sqrt {5} \left (\sqrt {\sqrt {x + 1} + 1} + \frac {1}{2}\right )}{5} \right )}}{10} & \text {for}\: \left (\sqrt {\sqrt {x + 1} + 1} + \frac {1}{2}\right )^{2} < \frac {5}{4} \end {cases}\right ) + 2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.01, size = 71, normalized size = 1.73 \begin {gather*} 4 \left (\frac {\sqrt {x+1}+1}{2}-\frac {\ln \left (\frac {2 \sqrt {\sqrt {x+1}+1}+1-\sqrt {5}}{2 \sqrt {\sqrt {x+1}+1}+1+\sqrt {5}}\right )}{\sqrt {5}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {x+1}}{x+\sqrt {\sqrt {x+1}+1}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________