Optimal. Leaf size=32 \[ x+3 \cot \left (\frac {\pi }{4}+\frac {x}{3}\right )-\cot ^3\left (\frac {\pi }{4}+\frac {x}{3}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3554, 8}
\begin {gather*} x-\cot ^3\left (\frac {x}{3}+\frac {\pi }{4}\right )+3 \cot \left (\frac {x}{3}+\frac {\pi }{4}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3554
Rubi steps
\begin {align*} \int \cot ^4\left (\frac {\pi }{4}+\frac {x}{3}\right ) \, dx &=-\cot ^3\left (\frac {\pi }{4}+\frac {x}{3}\right )-\int \tan ^2\left (\frac {\pi }{4}-\frac {x}{3}\right ) \, dx\\ &=3 \cot \left (\frac {\pi }{4}+\frac {x}{3}\right )-\cot ^3\left (\frac {\pi }{4}+\frac {x}{3}\right )+\int 1 \, dx\\ &=x+3 \cot \left (\frac {\pi }{4}+\frac {x}{3}\right )-\cot ^3\left (\frac {\pi }{4}+\frac {x}{3}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.01, size = 40, normalized size = 1.25 \begin {gather*} -\cot ^3\left (\frac {\pi }{4}+\frac {x}{3}\right ) \, _2F_1\left (-\frac {3}{2},1;-\frac {1}{2};-\tan ^2\left (\frac {\pi }{4}+\frac {x}{3}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 38, normalized size = 1.19
method | result | size |
derivativedivides | \(-\left (\cot ^{3}\left (\frac {\pi }{4}+\frac {x}{3}\right )\right )+3 \cot \left (\frac {\pi }{4}+\frac {x}{3}\right )-\frac {3 \pi }{2}+3 \,\mathrm {arccot}\left (\cot \left (\frac {\pi }{4}+\frac {x}{3}\right )\right )\) | \(38\) |
default | \(-\left (\cot ^{3}\left (\frac {\pi }{4}+\frac {x}{3}\right )\right )+3 \cot \left (\frac {\pi }{4}+\frac {x}{3}\right )-\frac {3 \pi }{2}+3 \,\mathrm {arccot}\left (\cot \left (\frac {\pi }{4}+\frac {x}{3}\right )\right )\) | \(38\) |
norman | \(\frac {-1+x \left (\tan ^{3}\left (\frac {\pi }{4}+\frac {x}{3}\right )\right )+3 \left (\tan ^{2}\left (\frac {\pi }{4}+\frac {x}{3}\right )\right )}{\tan \left (\frac {\pi }{4}+\frac {x}{3}\right )^{3}}\) | \(38\) |
risch | \(x +\frac {4 i \left (-3 \,{\mathrm e}^{\frac {4 i x}{3}}-3 i {\mathrm e}^{\frac {2 i x}{3}}+2\right )}{\left ({\mathrm e}^{\frac {i \left (3 \pi +4 x \right )}{6}}-1\right )^{3}}\) | \(38\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 5.36, size = 30, normalized size = 0.94 \begin {gather*} \frac {3}{4} \, \pi + x + \frac {3 \, \tan \left (\frac {1}{4} \, \pi + \frac {1}{3} \, x\right )^{2} - 1}{\tan \left (\frac {1}{4} \, \pi + \frac {1}{3} \, 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. 70 vs.
\(2 (24) = 48\).
time = 1.07, size = 70, normalized size = 2.19 \begin {gather*} \frac {4 \, \cos \left (\frac {1}{2} \, \pi + \frac {2}{3} \, x\right )^{2} + {\left (x \cos \left (\frac {1}{2} \, \pi + \frac {2}{3} \, x\right ) - x\right )} \sin \left (\frac {1}{2} \, \pi + \frac {2}{3} \, x\right ) + 2 \, \cos \left (\frac {1}{2} \, \pi + \frac {2}{3} \, x\right ) - 2}{{\left (\cos \left (\frac {1}{2} \, \pi + \frac {2}{3} \, x\right ) - 1\right )} \sin \left (\frac {1}{2} \, \pi + \frac {2}{3} \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.06, size = 20, normalized size = 0.62 \begin {gather*} x - \cot ^{3}{\left (\frac {x}{3} + \frac {\pi }{4} \right )} + 3 \cot {\left (\frac {x}{3} + \frac {\pi }{4} \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. 53 vs.
\(2 (24) = 48\).
time = 1.47, size = 53, normalized size = 1.66 \begin {gather*} \frac {3}{4} \, \pi + \frac {1}{8} \, \tan \left (\frac {1}{8} \, \pi + \frac {1}{6} \, x\right )^{3} + x + \frac {15 \, \tan \left (\frac {1}{8} \, \pi + \frac {1}{6} \, x\right )^{2} - 1}{8 \, \tan \left (\frac {1}{8} \, \pi + \frac {1}{6} \, x\right )^{3}} - \frac {15}{8} \, \tan \left (\frac {1}{8} \, \pi + \frac {1}{6} \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.09, size = 24, normalized size = 0.75 \begin {gather*} -{\mathrm {cot}\left (\frac {\Pi }{4}+\frac {x}{3}\right )}^3+3\,\mathrm {cot}\left (\frac {\Pi }{4}+\frac {x}{3}\right )+x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________