Optimal. Leaf size=44 \[ \frac {35 x}{8}-\frac {35 \cot ^3(x)}{24}+\frac {35 \cot (x)}{8}+\frac {1}{4} \cos ^4(x) \cot ^3(x)+\frac {7}{8} \cos ^2(x) \cot ^3(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {290, 325, 203} \[ \frac {35 x}{8}-\frac {35 \cot ^3(x)}{24}+\frac {35 \cot (x)}{8}+\frac {1}{4} \cos ^4(x) \cot ^3(x)+\frac {7}{8} \cos ^2(x) \cot ^3(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 290
Rule 325
Rubi steps
\begin {align*} \int (\csc (x)-\sin (x))^4 \, dx &=\operatorname {Subst}\left (\int \frac {1}{x^4 \left (1+x^2\right )^3} \, dx,x,\tan (x)\right )\\ &=\frac {1}{4} \cos ^4(x) \cot ^3(x)+\frac {7}{4} \operatorname {Subst}\left (\int \frac {1}{x^4 \left (1+x^2\right )^2} \, dx,x,\tan (x)\right )\\ &=\frac {7}{8} \cos ^2(x) \cot ^3(x)+\frac {1}{4} \cos ^4(x) \cot ^3(x)+\frac {35}{8} \operatorname {Subst}\left (\int \frac {1}{x^4 \left (1+x^2\right )} \, dx,x,\tan (x)\right )\\ &=-\frac {35}{24} \cot ^3(x)+\frac {7}{8} \cos ^2(x) \cot ^3(x)+\frac {1}{4} \cos ^4(x) \cot ^3(x)-\frac {35}{8} \operatorname {Subst}\left (\int \frac {1}{x^2 \left (1+x^2\right )} \, dx,x,\tan (x)\right )\\ &=\frac {35 \cot (x)}{8}-\frac {35 \cot ^3(x)}{24}+\frac {7}{8} \cos ^2(x) \cot ^3(x)+\frac {1}{4} \cos ^4(x) \cot ^3(x)+\frac {35}{8} \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac {35 x}{8}+\frac {35 \cot (x)}{8}-\frac {35 \cot ^3(x)}{24}+\frac {7}{8} \cos ^2(x) \cot ^3(x)+\frac {1}{4} \cos ^4(x) \cot ^3(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 38, normalized size = 0.86 \[ \frac {35 x}{8}+\frac {3}{4} \sin (2 x)+\frac {1}{32} \sin (4 x)+\frac {10 \cot (x)}{3}-\frac {1}{3} \cot (x) \csc ^2(x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 2.05, size = 51, normalized size = 1.16 \[ -\frac {6 \, \cos \relax (x)^{7} + 21 \, \cos \relax (x)^{5} - 140 \, \cos \relax (x)^{3} - 105 \, {\left (x \cos \relax (x)^{2} - x\right )} \sin \relax (x) + 105 \, \cos \relax (x)}{24 \, {\left (\cos \relax (x)^{2} - 1\right )} \sin \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 39, normalized size = 0.89 \[ \frac {35}{8} \, x + \frac {11 \, \tan \relax (x)^{3} + 13 \, \tan \relax (x)}{8 \, {\left (\tan \relax (x)^{2} + 1\right )}^{2}} + \frac {9 \, \tan \relax (x)^{2} - 1}{3 \, \tan \relax (x)^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 39, normalized size = 0.89 \[ -\frac {\left (\sin ^{3}\relax (x )+\frac {3 \sin \relax (x )}{2}\right ) \cos \relax (x )}{4}+\frac {35 x}{8}+2 \cos \relax (x ) \sin \relax (x )+4 \cot \relax (x )+\left (-\frac {2}{3}-\frac {\left (\csc ^{2}\relax (x )\right )}{3}\right ) \cot \relax (x ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 36, normalized size = 0.82 \[ \frac {35}{8} \, x + \frac {4}{\tan \relax (x)} - \frac {3 \, \tan \relax (x)^{2} + 1}{3 \, \tan \relax (x)^{3}} + \frac {1}{32} \, \sin \left (4 \, x\right ) + \frac {3}{4} \, \sin \left (2 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.49, size = 59, normalized size = 1.34 \[ \frac {\frac {{\cos \relax (x)}^7}{4}+\frac {7\,{\cos \relax (x)}^5}{8}-\frac {35\,{\cos \relax (x)}^3}{6}+\frac {35\,\cos \relax (x)}{8}}{\sin \relax (x)-{\cos \relax (x)}^2\,\sin \relax (x)}-\frac {\frac {35\,x}{8}-\frac {35\,x\,{\cos \relax (x)}^2}{8}}{{\cos \relax (x)}^2-1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 8.78, size = 44, normalized size = 1.00 \[ \frac {35 x}{8} + 2 \sin {\relax (x )} \cos {\relax (x )} - \frac {\sin {\left (2 x \right )}}{4} + \frac {\sin {\left (4 x \right )}}{32} - \frac {\cot ^{3}{\relax (x )}}{3} - \cot {\relax (x )} + \frac {4 \cos {\relax (x )}}{\sin {\relax (x )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________