\(\int \frac {\sqrt {b-\frac {a}{x}}}{x^2 \sqrt {a-b x}} \, dx\) [586]

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

Optimal result

Integrand size = 26, antiderivative size = 29 \[ \int \frac {\sqrt {b-\frac {a}{x}}}{x^2 \sqrt {a-b x}} \, dx=-\frac {2 \sqrt {b-\frac {a}{x}}}{3 x \sqrt {a-b x}} \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 29, 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.115, Rules used = {529, 23, 30} \[ \int \frac {\sqrt {b-\frac {a}{x}}}{x^2 \sqrt {a-b x}} \, dx=-\frac {2 \sqrt {b-\frac {a}{x}}}{3 x \sqrt {a-b x}} \]

[In]

Int[Sqrt[b - a/x]/(x^2*Sqrt[a - b*x]),x]

[Out]

(-2*Sqrt[b - a/x])/(3*x*Sqrt[a - b*x])

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rule 30

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

Rule 529

Int[(x_)^(m_.)*((c_) + (d_.)*(x_)^(mn_.))^(q_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Dist[x^(n*FracPar
t[q])*((c + d/x^n)^FracPart[q]/(d + c*x^n)^FracPart[q]), Int[x^(m - n*q)*(a + b*x^n)^p*(d + c*x^n)^q, x], x] /
; FreeQ[{a, b, c, d, m, n, p, q}, x] && EqQ[mn, -n] &&  !IntegerQ[q] &&  !IntegerQ[p]

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

Mathematica [A] (verified)

Time = 3.14 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.90 \[ \int \frac {\sqrt {b-\frac {a}{x}}}{x^2 \sqrt {a-b x}} \, dx=\frac {2 \left (b-\frac {a}{x}\right )^{3/2}}{3 (a-b x)^{3/2}} \]

[In]

Integrate[Sqrt[b - a/x]/(x^2*Sqrt[a - b*x]),x]

[Out]

(2*(b - a/x)^(3/2))/(3*(a - b*x)^(3/2))

Maple [A] (verified)

Time = 1.04 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.93

method result size
gosper \(-\frac {2 \sqrt {-\frac {-b x +a}{x}}}{3 x \sqrt {-b x +a}}\) \(27\)
default \(-\frac {2 \sqrt {-\frac {-b x +a}{x}}}{3 x \sqrt {-b x +a}}\) \(27\)
risch \(\frac {2 \sqrt {-\frac {-b x +a}{x}}\, \sqrt {-\left (-b x +a \right ) x}\, \sqrt {\frac {x \left (-b x +a \right )}{b x -a}}\, \left (b x -a \right )}{3 \left (-b x +a \right )^{\frac {3}{2}} \sqrt {\left (b x -a \right ) x}\, \sqrt {-x}\, x}\) \(80\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.21 \[ \int \frac {\sqrt {b-\frac {a}{x}}}{x^2 \sqrt {a-b x}} \, dx=\frac {2 \, \sqrt {-b x + a} \sqrt {\frac {b x - a}{x}}}{3 \, {\left (b x^{2} - a x\right )}} \]

[In]

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

[Out]

2/3*sqrt(-b*x + a)*sqrt((b*x - a)/x)/(b*x^2 - a*x)

Sympy [F]

\[ \int \frac {\sqrt {b-\frac {a}{x}}}{x^2 \sqrt {a-b x}} \, dx=\int \frac {\sqrt {- \frac {a}{x} + b}}{x^{2} \sqrt {a - b x}}\, dx \]

[In]

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

[Out]

Integral(sqrt(-a/x + b)/(x**2*sqrt(a - b*x)), x)

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.21 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.17 \[ \int \frac {\sqrt {b-\frac {a}{x}}}{x^2 \sqrt {a-b x}} \, dx=\frac {2 i}{3 \, x^{\frac {3}{2}}} \]

[In]

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

[Out]

2/3*I/x^(3/2)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (23) = 46\).

Time = 0.38 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.07 \[ \int \frac {\sqrt {b-\frac {a}{x}}}{x^2 \sqrt {a-b x}} \, dx=\frac {2 \, {\left (\frac {b^{5}}{{\left ({\left (b x - a\right )} b + a b\right )} \sqrt {-{\left (b x - a\right )} b - a b}} - \frac {b^{4}}{\sqrt {-a b} a}\right )} {\left | b \right |} \mathrm {sgn}\left (x\right )}{3 \, b^{3}} \]

[In]

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

[Out]

2/3*(b^5/(((b*x - a)*b + a*b)*sqrt(-(b*x - a)*b - a*b)) - b^4/(sqrt(-a*b)*a))*abs(b)*sgn(x)/b^3

Mupad [B] (verification not implemented)

Time = 16.74 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.79 \[ \int \frac {\sqrt {b-\frac {a}{x}}}{x^2 \sqrt {a-b x}} \, dx=-\frac {2\,\sqrt {b-\frac {a}{x}}}{3\,x\,\sqrt {a-b\,x}} \]

[In]

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

[Out]

-(2*(b - a/x)^(1/2))/(3*x*(a - b*x)^(1/2))