### 3.232 $$\int \frac{1+\sqrt{x}}{-1+\sqrt{x}} \, dx$$

Optimal. Leaf size=21 $x+4 \sqrt{x}+4 \log \left (1-\sqrt{x}\right )$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0112809, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 17, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.118, Rules used = {376, 77} $x+4 \sqrt{x}+4 \log \left (1-\sqrt{x}\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 376

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 77

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]))))

Rubi steps

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

Mathematica [A]  time = 0.0079634, size = 20, normalized size = 0.95 $x+4 \left (\sqrt{x}+\log \left (1-\sqrt{x}\right )\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 16, normalized size = 0.8 \begin{align*} x+4\,\sqrt{x}+4\,\ln \left ( \sqrt{x}-1 \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.950811, size = 20, normalized size = 0.95 \begin{align*} x + 4 \, \sqrt{x} + 4 \, \log \left (\sqrt{x} - 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.19142, size = 49, normalized size = 2.33 \begin{align*} x + 4 \, \sqrt{x} + 4 \, \log \left (\sqrt{x} - 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.136053, size = 17, normalized size = 0.81 \begin{align*} 4 \sqrt{x} + x + 4 \log{\left (\sqrt{x} - 1 \right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.05136, size = 22, normalized size = 1.05 \begin{align*} x + 4 \, \sqrt{x} + 4 \, \log \left ({\left | \sqrt{x} - 1 \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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