\(\int \frac {1+\sqrt {1+x}}{-1+\sqrt {1+x}} \, dx\) [212]

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

Optimal result

Integrand size = 21, antiderivative size = 25 \[ \int \frac {1+\sqrt {1+x}}{-1+\sqrt {1+x}} \, dx=x+4 \sqrt {1+x}+4 \log \left (1-\sqrt {1+x}\right ) \]

[Out]

x+4*ln(1-(1+x)^(1/2))+4*(1+x)^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {442, 383, 78} \[ \int \frac {1+\sqrt {1+x}}{-1+\sqrt {1+x}} \, dx=x+4 \sqrt {x+1}+4 \log \left (1-\sqrt {x+1}\right ) \]

[In]

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

[Out]

x + 4*Sqrt[1 + x] + 4*Log[1 - Sqrt[1 + x]]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 383

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> With[{g = Denominator[n]}, Dis
t[g, Subst[Int[x^(g - 1)*(a + b*x^(g*n))^p*(c + d*x^(g*n))^q, x], x, x^(1/g)], x]] /; FreeQ[{a, b, c, d, p, q}
, x] && NeQ[b*c - a*d, 0] && FractionQ[n]

Rule 442

Int[((a_.) + (b_.)*(u_)^(n_))^(p_.)*((c_.) + (d_.)*(u_)^(n_))^(q_.), x_Symbol] :> Dist[1/Coefficient[u, x, 1],
 Subst[Int[(a + b*x^n)^p*(c + d*x^n)^q, x], x, u], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && LinearQ[u, x] && N
eQ[u, x]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1+\sqrt {x}}{-1+\sqrt {x}} \, dx,x,1+x\right ) \\ & = 2 \text {Subst}\left (\int \frac {x (1+x)}{-1+x} \, dx,x,\sqrt {1+x}\right ) \\ & = 2 \text {Subst}\left (\int \left (2+\frac {2}{-1+x}+x\right ) \, dx,x,\sqrt {1+x}\right ) \\ & = x+4 \sqrt {1+x}+4 \log \left (1-\sqrt {1+x}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.96 \[ \int \frac {1+\sqrt {1+x}}{-1+\sqrt {1+x}} \, dx=1+x+4 \sqrt {1+x}+4 \log \left (-1+\sqrt {1+x}\right ) \]

[In]

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

[Out]

1 + x + 4*Sqrt[1 + x] + 4*Log[-1 + Sqrt[1 + x]]

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84

method result size
derivativedivides \(1+x +4 \sqrt {1+x}+4 \ln \left (-1+\sqrt {1+x}\right )\) \(21\)
default \(1+x +4 \sqrt {1+x}+4 \ln \left (-1+\sqrt {1+x}\right )\) \(21\)
trager \(-1+x +4 \sqrt {1+x}+2 \ln \left (2 \sqrt {1+x}-2-x \right )\) \(26\)

[In]

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

[Out]

1+x+4*(1+x)^(1/2)+4*ln(-1+(1+x)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {1+\sqrt {1+x}}{-1+\sqrt {1+x}} \, dx=x + 4 \, \sqrt {x + 1} + 4 \, \log \left (\sqrt {x + 1} - 1\right ) \]

[In]

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

[Out]

x + 4*sqrt(x + 1) + 4*log(sqrt(x + 1) - 1)

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {1+\sqrt {1+x}}{-1+\sqrt {1+x}} \, dx=x + 4 \sqrt {x + 1} + 4 \log {\left (\sqrt {x + 1} - 1 \right )} \]

[In]

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

[Out]

x + 4*sqrt(x + 1) + 4*log(sqrt(x + 1) - 1)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {1+\sqrt {1+x}}{-1+\sqrt {1+x}} \, dx=x + 4 \, \sqrt {x + 1} + 4 \, \log \left (\sqrt {x + 1} - 1\right ) + 1 \]

[In]

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

[Out]

x + 4*sqrt(x + 1) + 4*log(sqrt(x + 1) - 1) + 1

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84 \[ \int \frac {1+\sqrt {1+x}}{-1+\sqrt {1+x}} \, dx=x + 4 \, \sqrt {x + 1} + 4 \, \log \left ({\left | \sqrt {x + 1} - 1 \right |}\right ) + 1 \]

[In]

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

[Out]

x + 4*sqrt(x + 1) + 4*log(abs(sqrt(x + 1) - 1)) + 1

Mupad [B] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {1+\sqrt {1+x}}{-1+\sqrt {1+x}} \, dx=x+4\,\ln \left (\sqrt {x+1}-1\right )+4\,\sqrt {x+1} \]

[In]

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

[Out]

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