Integrand size = 13, antiderivative size = 36 \[ \int \csc (a+b x) \csc (c+b x) \, dx=-\frac {\csc (a-c) \log (\sin (a+b x))}{b}+\frac {\csc (a-c) \log (\sin (c+b x))}{b} \] Output:
-csc(a-c)*ln(sin(b*x+a))/b+csc(a-c)*ln(sin(b*x+c))/b
Time = 0.15 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.78 \[ \int \csc (a+b x) \csc (c+b x) \, dx=-\frac {\csc (a-c) (\log (\sin (a+b x))-\log (\sin (c+b x)))}{b} \] Input:
Integrate[Csc[a + b*x]*Csc[c + b*x],x]
Output:
-((Csc[a - c]*(Log[Sin[a + b*x]] - Log[Sin[c + b*x]]))/b)
Time = 0.24 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.11, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, 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 (b x+c) \, 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 a+\pi )+b x\right )dx-\csc (a-c) \int \tan \left (\frac {1}{2} (2 c+\pi )+b x\right )dx\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {\csc (a-c) \log (-\sin (b x+c))}{b}-\frac {\csc (a-c) \log (-\sin (a+b x))}{b}\) |
Input:
Int[Csc[a + b*x]*Csc[c + b*x],x]
Output:
-((Csc[a - c]*Log[-Sin[a + b*x]])/b) + (Csc[a - c]*Log[-Sin[c + b*x]])/b
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
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]
Result contains complex when optimal does not.
Time = 0.50 (sec) , antiderivative size = 92, normalized size of antiderivative = 2.56
method | result | size |
risch | \(-\frac {2 i \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right ) {\mathrm e}^{i \left (a +c \right )}}{\left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right ) b}+\frac {2 i \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-{\mathrm e}^{2 i \left (a -c \right )}\right ) {\mathrm e}^{i \left (a +c \right )}}{\left ({\mathrm e}^{2 i a}-{\mathrm e}^{2 i c}\right ) b}\) | \(92\) |
default | \(\frac {\frac {\ln \left (\tan \left (b x +a \right )\right )}{-\sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \sin \left (c \right )}+\frac {\left (-\cos \left (a \right ) \cos \left (c \right )-\sin \left (a \right ) \sin \left (c \right )\right ) \ln \left (\tan \left (b x +a \right ) \cos \left (a \right ) \cos \left (c \right )+\tan \left (b x +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 )}{\left (-\sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \sin \left (c \right )\right ) \left (\cos \left (a \right ) \cos \left (c \right )+\sin \left (a \right ) \sin \left (c \right )\right )}}{b}\) | \(104\) |
Input:
int(csc(b*x+a)*csc(b*x+c),x,method=_RETURNVERBOSE)
Output:
-2*I*ln(exp(2*I*(b*x+a))-1)/(exp(2*I*a)-exp(2*I*c))/b*exp(I*(a+c))+2*I*ln( exp(2*I*(b*x+a))-exp(2*I*(a-c)))/(exp(2*I*a)-exp(2*I*c))/b*exp(I*(a+c))
Leaf count of result is larger than twice the leaf count of optimal. 110 vs. \(2 (36) = 72\).
Time = 0.08 (sec) , antiderivative size = 110, normalized size of antiderivative = 3.06 \[ \int \csc (a+b x) \csc (c+b x) \, dx=-\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 )} \] Input:
integrate(csc(b*x+a)*csc(b*x+c),x, algorithm="fricas")
Output:
-1/2*(log(-1/4*cos(b*x + c)^2 + 1/4) - log(-(2*cos(b*x + c)*cos(-a + c)*si n(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))
\[ \int \csc (a+b x) \csc (c+b x) \, dx=\int \csc {\left (a + b x \right )} \csc {\left (b x + c \right )}\, dx \] Input:
integrate(csc(b*x+a)*csc(b*x+c),x)
Output:
Integral(csc(a + b*x)*csc(b*x + c), x)
Leaf count of result is larger than twice the leaf count of optimal. 564 vs. \(2 (36) = 72\).
Time = 0.09 (sec) , antiderivative size = 564, normalized size of antiderivative = 15.67 \[ \int \csc (a+b x) \csc (c+b x) \, dx=\text {Too large to display} \] Input:
integrate(csc(b*x+a)*csc(b*x+c),x, algorithm="maxima")
Output:
-(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))*c os(a + c) + (sin(2*a) - sin(2*c))*sin(a + c))*arctan2(sin(b*x) - sin(a), c os(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))*arctan2(si n(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) - 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) - 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) + ((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)
Leaf count of result is larger than twice the leaf count of optimal. 396 vs. \(2 (36) = 72\).
Time = 0.16 (sec) , antiderivative size = 396, normalized size of antiderivative = 11.00 \[ \int \csc (a+b x) \csc (c+b x) \, dx =\text {Too large to display} \] Input:
integrate(csc(b*x+a)*csc(b*x+c),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
Time = 25.21 (sec) , antiderivative size = 249, normalized size of antiderivative = 6.92 \[ \int \csc (a+b x) \csc (c+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*ex p(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)*exp(b* x*2i)*4i)))/(b*(exp(a*2i - c*2i) - 1))
\[ \int \csc (a+b x) \csc (c+b x) \, dx=\int \csc \left (b x +c \right ) \csc \left (b x +a \right )d x \] Input:
int(csc(b*x+a)*csc(b*x+c),x)
Output:
int(csc(b*x + c)*csc(a + b*x),x)