Optimal. Leaf size=22 \[ -\frac {1}{2} \csc ^2(x)-2 \log (\sin (x))+\frac {\sin ^2(x)}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2670, 272, 45}
\begin {gather*} \frac {\sin ^2(x)}{2}-\frac {1}{2} \csc ^2(x)-2 \log (\sin (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 272
Rule 2670
Rubi steps
\begin {align*} \int \cos ^2(x) \cot ^3(x) \, dx &=\text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{x^3} \, dx,x,-\sin (x)\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {(1-x)^2}{x^2} \, dx,x,\sin ^2(x)\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \left (1+\frac {1}{x^2}-\frac {2}{x}\right ) \, dx,x,\sin ^2(x)\right )\\ &=-\frac {1}{2} \csc ^2(x)-2 \log (\sin (x))+\frac {\sin ^2(x)}{2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 20, normalized size = 0.91 \begin {gather*} \frac {1}{2} \left (-\csc ^2(x)-4 \log (\sin (x))+\sin ^2(x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 29, normalized size = 1.32
method | result | size |
default | \(-\frac {\cos ^{6}\left (x \right )}{2 \sin \left (x \right )^{2}}-\frac {\left (\cos ^{4}\left (x \right )\right )}{2}-\left (\cos ^{2}\left (x \right )\right )-2 \ln \left (\sin \left (x \right )\right )\) | \(29\) |
risch | \(2 i x -\frac {{\mathrm e}^{2 i x}}{8}-\frac {{\mathrm e}^{-2 i x}}{8}+\frac {2 \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}-2 \ln \left ({\mathrm e}^{2 i x}-1\right )\) | \(46\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 2.56, size = 20, normalized size = 0.91 \begin {gather*} \frac {1}{2} \, \sin \left (x\right )^{2} - \frac {1}{2 \, \sin \left (x\right )^{2}} - \log \left (\sin \left (x\right )^{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 37 vs.
\(2 (18) = 36\).
time = 0.66, size = 37, normalized size = 1.68 \begin {gather*} -\frac {2 \, \cos \left (x\right )^{4} - 3 \, \cos \left (x\right )^{2} + 8 \, {\left (\cos \left (x\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \sin \left (x\right )\right ) - 1}{4 \, {\left (\cos \left (x\right )^{2} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.03, size = 20, normalized size = 0.91 \begin {gather*} - 2 \log {\left (\sin {\left (x \right )} \right )} + \frac {\sin ^{2}{\left (x \right )}}{2} - \frac {1}{2 \sin ^{2}{\left (x \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.21, size = 28, normalized size = 1.27 \begin {gather*} -\frac {1}{2} \, \cos \left (x\right )^{2} + \frac {1}{2 \, {\left (\cos \left (x\right )^{2} - 1\right )}} - \log \left (-\cos \left (x\right )^{2} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.23, size = 32, normalized size = 1.45 \begin {gather*} \ln \left ({\mathrm {tan}\left (x\right )}^2+1\right )-2\,\ln \left (\mathrm {tan}\left (x\right )\right )-\frac {{\mathrm {tan}\left (x\right )}^2+\frac {1}{2}}{{\mathrm {tan}\left (x\right )}^4+{\mathrm {tan}\left (x\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________