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

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

[Out]

-ArcTan[(a + b - 2*x)/(2*Sqrt[-(a*b) + (a + b)*x - x^2])]

_______________________________________________________________________________________

Rubi [A]  time = 0.0263628, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ -\tan ^{-1}\left (\frac{a+b-2 x}{2 \sqrt{x (a+b)-a b-x^2}}\right ) \]

Antiderivative was successfully verified.

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

[Out]

-ArcTan[(a + b - 2*x)/(2*Sqrt[-(a*b) + (a + b)*x - x^2])]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 1.19132, size = 26, normalized size = 0.81 \[ - \operatorname{atan}{\left (\frac{a + b - 2 x}{2 \sqrt{- a b - x^{2} + x \left (a + b\right )}} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/((b-x)*(-a+x))**(1/2),x)

[Out]

-atan((a + b - 2*x)/(2*sqrt(-a*b - x**2 + x*(a + b))))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0385634, size = 64, normalized size = 2. \[ -\frac{\sqrt{x-a} \sqrt{b-x} \tan ^{-1}\left (\frac{a+b-2 x}{2 \sqrt{x-a} \sqrt{b-x}}\right )}{\sqrt{(a-x) (x-b)}} \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.006, size = 28, normalized size = 0.9 \[ \arctan \left ({1 \left ( x-{\frac{a}{2}}-{\frac{b}{2}} \right ){\frac{1}{\sqrt{-ab+ \left ( a+b \right ) x-{x}^{2}}}}} \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/sqrt(-(a - x)*(b - x)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.207562, size = 35, normalized size = 1.09 \[ \arctan \left (-\frac{a + b - 2 \, x}{2 \, \sqrt{-a b +{\left (a + b\right )} x - x^{2}}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/sqrt(-(a - x)*(b - x)),x, algorithm="fricas")

[Out]

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

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{1}{\sqrt{\left (- a + x\right ) \left (b - x\right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.24245, size = 30, normalized size = 0.94 \[ \arcsin \left (\frac{a + b - 2 \, x}{a - b}\right ){\rm sign}\left (-a + b\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/sqrt(-(a - x)*(b - x)),x, algorithm="giac")

[Out]

arcsin((a + b - 2*x)/(a - b))*sign(-a + b)