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

Optimal. Leaf size=31 \[ 2 \sqrt {-1+x}-2 \sqrt {2} \tan ^{-1}\left (\frac {\sqrt {-1+x}}{\sqrt {2}}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {52, 65, 209} \begin {gather*} 2 \sqrt {x-1}-2 \sqrt {2} \text {ArcTan}\left (\frac {\sqrt {x-1}}{\sqrt {2}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2*Sqrt[-1 + x] - 2*Sqrt[2]*ArcTan[Sqrt[-1 + x]/Sqrt[2]]

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 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 31, normalized size = 1.00 \begin {gather*} 2 \sqrt {-1+x}-2 \sqrt {2} \tan ^{-1}\left (\frac {\sqrt {-1+x}}{\sqrt {2}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2*Sqrt[-1 + x] - 2*Sqrt[2]*ArcTan[Sqrt[-1 + x]/Sqrt[2]]

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 25, normalized size = 0.81

method result size
derivativedivides \(-2 \arctan \left (\frac {\sqrt {-1+x}\, \sqrt {2}}{2}\right ) \sqrt {2}+2 \sqrt {-1+x}\) \(25\)
default \(-2 \arctan \left (\frac {\sqrt {-1+x}\, \sqrt {2}}{2}\right ) \sqrt {2}+2 \sqrt {-1+x}\) \(25\)
risch \(-2 \arctan \left (\frac {\sqrt {-1+x}\, \sqrt {2}}{2}\right ) \sqrt {2}+2 \sqrt {-1+x}\) \(25\)
trager \(2 \sqrt {-1+x}+\RootOf \left (\textit {\_Z}^{2}+2\right ) \ln \left (\frac {\RootOf \left (\textit {\_Z}^{2}+2\right ) x +4 \sqrt {-1+x}-3 \RootOf \left (\textit {\_Z}^{2}+2\right )}{1+x}\right )\) \(47\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 2.65, size = 24, normalized size = 0.77 \begin {gather*} -2 \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} \sqrt {x - 1}\right ) + 2 \, \sqrt {x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.81, size = 24, normalized size = 0.77 \begin {gather*} -2 \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} \sqrt {x - 1}\right ) + 2 \, \sqrt {x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 0.62, size = 75, normalized size = 2.42 \begin {gather*} \begin {cases} 2 \sqrt {x - 1} + 2 \sqrt {2} \operatorname {asin}{\left (\frac {\sqrt {2}}{\sqrt {x + 1}} \right )} & \text {for}\: \left |{x + 1}\right | > 2 \\2 i \sqrt {1 - x} + \sqrt {2} i \log {\left (x + 1 \right )} - 2 \sqrt {2} i \log {\left (\sqrt {\frac {1}{2} - \frac {x}{2}} + 1 \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((2*sqrt(x - 1) + 2*sqrt(2)*asin(sqrt(2)/sqrt(x + 1)), Abs(x + 1) > 2), (2*I*sqrt(1 - x) + sqrt(2)*I*
log(x + 1) - 2*sqrt(2)*I*log(sqrt(1/2 - x/2) + 1), True))

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 24, normalized size = 0.77 \begin {gather*} -2 \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} \sqrt {x - 1}\right ) + 2 \, \sqrt {x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.16, size = 24, normalized size = 0.77 \begin {gather*} 2\,\sqrt {x-1}-2\,\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {x-1}}{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*(x - 1)^(1/2) - 2*2^(1/2)*atan((2^(1/2)*(x - 1)^(1/2))/2)

________________________________________________________________________________________