3.145 \(\int \csc (a+b x) \csc (c+b x) \, dx\)

Optimal. Leaf size=36 \[ \frac {\csc (a-c) \log (\sin (b x+c))}{b}-\frac {\csc (a-c) \log (\sin (a+b x))}{b} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4611, 3475} \[ \frac {\csc (a-c) \log (\sin (b x+c))}{b}-\frac {\csc (a-c) \log (\sin (a+b x))}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-((Csc[a - c]*Log[Sin[a + b*x]])/b) + (Csc[a - c]*Log[Sin[c + b*x]])/b

Rule 3475

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

Rule 4611

Int[Csc[(a_.) + (b_.)*(x_)]*Csc[(c_) + (d_.)*(x_)], x_Symbol] :> Dist[Csc[(b*c - a*d)/b], Int[Cot[a + b*x], x]
, x] - Dist[Csc[(b*c - a*d)/d], Int[Cot[c + d*x], x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[b^2 - d^2, 0] && NeQ
[b*c - a*d, 0]

Rubi steps

\begin {align*} \int \csc (a+b x) \csc (c+b x) \, dx &=-(\csc (a-c) \int \cot (a+b x) \, dx)+\csc (a-c) \int \cot (c+b x) \, dx\\ &=-\frac {\csc (a-c) \log (\sin (a+b x))}{b}+\frac {\csc (a-c) \log (\sin (c+b x))}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.24, size = 28, normalized size = 0.78 \[ -\frac {\csc (a-c) (\log (\sin (a+b x))-\log (\sin (b x+c)))}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-((Csc[a - c]*(Log[Sin[a + b*x]] - Log[Sin[c + b*x]]))/b)

________________________________________________________________________________________

fricas [B]  time = 0.75, size = 110, normalized size = 3.06 \[ -\frac {\log \left (-\frac {1}{4} \, \cos \left (b x + c\right )^{2} + \frac {1}{4}\right ) - \log \left (-\frac {2 \, \cos \left (b x + c\right ) \cos \left (-a + c\right ) \sin \left (b x + c\right ) \sin \left (-a + c\right ) + {\left (2 \, \cos \left (-a + c\right )^{2} - 1\right )} \cos \left (b x + c\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 )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.24, size = 396, normalized size = 11.00 \[ \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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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*t
an(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*ta
n(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 + tan(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)*lo
g(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

________________________________________________________________________________________

maple [B]  time = 0.49, size = 169, normalized size = 4.69 \[ -\frac {\ln \left (\tan \left (b x +a \right ) \cos \relax (a ) \cos \relax (c )+\tan \left (b x +a \right ) \sin \relax (a ) \sin \relax (c )+\cos \relax (a ) \sin \relax (c )-\sin \relax (a ) \cos \relax (c )\right ) \cos \relax (a ) \cos \relax (c )}{b \left (\cos \relax (a ) \sin \relax (c )-\sin \relax (a ) \cos \relax (c )\right ) \left (\cos \relax (a ) \cos \relax (c )+\sin \relax (a ) \sin \relax (c )\right )}-\frac {\ln \left (\tan \left (b x +a \right ) \cos \relax (a ) \cos \relax (c )+\tan \left (b x +a \right ) \sin \relax (a ) \sin \relax (c )+\cos \relax (a ) \sin \relax (c )-\sin \relax (a ) \cos \relax (c )\right ) \sin \relax (a ) \sin \relax (c )}{b \left (\cos \relax (a ) \sin \relax (c )-\sin \relax (a ) \cos \relax (c )\right ) \left (\cos \relax (a ) \cos \relax (c )+\sin \relax (a ) \sin \relax (c )\right )}+\frac {\ln \left (\tan \left (b x +a \right )\right )}{b \left (\cos \relax (a ) \sin \relax (c )-\sin \relax (a ) \cos \relax (c )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/b/(cos(a)*sin(c)-sin(a)*cos(c))/(cos(a)*cos(c)+sin(a)*sin(c))*ln(tan(b*x+a)*cos(a)*cos(c)+tan(b*x+a)*sin(a)
*sin(c)+cos(a)*sin(c)-sin(a)*cos(c))*cos(a)*cos(c)-1/b/(cos(a)*sin(c)-sin(a)*cos(c))/(cos(a)*cos(c)+sin(a)*sin
(c))*ln(tan(b*x+a)*cos(a)*cos(c)+tan(b*x+a)*sin(a)*sin(c)+cos(a)*sin(c)-sin(a)*cos(c))*sin(a)*sin(c)+1/b/(cos(
a)*sin(c)-sin(a)*cos(c))*ln(tan(b*x+a))

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 564, normalized size = 15.67 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(2*((cos(2*a) - cos(2*c))*cos(a + c) + (sin(2*a) - sin(2*c))*sin(a + c))*arctan2(sin(b*x) + sin(a), cos(b*x)
- cos(a)) + 2*((cos(2*a) - cos(2*c))*cos(a + c) + (sin(2*a) - sin(2*c))*sin(a + c))*arctan2(sin(b*x) - sin(a),
 cos(b*x) + cos(a)) - 2*((cos(2*a) - cos(2*c))*cos(a + c) + (sin(2*a) - sin(2*c))*sin(a + c))*arctan2(sin(b*x)
 + sin(c), cos(b*x) - cos(c)) - 2*((cos(2*a) - cos(2*c))*cos(a + c) + (sin(2*a) - sin(2*c))*sin(a + c))*arctan
2(sin(b*x) - sin(c), cos(b*x) + cos(c)) - ((sin(2*a) - sin(2*c))*cos(a + c) - (cos(2*a) - cos(2*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) - ((sin(2*a) - si
n(2*c))*cos(a + c) - (cos(2*a) - cos(2*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) + ((sin(2*a) - sin(2*c))*cos(a + c) - (cos(2*a) - cos(2*c))*sin(a + c))*lo
g(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) + ((sin(2*a) - sin(2*
c))*cos(a + c) - (cos(2*a) - cos(2*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))/(2*b*cos(2*a)*cos(2*c) - b*cos(2*c)^2 + 2*b*sin(2*a)*sin(2*c) - b*sin(2*c)^2
- (cos(2*a)^2 + sin(2*a)^2)*b)

________________________________________________________________________________________

mupad [B]  time = 7.77, size = 249, normalized size = 6.92 \[ \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 )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(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)*exp(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)*ex
p(b*x*2i)*4i)))/(b*(exp(a*2i - c*2i) - 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \csc {\left (a + b x \right )} \csc {\left (b x + c \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________