Optimal. Leaf size=12 \[ x+\cot (x)-\frac {\cot ^3(x)}{3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3554, 8}
\begin {gather*} x-\frac {1}{3} \cot ^3(x)+\cot (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3554
Rubi steps
\begin {align*} \int \cot ^4(x) \, dx &=-\frac {1}{3} \cot ^3(x)-\int \cot ^2(x) \, dx\\ &=\cot (x)-\frac {\cot ^3(x)}{3}+\int 1 \, dx\\ &=x+\cot (x)-\frac {\cot ^3(x)}{3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 18, normalized size = 1.50 \begin {gather*} x+\frac {4 \cot (x)}{3}-\frac {1}{3} \cot (x) \csc ^2(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.00, size = 16, normalized size = 1.33
method | result | size |
derivativedivides | \(-\frac {\left (\cot ^{3}\left (x \right )\right )}{3}+\cot \left (x \right )-\frac {\pi }{2}+\mathrm {arccot}\left (\cot \left (x \right )\right )\) | \(16\) |
default | \(-\frac {\left (\cot ^{3}\left (x \right )\right )}{3}+\cot \left (x \right )-\frac {\pi }{2}+\mathrm {arccot}\left (\cot \left (x \right )\right )\) | \(16\) |
norman | \(\frac {-\frac {1}{3}+\tan ^{2}\left (x \right )+x \left (\tan ^{3}\left (x \right )\right )}{\tan \left (x \right )^{3}}\) | \(18\) |
risch | \(x +\frac {4 i \left (3 \,{\mathrm e}^{4 i x}-3 \,{\mathrm e}^{2 i x}+2\right )}{3 \left ({\mathrm e}^{2 i x}-1\right )^{3}}\) | \(31\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 2.96, size = 16, normalized size = 1.33 \begin {gather*} x + \frac {3 \, \tan \left (x\right )^{2} - 1}{3 \, \tan \left (x\right )^{3}} \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. 48 vs.
\(2 (10) = 20\).
time = 0.54, size = 48, normalized size = 4.00 \begin {gather*} \frac {4 \, \cos \left (2 \, x\right )^{2} + 3 \, {\left (x \cos \left (2 \, x\right ) - x\right )} \sin \left (2 \, x\right ) + 2 \, \cos \left (2 \, x\right ) - 2}{3 \, {\left (\cos \left (2 \, x\right ) - 1\right )} \sin \left (2 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.02, size = 19, normalized size = 1.58 \begin {gather*} x + \frac {\cos {\left (x \right )}}{\sin {\left (x \right )}} - \frac {\cos ^{3}{\left (x \right )}}{3 \sin ^{3}{\left (x \right )}} \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. 34 vs.
\(2 (10) = 20\).
time = 0.46, size = 34, normalized size = 2.83 \begin {gather*} \frac {1}{24} \, \tan \left (\frac {1}{2} \, x\right )^{3} + x + \frac {15 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1}{24 \, \tan \left (\frac {1}{2} \, x\right )^{3}} - \frac {5}{8} \, \tan \left (\frac {1}{2} \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.00, size = 10, normalized size = 0.83 \begin {gather*} -\frac {{\mathrm {cot}\left (x\right )}^3}{3}+\mathrm {cot}\left (x\right )+x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________