\(\int \cot (c+b x) \csc ^2(a+b x) \, dx\) [250]

Optimal result
Mathematica [A] (verified)
Rubi [F]
Maple [C] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [B] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 15, antiderivative size = 56 \[ \int \cot (c+b x) \csc ^2(a+b x) \, dx=\frac {\cot (a-c) \cot (a+b x)}{b}-\frac {\csc ^2(a-c) \log (\sin (a+b x))}{b}+\frac {\csc ^2(a-c) \log (\sin (c+b x))}{b} \] Output:

cot(a-c)*cot(b*x+a)/b-csc(a-c)^2*ln(sin(b*x+a))/b+csc(a-c)^2*ln(sin(b*x+c) 
)/b
 

Mathematica [A] (verified)

Time = 0.45 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.36 \[ \int \cot (c+b x) \csc ^2(a+b x) \, dx=\frac {\csc (a) \csc ^2(a-c) \csc (a+b x) (-\cos (2 a-2 c-b x)+\cos (2 a-2 c+b x)+4 (-\log (\sin (a+b x))+\log (\sin (c+b x))) \sin (a) \sin (a+b x))}{4 b} \] Input:

Integrate[Cot[c + b*x]*Csc[a + b*x]^2,x]
 

Output:

(Csc[a]*Csc[a - c]^2*Csc[a + b*x]*(-Cos[2*a - 2*c - b*x] + Cos[2*a - 2*c + 
 b*x] + 4*(-Log[Sin[a + b*x]] + Log[Sin[c + b*x]])*Sin[a]*Sin[a + b*x]))/( 
4*b)
 

Rubi [F]

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 ^2(a+b x) \cot (b x+c) \, dx\)

\(\Big \downarrow \) 7299

\(\displaystyle \int \csc ^2(a+b x) \cot (b x+c)dx\)

Input:

Int[Cot[c + b*x]*Csc[a + b*x]^2,x]
 

Output:

$Aborted
 

Defintions of rubi rules used

rule 7299
Int[u_, x_] :> CannotIntegrate[u, x]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.12 (sec) , antiderivative size = 180, normalized size of antiderivative = 3.21

method result size
risch \(-\frac {2 \,{\mathrm e}^{2 i a}}{b \left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right ) \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}-\frac {2 \,{\mathrm e}^{2 i c}}{b \left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right ) \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}+\frac {4 \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right ) {\mathrm e}^{2 i \left (a +c \right )}}{\left ({\mathrm e}^{4 i a}-2 \,{\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{4 i c}\right ) b}-\frac {4 \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-{\mathrm e}^{2 i \left (a -c \right )}\right ) {\mathrm e}^{2 i \left (a +c \right )}}{\left ({\mathrm e}^{4 i a}-2 \,{\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{4 i c}\right ) b}\) \(180\)

Input:

int(cot(b*x+c)*csc(b*x+a)^2,x,method=_RETURNVERBOSE)
 

Output:

-2/b/(exp(2*I*a)-exp(2*I*c))/(exp(2*I*(b*x+a))-1)*exp(2*I*a)-2/b/(exp(2*I* 
a)-exp(2*I*c))/(exp(2*I*(b*x+a))-1)*exp(2*I*c)+4*ln(exp(2*I*(b*x+a))-1)/(e 
xp(4*I*a)-2*exp(2*I*(a+c))+exp(4*I*c))/b*exp(2*I*(a+c))-4*ln(exp(2*I*(b*x+ 
a))-exp(2*I*(a-c)))/(exp(4*I*a)-2*exp(2*I*(a+c))+exp(4*I*c))/b*exp(2*I*(a+ 
c))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 136 vs. \(2 (56) = 112\).

Time = 0.09 (sec) , antiderivative size = 136, normalized size of antiderivative = 2.43 \[ \int \cot (c+b x) \csc ^2(a+b x) \, dx=\frac {\log \left (-\frac {1}{4} \, \cos \left (b x + a\right )^{2} + \frac {1}{4}\right ) \sin \left (b x + a\right ) - \log \left (-\frac {2 \, \cos \left (b x + a\right )^{2} \cos \left (-2 \, a + 2 \, c\right ) - 2 \, \cos \left (b x + a\right ) \sin \left (b x + a\right ) \sin \left (-2 \, a + 2 \, c\right ) - \cos \left (-2 \, a + 2 \, c\right ) - 1}{\cos \left (-2 \, a + 2 \, c\right ) + 1}\right ) \sin \left (b x + a\right ) + \cos \left (b x + a\right ) \sin \left (-2 \, a + 2 \, c\right )}{{\left (b \cos \left (-2 \, a + 2 \, c\right ) - b\right )} \sin \left (b x + a\right )} \] Input:

integrate(cot(b*x+c)*csc(b*x+a)^2,x, algorithm="fricas")
 

Output:

(log(-1/4*cos(b*x + a)^2 + 1/4)*sin(b*x + a) - log(-(2*cos(b*x + a)^2*cos( 
-2*a + 2*c) - 2*cos(b*x + a)*sin(b*x + a)*sin(-2*a + 2*c) - cos(-2*a + 2*c 
) - 1)/(cos(-2*a + 2*c) + 1))*sin(b*x + a) + cos(b*x + a)*sin(-2*a + 2*c)) 
/((b*cos(-2*a + 2*c) - b)*sin(b*x + a))
 

Sympy [F]

\[ \int \cot (c+b x) \csc ^2(a+b x) \, dx=\int \cot {\left (b x + c \right )} \csc ^{2}{\left (a + b x \right )}\, dx \] Input:

integrate(cot(b*x+c)*csc(b*x+a)**2,x)
 

Output:

Integral(cot(b*x + c)*csc(a + b*x)**2, x)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 14405 vs. \(2 (56) = 112\).

Time = 0.28 (sec) , antiderivative size = 14405, normalized size of antiderivative = 257.23 \[ \int \cot (c+b x) \csc ^2(a+b x) \, dx=\text {Too large to display} \] Input:

integrate(cot(b*x+c)*csc(b*x+a)^2,x, algorithm="maxima")
 

Output:

2*((cos(2*a)^2 + sin(2*a)^2)*cos(4*a)^2 + 4*(cos(2*a)^2 - cos(2*c)^2 + sin 
(2*a)^2 - sin(2*c)^2)*cos(2*a + 2*c)^2 + (cos(2*a)^2 - cos(2*c)^2 + sin(2* 
a)^2 - sin(2*c)^2)*cos(4*c)^2 - (cos(4*a)^2 + sin(4*a)^2)*cos(2*c)^2 + (co 
s(2*a)^2 + sin(2*a)^2)*sin(4*a)^2 + 4*(cos(2*a)^2 - cos(2*c)^2 + sin(2*a)^ 
2 - sin(2*c)^2)*sin(2*a + 2*c)^2 + (cos(2*a)^2 - cos(2*c)^2 + sin(2*a)^2 - 
 sin(2*c)^2)*sin(4*c)^2 - (cos(4*a)^2 + sin(4*a)^2)*sin(2*c)^2 + 2*(((sin( 
4*a) + sin(4*c))*cos(2*a + 2*c) - (cos(4*a) + cos(4*c))*sin(2*a + 2*c))*co 
s(2*b*x + 4*a)^2 + ((sin(4*a) + sin(4*c))*cos(2*a + 2*c) - (cos(4*a) + cos 
(4*c))*sin(2*a + 2*c))*cos(2*b*x + 2*a + 2*c)^2 + ((sin(4*a) + sin(4*c))*c 
os(2*a + 2*c) - (cos(4*a) + cos(4*c))*sin(2*a + 2*c))*sin(2*b*x + 4*a)^2 + 
 ((sin(4*a) + sin(4*c))*cos(2*a + 2*c) - (cos(4*a) + cos(4*c))*sin(2*a + 2 
*c))*sin(2*b*x + 2*a + 2*c)^2 - 2*((cos(2*a)*sin(4*a) - cos(2*c)*sin(4*a) 
+ (cos(2*a) - cos(2*c))*sin(4*c))*cos(2*a + 2*c) - (cos(4*a)*cos(2*a) + (c 
os(2*a) - cos(2*c))*cos(4*c) - cos(4*a)*cos(2*c))*sin(2*a + 2*c))*cos(2*b* 
x + 4*a) - 2*(((sin(4*a) + sin(4*c))*cos(2*a + 2*c) - (cos(4*a) + cos(4*c) 
)*sin(2*a + 2*c))*cos(2*b*x + 4*a) - (cos(2*a)*sin(4*a) - cos(2*c)*sin(4*a 
) + (cos(2*a) - cos(2*c))*sin(4*c))*cos(2*a + 2*c) + (cos(4*a)*cos(2*a) + 
(cos(2*a) - cos(2*c))*cos(4*c) - cos(4*a)*cos(2*c))*sin(2*a + 2*c))*cos(2* 
b*x + 2*a + 2*c) - (2*cos(2*a)*cos(2*c)*sin(4*a) - cos(2*c)^2*sin(4*a) + 2 
*sin(4*a)*sin(2*a)*sin(2*c) - sin(4*a)*sin(2*c)^2 - (cos(2*a)^2 + sin(2...
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1208 vs. \(2 (56) = 112\).

Time = 0.17 (sec) , antiderivative size = 1208, normalized size of antiderivative = 21.57 \[ \int \cot (c+b x) \csc ^2(a+b x) \, dx=\text {Too large to display} \] Input:

integrate(cot(b*x+c)*csc(b*x+a)^2,x, algorithm="giac")
 

Output:

-1/4*((tan(1/2*a)^6*tan(1/2*c)^4 + 2*tan(1/2*a)^6*tan(1/2*c)^2 + tan(1/2*a 
)^4*tan(1/2*c)^4 + tan(1/2*a)^6 + 2*tan(1/2*a)^4*tan(1/2*c)^2 - tan(1/2*a) 
^2*tan(1/2*c)^4 + tan(1/2*a)^4 - 2*tan(1/2*a)^2*tan(1/2*c)^2 - tan(1/2*c)^ 
4 - tan(1/2*a)^2 - 2*tan(1/2*c)^2 - 1)*log(abs(tan(b*x)*tan(1/2*a)^2 - tan 
(b*x) - 2*tan(1/2*a)))/(tan(1/2*a)^6*tan(1/2*c)^2 - 2*tan(1/2*a)^5*tan(1/2 
*c)^3 + tan(1/2*a)^4*tan(1/2*c)^4 + 2*tan(1/2*a)^5*tan(1/2*c) - 5*tan(1/2* 
a)^4*tan(1/2*c)^2 + 4*tan(1/2*a)^3*tan(1/2*c)^3 - tan(1/2*a)^2*tan(1/2*c)^ 
4 + tan(1/2*a)^4 - 4*tan(1/2*a)^3*tan(1/2*c) + 5*tan(1/2*a)^2*tan(1/2*c)^2 
 - 2*tan(1/2*a)*tan(1/2*c)^3 - tan(1/2*a)^2 + 2*tan(1/2*a)*tan(1/2*c) - ta 
n(1/2*c)^2) - (tan(1/2*a)^4*tan(1/2*c)^6 + tan(1/2*a)^4*tan(1/2*c)^4 + 2*t 
an(1/2*a)^2*tan(1/2*c)^6 - tan(1/2*a)^4*tan(1/2*c)^2 + 2*tan(1/2*a)^2*tan( 
1/2*c)^4 + tan(1/2*c)^6 - tan(1/2*a)^4 - 2*tan(1/2*a)^2*tan(1/2*c)^2 + tan 
(1/2*c)^4 - 2*tan(1/2*a)^2 - tan(1/2*c)^2 - 1)*log(abs(tan(b*x)*tan(1/2*c) 
^2 - tan(b*x) - 2*tan(1/2*c)))/(tan(1/2*a)^4*tan(1/2*c)^4 - 2*tan(1/2*a)^3 
*tan(1/2*c)^5 + tan(1/2*a)^2*tan(1/2*c)^6 - tan(1/2*a)^4*tan(1/2*c)^2 + 4* 
tan(1/2*a)^3*tan(1/2*c)^3 - 5*tan(1/2*a)^2*tan(1/2*c)^4 + 2*tan(1/2*a)*tan 
(1/2*c)^5 - 2*tan(1/2*a)^3*tan(1/2*c) + 5*tan(1/2*a)^2*tan(1/2*c)^2 - 4*ta 
n(1/2*a)*tan(1/2*c)^3 + tan(1/2*c)^4 - tan(1/2*a)^2 + 2*tan(1/2*a)*tan(1/2 
*c) - tan(1/2*c)^2) - (tan(b*x)*tan(1/2*a)^8*tan(1/2*c)^4 + 2*tan(b*x)*tan 
(1/2*a)^8*tan(1/2*c)^2 + 2*tan(1/2*a)^8*tan(1/2*c)^3 - 4*tan(1/2*a)^7*t...
 

Mupad [F(-1)]

Timed out. \[ \int \cot (c+b x) \csc ^2(a+b x) \, dx=\text {Hanged} \] Input:

int(cot(c + b*x)/sin(a + b*x)^2,x)
 

Output:

\text{Hanged}
 

Reduce [F]

\[ \int \cot (c+b x) \csc ^2(a+b x) \, dx=\int \cot \left (b x +c \right ) \csc \left (b x +a \right )^{2}d x \] Input:

int(cot(b*x+c)*csc(b*x+a)^2,x)
 

Output:

int(cot(b*x + c)*csc(a + b*x)**2,x)