Integrand size = 17, antiderivative size = 33 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=-\frac {285 x}{2}+5 (3-2 \cot (x))^2+(3-2 \cot (x))^3-42 \cot (x)+4 \log (\sin (x)) \]
[Out]
Time = 0.06 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {3609, 3606, 3556} \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=-\frac {285 x}{2}+(3-2 \cot (x))^3+5 (3-2 \cot (x))^2-42 \cot (x)+4 \log (\sin (x)) \]
[In]
[Out]
Rule 3556
Rule 3606
Rule 3609
Rubi steps \begin{align*} \text {integral}& = (3-2 \cot (x))^3+\int \left (-\frac {9}{2}-10 \cot (x)\right ) (3-2 \cot (x))^2 \, dx \\ & = 5 (3-2 \cot (x))^2+(3-2 \cot (x))^3+\int \left (-\frac {67}{2}-21 \cot (x)\right ) (3-2 \cot (x)) \, dx \\ & = -\frac {285 x}{2}+5 (3-2 \cot (x))^2+(3-2 \cot (x))^3-42 \cot (x)+4 \int \cot (x) \, dx \\ & = -\frac {285 x}{2}+5 (3-2 \cot (x))^2+(3-2 \cot (x))^3-42 \cot (x)+4 \log (\sin (x)) \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.05 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.82 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=\frac {27 x}{2}+56 \cot ^2(x)-8 \cot ^3(x) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-\tan ^2(x)\right )-180 \cot (x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-\tan ^2(x)\right )+4 \log (\cos (x))+4 \log (\tan (x)) \]
[In]
[Out]
Time = 0.12 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00
method | result | size |
parallelrisch | \(4 \ln \left (\tan \left (x \right )\right )-2 \ln \left (\sec ^{2}\left (x \right )\right )-\frac {285 x}{2}-8 \left (\cot ^{3}\left (x \right )\right )-156 \cot \left (x \right )+56 \left (\cot ^{2}\left (x \right )\right )\) | \(33\) |
derivativedivides | \(-8 \left (\cot ^{3}\left (x \right )\right )+56 \left (\cot ^{2}\left (x \right )\right )-156 \cot \left (x \right )-2 \ln \left (\cot ^{2}\left (x \right )+1\right )+\frac {285 \pi }{4}-\frac {285 \,\operatorname {arccot}\left (\cot \left (x \right )\right )}{2}\) | \(35\) |
default | \(-8 \left (\cot ^{3}\left (x \right )\right )+56 \left (\cot ^{2}\left (x \right )\right )-156 \cot \left (x \right )-2 \ln \left (\cot ^{2}\left (x \right )+1\right )+\frac {285 \pi }{4}-\frac {285 \,\operatorname {arccot}\left (\cot \left (x \right )\right )}{2}\) | \(35\) |
norman | \(\frac {-8-156 \left (\tan ^{2}\left (x \right )\right )-\frac {285 x \left (\tan ^{3}\left (x \right )\right )}{2}+56 \tan \left (x \right )}{\tan \left (x \right )^{3}}+4 \ln \left (\tan \left (x \right )\right )-2 \ln \left (1+\tan ^{2}\left (x \right )\right )\) | \(40\) |
parts | \(\frac {27 x}{2}-156 \cot \left (x \right )+78 \pi -156 \,\operatorname {arccot}\left (\cot \left (x \right )\right )+56 \left (\cot ^{2}\left (x \right )\right )-56 \ln \left (\cot ^{2}\left (x \right )+1\right )-8 \left (\cot ^{3}\left (x \right )\right )-108 \ln \left (\sin \left (x \right )\right )\) | \(43\) |
risch | \(-\frac {285 x}{2}-4 i x +\frac {\left (-\frac {224}{1873}-\frac {264 i}{1873}\right ) \left (1873 \,{\mathrm e}^{4 i x}-1260 i {\mathrm e}^{2 i x}-3358 \,{\mathrm e}^{2 i x}+1221+1036 i\right )}{\left ({\mathrm e}^{2 i x}-1\right )^{3}}+4 \ln \left ({\mathrm e}^{2 i x}-1\right )\) | \(58\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 71 vs. \(2 (33) = 66\).
Time = 0.26 (sec) , antiderivative size = 71, normalized size of antiderivative = 2.15 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=\frac {4 \, {\left (\cos \left (2 \, x\right ) - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (2 \, x\right ) + \frac {1}{2}\right ) \sin \left (2 \, x\right ) - 296 \, \cos \left (2 \, x\right )^{2} - {\left (285 \, x \cos \left (2 \, x\right ) - 285 \, x + 224\right )} \sin \left (2 \, x\right ) + 32 \, \cos \left (2 \, x\right ) + 328}{2 \, {\left (\cos \left (2 \, x\right ) - 1\right )} \sin \left (2 \, x\right )} \]
[In]
[Out]
Time = 0.22 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.18 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=- \frac {285 x}{2} - 2 \log {\left (\tan ^{2}{\left (x \right )} + 1 \right )} + 4 \log {\left (\tan {\left (x \right )} \right )} - \frac {156}{\tan {\left (x \right )}} + \frac {56}{\tan ^{2}{\left (x \right )}} - \frac {8}{\tan ^{3}{\left (x \right )}} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.09 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=-\frac {285}{2} \, x - \frac {4 \, {\left (39 \, \tan \left (x\right )^{2} - 14 \, \tan \left (x\right ) + 2\right )}}{\tan \left (x\right )^{3}} - 2 \, \log \left (\tan \left (x\right )^{2} + 1\right ) + 4 \, \log \left (\tan \left (x\right )\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (33) = 66\).
Time = 0.30 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.27 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=\tan \left (\frac {1}{2} \, x\right )^{3} + 14 \, \tan \left (\frac {1}{2} \, x\right )^{2} - \frac {285}{2} \, x - \frac {22 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 225 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 42 \, \tan \left (\frac {1}{2} \, x\right ) + 3}{3 \, \tan \left (\frac {1}{2} \, x\right )^{3}} - 4 \, \log \left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right ) + 4 \, \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right ) + 75 \, \tan \left (\frac {1}{2} \, x\right ) \]
[In]
[Out]
Time = 0.58 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.27 \[ \int \left (\frac {1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx=x\,\left (-\frac {285}{2}-4{}\mathrm {i}\right )+4\,\ln \left ({\mathrm {e}}^{x\,2{}\mathrm {i}}-1\right )+\frac {64{}\mathrm {i}}{3\,{\mathrm {e}}^{x\,2{}\mathrm {i}}-3\,{\mathrm {e}}^{x\,4{}\mathrm {i}}+{\mathrm {e}}^{x\,6{}\mathrm {i}}-1}+\frac {-224+96{}\mathrm {i}}{1+{\mathrm {e}}^{x\,4{}\mathrm {i}}-2\,{\mathrm {e}}^{x\,2{}\mathrm {i}}}+\frac {-224-264{}\mathrm {i}}{{\mathrm {e}}^{x\,2{}\mathrm {i}}-1} \]
[In]
[Out]