Optimal. Leaf size=64 \[ r^3 \tan ^{-1}\left (\frac {x}{\sqrt {2 r x-x^2}}\right )-\frac {1}{2} r (r-x) \sqrt {2 r x-x^2}-\frac {1}{3} \left (2 r x-x^2\right )^{3/2} \]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {640, 612, 620, 203} \[ r^3 \tan ^{-1}\left (\frac {x}{\sqrt {2 r x-x^2}}\right )-\frac {1}{2} r (r-x) \sqrt {2 r x-x^2}-\frac {1}{3} \left (2 r x-x^2\right )^{3/2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 612
Rule 620
Rule 640
Rubi steps
\begin {align*} \int x \sqrt {2 r x-x^2} \, dx &=-\frac {1}{3} \left (2 r x-x^2\right )^{3/2}+r \int \sqrt {2 r x-x^2} \, dx\\ &=-\frac {1}{2} r (r-x) \sqrt {2 r x-x^2}-\frac {1}{3} \left (2 r x-x^2\right )^{3/2}+\frac {1}{2} r^3 \int \frac {1}{\sqrt {2 r x-x^2}} \, dx\\ &=-\frac {1}{2} r (r-x) \sqrt {2 r x-x^2}-\frac {1}{3} \left (2 r x-x^2\right )^{3/2}+r^3 \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {x}{\sqrt {2 r x-x^2}}\right )\\ &=-\frac {1}{2} r (r-x) \sqrt {2 r x-x^2}-\frac {1}{3} \left (2 r x-x^2\right )^{3/2}+r^3 \tan ^{-1}\left (\frac {x}{\sqrt {2 r x-x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 72, normalized size = 1.12 \[ \frac {1}{6} \sqrt {-x (x-2 r)} \left (\frac {6 r^{5/2} \sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {2} \sqrt {r}}\right )}{\sqrt {x} \sqrt {2-\frac {x}{r}}}-3 r^2-r x+2 x^2\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [C] time = 0.18, size = 113, normalized size = 1.77 \[ -\frac {1}{2} i r^3 \tanh ^{-1}\left (\frac {x}{r}+\frac {i \sqrt {2 r x-x^2}}{r}\right )+\frac {1}{6} \sqrt {2 r x-x^2} \left (-3 r^2-r x+2 x^2\right )+\frac {1}{4} i r^3 \log \left (r^2-2 i x \sqrt {2 r x-x^2}+2 r x-2 x^2\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.66, size = 51, normalized size = 0.80 \[ -r^{3} \arctan \left (\frac {\sqrt {2 \, r x - x^{2}}}{x}\right ) - \frac {1}{6} \, {\left (3 \, r^{2} + r x - 2 \, x^{2}\right )} \sqrt {2 \, r x - x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.65, size = 45, normalized size = 0.70 \[ -\frac {1}{2} \, r^{3} \arcsin \left (\frac {r - x}{r}\right ) \mathrm {sgn}\relax (r) - \frac {1}{6} \, {\left (3 \, r^{2} + {\left (r - 2 \, x\right )} x\right )} \sqrt {2 \, r x - x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.31, size = 60, normalized size = 0.94
method | result | size |
risch | \(-\frac {\left (3 r^{2}+r x -2 x^{2}\right ) x \left (2 r -x \right )}{6 \sqrt {-x \left (-2 r +x \right )}}+\frac {r^{3} \arctan \left (\frac {x -r}{\sqrt {2 r x -x^{2}}}\right )}{2}\) | \(60\) |
default | \(-\frac {\left (2 r x -x^{2}\right )^{\frac {3}{2}}}{3}+r \left (-\frac {\left (2 r -2 x \right ) \sqrt {2 r x -x^{2}}}{4}+\frac {r^{2} \arctan \left (\frac {x -r}{\sqrt {2 r x -x^{2}}}\right )}{2}\right )\) | \(64\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.17, size = 63, normalized size = 0.98 \[ -\frac {1}{2} \, r^{3} \arcsin \left (\frac {r - x}{r}\right ) - \frac {1}{2} \, \sqrt {2 \, r x - x^{2}} r^{2} + \frac {1}{2} \, \sqrt {2 \, r x - x^{2}} r x - \frac {1}{3} \, {\left (2 \, r x - x^{2}\right )}^{\frac {3}{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.10, size = 56, normalized size = 0.88 \[ -\frac {\sqrt {2\,r\,x-x^2}\,\left (12\,r^2+4\,r\,x-8\,x^2\right )}{24}-\frac {r^3\,\ln \left (x-r-\sqrt {x\,\left (2\,r-x\right )}\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \sqrt {- x \left (- 2 r + x\right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________