Optimal. Leaf size=126 \[ -\sqrt {\frac {1}{2} \left (1+\sqrt {5}\right )} \tan ^{-1}\left (\frac {2 \sqrt {5}-\left (5+\sqrt {5}\right ) x}{\sqrt {10 \left (1+\sqrt {5}\right )} \sqrt {x^2+2 x+2}}\right )-\sqrt {\frac {1}{2} \left (\sqrt {5}-1\right )} \tanh ^{-1}\left (\frac {\left (5-\sqrt {5}\right ) x+2 \sqrt {5}}{\sqrt {10 \left (\sqrt {5}-1\right )} \sqrt {x^2+2 x+2}}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {1036, 1030, 207, 203} \begin {gather*} -\sqrt {\frac {1}{2} \left (1+\sqrt {5}\right )} \tan ^{-1}\left (\frac {2 \sqrt {5}-\left (5+\sqrt {5}\right ) x}{\sqrt {10 \left (1+\sqrt {5}\right )} \sqrt {x^2+2 x+2}}\right )-\sqrt {\frac {1}{2} \left (\sqrt {5}-1\right )} \tanh ^{-1}\left (\frac {\left (5-\sqrt {5}\right ) x+2 \sqrt {5}}{\sqrt {10 \left (\sqrt {5}-1\right )} \sqrt {x^2+2 x+2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 207
Rule 1030
Rule 1036
Rubi steps
\begin {align*} \int \frac {1+2 x}{\left (1+x^2\right ) \sqrt {2+2 x+x^2}} \, dx &=-\frac {\int \frac {-5-\sqrt {5}-2 \sqrt {5} x}{\left (1+x^2\right ) \sqrt {2+2 x+x^2}} \, dx}{2 \sqrt {5}}+\frac {\int \frac {-5+\sqrt {5}+2 \sqrt {5} x}{\left (1+x^2\right ) \sqrt {2+2 x+x^2}} \, dx}{2 \sqrt {5}}\\ &=\left (2 \left (5-\sqrt {5}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{20 \left (1-\sqrt {5}\right )+2 x^2} \, dx,x,\frac {2 \sqrt {5}+\left (5-\sqrt {5}\right ) x}{\sqrt {2+2 x+x^2}}\right )+\left (2 \left (5+\sqrt {5}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{20 \left (1+\sqrt {5}\right )+2 x^2} \, dx,x,\frac {-2 \sqrt {5}+\left (5+\sqrt {5}\right ) x}{\sqrt {2+2 x+x^2}}\right )\\ &=-\sqrt {\frac {1}{2} \left (1+\sqrt {5}\right )} \tan ^{-1}\left (\frac {2 \sqrt {5}-\left (5+\sqrt {5}\right ) x}{\sqrt {10 \left (1+\sqrt {5}\right )} \sqrt {2+2 x+x^2}}\right )-\sqrt {\frac {1}{2} \left (-1+\sqrt {5}\right )} \tanh ^{-1}\left (\frac {2 \sqrt {5}+\left (5-\sqrt {5}\right ) x}{\sqrt {10 \left (-1+\sqrt {5}\right )} \sqrt {2+2 x+x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.04, size = 87, normalized size = 0.69 \begin {gather*} \frac {1}{2} i \left (\sqrt {1+2 i} \tanh ^{-1}\left (\frac {(1+i) x+(2+i)}{\sqrt {1+2 i} \sqrt {x^2+2 x+2}}\right )-\sqrt {1-2 i} \tanh ^{-1}\left (\frac {(2-2 i) x+(4-2 i)}{2 \sqrt {1-2 i} \sqrt {x^2+2 x+2}}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [C] time = 0.24, size = 97, normalized size = 0.77 \begin {gather*} \text {RootSum}\left [\text {$\#$1}^4-8 \text {$\#$1}+8\&,\frac {\text {$\#$1}^2 \log \left (-\text {$\#$1}+\sqrt {x^2+2 x+2}-x\right )-\text {$\#$1} \log \left (-\text {$\#$1}+\sqrt {x^2+2 x+2}-x\right )-\log \left (-\text {$\#$1}+\sqrt {x^2+2 x+2}-x\right )}{\text {$\#$1}^3-2}\&\right ] \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.73, size = 770, normalized size = 6.11
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.72, size = 444, normalized size = 3.52 \begin {gather*} \frac {1}{4} \, \sqrt {2 \, \sqrt {5} - 2} \log \left (256 \, {\left (\sqrt {5} {\left (x - \sqrt {x^{2} + 2 \, x + 2}\right )} - 2 \, x + \sqrt {5} \sqrt {\sqrt {5} - 2} + \sqrt {5} + 2 \, \sqrt {x^{2} + 2 \, x + 2} - 2 \, \sqrt {\sqrt {5} - 2} - 2\right )}^{2} + 256 \, {\left (\sqrt {5} {\left (x - \sqrt {x^{2} + 2 \, x + 2}\right )} - 2 \, x - \sqrt {5} + 2 \, \sqrt {x^{2} + 2 \, x + 2} + \sqrt {\sqrt {5} - 2} + 2\right )}^{2}\right ) - \frac {1}{4} \, \sqrt {2 \, \sqrt {5} - 2} \log \left (256 \, {\left (\sqrt {5} {\left (x - \sqrt {x^{2} + 2 \, x + 2}\right )} - 2 \, x - \sqrt {5} \sqrt {\sqrt {5} - 2} + \sqrt {5} + 2 \, \sqrt {x^{2} + 2 \, x + 2} + 2 \, \sqrt {\sqrt {5} - 2} - 2\right )}^{2} + 256 \, {\left (\sqrt {5} {\left (x - \sqrt {x^{2} + 2 \, x + 2}\right )} - 2 \, x - \sqrt {5} + 2 \, \sqrt {x^{2} + 2 \, x + 2} - \sqrt {\sqrt {5} - 2} + 2\right )}^{2}\right ) + \frac {{\left (\pi + 4 \, \arctan \left (\frac {1}{2} \, {\left (x - \sqrt {x^{2} + 2 \, x + 2}\right )} {\left (2 \, \sqrt {5} \sqrt {\sqrt {5} - 2} + \sqrt {5} + 4 \, \sqrt {\sqrt {5} - 2} + 3\right )} + \frac {3}{2} \, \sqrt {5} \sqrt {\sqrt {5} - 2} + \frac {1}{2} \, \sqrt {5} + \frac {7}{2} \, \sqrt {\sqrt {5} - 2} + \frac {3}{2}\right )\right )} \sqrt {2 \, \sqrt {5} - 2}}{4 \, {\left (\sqrt {5} - 1\right )}} - \frac {{\left (\pi + 4 \, \arctan \left (-\frac {1}{2} \, {\left (x - \sqrt {x^{2} + 2 \, x + 2}\right )} {\left (2 \, \sqrt {5} \sqrt {\sqrt {5} - 2} - \sqrt {5} + 4 \, \sqrt {\sqrt {5} - 2} - 3\right )} - \frac {3}{2} \, \sqrt {5} \sqrt {\sqrt {5} - 2} + \frac {1}{2} \, \sqrt {5} - \frac {7}{2} \, \sqrt {\sqrt {5} - 2} + \frac {3}{2}\right )\right )} \sqrt {2 \, \sqrt {5} - 2}}{4 \, {\left (\sqrt {5} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.11, size = 753, normalized size = 5.98
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {2 \, x + 1}{\sqrt {x^{2} + 2 \, x + 2} {\left (x^{2} + 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {2\,x+1}{\left (x^2+1\right )\,\sqrt {x^2+2\,x+2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {2 x + 1}{\left (x^{2} + 1\right ) \sqrt {x^{2} + 2 x + 2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________