3.1.3 \(\int \frac {1}{(2 x+\sqrt {1+x^2})^2} \, dx\) [3]

Optimal. Leaf size=82 \[ \frac {4 x}{3 \left (1-3 x^2\right )}-\frac {2 \sqrt {1+x^2}}{3 \left (1-3 x^2\right )}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}}+\frac {\tanh ^{-1}\left (\frac {1}{2} \sqrt {3} \sqrt {1+x^2}\right )}{3 \sqrt {3}} \]

[Out]

4/3*x/(-3*x^2+1)-1/9*arctanh(x*3^(1/2))*3^(1/2)+1/9*arctanh(1/2*3^(1/2)*(x^2+1)^(1/2))*3^(1/2)-2/3*(x^2+1)^(1/
2)/(-3*x^2+1)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6874, 205, 213, 455, 43, 65} \begin {gather*} \frac {4 x}{3 \left (1-3 x^2\right )}-\frac {2 \sqrt {x^2+1}}{3 \left (1-3 x^2\right )}+\frac {\tanh ^{-1}\left (\frac {1}{2} \sqrt {3} \sqrt {x^2+1}\right )}{3 \sqrt {3}}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(4*x)/(3*(1 - 3*x^2)) - (2*Sqrt[1 + x^2])/(3*(1 - 3*x^2)) - ArcTanh[Sqrt[3]*x]/(3*Sqrt[3]) + ArcTanh[(Sqrt[3]*
Sqrt[1 + x^2])/2]/(3*Sqrt[3])

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + 1))), x] - Dist[d*(n/(b*(m + 1))), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d, n
}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, -1] &&  !IntegerQ[n] && GtQ[n, 0]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 205

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^n)^(p + 1)/(a*n*(p + 1))), x] + Dist[(n*(p
 + 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (
IntegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[
p])

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 455

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

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \frac {1}{\left (2 x+\sqrt {1+x^2}\right )^2} \, dx &=\int \left (\frac {8}{3 \left (-1+3 x^2\right )^2}-\frac {4 x \sqrt {1+x^2}}{\left (-1+3 x^2\right )^2}+\frac {5}{3 \left (-1+3 x^2\right )}\right ) \, dx\\ &=\frac {5}{3} \int \frac {1}{-1+3 x^2} \, dx+\frac {8}{3} \int \frac {1}{\left (-1+3 x^2\right )^2} \, dx-4 \int \frac {x \sqrt {1+x^2}}{\left (-1+3 x^2\right )^2} \, dx\\ &=\frac {4 x}{3 \left (1-3 x^2\right )}-\frac {5 \tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}}-\frac {4}{3} \int \frac {1}{-1+3 x^2} \, dx-2 \text {Subst}\left (\int \frac {\sqrt {1+x}}{(-1+3 x)^2} \, dx,x,x^2\right )\\ &=\frac {4 x}{3 \left (1-3 x^2\right )}-\frac {2 \sqrt {1+x^2}}{3 \left (1-3 x^2\right )}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}}-\frac {1}{3} \text {Subst}\left (\int \frac {1}{\sqrt {1+x} (-1+3 x)} \, dx,x,x^2\right )\\ &=\frac {4 x}{3 \left (1-3 x^2\right )}-\frac {2 \sqrt {1+x^2}}{3 \left (1-3 x^2\right )}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}}-\frac {2}{3} \text {Subst}\left (\int \frac {1}{-4+3 x^2} \, dx,x,\sqrt {1+x^2}\right )\\ &=\frac {4 x}{3 \left (1-3 x^2\right )}-\frac {2 \sqrt {1+x^2}}{3 \left (1-3 x^2\right )}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}}+\frac {\tanh ^{-1}\left (\frac {1}{2} \sqrt {3} \sqrt {1+x^2}\right )}{3 \sqrt {3}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.19, size = 60, normalized size = 0.73 \begin {gather*} \frac {6 \left (-2 x+\sqrt {1+x^2}\right )-2 \sqrt {3} \left (-1+3 x^2\right ) \tanh ^{-1}\left (\frac {x-\sqrt {1+x^2}}{\sqrt {3}}\right )}{-9+27 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(6*(-2*x + Sqrt[1 + x^2]) - 2*Sqrt[3]*(-1 + 3*x^2)*ArcTanh[(x - Sqrt[1 + x^2])/Sqrt[3]])/(-9 + 27*x^2)

________________________________________________________________________________________

Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: maximum recursion depth exceeded} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

cought exception: maximum recursion depth exceeded

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(369\) vs. \(2(60)=120\).
time = 0.16, size = 370, normalized size = 4.51

method result size
trager \(-\frac {4 x}{3 \left (3 x^{2}-1\right )}+\frac {2 \sqrt {x^{2}+1}}{3 \left (3 x^{2}-1\right )}+\frac {\RootOf \left (\textit {\_Z}^{2}-3\right ) \ln \left (-\frac {2 \RootOf \left (\textit {\_Z}^{2}-3\right )+3 \sqrt {x^{2}+1}}{\RootOf \left (\textit {\_Z}^{2}-3\right ) x +1}\right )}{9}\) \(73\)
default \(-\frac {x}{2 \left (3 x^{2}-1\right )}-\frac {\arctanh \left (x \sqrt {3}\right ) \sqrt {3}}{9}-\frac {5 x}{18 \left (x^{2}-\frac {1}{3}\right )}-\sqrt {3}\, \left (-\frac {\left (\left (x -\frac {\sqrt {3}}{3}\right )^{2}+\frac {2 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )}{3}+\frac {4}{3}\right )^{\frac {3}{2}}}{12 \left (x -\frac {\sqrt {3}}{3}\right )}+\frac {\sqrt {3}\, \left (\frac {\sqrt {9 \left (x -\frac {\sqrt {3}}{3}\right )^{2}+6 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )+12}}{3}+\frac {\sqrt {3}\, \arcsinh \left (x \right )}{3}-\frac {2 \sqrt {3}\, \arctanh \left (\frac {3 \left (\frac {8}{3}+\frac {2 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )}{3}\right ) \sqrt {3}}{4 \sqrt {9 \left (x -\frac {\sqrt {3}}{3}\right )^{2}+6 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )+12}}\right )}{3}\right )}{36}+\frac {x \sqrt {\left (x -\frac {\sqrt {3}}{3}\right )^{2}+\frac {2 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )}{3}+\frac {4}{3}}}{12}+\frac {\arcsinh \left (x \right )}{12}\right )+\sqrt {3}\, \left (-\frac {\left (\left (x +\frac {\sqrt {3}}{3}\right )^{2}-\frac {2 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )}{3}+\frac {4}{3}\right )^{\frac {3}{2}}}{12 \left (x +\frac {\sqrt {3}}{3}\right )}-\frac {\sqrt {3}\, \left (\frac {\sqrt {9 \left (x +\frac {\sqrt {3}}{3}\right )^{2}-6 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )+12}}{3}-\frac {\sqrt {3}\, \arcsinh \left (x \right )}{3}-\frac {2 \sqrt {3}\, \arctanh \left (\frac {3 \left (\frac {8}{3}-\frac {2 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )}{3}\right ) \sqrt {3}}{4 \sqrt {9 \left (x +\frac {\sqrt {3}}{3}\right )^{2}-6 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )+12}}\right )}{3}\right )}{36}+\frac {x \sqrt {\left (x +\frac {\sqrt {3}}{3}\right )^{2}-\frac {2 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )}{3}+\frac {4}{3}}}{12}+\frac {\arcsinh \left (x \right )}{12}\right )\) \(370\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*x/(3*x^2-1)-1/9*arctanh(x*3^(1/2))*3^(1/2)-5/18*x/(x^2-1/3)-3^(1/2)*(-1/12/(x-1/3*3^(1/2))*((x-1/3*3^(1/2
))^2+2/3*3^(1/2)*(x-1/3*3^(1/2))+4/3)^(3/2)+1/36*3^(1/2)*(1/3*(9*(x-1/3*3^(1/2))^2+6*3^(1/2)*(x-1/3*3^(1/2))+1
2)^(1/2)+1/3*3^(1/2)*arcsinh(x)-2/3*3^(1/2)*arctanh(3/4*(8/3+2/3*3^(1/2)*(x-1/3*3^(1/2)))*3^(1/2)/(9*(x-1/3*3^
(1/2))^2+6*3^(1/2)*(x-1/3*3^(1/2))+12)^(1/2)))+1/12*x*((x-1/3*3^(1/2))^2+2/3*3^(1/2)*(x-1/3*3^(1/2))+4/3)^(1/2
)+1/12*arcsinh(x))+3^(1/2)*(-1/12/(x+1/3*3^(1/2))*((x+1/3*3^(1/2))^2-2/3*3^(1/2)*(x+1/3*3^(1/2))+4/3)^(3/2)-1/
36*3^(1/2)*(1/3*(9*(x+1/3*3^(1/2))^2-6*3^(1/2)*(x+1/3*3^(1/2))+12)^(1/2)-1/3*3^(1/2)*arcsinh(x)-2/3*3^(1/2)*ar
ctanh(3/4*(8/3-2/3*3^(1/2)*(x+1/3*3^(1/2)))*3^(1/2)/(9*(x+1/3*3^(1/2))^2-6*3^(1/2)*(x+1/3*3^(1/2))+12)^(1/2)))
+1/12*x*((x+1/3*3^(1/2))^2-2/3*3^(1/2)*(x+1/3*3^(1/2))+4/3)^(1/2)+1/12*arcsinh(x))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((2*x + sqrt(x^2 + 1))^(-2), x)

________________________________________________________________________________________

Fricas [A]
time = 0.31, size = 100, normalized size = 1.22 \begin {gather*} \frac {\sqrt {3} {\left (3 \, x^{2} - 1\right )} \log \left (\frac {3 \, x^{2} - 2 \, \sqrt {3} x + 1}{3 \, x^{2} - 1}\right ) + \sqrt {3} {\left (3 \, x^{2} - 1\right )} \log \left (\frac {3 \, x^{2} + 4 \, \sqrt {3} \sqrt {x^{2} + 1} + 7}{3 \, x^{2} - 1}\right ) - 24 \, x + 12 \, \sqrt {x^{2} + 1}}{18 \, {\left (3 \, x^{2} - 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/18*(sqrt(3)*(3*x^2 - 1)*log((3*x^2 - 2*sqrt(3)*x + 1)/(3*x^2 - 1)) + sqrt(3)*(3*x^2 - 1)*log((3*x^2 + 4*sqrt
(3)*sqrt(x^2 + 1) + 7)/(3*x^2 - 1)) - 24*x + 12*sqrt(x^2 + 1))/(3*x^2 - 1)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (2 x + \sqrt {x^{2} + 1}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((2*x + sqrt(x**2 + 1))**(-2), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 174 vs. \(2 (60) = 120\).
time = 0.02, size = 201, normalized size = 2.45 \begin {gather*} -\frac {4 x}{3 \left (3 x^{2}-1\right )}+\frac {\ln \left |\frac {6 x-2 \sqrt {3}}{6 x+2 \sqrt {3}}\right |}{2\cdot 3 \sqrt {3}}+2 \left (\frac {2 \left (\sqrt {x^{2}+1}-x+\frac 1{\sqrt {x^{2}+1}-x}\right )}{3 \left (3 \left (\sqrt {x^{2}+1}-x+\frac 1{\sqrt {x^{2}+1}-x}\right )^{2}-16\right )}-\frac {\ln \left (\frac {\left |6 \left (\sqrt {x^{2}+1}-x+\frac 1{\sqrt {x^{2}+1}-x}\right )-8 \sqrt {3}\right |}{6 \left (\sqrt {x^{2}+1}-x+\frac 1{\sqrt {x^{2}+1}-x}\right )+8 \sqrt {3}}\right )}{12 \sqrt {3}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/18*sqrt(3)*log(-1/2*abs(-6*x - 8*sqrt(3) + 6*sqrt(x^2 + 1) - 6/(x - sqrt(x^2 + 1)))/(3*x - 4*sqrt(3) - 3*sq
rt(x^2 + 1) + 3/(x - sqrt(x^2 + 1)))) + 1/18*sqrt(3)*log(abs((3*x - sqrt(3))/(3*x + sqrt(3)))) - 4/3*(x - sqrt
(x^2 + 1) + 1/(x - sqrt(x^2 + 1)))/(3*(x - sqrt(x^2 + 1) + 1/(x - sqrt(x^2 + 1)))^2 - 16) - 4/3*x/(3*x^2 - 1)

________________________________________________________________________________________

Mupad [B]
time = 0.57, size = 204, normalized size = 2.49 \begin {gather*} \frac {\sqrt {3}\,\left (\ln \left (x-\frac {\sqrt {3}}{3}\right )-\ln \left (x+\sqrt {3}+2\,\sqrt {x^2+1}\right )\right )}{18}-\frac {4\,x}{9\,\left (x^2-\frac {1}{3}\right )}+\frac {\sqrt {3}\,\left (\ln \left (x+\frac {\sqrt {3}}{3}\right )-\ln \left (x-\sqrt {3}-2\,\sqrt {x^2+1}\right )\right )}{18}-\frac {\sqrt {3}\,\left (6\,\ln \left (x-\frac {\sqrt {3}}{3}\right )-6\,\ln \left (x+\sqrt {3}+2\,\sqrt {x^2+1}\right )\right )}{54}-\frac {\sqrt {3}\,\left (6\,\ln \left (x+\frac {\sqrt {3}}{3}\right )-6\,\ln \left (x-\sqrt {3}-2\,\sqrt {x^2+1}\right )\right )}{54}+\frac {\sqrt {3}\,\sqrt {x^2+1}}{9\,\left (x-\frac {\sqrt {3}}{3}\right )}-\frac {\sqrt {3}\,\sqrt {x^2+1}}{9\,\left (x+\frac {\sqrt {3}}{3}\right )}+\frac {\sqrt {3}\,\mathrm {atan}\left (\sqrt {3}\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(3^(1/2)*(log(x - 3^(1/2)/3) - log(x + 3^(1/2) + 2*(x^2 + 1)^(1/2))))/18 + (3^(1/2)*atan(3^(1/2)*x*1i)*1i)/9 -
 (4*x)/(9*(x^2 - 1/3)) + (3^(1/2)*(log(x + 3^(1/2)/3) - log(x - 3^(1/2) - 2*(x^2 + 1)^(1/2))))/18 - (3^(1/2)*(
6*log(x - 3^(1/2)/3) - 6*log(x + 3^(1/2) + 2*(x^2 + 1)^(1/2))))/54 - (3^(1/2)*(6*log(x + 3^(1/2)/3) - 6*log(x
- 3^(1/2) - 2*(x^2 + 1)^(1/2))))/54 + (3^(1/2)*(x^2 + 1)^(1/2))/(9*(x - 3^(1/2)/3)) - (3^(1/2)*(x^2 + 1)^(1/2)
)/(9*(x + 3^(1/2)/3))

________________________________________________________________________________________