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

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

Optimal result

Integrand size = 11, antiderivative size = 22 \[ \int \sqrt {\frac {x}{1+x}} \, dx=\sqrt {x} \sqrt {1+x}-\text {arcsinh}\left (\sqrt {x}\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {1978, 52, 56, 221} \[ \int \sqrt {\frac {x}{1+x}} \, dx=\sqrt {x} \sqrt {x+1}-\text {arcsinh}\left (\sqrt {x}\right ) \]

[In]

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

[Out]

Sqrt[x]*Sqrt[1 + x] - ArcSinh[Sqrt[x]]

Rule 52

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

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 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 1978

Int[(u_.)*(((e_.)*((a_.) + (b_.)*(x_)^(n_.)))/((c_) + (d_.)*(x_)^(n_.)))^(p_), x_Symbol] :> Int[u*((a*e + b*e*
x^n)^p/(c + d*x^n)^p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && GtQ[b*d*e, 0] && GtQ[c - a*(d/b), 0]

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

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(51\) vs. \(2(22)=44\).

Time = 0.00 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.32 \[ \int \sqrt {\frac {x}{1+x}} \, dx=\frac {\sqrt {\frac {x}{1+x}} \left (\sqrt {x} (1+x)+\sqrt {1+x} \log \left (-\sqrt {x}+\sqrt {1+x}\right )\right )}{\sqrt {x}} \]

[In]

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

[Out]

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

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(44\) vs. \(2(16)=32\).

Time = 0.11 (sec) , antiderivative size = 45, normalized size of antiderivative = 2.05

method result size
default \(\frac {\sqrt {\frac {x}{x +1}}\, \left (x +1\right ) \left (2 \sqrt {x^{2}+x}-\ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )\right )}{2 \sqrt {\left (x +1\right ) x}}\) \(45\)
risch \(\left (x +1\right ) \sqrt {\frac {x}{x +1}}-\frac {\ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right ) \sqrt {\frac {x}{x +1}}\, \sqrt {\left (x +1\right ) x}}{2 x}\) \(47\)
trager \(2 \left (\frac {x}{2}+\frac {1}{2}\right ) \sqrt {\frac {x}{x +1}}-\frac {\ln \left (2 \sqrt {\frac {x}{x +1}}\, x +2 \sqrt {\frac {x}{x +1}}+2 x +1\right )}{2}\) \(49\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (16) = 32\).

Time = 0.31 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.91 \[ \int \sqrt {\frac {x}{1+x}} \, dx={\left (x + 1\right )} \sqrt {\frac {x}{x + 1}} - \frac {1}{2} \, \log \left (\sqrt {\frac {x}{x + 1}} + 1\right ) + \frac {1}{2} \, \log \left (\sqrt {\frac {x}{x + 1}} - 1\right ) \]

[In]

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

[Out]

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

Sympy [F]

\[ \int \sqrt {\frac {x}{1+x}} \, dx=\int \sqrt {\frac {x}{x + 1}}\, dx \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (16) = 32\).

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

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (16) = 32\).

Time = 0.34 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.59 \[ \int \sqrt {\frac {x}{1+x}} \, dx=\frac {1}{2} \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} + x} - 1 \right |}\right ) \mathrm {sgn}\left (x + 1\right ) + \sqrt {x^{2} + x} \mathrm {sgn}\left (x + 1\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 18.84 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.59 \[ \int \sqrt {\frac {x}{1+x}} \, dx=-\mathrm {atanh}\left (\sqrt {\frac {x}{x+1}}\right )-\frac {\sqrt {\frac {x}{x+1}}}{\frac {x}{x+1}-1} \]

[In]

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

[Out]

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