Optimal. Leaf size=82 \[ -\frac{\tan ^{-1}\left (\frac{x+1}{\sqrt{3} \sqrt{x^2+2 x+5}}\right )}{4 \sqrt{3}}-\frac{\tanh ^{-1}\left (\frac{3 x+7}{\sqrt{13} \sqrt{x^2+2 x+5}}\right )}{12 \sqrt{13}}+\frac{1}{12} \tanh ^{-1}\left (\sqrt{x^2+2 x+5}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.121105, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35, Rules used = {2074, 724, 206, 1025, 982, 204, 1024} \[ -\frac{\tan ^{-1}\left (\frac{x+1}{\sqrt{3} \sqrt{x^2+2 x+5}}\right )}{4 \sqrt{3}}-\frac{\tanh ^{-1}\left (\frac{3 x+7}{\sqrt{13} \sqrt{x^2+2 x+5}}\right )}{12 \sqrt{13}}+\frac{1}{12} \tanh ^{-1}\left (\sqrt{x^2+2 x+5}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2074
Rule 724
Rule 206
Rule 1025
Rule 982
Rule 204
Rule 1024
Rubi steps
\begin{align*} \int \frac{1}{\sqrt{5+2 x+x^2} \left (-8+x^3\right )} \, dx &=\int \left (\frac{1}{12 (-2+x) \sqrt{5+2 x+x^2}}+\frac{-4-x}{12 \left (4+2 x+x^2\right ) \sqrt{5+2 x+x^2}}\right ) \, dx\\ &=\frac{1}{12} \int \frac{1}{(-2+x) \sqrt{5+2 x+x^2}} \, dx+\frac{1}{12} \int \frac{-4-x}{\left (4+2 x+x^2\right ) \sqrt{5+2 x+x^2}} \, dx\\ &=-\left (\frac{1}{24} \int \frac{2+2 x}{\left (4+2 x+x^2\right ) \sqrt{5+2 x+x^2}} \, dx\right )-\frac{1}{6} \operatorname{Subst}\left (\int \frac{1}{52-x^2} \, dx,x,\frac{14+6 x}{\sqrt{5+2 x+x^2}}\right )-\frac{1}{4} \int \frac{1}{\left (4+2 x+x^2\right ) \sqrt{5+2 x+x^2}} \, dx\\ &=-\frac{\tanh ^{-1}\left (\frac{7+3 x}{\sqrt{13} \sqrt{5+2 x+x^2}}\right )}{12 \sqrt{13}}+\frac{1}{6} \operatorname{Subst}\left (\int \frac{1}{2-2 x^2} \, dx,x,\sqrt{5+2 x+x^2}\right )+\operatorname{Subst}\left (\int \frac{1}{-24-2 x^2} \, dx,x,\frac{2+2 x}{\sqrt{5+2 x+x^2}}\right )\\ &=-\frac{\tan ^{-1}\left (\frac{2+2 x}{2 \sqrt{3} \sqrt{5+2 x+x^2}}\right )}{4 \sqrt{3}}-\frac{\tanh ^{-1}\left (\frac{7+3 x}{\sqrt{13} \sqrt{5+2 x+x^2}}\right )}{12 \sqrt{13}}+\frac{1}{12} \tanh ^{-1}\left (\sqrt{5+2 x+x^2}\right )\\ \end{align*}
Mathematica [C] time = 0.31045, size = 159, normalized size = 1.94 \[ \frac{1}{312} \left (-2 \sqrt{13} \tanh ^{-1}\left (\frac{3 x+7}{\sqrt{13} \sqrt{x^2+2 x+5}}\right )-13 \left (\left (\sqrt{3}+i\right ) \tan ^{-1}\left (\frac{2 \left (\sqrt [3]{-1}-2\right ) x+5 i \sqrt{3}+1}{\sqrt{2-2 i \sqrt{3}} \sqrt{x^2+2 x+5}}\right )+\left (\sqrt{3}-i\right ) \tan ^{-1}\left (\frac{-2 \left (2+(-1)^{2/3}\right ) x-5 i \sqrt{3}+1}{\sqrt{2+2 i \sqrt{3}} \sqrt{x^2+2 x+5}}\right )\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.018, size = 69, normalized size = 0.8 \begin{align*}{\frac{1}{12}{\it Artanh} \left ( \sqrt{{x}^{2}+2\,x+5} \right ) }-{\frac{\sqrt{3}}{12}\arctan \left ({\frac{ \left ( 2\,x+2 \right ) \sqrt{3}}{6}{\frac{1}{\sqrt{{x}^{2}+2\,x+5}}}} \right ) }-{\frac{\sqrt{13}}{156}{\it Artanh} \left ({\frac{ \left ( 14+6\,x \right ) \sqrt{13}}{26}{\frac{1}{\sqrt{ \left ( -2+x \right ) ^{2}+6\,x+1}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (x^{3} - 8\right )} \sqrt{x^{2} + 2 \, x + 5}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.14768, size = 479, normalized size = 5.84 \begin{align*} \frac{1}{12} \, \sqrt{3} \arctan \left (-\frac{1}{3} \, \sqrt{3}{\left (x + 2\right )} + \frac{1}{3} \, \sqrt{3} \sqrt{x^{2} + 2 \, x + 5}\right ) - \frac{1}{12} \, \sqrt{3} \arctan \left (-\frac{1}{3} \, \sqrt{3} x + \frac{1}{3} \, \sqrt{3} \sqrt{x^{2} + 2 \, x + 5}\right ) + \frac{1}{156} \, \sqrt{13} \log \left (\frac{\sqrt{13}{\left (3 \, x + 7\right )} + \sqrt{x^{2} + 2 \, x + 5}{\left (3 \, \sqrt{13} - 13\right )} - 9 \, x - 21}{x - 2}\right ) - \frac{1}{24} \, \log \left (x^{2} - \sqrt{x^{2} + 2 \, x + 5}{\left (x + 2\right )} + 3 \, x + 6\right ) + \frac{1}{24} \, \log \left (x^{2} - \sqrt{x^{2} + 2 \, x + 5} x + x + 4\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\left (x - 2\right ) \left (x^{2} + 2 x + 4\right ) \sqrt{x^{2} + 2 x + 5}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.11625, size = 221, normalized size = 2.7 \begin{align*} \frac{1}{12} \, \sqrt{3} \arctan \left (-\frac{1}{3} \, \sqrt{3}{\left (x - \sqrt{x^{2} + 2 \, x + 5} + 2\right )}\right ) - \frac{1}{12} \, \sqrt{3} \arctan \left (-\frac{1}{3} \, \sqrt{3}{\left (x - \sqrt{x^{2} + 2 \, x + 5}\right )}\right ) + \frac{1}{156} \, \sqrt{13} \log \left (\frac{{\left | -2 \, x - 2 \, \sqrt{13} + 2 \, \sqrt{x^{2} + 2 \, x + 5} + 4 \right |}}{{\left | -2 \, x + 2 \, \sqrt{13} + 2 \, \sqrt{x^{2} + 2 \, x + 5} + 4 \right |}}\right ) - \frac{1}{24} \, \log \left ({\left (x - \sqrt{x^{2} + 2 \, x + 5}\right )}^{2} + 4 \, x - 4 \, \sqrt{x^{2} + 2 \, x + 5} + 7\right ) + \frac{1}{24} \, \log \left ({\left (x - \sqrt{x^{2} + 2 \, x + 5}\right )}^{2} + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]