Optimal. Leaf size=72 \[ -2 x^3 \cot \left (\frac {x}{2}\right ) \sqrt {a-a \cos (x)}+12 x^2 \sqrt {a-a \cos (x)}-96 \sqrt {a-a \cos (x)}+48 x \cot \left (\frac {x}{2}\right ) \sqrt {a-a \cos (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3319, 3296, 2637} \[ 12 x^2 \sqrt {a-a \cos (x)}-2 x^3 \cot \left (\frac {x}{2}\right ) \sqrt {a-a \cos (x)}-96 \sqrt {a-a \cos (x)}+48 x \cot \left (\frac {x}{2}\right ) \sqrt {a-a \cos (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 3296
Rule 3319
Rubi steps
\begin {align*} \int x^3 \sqrt {a-a \cos (x)} \, dx &=\left (\sqrt {a-a \cos (x)} \csc \left (\frac {x}{2}\right )\right ) \int x^3 \sin \left (\frac {x}{2}\right ) \, dx\\ &=-2 x^3 \sqrt {a-a \cos (x)} \cot \left (\frac {x}{2}\right )+\left (6 \sqrt {a-a \cos (x)} \csc \left (\frac {x}{2}\right )\right ) \int x^2 \cos \left (\frac {x}{2}\right ) \, dx\\ &=12 x^2 \sqrt {a-a \cos (x)}-2 x^3 \sqrt {a-a \cos (x)} \cot \left (\frac {x}{2}\right )-\left (24 \sqrt {a-a \cos (x)} \csc \left (\frac {x}{2}\right )\right ) \int x \sin \left (\frac {x}{2}\right ) \, dx\\ &=12 x^2 \sqrt {a-a \cos (x)}+48 x \sqrt {a-a \cos (x)} \cot \left (\frac {x}{2}\right )-2 x^3 \sqrt {a-a \cos (x)} \cot \left (\frac {x}{2}\right )-\left (48 \sqrt {a-a \cos (x)} \csc \left (\frac {x}{2}\right )\right ) \int \cos \left (\frac {x}{2}\right ) \, dx\\ &=-96 \sqrt {a-a \cos (x)}+12 x^2 \sqrt {a-a \cos (x)}+48 x \sqrt {a-a \cos (x)} \cot \left (\frac {x}{2}\right )-2 x^3 \sqrt {a-a \cos (x)} \cot \left (\frac {x}{2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 34, normalized size = 0.47 \[ -2 \left (x \left (x^2-24\right ) \cot \left (\frac {x}{2}\right )-6 \left (x^2-8\right )\right ) \sqrt {a-a \cos (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.47, size = 55, normalized size = 0.76 \[ -2 \, \sqrt {2} {\left ({\left (x^{3} \mathrm {sgn}\left (\sin \left (\frac {1}{2} \, x\right )\right ) - 24 \, x \mathrm {sgn}\left (\sin \left (\frac {1}{2} \, x\right )\right )\right )} \cos \left (\frac {1}{2} \, x\right ) - 6 \, {\left (x^{2} \mathrm {sgn}\left (\sin \left (\frac {1}{2} \, x\right )\right ) - 8 \, \mathrm {sgn}\left (\sin \left (\frac {1}{2} \, x\right )\right )\right )} \sin \left (\frac {1}{2} \, x\right )\right )} \sqrt {a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.07, size = 86, normalized size = 1.19 \[ -\frac {i \sqrt {2}\, \sqrt {-a \left ({\mathrm e}^{i x}-1\right )^{2} {\mathrm e}^{-i x}}\, \left (6 i x^{2} {\mathrm e}^{i x}+x^{3} {\mathrm e}^{i x}-6 i x^{2}+x^{3}-48 i {\mathrm e}^{i x}-24 x \,{\mathrm e}^{i x}+48 i-24 x \right )}{{\mathrm e}^{i x}-1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.15, size = 129, normalized size = 1.79 \[ -{\left ({\left (6 \, \sqrt {2} x^{2} - 6 \, {\left (\sqrt {2} x^{2} - 8 \, \sqrt {2}\right )} \cos \relax (x) - {\left (\sqrt {2} x^{3} - 24 \, \sqrt {2} x\right )} \sin \relax (x) - 48 \, \sqrt {2}\right )} \cos \left (\frac {1}{2} \, \pi + \frac {1}{2} \, \arctan \left (\sin \relax (x), \cos \relax (x)\right )\right ) + {\left (\sqrt {2} x^{3} + {\left (\sqrt {2} x^{3} - 24 \, \sqrt {2} x\right )} \cos \relax (x) - 6 \, {\left (\sqrt {2} x^{2} - 8 \, \sqrt {2}\right )} \sin \relax (x) - 24 \, \sqrt {2} x\right )} \sin \left (\frac {1}{2} \, \pi + \frac {1}{2} \, \arctan \left (\sin \relax (x), \cos \relax (x)\right )\right )\right )} \sqrt {a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.43, size = 92, normalized size = 1.28 \[ \frac {2\,\sqrt {a}\,\sqrt {1-\cos \relax (x)}\,\left (24\,x+\cos \relax (x)\,48{}\mathrm {i}-48\,\sin \relax (x)-x^2\,\cos \relax (x)\,6{}\mathrm {i}-x^3\,\cos \relax (x)+6\,x^2\,\sin \relax (x)-x^3\,\sin \relax (x)\,1{}\mathrm {i}+24\,x\,\cos \relax (x)+x\,\sin \relax (x)\,24{}\mathrm {i}+x^2\,6{}\mathrm {i}-x^3-48{}\mathrm {i}\right )}{\sin \relax (x)-\cos \relax (x)\,1{}\mathrm {i}+1{}\mathrm {i}} \]
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^{3} \sqrt {- a \left (\cos {\relax (x )} - 1\right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________