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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 123 \[ \int \frac {1}{\left (2 \sqrt {x}+\sqrt {1+x}\right )^2} \, dx=\frac {\sqrt {x} \left (4-4 \sqrt {1+x}\right )}{3+3 x-3 \sqrt {1+x}+\sqrt {x} \left (-6+6 \sqrt {1+x}\right )}-\frac {2}{9} \log \left (-1-\sqrt {x}+\sqrt {1+x}\right )-2 \log \left (-1+\sqrt {x}+\sqrt {1+x}\right )+\frac {10}{9} \log \left (1+x-\sqrt {1+x}+\sqrt {x} \left (-2+2 \sqrt {1+x}\right )\right ) \]

[Out]

x^(1/2)*(4-4*(1+x)^(1/2))/(3+3*x-3*(1+x)^(1/2)+x^(1/2)*(-6+6*(1+x)^(1/2)))-2/9*ln(-1-x^(1/2)+(1+x)^(1/2))-2*ln
(-1+x^(1/2)+(1+x)^(1/2))+10/9*ln(1+x-(1+x)^(1/2)+x^(1/2)*(-2+2*(1+x)^(1/2)))

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.60, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {6874, 99, 163, 56, 221, 95, 213} \[ \int \frac {1}{\left (2 \sqrt {x}+\sqrt {1+x}\right )^2} \, dx=-\frac {8}{9} \text {arcsinh}\left (\sqrt {x}\right )+\frac {10}{9} \text {arctanh}\left (\frac {2 \sqrt {x}}{\sqrt {x+1}}\right )-\frac {4 \sqrt {x} \sqrt {x+1}}{3 (1-3 x)}+\frac {8}{9 (1-3 x)}+\frac {5}{9} \log (1-3 x) \]

[In]

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

[Out]

8/(9*(1 - 3*x)) - (4*Sqrt[x]*Sqrt[1 + x])/(3*(1 - 3*x)) - (8*ArcSinh[Sqrt[x]])/9 + (10*ArcTanh[(2*Sqrt[x])/Sqr
t[1 + x]])/9 + (5*Log[1 - 3*x])/9

Rule 56

Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Dist[2/Sqrt[b], Subst[Int[1/Sqrt[b*c -
 a*d + d*x^2], x], x, Sqrt[a + b*x]], x] /; FreeQ[{a, b, c, d}, x] && GtQ[b*c - a*d, 0] && GtQ[b, 0]

Rule 95

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 99

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(a + b*
x)^(m + 1)*(c + d*x)^n*((e + f*x)^p/(b*(m + 1))), x] - Dist[1/(b*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n
- 1)*(e + f*x)^(p - 1)*Simp[d*e*n + c*f*p + d*f*(n + p)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && LtQ[m
, -1] && GtQ[n, 0] && GtQ[p, 0] && (IntegersQ[2*m, 2*n, 2*p] || IntegersQ[m, n + p] || IntegersQ[p, m + n])

Rule 163

Int[(((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/((a_.) + (b_.)*(x_)), x_Symbol]
 :> Dist[h/b, Int[(c + d*x)^n*(e + f*x)^p, x], x] + Dist[(b*g - a*h)/b, Int[(c + d*x)^n*((e + f*x)^p/(a + b*x)
), x], x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x]

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 221

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt[a])]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {8}{3 (-1+3 x)^2}-\frac {4 \sqrt {x} \sqrt {1+x}}{(-1+3 x)^2}+\frac {5}{3 (-1+3 x)}\right ) \, dx \\ & = \frac {8}{9 (1-3 x)}+\frac {5}{9} \log (1-3 x)-4 \int \frac {\sqrt {x} \sqrt {1+x}}{(-1+3 x)^2} \, dx \\ & = \frac {8}{9 (1-3 x)}-\frac {4 \sqrt {x} \sqrt {1+x}}{3 (1-3 x)}+\frac {5}{9} \log (1-3 x)-\frac {4}{3} \int \frac {\frac {1}{2}+x}{\sqrt {x} \sqrt {1+x} (-1+3 x)} \, dx \\ & = \frac {8}{9 (1-3 x)}-\frac {4 \sqrt {x} \sqrt {1+x}}{3 (1-3 x)}+\frac {5}{9} \log (1-3 x)-\frac {4}{9} \int \frac {1}{\sqrt {x} \sqrt {1+x}} \, dx-\frac {10}{9} \int \frac {1}{\sqrt {x} \sqrt {1+x} (-1+3 x)} \, dx \\ & = \frac {8}{9 (1-3 x)}-\frac {4 \sqrt {x} \sqrt {1+x}}{3 (1-3 x)}+\frac {5}{9} \log (1-3 x)-\frac {8}{9} \text {Subst}\left (\int \frac {1}{\sqrt {1+x^2}} \, dx,x,\sqrt {x}\right )-\frac {20}{9} \text {Subst}\left (\int \frac {1}{-1+4 x^2} \, dx,x,\frac {\sqrt {x}}{\sqrt {1+x}}\right ) \\ & = \frac {8}{9 (1-3 x)}-\frac {4 \sqrt {x} \sqrt {1+x}}{3 (1-3 x)}-\frac {8 \text {arcsinh}\left (\sqrt {x}\right )}{9}+\frac {10}{9} \text {arctanh}\left (\frac {2 \sqrt {x}}{\sqrt {1+x}}\right )+\frac {5}{9} \log (1-3 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.59 \[ \int \frac {1}{\left (2 \sqrt {x}+\sqrt {1+x}\right )^2} \, dx=\frac {2 \left (-4+6 \sqrt {x} \sqrt {1+x}+(1-3 x) \log \left (-\sqrt {x}+\sqrt {1+x}\right )+5 (-1+3 x) \log \left (1-x+\sqrt {x} \sqrt {1+x}\right )\right )}{-9+27 x} \]

[In]

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

[Out]

(2*(-4 + 6*Sqrt[x]*Sqrt[1 + x] + (1 - 3*x)*Log[-Sqrt[x] + Sqrt[1 + x]] + 5*(-1 + 3*x)*Log[1 - x + Sqrt[x]*Sqrt
[1 + x]]))/(-9 + 27*x)

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.93

method result size
default \(-\frac {8}{9 \left (-1+3 x \right )}+\frac {5 \ln \left (-1+3 x \right )}{9}-\frac {\sqrt {x}\, \sqrt {1+x}\, \left (12 \ln \left (\frac {1}{2}+x +\sqrt {x \left (1+x \right )}\right ) x -15 \,\operatorname {arctanh}\left (\frac {1+5 x}{4 \sqrt {x \left (1+x \right )}}\right ) x -4 \ln \left (\frac {1}{2}+x +\sqrt {x \left (1+x \right )}\right )+5 \,\operatorname {arctanh}\left (\frac {1+5 x}{4 \sqrt {x \left (1+x \right )}}\right )-12 \sqrt {x \left (1+x \right )}\right )}{9 \sqrt {x \left (1+x \right )}\, \left (-1+3 x \right )}\) \(115\)

[In]

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

[Out]

-8/9/(-1+3*x)+5/9*ln(-1+3*x)-1/9*x^(1/2)*(1+x)^(1/2)*(12*ln(1/2+x+(x*(1+x))^(1/2))*x-15*arctanh(1/4*(1+5*x)/(x
*(1+x))^(1/2))*x-4*ln(1/2+x+(x*(1+x))^(1/2))+5*arctanh(1/4*(1+5*x)/(x*(1+x))^(1/2))-12*(x*(1+x))^(1/2))/(x*(1+
x))^(1/2)/(-1+3*x)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.85 \[ \int \frac {1}{\left (2 \sqrt {x}+\sqrt {1+x}\right )^2} \, dx=-\frac {5 \, {\left (3 \, x - 1\right )} \log \left (3 \, \sqrt {x + 1} \sqrt {x} - 3 \, x - 1\right ) - 4 \, {\left (3 \, x - 1\right )} \log \left (2 \, \sqrt {x + 1} \sqrt {x} - 2 \, x - 1\right ) - 5 \, {\left (3 \, x - 1\right )} \log \left (\sqrt {x + 1} \sqrt {x} - x + 1\right ) - 5 \, {\left (3 \, x - 1\right )} \log \left (3 \, x - 1\right ) - 12 \, \sqrt {x + 1} \sqrt {x} - 12 \, x + 12}{9 \, {\left (3 \, x - 1\right )}} \]

[In]

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

[Out]

-1/9*(5*(3*x - 1)*log(3*sqrt(x + 1)*sqrt(x) - 3*x - 1) - 4*(3*x - 1)*log(2*sqrt(x + 1)*sqrt(x) - 2*x - 1) - 5*
(3*x - 1)*log(sqrt(x + 1)*sqrt(x) - x + 1) - 5*(3*x - 1)*log(3*x - 1) - 12*sqrt(x + 1)*sqrt(x) - 12*x + 12)/(3
*x - 1)

Sympy [F]

\[ \int \frac {1}{\left (2 \sqrt {x}+\sqrt {1+x}\right )^2} \, dx=\int \frac {1}{\left (2 \sqrt {x} + \sqrt {x + 1}\right )^{2}}\, dx \]

[In]

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

[Out]

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

Maxima [F]

\[ \int \frac {1}{\left (2 \sqrt {x}+\sqrt {1+x}\right )^2} \, dx=\int { \frac {1}{{\left (\sqrt {x + 1} + 2 \, \sqrt {x}\right )}^{2}} \,d x } \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.08 \[ \int \frac {1}{\left (2 \sqrt {x}+\sqrt {1+x}\right )^2} \, dx=-\frac {8 \, {\left (5 \, {\left (\sqrt {x + 1} - \sqrt {x}\right )}^{2} - 3\right )}}{9 \, {\left (3 \, {\left (\sqrt {x + 1} - \sqrt {x}\right )}^{4} - 10 \, {\left (\sqrt {x + 1} - \sqrt {x}\right )}^{2} + 3\right )}} - \frac {5 \, x + 1}{3 \, {\left (3 \, x - 1\right )}} + \frac {4}{9} \, \log \left ({\left (\sqrt {x + 1} - \sqrt {x}\right )}^{2}\right ) - \frac {5}{9} \, \log \left ({\left | 3 \, {\left (\sqrt {x + 1} - \sqrt {x}\right )}^{2} - 1 \right |}\right ) + \frac {5}{9} \, \log \left ({\left | {\left (\sqrt {x + 1} - \sqrt {x}\right )}^{2} - 3 \right |}\right ) + \frac {5}{9} \, \log \left ({\left | 3 \, x - 1 \right |}\right ) \]

[In]

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

[Out]

-8/9*(5*(sqrt(x + 1) - sqrt(x))^2 - 3)/(3*(sqrt(x + 1) - sqrt(x))^4 - 10*(sqrt(x + 1) - sqrt(x))^2 + 3) - 1/3*
(5*x + 1)/(3*x - 1) + 4/9*log((sqrt(x + 1) - sqrt(x))^2) - 5/9*log(abs(3*(sqrt(x + 1) - sqrt(x))^2 - 1)) + 5/9
*log(abs((sqrt(x + 1) - sqrt(x))^2 - 3)) + 5/9*log(abs(3*x - 1))

Mupad [B] (verification not implemented)

Time = 6.91 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.67 \[ \int \frac {1}{\left (2 \sqrt {x}+\sqrt {1+x}\right )^2} \, dx=\frac {10\,\mathrm {atanh}\left (\frac {2662400\,\sqrt {x}}{81\,\left (\frac {665600\,x}{81\,{\left (\sqrt {x+1}-1\right )}^2}+\frac {665600}{81}\right )\,\left (\sqrt {x+1}-1\right )}\right )}{9}+\frac {5\,\ln \left (x-\frac {1}{3}\right )}{9}-\frac {16\,\mathrm {atanh}\left (\frac {\sqrt {x}}{\sqrt {x+1}-1}\right )}{9}-\frac {8}{27\,\left (x-\frac {1}{3}\right )}+\frac {4\,\sqrt {x}\,\sqrt {x+1}}{3\,\left (3\,x-1\right )} \]

[In]

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

[Out]

(10*atanh((2662400*x^(1/2))/(81*((665600*x)/(81*((x + 1)^(1/2) - 1)^2) + 665600/81)*((x + 1)^(1/2) - 1))))/9 +
 (5*log(x - 1/3))/9 - (16*atanh(x^(1/2)/((x + 1)^(1/2) - 1)))/9 - 8/(27*(x - 1/3)) + (4*x^(1/2)*(x + 1)^(1/2))
/(3*(3*x - 1))