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

Optimal result
Mathematica [A] (verified)
Rubi [F]
Maple [B] (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 = 61 \[ \int \csc (a+b x) \csc ^2(c+b x) \, dx=\frac {\text {arctanh}(\cos (c+b x)) \cot (a-c) \csc (a-c)}{b}-\frac {\text {arctanh}(\cos (a+b x)) \csc ^2(a-c)}{b}-\frac {\csc (a-c) \csc (c+b x)}{b} \] Output:

arctanh(cos(b*x+c))*cot(a-c)*csc(a-c)/b-arctanh(cos(b*x+a))*csc(a-c)^2/b-c 
sc(a-c)*csc(b*x+c)/b
 

Mathematica [A] (verified)

Time = 0.33 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.20 \[ \int \csc (a+b x) \csc ^2(c+b x) \, dx=-\frac {\csc (a-c) \left (-2 \text {arctanh}\left (\cos (c)-\sin (c) \tan \left (\frac {b x}{2}\right )\right ) \cot (a-c)+\csc (c+b x)+\csc (a-c) \left (\log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )\right )\right )}{b} \] Input:

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

Output:

-((Csc[a - c]*(-2*ArcTanh[Cos[c] - Sin[c]*Tan[(b*x)/2]]*Cot[a - c] + Csc[c 
 + b*x] + Csc[a - c]*(Log[Cos[(a + b*x)/2]] - Log[Sin[(a + b*x)/2]])))/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 (a+b x) \csc ^2(b x+c) \, dx\)

\(\Big \downarrow \) 7299

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

Input:

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

Output:

$Aborted
 

Defintions of rubi rules used

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

Leaf count of result is larger than twice the leaf count of optimal. \(299\) vs. \(2(61)=122\).

Time = 1.02 (sec) , antiderivative size = 300, normalized size of antiderivative = 4.92

method result size
default \(\frac {\frac {\frac {4 \left (\left (\frac {\cos \left (a \right ) \cos \left (c \right )}{2}+\frac {\sin \left (a \right ) \sin \left (c \right )}{2}\right ) \tan \left (\frac {a}{2}+\frac {b x}{2}\right )-\frac {\sin \left (a \right ) \cos \left (c \right )}{2}+\frac {\cos \left (a \right ) \sin \left (c \right )}{2}\right )}{\cos \left (c \right ) \sin \left (a \right ) \tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}-\sin \left (c \right ) \cos \left (a \right ) \tan \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}+2 \tan \left (\frac {a}{2}+\frac {b x}{2}\right ) \cos \left (a \right ) \cos \left (c \right )+2 \tan \left (\frac {a}{2}+\frac {b x}{2}\right ) \sin \left (a \right ) \sin \left (c \right )-\sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \sin \left (c \right )}-\frac {2 \left (\cos \left (a \right ) \cos \left (c \right )+\sin \left (a \right ) \sin \left (c \right )\right ) \arctan \left (\frac {2 \left (\sin \left (a \right ) \cos \left (c \right )-\cos \left (a \right ) \sin \left (c \right )\right ) \tan \left (\frac {a}{2}+\frac {b x}{2}\right )+2 \cos \left (a \right ) \cos \left (c \right )+2 \sin \left (a \right ) \sin \left (c \right )}{2 \sqrt {-\cos \left (c \right )^{2} \sin \left (a \right )^{2}-\cos \left (a \right )^{2} \cos \left (c \right )^{2}-\sin \left (a \right )^{2} \sin \left (c \right )^{2}-\sin \left (c \right )^{2} \cos \left (a \right )^{2}}}\right )}{\sqrt {-\cos \left (c \right )^{2} \sin \left (a \right )^{2}-\cos \left (a \right )^{2} \cos \left (c \right )^{2}-\sin \left (a \right )^{2} \sin \left (c \right )^{2}-\sin \left (c \right )^{2} \cos \left (a \right )^{2}}}}{\left (\sin \left (a \right ) \cos \left (c \right )-\cos \left (a \right ) \sin \left (c \right )\right )^{2}}+\frac {\ln \left (\tan \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{\left (\sin \left (a \right ) \cos \left (c \right )-\cos \left (a \right ) \sin \left (c \right )\right )^{2}}}{b}\) \(300\)
risch \(-\frac {4 \,{\mathrm e}^{i \left (b x +3 a +2 c \right )}}{\left (-{\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right ) \left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right ) b}-\frac {4 \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right ) {\mathrm e}^{2 i \left (a +c \right )}}{b \left ({\mathrm e}^{4 i a}-2 \,{\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{4 i c}\right )}-\frac {2 \ln \left ({\mathrm e}^{i \left (b x +a \right )}+{\mathrm e}^{i \left (a -c \right )}\right ) {\mathrm e}^{i \left (3 a +c \right )}}{b \left ({\mathrm e}^{4 i a}-2 \,{\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{4 i c}\right )}-\frac {2 \ln \left ({\mathrm e}^{i \left (b x +a \right )}+{\mathrm e}^{i \left (a -c \right )}\right ) {\mathrm e}^{i \left (a +3 c \right )}}{b \left ({\mathrm e}^{4 i a}-2 \,{\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{4 i c}\right )}+\frac {2 \ln \left ({\mathrm e}^{i \left (b x +a \right )}-{\mathrm e}^{i \left (a -c \right )}\right ) {\mathrm e}^{i \left (3 a +c \right )}}{b \left ({\mathrm e}^{4 i a}-2 \,{\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{4 i c}\right )}+\frac {2 \ln \left ({\mathrm e}^{i \left (b x +a \right )}-{\mathrm e}^{i \left (a -c \right )}\right ) {\mathrm e}^{i \left (a +3 c \right )}}{b \left ({\mathrm e}^{4 i a}-2 \,{\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{4 i c}\right )}+\frac {4 \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) {\mathrm e}^{2 i \left (a +c \right )}}{b \left ({\mathrm e}^{4 i a}-2 \,{\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{4 i c}\right )}\) \(376\)

Input:

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

Output:

1/b*(4/(sin(a)*cos(c)-cos(a)*sin(c))^2*(((1/2*cos(a)*cos(c)+1/2*sin(a)*sin 
(c))*tan(1/2*a+1/2*b*x)-1/2*sin(a)*cos(c)+1/2*cos(a)*sin(c))/(cos(c)*sin(a 
)*tan(1/2*a+1/2*b*x)^2-sin(c)*cos(a)*tan(1/2*a+1/2*b*x)^2+2*tan(1/2*a+1/2* 
b*x)*cos(a)*cos(c)+2*tan(1/2*a+1/2*b*x)*sin(a)*sin(c)-sin(a)*cos(c)+cos(a) 
*sin(c))-1/2*(cos(a)*cos(c)+sin(a)*sin(c))/(-cos(c)^2*sin(a)^2-cos(a)^2*co 
s(c)^2-sin(a)^2*sin(c)^2-sin(c)^2*cos(a)^2)^(1/2)*arctan(1/2*(2*(sin(a)*co 
s(c)-cos(a)*sin(c))*tan(1/2*a+1/2*b*x)+2*cos(a)*cos(c)+2*sin(a)*sin(c))/(- 
cos(c)^2*sin(a)^2-cos(a)^2*cos(c)^2-sin(a)^2*sin(c)^2-sin(c)^2*cos(a)^2)^( 
1/2)))+1/(sin(a)*cos(c)-cos(a)*sin(c))^2*ln(tan(1/2*a+1/2*b*x)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 180 vs. \(2 (61) = 122\).

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

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

Output:

-1/2*(cos(-a + c)*log(1/2*cos(b*x + c) + 1/2)*sin(b*x + c) - cos(-a + c)*l 
og(-1/2*cos(b*x + c) + 1/2)*sin(b*x + c) - log((cos(b*x + c)*cos(-a + c) + 
 sin(b*x + c)*sin(-a + c) + 1)/(cos(-a + c) + 1))*sin(b*x + c) + log(-(cos 
(b*x + c)*cos(-a + c) + sin(b*x + c)*sin(-a + c) - 1)/(cos(-a + c) + 1))*s 
in(b*x + c) + 2*sin(-a + c))/((b*cos(-a + c)^2 - b)*sin(b*x + c))
 

Sympy [F]

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

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 19853 vs. \(2 (61) = 122\).

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

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

Output:

(4*(cos(4*a)^2 - 4*(cos(4*a) + cos(4*c))*cos(2*a + 2*c) + 4*cos(2*a + 2*c) 
^2 + 2*cos(4*a)*cos(4*c) + cos(4*c)^2 + sin(4*a)^2 - 4*(sin(4*a) + sin(4*c 
))*sin(2*a + 2*c) + 4*sin(2*a + 2*c)^2 + 2*sin(4*a)*sin(4*c) + sin(4*c)^2) 
*cos(2*b*x + 2*a + 2*c)*cos(b*x + a + 2*c) - 4*(cos(4*a)^2 - 4*(cos(4*a) + 
 cos(4*c))*cos(2*a + 2*c) + 4*cos(2*a + 2*c)^2 + 2*cos(4*a)*cos(4*c) + cos 
(4*c)^2 + sin(4*a)^2 - 4*(sin(4*a) + sin(4*c))*sin(2*a + 2*c) + 4*sin(2*a 
+ 2*c)^2 + 2*sin(4*a)*sin(4*c) + sin(4*c)^2)*cos(2*b*x + 4*c)*cos(b*x + a 
+ 2*c) + 4*(cos(4*a)^2 - 4*(cos(4*a) + cos(4*c))*cos(2*a + 2*c) + 4*cos(2* 
a + 2*c)^2 + 2*cos(4*a)*cos(4*c) + cos(4*c)^2 + sin(4*a)^2 - 4*(sin(4*a) + 
 sin(4*c))*sin(2*a + 2*c) + 4*sin(2*a + 2*c)^2 + 2*sin(4*a)*sin(4*c) + sin 
(4*c)^2)*sin(2*b*x + 2*a + 2*c)*sin(b*x + a + 2*c) - 4*(cos(4*a)^2 - 4*(co 
s(4*a) + cos(4*c))*cos(2*a + 2*c) + 4*cos(2*a + 2*c)^2 + 2*cos(4*a)*cos(4* 
c) + cos(4*c)^2 + sin(4*a)^2 - 4*(sin(4*a) + sin(4*c))*sin(2*a + 2*c) + 4* 
sin(2*a + 2*c)^2 + 2*sin(4*a)*sin(4*c) + sin(4*c)^2)*sin(2*b*x + 4*c)*sin( 
b*x + a + 2*c) - 4*(((sin(4*a) + sin(4*c))*cos(2*a + 2*c) - (cos(4*a) + co 
s(4*c))*sin(2*a + 2*c))*cos(2*b*x + 2*a + 2*c)^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*c)^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 + ((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 + 4*c)^2 - 2*((cos(2*a)*...
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1917 vs. \(2 (61) = 122\).

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

\text{Hanged}
 

Reduce [F]

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

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

Output:

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