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.0336686, antiderivative size = 44, normalized size of antiderivative = 1., 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 290
Rule 325
Rule 203
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.0295829, 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]
________________________________________________________________________________________
Maple [A] time = 0.022, size = 39, normalized size = 0.9 \begin{align*} -{\frac{\cos \left ( x \right ) }{4} \left ( \left ( \sin \left ( x \right ) \right ) ^{3}+{\frac{3\,\sin \left ( x \right ) }{2}} \right ) }+{\frac{35\,x}{8}}+2\,\cos \left ( x \right ) \sin \left ( x \right ) +4\,\cot \left ( x \right ) + \left ( -{\frac{2}{3}}-{\frac{ \left ( \csc \left ( x \right ) \right ) ^{2}}{3}} \right ) \cot \left ( x \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00614, size = 49, normalized size = 1.11 \begin{align*} \frac{35}{8} \, x + \frac{4}{\tan \left (x\right )} - \frac{3 \, \tan \left (x\right )^{2} + 1}{3 \, \tan \left (x\right )^{3}} + \frac{1}{32} \, \sin \left (4 \, x\right ) + \frac{3}{4} \, \sin \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.12102, size = 157, normalized size = 3.57 \begin{align*} -\frac{6 \, \cos \left (x\right )^{7} + 21 \, \cos \left (x\right )^{5} - 140 \, \cos \left (x\right )^{3} - 105 \,{\left (x \cos \left (x\right )^{2} - x\right )} \sin \left (x\right ) + 105 \, \cos \left (x\right )}{24 \,{\left (\cos \left (x\right )^{2} - 1\right )} \sin \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 18.1013, size = 44, normalized size = 1. \begin{align*} \frac{35 x}{8} + 2 \sin{\left (x \right )} \cos{\left (x \right )} - \frac{\sin{\left (2 x \right )}}{4} + \frac{\sin{\left (4 x \right )}}{32} - \frac{\cot ^{3}{\left (x \right )}}{3} - \cot{\left (x \right )} + \frac{4 \cos{\left (x \right )}}{\sin{\left (x \right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16528, size = 53, normalized size = 1.2 \begin{align*} \frac{35}{8} \, x + \frac{11 \, \tan \left (x\right )^{3} + 13 \, \tan \left (x\right )}{8 \,{\left (\tan \left (x\right )^{2} + 1\right )}^{2}} + \frac{9 \, \tan \left (x\right )^{2} - 1}{3 \, \tan \left (x\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]