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

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

Optimal result

Integrand size = 17, antiderivative size = 21 \[ \int \frac {1}{-\sqrt {-1+x}+\sqrt {x}} \, dx=\frac {2}{3} (-1+x)^{3/2}+\frac {2 x^{3/2}}{3} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2131, 30, 32} \[ \int \frac {1}{-\sqrt {-1+x}+\sqrt {x}} \, dx=\frac {2 x^{3/2}}{3}+\frac {2}{3} (x-1)^{3/2} \]

[In]

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

[Out]

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2131

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

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

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {1}{-\sqrt {-1+x}+\sqrt {x}} \, dx=\frac {2}{3} \left ((-1+x)^{3/2}+x^{3/2}\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.67

method result size
default \(\frac {2 \left (-1+x \right )^{\frac {3}{2}}}{3}+\frac {2 x^{\frac {3}{2}}}{3}\) \(14\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.62 \[ \int \frac {1}{-\sqrt {-1+x}+\sqrt {x}} \, dx=\frac {2}{3} \, {\left (x - 1\right )}^{\frac {3}{2}} + \frac {2}{3} \, x^{\frac {3}{2}} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (17) = 34\).

Time = 0.20 (sec) , antiderivative size = 63, normalized size of antiderivative = 3.00 \[ \int \frac {1}{-\sqrt {-1+x}+\sqrt {x}} \, dx=\frac {2 \sqrt {x} \sqrt {x - 1}}{- 3 \sqrt {x} + 3 \sqrt {x - 1}} - \frac {4 x}{- 3 \sqrt {x} + 3 \sqrt {x - 1}} + \frac {2}{- 3 \sqrt {x} + 3 \sqrt {x - 1}} \]

[In]

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

[Out]

2*sqrt(x)*sqrt(x - 1)/(-3*sqrt(x) + 3*sqrt(x - 1)) - 4*x/(-3*sqrt(x) + 3*sqrt(x - 1)) + 2/(-3*sqrt(x) + 3*sqrt
(x - 1))

Maxima [F]

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

[In]

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

[Out]

-integrate(1/(sqrt(x - 1) - sqrt(x)), x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.62 \[ \int \frac {1}{-\sqrt {-1+x}+\sqrt {x}} \, dx=\frac {2}{3} \, {\left (x - 1\right )}^{\frac {3}{2}} + \frac {2}{3} \, x^{\frac {3}{2}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00 \[ \int \frac {1}{-\sqrt {-1+x}+\sqrt {x}} \, dx=\frac {2\,x\,\sqrt {x-1}}{3}-\frac {2\,\sqrt {x-1}}{3}+\frac {2\,x^{3/2}}{3} \]

[In]

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

[Out]

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