Integrand size = 15, antiderivative size = 55 \[ \int \cot ^4(a+b x) \csc (a+b x) \, dx=-\frac {3 \text {arctanh}(\cos (a+b x))}{8 b}+\frac {3 \cot (a+b x) \csc (a+b x)}{8 b}-\frac {\cot ^3(a+b x) \csc (a+b x)}{4 b} \] Output:
-3/8*arctanh(cos(b*x+a))/b+3/8*cot(b*x+a)*csc(b*x+a)/b-1/4*cot(b*x+a)^3*cs c(b*x+a)/b
Leaf count is larger than twice the leaf count of optimal. \(113\) vs. \(2(55)=110\).
Time = 0.12 (sec) , antiderivative size = 113, normalized size of antiderivative = 2.05 \[ \int \cot ^4(a+b x) \csc (a+b x) \, dx=\frac {5 \csc ^2\left (\frac {1}{2} (a+b x)\right )}{32 b}-\frac {\csc ^4\left (\frac {1}{2} (a+b x)\right )}{64 b}-\frac {3 \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )}{8 b}+\frac {3 \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )}{8 b}-\frac {5 \sec ^2\left (\frac {1}{2} (a+b x)\right )}{32 b}+\frac {\sec ^4\left (\frac {1}{2} (a+b x)\right )}{64 b} \] Input:
Integrate[Cot[a + b*x]^4*Csc[a + b*x],x]
Output:
(5*Csc[(a + b*x)/2]^2)/(32*b) - Csc[(a + b*x)/2]^4/(64*b) - (3*Log[Cos[(a + b*x)/2]])/(8*b) + (3*Log[Sin[(a + b*x)/2]])/(8*b) - (5*Sec[(a + b*x)/2]^ 2)/(32*b) + Sec[(a + b*x)/2]^4/(64*b)
Time = 0.58 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.09, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3042, 3091, 3042, 3091, 3042, 4257}
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 \cot ^4(a+b x) \csc (a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan \left (a+b x-\frac {\pi }{2}\right )^4 \sec \left (a+b x-\frac {\pi }{2}\right )dx\) |
\(\Big \downarrow \) 3091 |
\(\displaystyle -\frac {3}{4} \int \cot ^2(a+b x) \csc (a+b x)dx-\frac {\cot ^3(a+b x) \csc (a+b x)}{4 b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {3}{4} \int \sec \left (a+b x-\frac {\pi }{2}\right ) \tan \left (a+b x-\frac {\pi }{2}\right )^2dx-\frac {\cot ^3(a+b x) \csc (a+b x)}{4 b}\) |
\(\Big \downarrow \) 3091 |
\(\displaystyle -\frac {3}{4} \left (-\frac {1}{2} \int \csc (a+b x)dx-\frac {\cot (a+b x) \csc (a+b x)}{2 b}\right )-\frac {\cot ^3(a+b x) \csc (a+b x)}{4 b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {3}{4} \left (-\frac {1}{2} \int \csc (a+b x)dx-\frac {\cot (a+b x) \csc (a+b x)}{2 b}\right )-\frac {\cot ^3(a+b x) \csc (a+b x)}{4 b}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {3}{4} \left (\frac {\text {arctanh}(\cos (a+b x))}{2 b}-\frac {\cot (a+b x) \csc (a+b x)}{2 b}\right )-\frac {\cot ^3(a+b x) \csc (a+b x)}{4 b}\) |
Input:
Int[Cot[a + b*x]^4*Csc[a + b*x],x]
Output:
-1/4*(Cot[a + b*x]^3*Csc[a + b*x])/b - (3*(ArcTanh[Cos[a + b*x]]/(2*b) - ( Cot[a + b*x]*Csc[a + b*x])/(2*b)))/4
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1)) Int[(a*Sec[e + f*x])^m*( b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & & NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 1.23 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.42
method | result | size |
derivativedivides | \(\frac {-\frac {\cos \left (b x +a \right )^{5}}{4 \sin \left (b x +a \right )^{4}}+\frac {\cos \left (b x +a \right )^{5}}{8 \sin \left (b x +a \right )^{2}}+\frac {\cos \left (b x +a \right )^{3}}{8}+\frac {3 \cos \left (b x +a \right )}{8}+\frac {3 \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{8}}{b}\) | \(78\) |
default | \(\frac {-\frac {\cos \left (b x +a \right )^{5}}{4 \sin \left (b x +a \right )^{4}}+\frac {\cos \left (b x +a \right )^{5}}{8 \sin \left (b x +a \right )^{2}}+\frac {\cos \left (b x +a \right )^{3}}{8}+\frac {3 \cos \left (b x +a \right )}{8}+\frac {3 \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{8}}{b}\) | \(78\) |
risch | \(-\frac {5 \,{\mathrm e}^{7 i \left (b x +a \right )}+3 \,{\mathrm e}^{5 i \left (b x +a \right )}+3 \,{\mathrm e}^{3 i \left (b x +a \right )}+5 \,{\mathrm e}^{i \left (b x +a \right )}}{4 b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{4}}+\frac {3 \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{8 b}-\frac {3 \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{8 b}\) | \(99\) |
Input:
int(cot(b*x+a)^4*csc(b*x+a),x,method=_RETURNVERBOSE)
Output:
1/b*(-1/4/sin(b*x+a)^4*cos(b*x+a)^5+1/8/sin(b*x+a)^2*cos(b*x+a)^5+1/8*cos( b*x+a)^3+3/8*cos(b*x+a)+3/8*ln(csc(b*x+a)-cot(b*x+a)))
Leaf count of result is larger than twice the leaf count of optimal. 112 vs. \(2 (49) = 98\).
Time = 0.09 (sec) , antiderivative size = 112, normalized size of antiderivative = 2.04 \[ \int \cot ^4(a+b x) \csc (a+b x) \, dx=-\frac {10 \, \cos \left (b x + a\right )^{3} + 3 \, {\left (\cos \left (b x + a\right )^{4} - 2 \, \cos \left (b x + a\right )^{2} + 1\right )} \log \left (\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) - 3 \, {\left (\cos \left (b x + a\right )^{4} - 2 \, \cos \left (b x + a\right )^{2} + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) - 6 \, \cos \left (b x + a\right )}{16 \, {\left (b \cos \left (b x + a\right )^{4} - 2 \, b \cos \left (b x + a\right )^{2} + b\right )}} \] Input:
integrate(cot(b*x+a)^4*csc(b*x+a),x, algorithm="fricas")
Output:
-1/16*(10*cos(b*x + a)^3 + 3*(cos(b*x + a)^4 - 2*cos(b*x + a)^2 + 1)*log(1 /2*cos(b*x + a) + 1/2) - 3*(cos(b*x + a)^4 - 2*cos(b*x + a)^2 + 1)*log(-1/ 2*cos(b*x + a) + 1/2) - 6*cos(b*x + a))/(b*cos(b*x + a)^4 - 2*b*cos(b*x + a)^2 + b)
\[ \int \cot ^4(a+b x) \csc (a+b x) \, dx=\int \cot ^{4}{\left (a + b x \right )} \csc {\left (a + b x \right )}\, dx \] Input:
integrate(cot(b*x+a)**4*csc(b*x+a),x)
Output:
Integral(cot(a + b*x)**4*csc(a + b*x), x)
Time = 0.03 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.29 \[ \int \cot ^4(a+b x) \csc (a+b x) \, dx=-\frac {\frac {2 \, {\left (5 \, \cos \left (b x + a\right )^{3} - 3 \, \cos \left (b x + a\right )\right )}}{\cos \left (b x + a\right )^{4} - 2 \, \cos \left (b x + a\right )^{2} + 1} + 3 \, \log \left (\cos \left (b x + a\right ) + 1\right ) - 3 \, \log \left (\cos \left (b x + a\right ) - 1\right )}{16 \, b} \] Input:
integrate(cot(b*x+a)^4*csc(b*x+a),x, algorithm="maxima")
Output:
-1/16*(2*(5*cos(b*x + a)^3 - 3*cos(b*x + a))/(cos(b*x + a)^4 - 2*cos(b*x + a)^2 + 1) + 3*log(cos(b*x + a) + 1) - 3*log(cos(b*x + a) - 1))/b
Time = 0.13 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.22 \[ \int \cot ^4(a+b x) \csc (a+b x) \, dx=-\frac {3 \, \log \left ({\left | \cos \left (b x + a\right ) + 1 \right |}\right )}{16 \, b} + \frac {3 \, \log \left ({\left | \cos \left (b x + a\right ) - 1 \right |}\right )}{16 \, b} - \frac {5 \, \cos \left (b x + a\right )^{3} - 3 \, \cos \left (b x + a\right )}{8 \, {\left (\cos \left (b x + a\right )^{2} - 1\right )}^{2} b} \] Input:
integrate(cot(b*x+a)^4*csc(b*x+a),x, algorithm="giac")
Output:
-3/16*log(abs(cos(b*x + a) + 1))/b + 3/16*log(abs(cos(b*x + a) - 1))/b - 1 /8*(5*cos(b*x + a)^3 - 3*cos(b*x + a))/((cos(b*x + a)^2 - 1)^2*b)
Time = 25.46 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.42 \[ \int \cot ^4(a+b x) \csc (a+b x) \, dx=\frac {{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^4}{64\,b}-\frac {{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2}{8\,b}+\frac {3\,\ln \left (\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )\right )}{8\,b}+\frac {{\mathrm {cot}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^4\,\left (\frac {{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2}{8}-\frac {1}{64}\right )}{b} \] Input:
int(cot(a + b*x)^4/sin(a + b*x),x)
Output:
tan(a/2 + (b*x)/2)^4/(64*b) - tan(a/2 + (b*x)/2)^2/(8*b) + (3*log(tan(a/2 + (b*x)/2)))/(8*b) + (cot(a/2 + (b*x)/2)^4*(tan(a/2 + (b*x)/2)^2/8 - 1/64) )/b
Time = 0.18 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.05 \[ \int \cot ^4(a+b x) \csc (a+b x) \, dx=\frac {5 \cos \left (b x +a \right ) \sin \left (b x +a \right )^{2}-2 \cos \left (b x +a \right )+3 \,\mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right ) \sin \left (b x +a \right )^{4}}{8 \sin \left (b x +a \right )^{4} b} \] Input:
int(cot(b*x+a)^4*csc(b*x+a),x)
Output:
(5*cos(a + b*x)*sin(a + b*x)**2 - 2*cos(a + b*x) + 3*log(tan((a + b*x)/2)) *sin(a + b*x)**4)/(8*sin(a + b*x)**4*b)