3.610 \(\int \frac {-1+\sqrt {a+b x}}{1+\sqrt {a+b x}} \, dx\)

Optimal. Leaf size=33 \[ -\frac {4 \sqrt {a+b x}}{b}+\frac {4 \log \left (\sqrt {a+b x}+1\right )}{b}+x \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {431, 376, 77} \[ -\frac {4 \sqrt {a+b x}}{b}+\frac {4 \log \left (\sqrt {a+b x}+1\right )}{b}+x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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

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 431

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*} \int \frac {-1+\sqrt {a+b x}}{1+\sqrt {a+b x}} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {-1+\sqrt {x}}{1+\sqrt {x}} \, dx,x,a+b x\right )}{b}\\ &=\frac {2 \operatorname {Subst}\left (\int \frac {(-1+x) x}{1+x} \, dx,x,\sqrt {a+b x}\right )}{b}\\ &=\frac {2 \operatorname {Subst}\left (\int \left (-2+x+\frac {2}{1+x}\right ) \, dx,x,\sqrt {a+b x}\right )}{b}\\ &=x-\frac {4 \sqrt {a+b x}}{b}+\frac {4 \log \left (1+\sqrt {a+b x}\right )}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 33, normalized size = 1.00 \[ -\frac {4 \sqrt {a+b x}}{b}+\frac {4 \log \left (\sqrt {a+b x}+1\right )}{b}+x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 29, normalized size = 0.88 \[ \frac {b x - 4 \, \sqrt {b x + a} + 4 \, \log \left (\sqrt {b x + a} + 1\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b*x - 4*sqrt(b*x + a) + 4*log(sqrt(b*x + a) + 1))/b

________________________________________________________________________________________

giac [A]  time = 0.36, size = 38, normalized size = 1.15 \[ \frac {4 \, \log \left (\sqrt {b x + a} + 1\right )}{b} + \frac {{\left (b x + a\right )} b - 4 \, \sqrt {b x + a} b}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 35, normalized size = 1.06 \[ x +\frac {a}{b}+\frac {4 \ln \left (1+\sqrt {b x +a}\right )}{b}-\frac {4 \sqrt {b x +a}}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-1+(b*x+a)^(1/2))/(1+(b*x+a)^(1/2)),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.05, size = 30, normalized size = 0.91 \[ \frac {b x + a - 4 \, \sqrt {b x + a} + 4 \, \log \left (\sqrt {b x + a} + 1\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b*x + a - 4*sqrt(b*x + a) + 4*log(sqrt(b*x + a) + 1))/b

________________________________________________________________________________________

mupad [B]  time = 3.02, size = 29, normalized size = 0.88 \[ x+\frac {4\,\ln \left (\sqrt {a+b\,x}+1\right )}{b}-\frac {4\,\sqrt {a+b\,x}}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*x)^(1/2) - 1)/((a + b*x)^(1/2) + 1),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.44, size = 42, normalized size = 1.27 \[ \begin {cases} x - \frac {4 \sqrt {a + b x}}{b} + \frac {4 \log {\left (\sqrt {a + b x} + 1 \right )}}{b} & \text {for}\: b \neq 0 \\\frac {x \left (\sqrt {a} - 1\right )}{\sqrt {a} + 1} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((x - 4*sqrt(a + b*x)/b + 4*log(sqrt(a + b*x) + 1)/b, Ne(b, 0)), (x*(sqrt(a) - 1)/(sqrt(a) + 1), True
))

________________________________________________________________________________________