Optimal. Leaf size=33 \[ -\frac{3 x^2}{4}-\frac{\cos ^2(x)}{4}-x \cot (x)+\log (\sin (x))-\frac{1}{2} x \sin (x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0544898, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {4408, 3310, 30, 3720, 3475} \[ -\frac{3 x^2}{4}-\frac{\cos ^2(x)}{4}-x \cot (x)+\log (\sin (x))-\frac{1}{2} x \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4408
Rule 3310
Rule 30
Rule 3720
Rule 3475
Rubi steps
\begin{align*} \int x \cos ^2(x) \cot ^2(x) \, dx &=-\int x \cos ^2(x) \, dx+\int x \cot ^2(x) \, dx\\ &=-\frac{1}{4} \cos ^2(x)-x \cot (x)-\frac{1}{2} x \cos (x) \sin (x)-\frac{\int x \, dx}{2}-\int x \, dx+\int \cot (x) \, dx\\ &=-\frac{3 x^2}{4}-\frac{\cos ^2(x)}{4}-x \cot (x)+\log (\sin (x))-\frac{1}{2} x \cos (x) \sin (x)\\ \end{align*}
Mathematica [A] time = 0.0286489, size = 33, normalized size = 1. \[ -\frac{3 x^2}{4}-\frac{1}{4} x \sin (2 x)-\frac{1}{8} \cos (2 x)-x \cot (x)+\log (\sin (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.193, size = 125, normalized size = 3.8 \begin{align*} -{\frac{x}{4\,\tan \left ( x \right ) }}+\ln \left ( \tan \left ( x \right ) \right ) -{\frac{\ln \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) }{2}}-{\frac{1}{4\,\tan \left ( x \right ) \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) ^{2}} \left ( x+{x}^{2}\tan \left ( x \right ) +{x}^{2} \left ( \tan \left ( x \right ) \right ) ^{5}-{\frac{ \left ( \tan \left ( x \right ) \right ) ^{5}}{2}}+{\frac{\tan \left ( x \right ) }{2}}+4\,x \left ( \tan \left ( x \right ) \right ) ^{2}+3\,x \left ( \tan \left ( x \right ) \right ) ^{4}+2\,{x}^{2} \left ( \tan \left ( x \right ) \right ) ^{3} \right ) }-{\frac{1}{\tan \left ( x \right ) \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) } \left ({\frac{x}{2}}+{\frac{x \left ( \tan \left ( x \right ) \right ) ^{2}}{2}}+{\frac{{x}^{2}\tan \left ( x \right ) }{2}}+{\frac{{x}^{2} \left ( \tan \left ( x \right ) \right ) ^{3}}{2}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.0248, size = 138, normalized size = 4.18 \begin{align*} \frac{4 \, x \cos \left (x\right )^{3} - 12 \, x \cos \left (x\right ) -{\left (6 \, x^{2} + 2 \, \cos \left (x\right )^{2} - 1\right )} \sin \left (x\right ) + 8 \, \log \left (\frac{1}{2} \, \sin \left (x\right )\right ) \sin \left (x\right )}{8 \, \sin \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 2.54221, size = 507, normalized size = 15.36 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.12583, size = 278, normalized size = 8.42 \begin{align*} -\frac{6 \, x^{2} \tan \left (\frac{1}{2} \, x\right )^{5} - 4 \, x \tan \left (\frac{1}{2} \, x\right )^{6} - 4 \, \log \left (\frac{16 \, \tan \left (\frac{1}{2} \, x\right )^{2}}{\tan \left (\frac{1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac{1}{2} \, x\right )^{5} + 12 \, x^{2} \tan \left (\frac{1}{2} \, x\right )^{3} - 12 \, x \tan \left (\frac{1}{2} \, x\right )^{4} + \tan \left (\frac{1}{2} \, x\right )^{5} - 8 \, \log \left (\frac{16 \, \tan \left (\frac{1}{2} \, x\right )^{2}}{\tan \left (\frac{1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac{1}{2} \, x\right )^{3} + 6 \, x^{2} \tan \left (\frac{1}{2} \, x\right ) + 12 \, x \tan \left (\frac{1}{2} \, x\right )^{2} - 6 \, \tan \left (\frac{1}{2} \, x\right )^{3} - 4 \, \log \left (\frac{16 \, \tan \left (\frac{1}{2} \, x\right )^{2}}{\tan \left (\frac{1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac{1}{2} \, x\right ) + 4 \, x + \tan \left (\frac{1}{2} \, x\right )}{8 \,{\left (\tan \left (\frac{1}{2} \, x\right )^{5} + 2 \, \tan \left (\frac{1}{2} \, x\right )^{3} + \tan \left (\frac{1}{2} \, x\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]