Optimal. Leaf size=64 \[ -\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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, 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 = {654, 626, 634,
209} \begin {gather*} 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} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 626
Rule 634
Rule 654
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 \text {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.09, size = 66, normalized size = 1.03 \begin {gather*} \frac {1}{6} \sqrt {-x (-2 r+x)} \left (-3 r^2-r x+2 x^2-\frac {6 r^3 \tanh ^{-1}\left (\frac {\sqrt {x}}{\sqrt {-2 r+x}}\right )}{\sqrt {x} \sqrt {-2 r+x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: maximum recursion depth exceeded in comparison} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 64, normalized size = 1.00
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 = 0.43, size = 63, normalized size = 0.98 \begin {gather*} -\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}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.32, size = 51, normalized size = 0.80 \begin {gather*} -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}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \sqrt {- x \left (- 2 r + x\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 54, normalized size = 0.84 \begin {gather*} 2 \left (\left (\frac {x}{6}-\frac {r}{12}\right ) x-\frac {3}{12} r^{2}\right ) \sqrt {2 r x-x^{2}}-\frac {1}{2} r^{3} \mathrm {sign}\left (r\right ) \arcsin \left (\frac {r-x}{r}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.10, size = 56, normalized size = 0.88 \begin {gather*} -\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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________