Optimal. Leaf size=12 \[ \log \left (a+\sqrt {1+x^2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2186, 31}
\begin {gather*} \log \left (a+\sqrt {x^2+1}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2186
Rubi steps
\begin {align*} \int \frac {x}{1+x^2+a \sqrt {1+x^2}} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {1}{1+x+a \sqrt {1+x}} \, dx,x,x^2\right )\\ &=\text {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.01, size = 12, normalized size = 1.00 \begin {gather*} \log \left (a+\sqrt {1+x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(327\) vs.
\(2(10)=20\).
time = 0.03, size = 328, normalized size = 27.33
method | result | size |
default | \(-\frac {\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}}}{2 a}+\frac {a \ln \left (\frac {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}}}{x +\sqrt {\left (1+a \right ) \left (a -1\right )}}\right )}{2 \sqrt {a^{2}}}-\frac {\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}}}{2 a}+\frac {a \ln \left (\frac {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}}}{x -\sqrt {\left (1+a \right ) \left (a -1\right )}}\right )}{2 \sqrt {a^{2}}}+\frac {\sqrt {x^{2}+1}}{a}+\frac {\ln \left (-a^{2}+x^{2}+1\right )}{2}\) | \(328\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.94, size = 10, normalized size = 0.83 \begin {gather*} \log \left (a + \sqrt {x^{2} + 1}\right ) \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. 62 vs.
\(2 (10) = 20\).
time = 0.46, size = 62, normalized size = 5.17 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 53 vs.
\(2 (10) = 20\).
time = 1.22, size = 53, normalized size = 4.42 \begin {gather*} - \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.90, size = 11, normalized size = 0.92 \begin {gather*} \log \left ({\left | a + \sqrt {x^{2} + 1} \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.27, size = 154, normalized size = 12.83 \begin {gather*} \frac {\ln \left (x+\sqrt {a-1}\,\sqrt {a+1}\right )}{2}+\frac {\ln \left (x-\sqrt {a-1}\,\sqrt {a+1}\right )}{2}-\frac {a\,\left (\ln \left (x+\sqrt {a-1}\,\sqrt {a+1}\right )-\ln \left (\sqrt {x^2+1}\,\sqrt {a^2}-x\,\sqrt {a-1}\,\sqrt {a+1}+1\right )\right )}{2\,\sqrt {\left (a-1\right )\,\left (a+1\right )+1}}-\frac {a\,\left (\ln \left (x-\sqrt {a-1}\,\sqrt {a+1}\right )-\ln \left (\sqrt {x^2+1}\,\sqrt {a^2}+x\,\sqrt {a-1}\,\sqrt {a+1}+1\right )\right )}{2\,\sqrt {\left (a-1\right )\,\left (a+1\right )+1}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________