Optimal. Leaf size=32 \[ -\tan ^{-1}\left (\frac {a+b-2 x}{2 \sqrt {x (a+b)-a b-x^2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1981, 621, 204} \[ -\tan ^{-1}\left (\frac {a+b-2 x}{2 \sqrt {x (a+b)-a b-x^2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 621
Rule 1981
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {(b-x) (-a+x)}} \, dx &=\int \frac {1}{\sqrt {-a b+(a+b) x-x^2}} \, dx\\ &=2 \operatorname {Subst}\left (\int \frac {1}{-4-x^2} \, dx,x,\frac {a+b-2 x}{\sqrt {-a b+(a+b) x-x^2}}\right )\\ &=-\tan ^{-1}\left (\frac {a+b-2 x}{2 \sqrt {-a b+(a+b) x-x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.03, size = 72, normalized size = 2.25 \[ -\frac {2 \sqrt {a-b} \sqrt {b-x} \sqrt {\frac {a-x}{a-b}} \sinh ^{-1}\left (\frac {\sqrt {b-x}}{\sqrt {a-b}}\right )}{\sqrt {(a-x) (x-b)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.76, size = 43, normalized size = 1.34 \[ -\arctan \left (-\frac {\sqrt {-a b + {\left (a + b\right )} x - x^{2}} {\left (a + b - 2 \, x\right )}}{2 \, {\left (a b - {\left (a + b\right )} x + x^{2}\right )}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.43, size = 22, normalized size = 0.69 \[ \arcsin \left (\frac {a + b - 2 \, x}{a - b}\right ) \mathrm {sgn}\left (-a + b\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 28, normalized size = 0.88 \[ \arctan \left (\frac {-\frac {a}{2}-\frac {b}{2}+x}{\sqrt {-a b -x^{2}+\left (a +b \right ) x}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.03 \[ \int \frac {1}{\sqrt {-\left (a-x\right )\,\left (b-x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {\left (- a + x\right ) \left (b - x\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________