Optimal. Leaf size=12 \[ \log \left (a+\sqrt{x^2+1}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0468336, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {2155, 31} \[ \log \left (a+\sqrt{x^2+1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2155
Rule 31
Rubi steps
\begin{align*} \int \frac{x}{1+x^2+a \sqrt{1+x^2}} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+x+a \sqrt{1+x}} \, dx,x,x^2\right )\\ &=\operatorname{Subst}\left (\int \frac{1}{a+x} \, dx,x,\sqrt{1+x^2}\right )\\ &=\log \left (a+\sqrt{1+x^2}\right )\\ \end{align*}
Mathematica [A] time = 0.0262214, size = 12, normalized size = 1. \[ \log \left (a+\sqrt{x^2+1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.04, size = 328, normalized size = 27.3 \begin{align*}{\frac{1}{a}\sqrt{{x}^{2}+1}}-{\frac{1}{2\,a}\sqrt{ \left ( x+\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) ^{2}-2\,\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \left ( x+\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) +{a}^{2}}}+{\frac{a}{2}\ln \left ({ \left ( 2\,{a}^{2}-2\,\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \left ( x+\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) +2\,\sqrt{{a}^{2}}\sqrt{ \left ( x+\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) ^{2}-2\,\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \left ( x+\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) +{a}^{2}} \right ) \left ( x+\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) ^{-1}} \right ){\frac{1}{\sqrt{{a}^{2}}}}}-{\frac{1}{2\,a}\sqrt{ \left ( x-\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) ^{2}+2\,\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \left ( x-\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) +{a}^{2}}}+{\frac{a}{2}\ln \left ({ \left ( 2\,{a}^{2}+2\,\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \left ( x-\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) +2\,\sqrt{{a}^{2}}\sqrt{ \left ( x-\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) ^{2}+2\,\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \left ( x-\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) +{a}^{2}} \right ) \left ( x-\sqrt{ \left ( 1+a \right ) \left ( a-1 \right ) } \right ) ^{-1}} \right ){\frac{1}{\sqrt{{a}^{2}}}}}+{\frac{\ln \left ( -{a}^{2}+{x}^{2}+1 \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.945527, size = 14, normalized size = 1.17 \begin{align*} \log \left (a + \sqrt{x^{2} + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.97612, size = 167, normalized size = 13.92 \begin{align*} \frac{1}{2} \, \log \left (-a^{2} + x^{2} + 1\right ) - \frac{1}{2} \, \log \left (a x + x^{2} - \sqrt{x^{2} + 1}{\left (a + x\right )} + 1\right ) + \frac{1}{2} \, \log \left (-a x + x^{2} + \sqrt{x^{2} + 1}{\left (a - x\right )} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.71292, size = 53, normalized size = 4.42 \begin{align*} - \frac{a \left (- \frac{\log{\left (2 a + 2 \sqrt{x^{2} + 1} \right )}}{a} + \frac{\log{\left (- 2 \sqrt{x^{2} + 1} \right )}}{a}\right )}{2} + \frac{\log{\left (a \sqrt{x^{2} + 1} + x^{2} + 1 \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.06548, size = 15, normalized size = 1.25 \begin{align*} \log \left ({\left | a + \sqrt{x^{2} + 1} \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]