Optimal. Leaf size=92 \[ \frac{1}{2} (b-x)^2 \sqrt{\frac{x-a}{b-x}}+\frac{1}{4} (a-5 b) (b-x) \sqrt{\frac{x-a}{b-x}}-\frac{1}{4} (a-b) (a+3 b) \tan ^{-1}\left (\sqrt{\frac{x-a}{b-x}}\right ) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.129557, antiderivative size = 95, normalized size of antiderivative = 1.03, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21 \[ \frac{1}{2} (b-x)^2 \sqrt{-\frac{a-x}{b-x}}+\frac{1}{4} (a-5 b) (b-x) \sqrt{-\frac{a-x}{b-x}}-\frac{1}{4} (a-b) (a+3 b) \tan ^{-1}\left (\sqrt{-\frac{a-x}{b-x}}\right ) \]
Antiderivative was successfully verified.
[In] Int[x*Sqrt[(-a + x)/(b - x)],x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 7.59273, size = 80, normalized size = 0.87 \[ - \frac{\sqrt{\frac{- a + x}{b - x}} \left (a - 5 b\right ) \left (a - b\right )}{4 \left (\frac{- a + x}{b - x} + 1\right )} + \frac{\sqrt{\frac{- a + x}{b - x}} \left (a - b\right )^{2}}{2 \left (\frac{- a + x}{b - x} + 1\right )^{2}} - \left (\frac{a}{4} - \frac{b}{4}\right ) \left (a + 3 b\right ) \operatorname{atan}{\left (\sqrt{\frac{- a + x}{b - x}} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(x*((-a+x)/(b-x))**(1/2),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.193515, size = 110, normalized size = 1.2 \[ \frac{\sqrt{\frac{x-a}{b-x}} \left (2 \sqrt{x-a} (b-x) (a-3 b-2 x)-\left (-a^2-2 a b+3 b^2\right ) \sqrt{b-x} \tan ^{-1}\left (\frac{a+b-2 x}{2 \sqrt{x-a} \sqrt{b-x}}\right )\right )}{8 \sqrt{x-a}} \]
Antiderivative was successfully verified.
[In] Integrate[x*Sqrt[(-a + x)/(b - x)],x]
[Out]
_______________________________________________________________________________________
Maple [B] time = 0.031, size = 208, normalized size = 2.3 \[{\frac{-b+x}{8}\sqrt{-{\frac{-a+x}{-b+x}}} \left ( \arctan \left ({\frac{-a+2\,x-b}{2}{\frac{1}{\sqrt{-ab+ax+bx-{x}^{2}}}}} \right ){a}^{2}+2\,\arctan \left ( 1/2\,{\frac{-a+2\,x-b}{\sqrt{-ab+ax+bx-{x}^{2}}}} \right ) ab-3\,\arctan \left ( 1/2\,{\frac{-a+2\,x-b}{\sqrt{-ab+ax+bx-{x}^{2}}}} \right ){b}^{2}+4\,\sqrt{-ab+ax+bx-{x}^{2}}x-2\,\sqrt{-ab+ax+bx-{x}^{2}}a+6\,b\sqrt{-ab+ax+bx-{x}^{2}} \right ){\frac{1}{\sqrt{- \left ( -b+x \right ) \left ( -a+x \right ) }}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(x*((-a+x)/(b-x))^(1/2),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.49273, size = 176, normalized size = 1.91 \[ -\frac{1}{4} \,{\left (a^{2} + 2 \, a b - 3 \, b^{2}\right )} \arctan \left (\sqrt{-\frac{a - x}{b - x}}\right ) - \frac{{\left (a^{2} - 6 \, a b + 5 \, b^{2}\right )} \left (-\frac{a - x}{b - x}\right )^{\frac{3}{2}} -{\left (a^{2} + 2 \, a b - 3 \, b^{2}\right )} \sqrt{-\frac{a - x}{b - x}}}{4 \,{\left (\frac{{\left (a - x\right )}^{2}}{{\left (b - x\right )}^{2}} - \frac{2 \,{\left (a - x\right )}}{b - x} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x*sqrt(-(a - x)/(b - x)),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.208526, size = 99, normalized size = 1.08 \[ -\frac{1}{4} \,{\left (a^{2} + 2 \, a b - 3 \, b^{2}\right )} \arctan \left (\sqrt{-\frac{a - x}{b - x}}\right ) + \frac{1}{4} \,{\left (a b - 3 \, b^{2} -{\left (a - b\right )} x + 2 \, x^{2}\right )} \sqrt{-\frac{a - x}{b - x}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x*sqrt(-(a - x)/(b - x)),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x*((-a+x)/(b-x))**(1/2),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.216916, size = 139, normalized size = 1.51 \[ \frac{1}{8} \,{\left (a^{2}{\rm sign}\left (-b + x\right ) + 2 \, a b{\rm sign}\left (-b + x\right ) - 3 \, b^{2}{\rm sign}\left (-b + x\right )\right )} \arcsin \left (\frac{a + b - 2 \, x}{a - b}\right ){\rm sign}\left (-a + b\right ) - \frac{1}{4} \, \sqrt{-a b + a x + b x - x^{2}}{\left (a{\rm sign}\left (-b + x\right ) - 3 \, b{\rm sign}\left (-b + x\right ) - 2 \, x{\rm sign}\left (-b + x\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x*sqrt(-(a - x)/(b - x)),x, algorithm="giac")
[Out]