Integrand size = 7, antiderivative size = 30 \[ \int (\cot (x)+\csc (x))^4 \, dx=x+\frac {2 \sin (x)}{1-\cos (x)}-\frac {2 \sin ^3(x)}{3 (1-\cos (x))^3} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {4477, 2749, 2759, 8} \[ \int (\cot (x)+\csc (x))^4 \, dx=x-\frac {2 \sin ^3(x)}{3 (1-\cos (x))^3}+\frac {2 \sin (x)}{1-\cos (x)} \]
[In]
[Out]
Rule 8
Rule 2749
Rule 2759
Rule 4477
Rubi steps \begin{align*} \text {integral}& = \int (1+\cos (x))^4 \csc ^4(x) \, dx \\ & = \int \frac {\sin ^4(x)}{(1-\cos (x))^4} \, dx \\ & = -\frac {2 \sin ^3(x)}{3 (1-\cos (x))^3}-\int \frac {\sin ^2(x)}{(1-\cos (x))^2} \, dx \\ & = \frac {2 \sin (x)}{1-\cos (x)}-\frac {2 \sin ^3(x)}{3 (1-\cos (x))^3}+\int 1 \, dx \\ & = x+\frac {2 \sin (x)}{1-\cos (x)}-\frac {2 \sin ^3(x)}{3 (1-\cos (x))^3} \\ \end{align*}
Time = 0.05 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00 \[ \int (\cot (x)+\csc (x))^4 \, dx=x+\frac {8}{3} \cot \left (\frac {x}{2}\right )-\frac {2}{3} \cot \left (\frac {x}{2}\right ) \csc ^2\left (\frac {x}{2}\right ) \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 1.66 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.03
method | result | size |
risch | \(x +\frac {8 i \left (3 \,{\mathrm e}^{2 i x}-3 \,{\mathrm e}^{i x}+2\right )}{3 \left ({\mathrm e}^{i x}-1\right )^{3}}\) | \(31\) |
parts | \(-\frac {7 \cot \left (x \right )^{3}}{3}+\cot \left (x \right )-\frac {\pi }{2}+\operatorname {arccot}\left (\cot \left (x \right )\right )+\left (-\frac {2}{3}-\frac {\csc \left (x \right )^{2}}{3}\right ) \cot \left (x \right )-\frac {8 \csc \left (x \right )^{3}}{3}+4 \csc \left (x \right )\) | \(37\) |
default | \(-\frac {\cot \left (x \right )^{3}}{3}+\cot \left (x \right )+x -\frac {4 \cos \left (x \right )^{4}}{3 \sin \left (x \right )^{3}}+\frac {4 \cos \left (x \right )^{4}}{3 \sin \left (x \right )}+\frac {4 \left (2+\cos \left (x \right )^{2}\right ) \sin \left (x \right )}{3}-\frac {2 \cos \left (x \right )^{3}}{\sin \left (x \right )^{3}}-\frac {4}{3 \sin \left (x \right )^{3}}+\left (-\frac {2}{3}-\frac {\csc \left (x \right )^{2}}{3}\right ) \cot \left (x \right )\) | \(68\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.20 \[ \int (\cot (x)+\csc (x))^4 \, dx=\frac {8 \, \cos \left (x\right )^{2} + 3 \, {\left (x \cos \left (x\right ) - x\right )} \sin \left (x\right ) + 4 \, \cos \left (x\right ) - 4}{3 \, {\left (\cos \left (x\right ) - 1\right )} \sin \left (x\right )} \]
[In]
[Out]
Time = 34.61 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.47 \[ \int (\cot (x)+\csc (x))^4 \, dx=x - \frac {7 \cot ^{3}{\left (x \right )}}{3} - \cot {\left (x \right )} - \frac {8 \csc ^{3}{\left (x \right )}}{3} + 4 \csc {\left (x \right )} + \frac {\cos {\left (x \right )}}{\sin {\left (x \right )}} - \frac {\cos ^{3}{\left (x \right )}}{3 \sin ^{3}{\left (x \right )}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 56 vs. \(2 (24) = 48\).
Time = 0.30 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.87 \[ \int (\cot (x)+\csc (x))^4 \, dx=-2 \, \cot \left (x\right )^{3} + x + \frac {4 \, {\left (3 \, \sin \left (x\right )^{2} - 1\right )}}{3 \, \sin \left (x\right )^{3}} - \frac {3 \, \tan \left (x\right )^{2} + 1}{3 \, \tan \left (x\right )^{3}} + \frac {3 \, \tan \left (x\right )^{2} - 1}{3 \, \tan \left (x\right )^{3}} - \frac {4}{3 \, \sin \left (x\right )^{3}} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.67 \[ \int (\cot (x)+\csc (x))^4 \, dx=x + \frac {2 \, {\left (3 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1\right )}}{3 \, \tan \left (\frac {1}{2} \, x\right )^{3}} \]
[In]
[Out]
Time = 27.68 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.53 \[ \int (\cot (x)+\csc (x))^4 \, dx=-\frac {2\,{\mathrm {cot}\left (\frac {x}{2}\right )}^3}{3}+2\,\mathrm {cot}\left (\frac {x}{2}\right )+x \]
[In]
[Out]