Optimal. Leaf size=24 \[ -\tanh ^{-1}\left (\cos \left (\frac {x}{2}\right )\right )-\cot \left (\frac {x}{2}\right ) \csc \left (\frac {x}{2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3853, 3855}
\begin {gather*} -\tanh ^{-1}\left (\cos \left (\frac {x}{2}\right )\right )-\cot \left (\frac {x}{2}\right ) \csc \left (\frac {x}{2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \csc ^3\left (\frac {x}{2}\right ) \, dx &=-\cot \left (\frac {x}{2}\right ) \csc \left (\frac {x}{2}\right )+\frac {1}{2} \int \csc \left (\frac {x}{2}\right ) \, dx\\ &=-\tanh ^{-1}\left (\cos \left (\frac {x}{2}\right )\right )-\cot \left (\frac {x}{2}\right ) \csc \left (\frac {x}{2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 41, normalized size = 1.71 \begin {gather*} -\frac {1}{4} \csc ^2\left (\frac {x}{4}\right )-\log \left (\cos \left (\frac {x}{4}\right )\right )+\log \left (\sin \left (\frac {x}{4}\right )\right )+\frac {1}{4} \sec ^2\left (\frac {x}{4}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 24, normalized size = 1.00
method | result | size |
derivativedivides | \(-\cot \left (\frac {x}{2}\right ) \csc \left (\frac {x}{2}\right )+\ln \left (\csc \left (\frac {x}{2}\right )-\cot \left (\frac {x}{2}\right )\right )\) | \(24\) |
default | \(-\cot \left (\frac {x}{2}\right ) \csc \left (\frac {x}{2}\right )+\ln \left (\csc \left (\frac {x}{2}\right )-\cot \left (\frac {x}{2}\right )\right )\) | \(24\) |
norman | \(\frac {-\frac {1}{4}+\frac {\left (\tan ^{4}\left (\frac {x}{4}\right )\right )}{4}}{\tan \left (\frac {x}{4}\right )^{2}}+\ln \left (\tan \left (\frac {x}{4}\right )\right )\) | \(24\) |
risch | \(\frac {2 \,{\mathrm e}^{\frac {3 i x}{2}}+2 \,{\mathrm e}^{\frac {i x}{2}}}{\left ({\mathrm e}^{i x}-1\right )^{2}}-\ln \left ({\mathrm e}^{\frac {i x}{2}}+1\right )+\ln \left (-1+{\mathrm e}^{\frac {i x}{2}}\right )\) | \(42\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 3.02, size = 34, normalized size = 1.42 \begin {gather*} \frac {\cos \left (\frac {1}{2} \, x\right )}{\cos \left (\frac {1}{2} \, x\right )^{2} - 1} - \frac {1}{2} \, \log \left (\cos \left (\frac {1}{2} \, x\right ) + 1\right ) + \frac {1}{2} \, \log \left (\cos \left (\frac {1}{2} \, x\right ) - 1\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. 56 vs.
\(2 (18) = 36\).
time = 0.60, size = 56, normalized size = 2.33 \begin {gather*} -\frac {{\left (\cos \left (\frac {1}{2} \, x\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (\frac {1}{2} \, x\right ) + \frac {1}{2}\right ) - {\left (\cos \left (\frac {1}{2} \, x\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (\frac {1}{2} \, x\right ) + \frac {1}{2}\right ) - 2 \, \cos \left (\frac {1}{2} \, x\right )}{2 \, {\left (\cos \left (\frac {1}{2} \, x\right )^{2} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 36 vs.
\(2 (17) = 34\).
time = 0.05, size = 36, normalized size = 1.50 \begin {gather*} \frac {\log {\left (\cos {\left (\frac {x}{2} \right )} - 1 \right )}}{2} - \frac {\log {\left (\cos {\left (\frac {x}{2} \right )} + 1 \right )}}{2} + \frac {2 \cos {\left (\frac {x}{2} \right )}}{2 \cos ^{2}{\left (\frac {x}{2} \right )} - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 70 vs.
\(2 (18) = 36\).
time = 0.93, size = 70, normalized size = 2.92 \begin {gather*} -\frac {{\left (\frac {2 \, {\left (\cos \left (\frac {1}{2} \, x\right ) - 1\right )}}{\cos \left (\frac {1}{2} \, x\right ) + 1} - 1\right )} {\left (\cos \left (\frac {1}{2} \, x\right ) + 1\right )}}{4 \, {\left (\cos \left (\frac {1}{2} \, x\right ) - 1\right )}} - \frac {\cos \left (\frac {1}{2} \, x\right ) - 1}{4 \, {\left (\cos \left (\frac {1}{2} \, x\right ) + 1\right )}} + \frac {1}{2} \, \log \left (-\frac {\cos \left (\frac {1}{2} \, x\right ) - 1}{\cos \left (\frac {1}{2} \, x\right ) + 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 18, normalized size = 0.75 \begin {gather*} \ln \left (\mathrm {tan}\left (\frac {x}{4}\right )\right )-\frac {\cos \left (\frac {x}{2}\right )}{{\sin \left (\frac {x}{2}\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________