Integrand size = 9, antiderivative size = 34 \[ \int (\csc (x)-\sin (x))^3 \, dx=\frac {5}{2} \text {arctanh}(\cos (x))-\frac {5 \cos (x)}{2}-\frac {5 \cos ^3(x)}{6}-\frac {1}{2} \cos ^3(x) \cot ^2(x) \] Output:
5/2*arctanh(cos(x))-5/2*cos(x)-5/6*cos(x)^3-1/2*cos(x)^3*cot(x)^2
Time = 0.03 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.79 \[ \int (\csc (x)-\sin (x))^3 \, dx=-\frac {9 \cos (x)}{4}-\frac {1}{12} \cos (3 x)-\frac {1}{8} \csc ^2\left (\frac {x}{2}\right )+\frac {5}{2} \log \left (\cos \left (\frac {x}{2}\right )\right )-\frac {5}{2} \log \left (\sin \left (\frac {x}{2}\right )\right )+\frac {1}{8} \sec ^2\left (\frac {x}{2}\right ) \] Input:
Integrate[(Csc[x] - Sin[x])^3,x]
Output:
(-9*Cos[x])/4 - Cos[3*x]/12 - Csc[x/2]^2/8 + (5*Log[Cos[x/2]])/2 - (5*Log[ Sin[x/2]])/2 + Sec[x/2]^2/8
Time = 0.27 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.15, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.889, Rules used = {3042, 4897, 3042, 25, 3072, 252, 254, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (\csc (x)-\sin (x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (\csc (x)-\sin (x))^3dx\) |
\(\Big \downarrow \) 4897 |
\(\displaystyle \int \cos ^3(x) \cot ^3(x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\sin \left (x+\frac {\pi }{2}\right )^3 \tan \left (x+\frac {\pi }{2}\right )^3dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \sin \left (x+\frac {\pi }{2}\right )^3 \tan \left (x+\frac {\pi }{2}\right )^3dx\) |
\(\Big \downarrow \) 3072 |
\(\displaystyle -\int \frac {\cos ^6(x)}{\left (1-\cos ^2(x)\right )^2}d\cos (x)\) |
\(\Big \downarrow \) 252 |
\(\displaystyle \frac {5}{2} \int \frac {\cos ^4(x)}{1-\cos ^2(x)}d\cos (x)-\frac {\cos ^5(x)}{2 \left (1-\cos ^2(x)\right )}\) |
\(\Big \downarrow \) 254 |
\(\displaystyle \frac {5}{2} \int \left (-\cos ^2(x)+\frac {1}{1-\cos ^2(x)}-1\right )d\cos (x)-\frac {\cos ^5(x)}{2 \left (1-\cos ^2(x)\right )}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {5}{2} \left (\text {arctanh}(\cos (x))-\frac {1}{3} \cos ^3(x)-\cos (x)\right )-\frac {\cos ^5(x)}{2 \left (1-\cos ^2(x)\right )}\) |
Input:
Int[(Csc[x] - Sin[x])^3,x]
Output:
-1/2*Cos[x]^5/(1 - Cos[x]^2) + (5*(ArcTanh[Cos[x]] - Cos[x] - Cos[x]^3/3)) /2
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x )^(m - 1)*((a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] - Simp[c^2*((m - 1)/(2*b* (p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c }, x] && LtQ[p, -1] && GtQ[m, 1] && !ILtQ[(m + 2*p + 3)/2, 0] && IntBinomi alQ[a, b, c, 2, m, p, x]
Int[(x_)^(m_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^2, x], x] /; FreeQ[{a, b}, x] && IGtQ[m, 3]
Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_ Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ (ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)], x ]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]
Time = 0.58 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.94
method | result | size |
default | \(\frac {\left (2+\sin \left (x \right )^{2}\right ) \cos \left (x \right )}{3}-3 \cos \left (x \right )-\frac {5 \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )}{2}-\frac {\csc \left (x \right ) \cot \left (x \right )}{2}\) | \(32\) |
parts | \(\frac {\left (2+\sin \left (x \right )^{2}\right ) \cos \left (x \right )}{3}-3 \cos \left (x \right )-\frac {5 \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )}{2}-\frac {\csc \left (x \right ) \cot \left (x \right )}{2}\) | \(32\) |
parallelrisch | \(-\frac {\sec \left (\frac {x}{2}\right )^{2} \csc \left (\frac {x}{2}\right )^{2} \left (-10-\cos \left (5 x \right )-25 \cos \left (3 x \right )+10 \cos \left (2 x \right )+50 \cos \left (x \right )-60 \ln \left (\tan \left (\frac {x}{2}\right )\right ) \cos \left (2 x \right )+60 \ln \left (\tan \left (\frac {x}{2}\right )\right )\right )}{192}\) | \(57\) |
norman | \(\frac {-\frac {1}{8}-\frac {75 \tan \left (\frac {x}{2}\right )^{4}}{8}-\frac {65 \tan \left (\frac {x}{2}\right )^{2}}{12}-\frac {55 \tan \left (\frac {x}{2}\right )^{6}}{8}+\frac {\tan \left (\frac {x}{2}\right )^{10}}{8}}{\tan \left (\frac {x}{2}\right )^{2} \left (1+\tan \left (\frac {x}{2}\right )^{2}\right )^{3}}-\frac {5 \ln \left (\tan \left (\frac {x}{2}\right )\right )}{2}\) | \(60\) |
risch | \(-\frac {{\mathrm e}^{3 i x}}{24}-\frac {9 \,{\mathrm e}^{i x}}{8}-\frac {9 \,{\mathrm e}^{-i x}}{8}-\frac {{\mathrm e}^{-3 i x}}{24}+\frac {{\mathrm e}^{3 i x}+{\mathrm e}^{i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}+\frac {5 \ln \left ({\mathrm e}^{i x}+1\right )}{2}-\frac {5 \ln \left ({\mathrm e}^{i x}-1\right )}{2}\) | \(71\) |
Input:
int((csc(x)-sin(x))^3,x,method=_RETURNVERBOSE)
Output:
1/3*(2+sin(x)^2)*cos(x)-3*cos(x)-5/2*ln(-cot(x)+csc(x))-1/2*csc(x)*cot(x)
Leaf count of result is larger than twice the leaf count of optimal. 57 vs. \(2 (26) = 52\).
Time = 0.09 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.68 \[ \int (\csc (x)-\sin (x))^3 \, dx=-\frac {4 \, \cos \left (x\right )^{5} + 20 \, \cos \left (x\right )^{3} - 15 \, {\left (\cos \left (x\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + 15 \, {\left (\cos \left (x\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - 30 \, \cos \left (x\right )}{12 \, {\left (\cos \left (x\right )^{2} - 1\right )}} \] Input:
integrate((csc(x)-sin(x))^3,x, algorithm="fricas")
Output:
-1/12*(4*cos(x)^5 + 20*cos(x)^3 - 15*(cos(x)^2 - 1)*log(1/2*cos(x) + 1/2) + 15*(cos(x)^2 - 1)*log(-1/2*cos(x) + 1/2) - 30*cos(x))/(cos(x)^2 - 1)
Time = 1.36 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.24 \[ \int (\csc (x)-\sin (x))^3 \, dx=- \frac {5 \log {\left (\cos {\left (x \right )} - 1 \right )}}{4} + \frac {5 \log {\left (\cos {\left (x \right )} + 1 \right )}}{4} - \frac {\cos ^{3}{\left (x \right )}}{3} - 2 \cos {\left (x \right )} + \frac {\cos {\left (x \right )}}{2 \cos ^{2}{\left (x \right )} - 2} \] Input:
integrate((csc(x)-sin(x))**3,x)
Output:
-5*log(cos(x) - 1)/4 + 5*log(cos(x) + 1)/4 - cos(x)**3/3 - 2*cos(x) + cos( x)/(2*cos(x)**2 - 2)
Time = 0.03 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.09 \[ \int (\csc (x)-\sin (x))^3 \, dx=-\frac {1}{3} \, \cos \left (x\right )^{3} + \frac {\cos \left (x\right )}{2 \, {\left (\cos \left (x\right )^{2} - 1\right )}} - 2 \, \cos \left (x\right ) + \frac {5}{4} \, \log \left (\cos \left (x\right ) + 1\right ) - \frac {5}{4} \, \log \left (\cos \left (x\right ) - 1\right ) \] Input:
integrate((csc(x)-sin(x))^3,x, algorithm="maxima")
Output:
-1/3*cos(x)^3 + 1/2*cos(x)/(cos(x)^2 - 1) - 2*cos(x) + 5/4*log(cos(x) + 1) - 5/4*log(cos(x) - 1)
Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (26) = 52\).
Time = 0.12 (sec) , antiderivative size = 99, normalized size of antiderivative = 2.91 \[ \int (\csc (x)-\sin (x))^3 \, dx=\frac {{\left (\frac {10 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} + 1\right )} {\left (\cos \left (x\right ) + 1\right )}}{8 \, {\left (\cos \left (x\right ) - 1\right )}} - \frac {\cos \left (x\right ) - 1}{8 \, {\left (\cos \left (x\right ) + 1\right )}} - \frac {2 \, {\left (\frac {12 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} - \frac {9 \, {\left (\cos \left (x\right ) - 1\right )}^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - 7\right )}}{3 \, {\left (\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} - 1\right )}^{3}} - \frac {5}{4} \, \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1}\right ) \] Input:
integrate((csc(x)-sin(x))^3,x, algorithm="giac")
Output:
1/8*(10*(cos(x) - 1)/(cos(x) + 1) + 1)*(cos(x) + 1)/(cos(x) - 1) - 1/8*(co s(x) - 1)/(cos(x) + 1) - 2/3*(12*(cos(x) - 1)/(cos(x) + 1) - 9*(cos(x) - 1 )^2/(cos(x) + 1)^2 - 7)/((cos(x) - 1)/(cos(x) + 1) - 1)^3 - 5/4*log(-(cos( x) - 1)/(cos(x) + 1))
Time = 15.08 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.21 \[ \int (\csc (x)-\sin (x))^3 \, dx=\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8}-\frac {\frac {49\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6}{8}+\frac {67\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4}{8}+\frac {121\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{24}+\frac {1}{8}}{{\mathrm {tan}\left (\frac {x}{2}\right )}^8+3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+{\mathrm {tan}\left (\frac {x}{2}\right )}^2}-\frac {5\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{2} \] Input:
int(-(sin(x) - 1/sin(x))^3,x)
Output:
tan(x/2)^2/8 - ((121*tan(x/2)^2)/24 + (67*tan(x/2)^4)/8 + (49*tan(x/2)^6)/ 8 + 1/8)/(tan(x/2)^2 + 3*tan(x/2)^4 + 3*tan(x/2)^6 + tan(x/2)^8) - (5*log( tan(x/2)))/2
Time = 0.17 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.29 \[ \int (\csc (x)-\sin (x))^3 \, dx=\frac {2 \cos \left (x \right ) \sin \left (x \right )^{4}-14 \cos \left (x \right ) \sin \left (x \right )^{2}-3 \cos \left (x \right )-15 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) \sin \left (x \right )^{2}+14 \sin \left (x \right )^{2}}{6 \sin \left (x \right )^{2}} \] Input:
int((csc(x)-sin(x))^3,x)
Output:
(2*cos(x)*sin(x)**4 - 14*cos(x)*sin(x)**2 - 3*cos(x) - 15*log(tan(x/2))*si n(x)**2 + 14*sin(x)**2)/(6*sin(x)**2)