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

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

Optimal result

Integrand size = 15, antiderivative size = 11 \[ \int \frac {\sqrt {1+\frac {1}{x}}}{(1+x)^2} \, dx=\frac {2}{\sqrt {1+\frac {1}{x}}} \]

[Out]

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

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {25, 267} \[ \int \frac {\sqrt {1+\frac {1}{x}}}{(1+x)^2} \, dx=\frac {2}{\sqrt {\frac {1}{x}+1}} \]

[In]

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

[Out]

2/Sqrt[1 + x^(-1)]

Rule 25

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

Rule 267

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{\left (1+\frac {1}{x}\right )^{3/2} x^2} \, dx \\ & = \frac {2}{\sqrt {1+\frac {1}{x}}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.73 \[ \int \frac {\sqrt {1+\frac {1}{x}}}{(1+x)^2} \, dx=\frac {2 x \sqrt {\frac {1+x}{x}}}{1+x} \]

[In]

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

[Out]

(2*x*Sqrt[(1 + x)/x])/(1 + x)

Maple [A] (verified)

Time = 1.08 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.64

method result size
gosper \(\frac {2 x \sqrt {\frac {x +1}{x}}}{x +1}\) \(18\)
risch \(\frac {2 x \sqrt {\frac {x +1}{x}}}{x +1}\) \(18\)
trager \(\frac {2 x \sqrt {-\frac {-x -1}{x}}}{x +1}\) \(21\)
default \(\frac {2 \sqrt {x^{2}+x}\, x \sqrt {\frac {x +1}{x}}}{\left (x +1\right ) \sqrt {\left (x +1\right ) x}}\) \(32\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.55 \[ \int \frac {\sqrt {1+\frac {1}{x}}}{(1+x)^2} \, dx=\frac {2 \, x \sqrt {\frac {x + 1}{x}}}{x + 1} \]

[In]

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

[Out]

2*x*sqrt((x + 1)/x)/(x + 1)

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 23 vs. \(2 (9) = 18\).

Time = 0.33 (sec) , antiderivative size = 23, normalized size of antiderivative = 2.09 \[ \int \frac {\sqrt {1+\frac {1}{x}}}{(1+x)^2} \, dx=\frac {2 \, \mathrm {sgn}\left (x\right )}{x - \sqrt {x^{2} + x} + 1} - 2 \, \mathrm {sgn}\left (x\right ) \]

[In]

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

[Out]

2*sgn(x)/(x - sqrt(x^2 + x) + 1) - 2*sgn(x)

Mupad [B] (verification not implemented)

Time = 18.25 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.36 \[ \int \frac {\sqrt {1+\frac {1}{x}}}{(1+x)^2} \, dx=\frac {2\,x\,\sqrt {\frac {1}{x}+1}}{x+1} \]

[In]

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

[Out]

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