3.2.46 \(\int \csc (c-b x) \csc (a+b x) \, dx\) [146]

3.2.46.1 Optimal result
3.2.46.2 Mathematica [A] (verified)
3.2.46.3 Rubi [A] (verified)
3.2.46.4 Maple [B] (verified)
3.2.46.5 Fricas [B] (verification not implemented)
3.2.46.6 Sympy [B] (verification not implemented)
3.2.46.7 Maxima [B] (verification not implemented)
3.2.46.8 Giac [B] (verification not implemented)
3.2.46.9 Mupad [B] (verification not implemented)

3.2.46.1 Optimal result

Integrand size = 14, antiderivative size = 33 \[ \int \csc (c-b x) \csc (a+b x) \, dx=-\frac {\csc (a+c) \log (\sin (c-b x))}{b}+\frac {\csc (a+c) \log (\sin (a+b x))}{b} \]

output
-csc(a+c)*ln(-sin(b*x-c))/b+csc(a+c)*ln(sin(b*x+a))/b
 
3.2.46.2 Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.88 \[ \int \csc (c-b x) \csc (a+b x) \, dx=-\frac {\csc (a+c) (\log (\sin (c-b x))-\log (-\sin (a+b x)))}{b} \]

input
Integrate[Csc[c - b*x]*Csc[a + b*x],x]
 
output
-((Csc[a + c]*(Log[Sin[c - b*x]] - Log[-Sin[a + b*x]]))/b)
 
3.2.46.3 Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.12, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {5122, 3042, 25, 3956}

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 (c-b x) \, dx\)

\(\Big \downarrow \) 5122

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

\(\Big \downarrow \) 3042

\(\displaystyle \csc (a+c) \int -\tan \left (c-b x+\frac {\pi }{2}\right )dx+\csc (a+c) \int -\tan \left (a+b x+\frac {\pi }{2}\right )dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\csc (a+c) \int \tan \left (\frac {1}{2} (2 c+\pi )-b x\right )dx-\csc (a+c) \int \tan \left (\frac {1}{2} (2 a+\pi )+b x\right )dx\)

\(\Big \downarrow \) 3956

\(\displaystyle \frac {\csc (a+c) \log (-\sin (a+b x))}{b}-\frac {\csc (a+c) \log (-\sin (c-b x))}{b}\)

input
Int[Csc[c - b*x]*Csc[a + b*x],x]
 
output
-((Csc[a + c]*Log[-Sin[c - b*x]])/b) + (Csc[a + c]*Log[-Sin[a + b*x]])/b
 

3.2.46.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3956
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d 
*x], x]]/d, x] /; FreeQ[{c, d}, x]
 

rule 5122
Int[Csc[(a_.) + (b_.)*(x_)]*Csc[(c_) + (d_.)*(x_)], x_Symbol] :> Simp[Csc[( 
b*c - a*d)/b]   Int[Cot[a + b*x], x], x] - Simp[Csc[(b*c - a*d)/d]   Int[Co 
t[c + d*x], x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[b^2 - d^2, 0] && NeQ[b* 
c - a*d, 0]
 
3.2.46.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(79\) vs. \(2(36)=72\).

Time = 1.48 (sec) , antiderivative size = 80, normalized size of antiderivative = 2.42

method result size
default \(-\frac {-\frac {\ln \left (\tan \left (x b +a \right )\right )}{\sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \sin \left (c \right )}+\frac {\ln \left (\tan \left (x b +a \right ) \cos \left (a \right ) \cos \left (c \right )-\tan \left (x b +a \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 )\right )}{\sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \sin \left (c \right )}}{b}\) \(80\)
risch \(\frac {2 i \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}-1\right ) {\mathrm e}^{i \left (a +c \right )}}{\left ({\mathrm e}^{2 i \left (a +c \right )}-1\right ) b}-\frac {2 i \ln \left (-{\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{2 i \left (x b +a \right )}\right ) {\mathrm e}^{i \left (a +c \right )}}{\left ({\mathrm e}^{2 i \left (a +c \right )}-1\right ) b}\) \(82\)

input
int(-csc(b*x-c)*csc(b*x+a),x,method=_RETURNVERBOSE)
 
output
-1/b*(-1/(sin(a)*cos(c)+cos(a)*sin(c))*ln(tan(b*x+a))+1/(sin(a)*cos(c)+cos 
(a)*sin(c))*ln(tan(b*x+a)*cos(a)*cos(c)-tan(b*x+a)*sin(a)*sin(c)-sin(a)*co 
s(c)-cos(a)*sin(c)))
 
3.2.46.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 96 vs. \(2 (36) = 72\).

Time = 0.26 (sec) , antiderivative size = 96, normalized size of antiderivative = 2.91 \[ \int \csc (c-b x) \csc (a+b x) \, dx=\frac {\log \left (-\frac {1}{4} \, \cos \left (b x + a\right )^{2} + \frac {1}{4}\right ) - \log \left (-\frac {2 \, \cos \left (b x + a\right ) \cos \left (a + c\right ) \sin \left (b x + a\right ) \sin \left (a + c\right ) + {\left (2 \, \cos \left (a + c\right )^{2} - 1\right )} \cos \left (b x + a\right )^{2} - \cos \left (a + c\right )^{2}}{\cos \left (a + c\right )^{2} + 2 \, \cos \left (a + c\right ) + 1}\right )}{2 \, b \sin \left (a + c\right )} \]

input
integrate(-csc(b*x-c)*csc(b*x+a),x, algorithm="fricas")
 
output
1/2*(log(-1/4*cos(b*x + a)^2 + 1/4) - log(-(2*cos(b*x + a)*cos(a + c)*sin( 
b*x + a)*sin(a + c) + (2*cos(a + c)^2 - 1)*cos(b*x + a)^2 - cos(a + c)^2)/ 
(cos(a + c)^2 + 2*cos(a + c) + 1)))/(b*sin(a + c))
 
3.2.46.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1824 vs. \(2 (31) = 62\).

Time = 68.55 (sec) , antiderivative size = 1824, normalized size of antiderivative = 55.27 \[ \int \csc (c-b x) \csc (a+b x) \, dx=\text {Too large to display} \]

input
integrate(-csc(b*x-c)*csc(b*x+a),x)
 
output
Piecewise((-log(-tan(c/2) + tan(b*x/2))*tan(c/2)/(2*b) - log(-tan(c/2) + t 
an(b*x/2))/(2*b*tan(c/2)) - log(tan(b*x/2) + 1/tan(c/2))*tan(c/2)/(2*b) - 
log(tan(b*x/2) + 1/tan(c/2))/(2*b*tan(c/2)) + log(tan(b*x/2))*tan(c/2)/(2* 
b) + log(tan(b*x/2))/(2*b*tan(c/2)), Eq(a, 0)), (log(tan(a/2) + tan(b*x/2) 
)*tan(a/2)/(2*b) + log(tan(a/2) + tan(b*x/2))/(2*b*tan(a/2)) + log(tan(b*x 
/2) - 1/tan(a/2))*tan(a/2)/(2*b) + log(tan(b*x/2) - 1/tan(a/2))/(2*b*tan(a 
/2)) - log(tan(b*x/2))*tan(a/2)/(2*b) - log(tan(b*x/2))/(2*b*tan(a/2)), Eq 
(c, 0)), (-tan(c/2)**4*tan(b*x/2)/(-2*b*tan(c/2)**3*tan(b*x/2) + 2*b*tan(c 
/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 + 2*b*tan(c/2)*tan(b*x/2)) - 2*tan( 
c/2)**2*tan(b*x/2)/(-2*b*tan(c/2)**3*tan(b*x/2) + 2*b*tan(c/2)**2*tan(b*x/ 
2)**2 - 2*b*tan(c/2)**2 + 2*b*tan(c/2)*tan(b*x/2)) - tan(b*x/2)/(-2*b*tan( 
c/2)**3*tan(b*x/2) + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 + 2*b 
*tan(c/2)*tan(b*x/2)), Eq(a, 2*atan(1/tan(c/2)))), (tan(c/2)**4*tan(b*x/2) 
/(-2*b*tan(c/2)**3*tan(b*x/2) + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/ 
2)**2 + 2*b*tan(c/2)*tan(b*x/2)) + 2*tan(c/2)**2*tan(b*x/2)/(-2*b*tan(c/2) 
**3*tan(b*x/2) + 2*b*tan(c/2)**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 + 2*b*tan 
(c/2)*tan(b*x/2)) + tan(b*x/2)/(-2*b*tan(c/2)**3*tan(b*x/2) + 2*b*tan(c/2) 
**2*tan(b*x/2)**2 - 2*b*tan(c/2)**2 + 2*b*tan(c/2)*tan(b*x/2)), Eq(a, -2*a 
tan(tan(c/2)) - 2*pi*floor((c/2 - pi/2)/pi))), (x/(sin(a)*sin(c)), Eq(b, 0 
)), (-log(tan(a/2) + tan(b*x/2))*tan(a/2)**2*tan(c/2)**2/(2*b*tan(a/2)*...
 
3.2.46.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 536 vs. \(2 (36) = 72\).

Time = 0.22 (sec) , antiderivative size = 536, normalized size of antiderivative = 16.24 \[ \int \csc (c-b x) \csc (a+b x) \, dx=-\frac {2 \, {\left (\cos \left (2 \, a + 2 \, c\right ) \cos \left (a + c\right ) + \sin \left (2 \, a + 2 \, c\right ) \sin \left (a + c\right ) - \cos \left (a + c\right )\right )} \arctan \left (\sin \left (b x\right ) + \sin \left (a\right ), \cos \left (b x\right ) - \cos \left (a\right )\right ) + 2 \, {\left (\cos \left (2 \, a + 2 \, c\right ) \cos \left (a + c\right ) + \sin \left (2 \, a + 2 \, c\right ) \sin \left (a + c\right ) - \cos \left (a + c\right )\right )} \arctan \left (\sin \left (b x\right ) - \sin \left (a\right ), \cos \left (b x\right ) + \cos \left (a\right )\right ) - 2 \, {\left (\cos \left (2 \, a + 2 \, c\right ) \cos \left (a + c\right ) + \sin \left (2 \, a + 2 \, c\right ) \sin \left (a + c\right ) - \cos \left (a + c\right )\right )} \arctan \left (\sin \left (b x\right ) + \sin \left (c\right ), \cos \left (b x\right ) + \cos \left (c\right )\right ) - 2 \, {\left (\cos \left (2 \, a + 2 \, c\right ) \cos \left (a + c\right ) + \sin \left (2 \, a + 2 \, c\right ) \sin \left (a + c\right ) - \cos \left (a + c\right )\right )} \arctan \left (\sin \left (b x\right ) - \sin \left (c\right ), \cos \left (b x\right ) - \cos \left (c\right )\right ) - {\left (\cos \left (a + c\right ) \sin \left (2 \, a + 2 \, c\right ) - \cos \left (2 \, a + 2 \, c\right ) \sin \left (a + c\right ) + \sin \left (a + c\right )\right )} \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) - {\left (\cos \left (a + c\right ) \sin \left (2 \, a + 2 \, c\right ) - \cos \left (2 \, a + 2 \, c\right ) \sin \left (a + c\right ) + \sin \left (a + c\right )\right )} \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) + {\left (\cos \left (a + c\right ) \sin \left (2 \, a + 2 \, c\right ) - \cos \left (2 \, a + 2 \, c\right ) \sin \left (a + c\right ) + \sin \left (a + c\right )\right )} \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \left (c\right ) + \cos \left (c\right )^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \left (c\right ) + \sin \left (c\right )^{2}\right ) + {\left (\cos \left (a + c\right ) \sin \left (2 \, a + 2 \, c\right ) - \cos \left (2 \, a + 2 \, c\right ) \sin \left (a + c\right ) + \sin \left (a + c\right )\right )} \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \left (c\right ) + \cos \left (c\right )^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \left (c\right ) + \sin \left (c\right )^{2}\right )}{b \cos \left (2 \, a + 2 \, c\right )^{2} + b \sin \left (2 \, a + 2 \, c\right )^{2} - 2 \, b \cos \left (2 \, a + 2 \, c\right ) + b} \]

input
integrate(-csc(b*x-c)*csc(b*x+a),x, algorithm="maxima")
 
output
-(2*(cos(2*a + 2*c)*cos(a + c) + sin(2*a + 2*c)*sin(a + c) - cos(a + c))*a 
rctan2(sin(b*x) + sin(a), cos(b*x) - cos(a)) + 2*(cos(2*a + 2*c)*cos(a + c 
) + sin(2*a + 2*c)*sin(a + c) - cos(a + c))*arctan2(sin(b*x) - sin(a), cos 
(b*x) + cos(a)) - 2*(cos(2*a + 2*c)*cos(a + c) + sin(2*a + 2*c)*sin(a + c) 
 - cos(a + c))*arctan2(sin(b*x) + sin(c), cos(b*x) + cos(c)) - 2*(cos(2*a 
+ 2*c)*cos(a + c) + sin(2*a + 2*c)*sin(a + c) - cos(a + c))*arctan2(sin(b* 
x) - sin(c), cos(b*x) - cos(c)) - (cos(a + c)*sin(2*a + 2*c) - cos(2*a + 2 
*c)*sin(a + c) + sin(a + c))*log(cos(b*x)^2 + 2*cos(b*x)*cos(a) + cos(a)^2 
 + sin(b*x)^2 - 2*sin(b*x)*sin(a) + sin(a)^2) - (cos(a + c)*sin(2*a + 2*c) 
 - cos(2*a + 2*c)*sin(a + c) + sin(a + c))*log(cos(b*x)^2 - 2*cos(b*x)*cos 
(a) + cos(a)^2 + sin(b*x)^2 + 2*sin(b*x)*sin(a) + sin(a)^2) + (cos(a + c)* 
sin(2*a + 2*c) - cos(2*a + 2*c)*sin(a + c) + sin(a + c))*log(cos(b*x)^2 + 
2*cos(b*x)*cos(c) + cos(c)^2 + sin(b*x)^2 + 2*sin(b*x)*sin(c) + sin(c)^2) 
+ (cos(a + c)*sin(2*a + 2*c) - cos(2*a + 2*c)*sin(a + c) + sin(a + c))*log 
(cos(b*x)^2 - 2*cos(b*x)*cos(c) + cos(c)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(c 
) + sin(c)^2))/(b*cos(2*a + 2*c)^2 + b*sin(2*a + 2*c)^2 - 2*b*cos(2*a + 2* 
c) + b)
 
3.2.46.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 397 vs. \(2 (36) = 72\).

Time = 0.31 (sec) , antiderivative size = 397, normalized size of antiderivative = 12.03 \[ \int \csc (c-b x) \csc (a+b x) \, dx=\frac {\frac {{\left (\tan \left (\frac {1}{2} \, a\right )^{4} \tan \left (\frac {1}{2} \, c\right )^{4} - 4 \, \tan \left (\frac {1}{2} \, a\right )^{3} \tan \left (\frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, a\right )^{4} - 4 \, \tan \left (\frac {1}{2} \, a\right )^{3} \tan \left (\frac {1}{2} \, c\right ) - 4 \, \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, c\right )^{4} - 4 \, \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right ) + 1\right )} \log \left ({\left | \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} - \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right )^{2} - 4 \, \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right ) + 2 \, \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right ) - \tan \left (b x + a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (b x + a\right ) - 2 \, \tan \left (\frac {1}{2} \, a\right ) - 2 \, \tan \left (\frac {1}{2} \, c\right ) \right |}\right )}{\tan \left (\frac {1}{2} \, a\right )^{4} \tan \left (\frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, a\right )^{3} \tan \left (\frac {1}{2} \, c\right )^{4} - \tan \left (\frac {1}{2} \, a\right )^{4} \tan \left (\frac {1}{2} \, c\right ) - 6 \, \tan \left (\frac {1}{2} \, a\right )^{3} \tan \left (\frac {1}{2} \, c\right )^{2} - 6 \, \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{4} + \tan \left (\frac {1}{2} \, a\right )^{3} + 6 \, \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right ) + 6 \, \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, a\right ) - \tan \left (\frac {1}{2} \, c\right )} - \frac {{\left (\tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, a\right )^{2} + \tan \left (\frac {1}{2} \, c\right )^{2} + 1\right )} \log \left ({\left | \tan \left (b x + a\right ) \right |}\right )}{\tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {1}{2} \, c\right ) + \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {1}{2} \, c\right )^{2} - \tan \left (\frac {1}{2} \, a\right ) - \tan \left (\frac {1}{2} \, c\right )}}{2 \, b} \]

input
integrate(-csc(b*x-c)*csc(b*x+a),x, algorithm="giac")
 
output
1/2*((tan(1/2*a)^4*tan(1/2*c)^4 - 4*tan(1/2*a)^3*tan(1/2*c)^3 - tan(1/2*a) 
^4 - 4*tan(1/2*a)^3*tan(1/2*c) - 4*tan(1/2*a)*tan(1/2*c)^3 - tan(1/2*c)^4 
- 4*tan(1/2*a)*tan(1/2*c) + 1)*log(abs(tan(b*x + a)*tan(1/2*a)^2*tan(1/2*c 
)^2 - tan(b*x + a)*tan(1/2*a)^2 - 4*tan(b*x + a)*tan(1/2*a)*tan(1/2*c) + 2 
*tan(1/2*a)^2*tan(1/2*c) - tan(b*x + a)*tan(1/2*c)^2 + 2*tan(1/2*a)*tan(1/ 
2*c)^2 + tan(b*x + a) - 2*tan(1/2*a) - 2*tan(1/2*c)))/(tan(1/2*a)^4*tan(1/ 
2*c)^3 + tan(1/2*a)^3*tan(1/2*c)^4 - tan(1/2*a)^4*tan(1/2*c) - 6*tan(1/2*a 
)^3*tan(1/2*c)^2 - 6*tan(1/2*a)^2*tan(1/2*c)^3 - tan(1/2*a)*tan(1/2*c)^4 + 
 tan(1/2*a)^3 + 6*tan(1/2*a)^2*tan(1/2*c) + 6*tan(1/2*a)*tan(1/2*c)^2 + ta 
n(1/2*c)^3 - tan(1/2*a) - tan(1/2*c)) - (tan(1/2*a)^2*tan(1/2*c)^2 + tan(1 
/2*a)^2 + tan(1/2*c)^2 + 1)*log(abs(tan(b*x + a)))/(tan(1/2*a)^2*tan(1/2*c 
) + tan(1/2*a)*tan(1/2*c)^2 - tan(1/2*a) - tan(1/2*c)))/b
 
3.2.46.9 Mupad [B] (verification not implemented)

Time = 32.91 (sec) , antiderivative size = 249, normalized size of antiderivative = 7.55 \[ \int \csc (c-b x) \csc (a+b x) \, dx=\frac {2\,\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}+c\,2{}\mathrm {i}}}\,\left (\ln \left (\frac {2\,\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{c\,2{}\mathrm {i}}}\,\left (-4\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{c\,2{}\mathrm {i}}+2\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}+2\,b\,{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\mathrm {e}}^{c\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}\right )}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{c\,2{}\mathrm {i}}-1\right )}+{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}\,4{}\mathrm {i}\right )-\ln \left (\frac {2\,\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{c\,2{}\mathrm {i}}}\,\left (-4\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{c\,2{}\mathrm {i}}+2\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}+2\,b\,{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\mathrm {e}}^{c\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}\right )}{b-b\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{c\,2{}\mathrm {i}}}+{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}\,4{}\mathrm {i}\right )\right )}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+c\,2{}\mathrm {i}}-1\right )} \]

input
int(1/(sin(a + b*x)*sin(c - b*x)),x)
 
output
(2*(-exp(a*2i + c*2i))^(1/2)*(log((2*(-exp(a*2i)*exp(c*2i))^(1/2)*(2*b*exp 
(a*2i)*exp(b*x*2i) - 4*b*exp(a*2i)*exp(c*2i) + 2*b*exp(a*4i)*exp(c*2i)*exp 
(b*x*2i)))/(b*(exp(a*2i)*exp(c*2i) - 1)) + exp(a*1i)*exp(a*2i)*exp(c*1i)*e 
xp(b*x*2i)*4i) - log((2*(-exp(a*2i)*exp(c*2i))^(1/2)*(2*b*exp(a*2i)*exp(b* 
x*2i) - 4*b*exp(a*2i)*exp(c*2i) + 2*b*exp(a*4i)*exp(c*2i)*exp(b*x*2i)))/(b 
 - b*exp(a*2i)*exp(c*2i)) + exp(a*1i)*exp(a*2i)*exp(c*1i)*exp(b*x*2i)*4i)) 
)/(b*(exp(a*2i + c*2i) - 1))