3.3.53 \(\int \frac {x}{1+x^2+a \sqrt {1+x^2}} \, dx\) [253]

Optimal. Leaf size=12 \[ \log \left (a+\sqrt {1+x^2}\right ) \]

[Out]

ln(a+(x^2+1)^(1/2))

________________________________________________________________________________________

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]

Int[x/(1 + x^2 + a*Sqrt[1 + x^2]),x]

[Out]

Log[a + Sqrt[1 + x^2]]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2186

Int[(x_)^(m_.)/((c_) + (d_.)*(x_)^(n_) + (e_.)*Sqrt[(a_) + (b_.)*(x_)^(n_)]), x_Symbol] :> Dist[1/n, Subst[Int
[x^((m + 1)/n - 1)/(c + d*x + e*Sqrt[a + b*x]), x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && EqQ[b*c
- a*d, 0] && IntegerQ[(m + 1)/n]

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]

Integrate[x/(1 + x^2 + a*Sqrt[1 + x^2]),x]

[Out]

Log[a + Sqrt[1 + x^2]]

________________________________________________________________________________________

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]

int(x/(1+x^2+a*(x^2+1)^(1/2)),x,method=_RETURNVERBOSE)

[Out]

-1/2/a*((x+((1+a)*(a-1))^(1/2))^2-2*((1+a)*(a-1))^(1/2)*(x+((1+a)*(a-1))^(1/2))+a^2)^(1/2)+1/2*a/(a^2)^(1/2)*l
n((2*a^2-2*((1+a)*(a-1))^(1/2)*(x+((1+a)*(a-1))^(1/2))+2*(a^2)^(1/2)*((x+((1+a)*(a-1))^(1/2))^2-2*((1+a)*(a-1)
)^(1/2)*(x+((1+a)*(a-1))^(1/2))+a^2)^(1/2))/(x+((1+a)*(a-1))^(1/2)))-1/2/a*((x-((1+a)*(a-1))^(1/2))^2+2*((1+a)
*(a-1))^(1/2)*(x-((1+a)*(a-1))^(1/2))+a^2)^(1/2)+1/2*a/(a^2)^(1/2)*ln((2*a^2+2*((1+a)*(a-1))^(1/2)*(x-((1+a)*(
a-1))^(1/2))+2*(a^2)^(1/2)*((x-((1+a)*(a-1))^(1/2))^2+2*((1+a)*(a-1))^(1/2)*(x-((1+a)*(a-1))^(1/2))+a^2)^(1/2)
)/(x-((1+a)*(a-1))^(1/2)))+1/a*(x^2+1)^(1/2)+1/2*ln(-a^2+x^2+1)

________________________________________________________________________________________

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]

integrate(x/(1+x^2+a*(x^2+1)^(1/2)),x, algorithm="maxima")

[Out]

log(a + sqrt(x^2 + 1))

________________________________________________________________________________________

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]

integrate(x/(1+x^2+a*(x^2+1)^(1/2)),x, algorithm="fricas")

[Out]

1/2*log(-a^2 + x^2 + 1) - 1/2*log(a*x + x^2 - sqrt(x^2 + 1)*(a + x) + 1) + 1/2*log(-a*x + x^2 + sqrt(x^2 + 1)*
(a - x) + 1)

________________________________________________________________________________________

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]

integrate(x/(1+x**2+a*(x**2+1)**(1/2)),x)

[Out]

-a*(-log(2*a + 2*sqrt(x**2 + 1))/a + log(-2*sqrt(x**2 + 1))/a)/2 + log(a*sqrt(x**2 + 1) + x**2 + 1)/2

________________________________________________________________________________________

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]

integrate(x/(1+x^2+a*(x^2+1)^(1/2)),x, algorithm="giac")

[Out]

log(abs(a + sqrt(x^2 + 1)))

________________________________________________________________________________________

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]

int(x/(a*(x^2 + 1)^(1/2) + x^2 + 1),x)

[Out]

log(x + (a - 1)^(1/2)*(a + 1)^(1/2))/2 + log(x - (a - 1)^(1/2)*(a + 1)^(1/2))/2 - (a*(log(x + (a - 1)^(1/2)*(a
 + 1)^(1/2)) - log((x^2 + 1)^(1/2)*(a^2)^(1/2) - x*(a - 1)^(1/2)*(a + 1)^(1/2) + 1)))/(2*((a - 1)*(a + 1) + 1)
^(1/2)) - (a*(log(x - (a - 1)^(1/2)*(a + 1)^(1/2)) - log((x^2 + 1)^(1/2)*(a^2)^(1/2) + x*(a - 1)^(1/2)*(a + 1)
^(1/2) + 1)))/(2*((a - 1)*(a + 1) + 1)^(1/2))

________________________________________________________________________________________