Integrand size = 17, antiderivative size = 130 \[ \int \cot ^2(c+b x) \sin ^2(a+b x) \, dx=-\frac {x}{2}+x \cos (2 (a-c))-\frac {(4-5 \cos (2 (a-c))) \cot (c+b x)}{8 b}+\frac {\log (\cos (c+b x)) \sin (2 (a-c))}{b}+\frac {\log (\tan (c+b x)) \sin (2 (a-c))}{b}+\frac {\csc (c) \csc (c+b x) \sin (2 a+3 b x)}{16 b}-\frac {\csc (c) \csc (c+b x) \sin (2 a+2 c+3 b x)}{16 b} \] Output:
-1/2*x+x*cos(2*a-2*c)-1/8*(4-5*cos(2*a-2*c))*cot(b*x+c)/b+ln(cos(b*x+c))*s in(2*a-2*c)/b+ln(tan(b*x+c))*sin(2*a-2*c)/b+1/16*csc(c)*csc(b*x+c)*sin(3*b *x+2*a)/b-1/16*csc(c)*csc(b*x+c)*sin(3*b*x+2*a+2*c)/b
Time = 1.43 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.46 \[ \int \cot ^2(c+b x) \sin ^2(a+b x) \, dx=x \cos (2 (a-c))+\frac {\csc (c) \csc (c+b x) (-4 b x \cos (b x)+4 b x \cos (2 c+b x)+8 \sin (b x)-4 \log (\sin (c+b x)) \sin (2 a-4 c-b x)+4 \sin (2 a-2 c-b x)+4 \log (\sin (c+b x)) \sin (2 a-2 c-b x)+\sin (2 a+b x)-4 \log (\sin (c+b x)) \sin (2 a+b x)-5 \sin (2 a-2 c+b x)+4 \log (\sin (c+b x)) \sin (2 a-2 c+b x)+\sin (2 a+3 b x)-\sin (2 a+2 c+3 b x))}{16 b} \] Input:
Integrate[Cot[c + b*x]^2*Sin[a + b*x]^2,x]
Output:
x*Cos[2*(a - c)] + (Csc[c]*Csc[c + b*x]*(-4*b*x*Cos[b*x] + 4*b*x*Cos[2*c + b*x] + 8*Sin[b*x] - 4*Log[Sin[c + b*x]]*Sin[2*a - 4*c - b*x] + 4*Sin[2*a - 2*c - b*x] + 4*Log[Sin[c + b*x]]*Sin[2*a - 2*c - b*x] + Sin[2*a + b*x] - 4*Log[Sin[c + b*x]]*Sin[2*a + b*x] - 5*Sin[2*a - 2*c + b*x] + 4*Log[Sin[c + b*x]]*Sin[2*a - 2*c + b*x] + Sin[2*a + 3*b*x] - Sin[2*a + 2*c + 3*b*x]) )/(16*b)
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 \sin ^2(a+b x) \cot ^2(b x+c) \, dx\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle \int \sin ^2(a+b x) \cot ^2(b x+c)dx\) |
Input:
Int[Cot[c + b*x]^2*Sin[a + b*x]^2,x]
Output:
$Aborted
Result contains complex when optimal does not.
Time = 0.51 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.58
method | result | size |
risch | \(x \,{\mathrm e}^{2 i \left (a -c \right )}-\frac {x}{2}-\frac {i {\mathrm e}^{2 i \left (b x +a \right )}}{8 b}+\frac {i {\mathrm e}^{-2 i \left (b x +a \right )}}{8 b}-2 i \sin \left (2 a -2 c \right ) x -\frac {2 i \sin \left (2 a -2 c \right ) a}{b}-\frac {i {\mathrm e}^{2 i \left (2 a -c \right )}}{2 b \left (-{\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right )}+\frac {i {\mathrm e}^{2 i a}}{b \left (-{\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right )}-\frac {i {\mathrm e}^{2 i c}}{2 b \left (-{\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-{\mathrm e}^{2 i \left (a -c \right )}\right ) \sin \left (2 a -2 c \right )}{b}\) | \(206\) |
Input:
int(cot(b*x+c)^2*sin(b*x+a)^2,x,method=_RETURNVERBOSE)
Output:
x*exp(2*I*(a-c))-1/2*x-1/8*I/b*exp(2*I*(b*x+a))+1/8*I/b*exp(-2*I*(b*x+a))- 2*I*sin(2*a-2*c)*x-2*I/b*sin(2*a-2*c)*a-1/2*I/b/(-exp(2*I*(b*x+a+c))+exp(2 *I*a))*exp(2*I*(2*a-c))+I/b/(-exp(2*I*(b*x+a+c))+exp(2*I*a))*exp(2*I*a)-1/ 2*I/b/(-exp(2*I*(b*x+a+c))+exp(2*I*a))*exp(2*I*c)+ln(exp(2*I*(b*x+a))-exp( 2*I*(a-c)))/b*sin(2*a-2*c)
Leaf count of result is larger than twice the leaf count of optimal. 301 vs. \(2 (122) = 244\).
Time = 0.09 (sec) , antiderivative size = 301, normalized size of antiderivative = 2.32 \[ \int \cot ^2(c+b x) \sin ^2(a+b x) \, dx=-\frac {{\left (\cos \left (-2 \, a + 2 \, c\right ) + 1\right )} \cos \left (b x + a\right )^{3} - {\left (2 \, b x \cos \left (-2 \, a + 2 \, c\right ) - b x\right )} \cos \left (b x + a\right ) \sin \left (-2 \, a + 2 \, c\right ) - {\left (\cos \left (-2 \, a + 2 \, c\right )^{2} + \cos \left (-2 \, a + 2 \, c\right )\right )} \cos \left (b x + a\right ) + {\left ({\left (\cos \left (-2 \, a + 2 \, c\right ) + 1\right )} \sin \left (b x + a\right ) \sin \left (-2 \, a + 2 \, c\right ) - {\left (\cos \left (-2 \, a + 2 \, c\right )^{2} - 1\right )} \cos \left (b x + a\right )\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 ) - {\left (2 \, b x \cos \left (-2 \, a + 2 \, c\right )^{2} + b x \cos \left (-2 \, a + 2 \, c\right ) - b x + {\left (\cos \left (b x + a\right )^{2} - \cos \left (-2 \, a + 2 \, c\right ) + 1\right )} \sin \left (-2 \, a + 2 \, c\right )\right )} \sin \left (b x + a\right )}{2 \, {\left (b \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 )\right )}} \] Input:
integrate(cot(b*x+c)^2*sin(b*x+a)^2,x, algorithm="fricas")
Output:
-1/2*((cos(-2*a + 2*c) + 1)*cos(b*x + a)^3 - (2*b*x*cos(-2*a + 2*c) - b*x) *cos(b*x + a)*sin(-2*a + 2*c) - (cos(-2*a + 2*c)^2 + cos(-2*a + 2*c))*cos( b*x + a) + ((cos(-2*a + 2*c) + 1)*sin(b*x + a)*sin(-2*a + 2*c) - (cos(-2*a + 2*c)^2 - 1)*cos(b*x + a))*log(-(2*cos(b*x + a)^2*cos(-2*a + 2*c) - 2*co s(b*x + a)*sin(b*x + a)*sin(-2*a + 2*c) - cos(-2*a + 2*c) - 1)/(cos(-2*a + 2*c) + 1)) - (2*b*x*cos(-2*a + 2*c)^2 + b*x*cos(-2*a + 2*c) - b*x + (cos( b*x + a)^2 - cos(-2*a + 2*c) + 1)*sin(-2*a + 2*c))*sin(b*x + a))/(b*cos(b* x + a)*sin(-2*a + 2*c) + (b*cos(-2*a + 2*c) + b)*sin(b*x + a))
\[ \int \cot ^2(c+b x) \sin ^2(a+b x) \, dx=\int \sin ^{2}{\left (a + b x \right )} \cot ^{2}{\left (b x + c \right )}\, dx \] Input:
integrate(cot(b*x+c)**2*sin(b*x+a)**2,x)
Output:
Integral(sin(a + b*x)**2*cot(b*x + c)**2, x)
Exception generated. \[ \int \cot ^2(c+b x) \sin ^2(a+b x) \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(cot(b*x+c)^2*sin(b*x+a)^2,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is un defined.
Leaf count of result is larger than twice the leaf count of optimal. 1401 vs. \(2 (122) = 244\).
Time = 0.20 (sec) , antiderivative size = 1401, normalized size of antiderivative = 10.78 \[ \int \cot ^2(c+b x) \sin ^2(a+b x) \, dx=\text {Too large to display} \] Input:
integrate(cot(b*x+c)^2*sin(b*x+a)^2,x, algorithm="giac")
Output:
1/2*((tan(1/2*a)^4*tan(1/2*c)^4 - 14*tan(1/2*a)^4*tan(1/2*c)^2 + 32*tan(1/ 2*a)^3*tan(1/2*c)^3 - 14*tan(1/2*a)^2*tan(1/2*c)^4 + tan(1/2*a)^4 - 32*tan (1/2*a)^3*tan(1/2*c) + 68*tan(1/2*a)^2*tan(1/2*c)^2 - 32*tan(1/2*a)*tan(1/ 2*c)^3 + tan(1/2*c)^4 - 14*tan(1/2*a)^2 + 32*tan(1/2*a)*tan(1/2*c) - 14*ta n(1/2*c)^2 + 1)*b*x/(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) - 4*(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*t an(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))*log(tan(b*x)^2 + 1)/(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) + 8*(tan(1/2*a)^4*tan(1/2*c)^5 - tan(1/2*a)^ 3*tan(1/2*c)^6 - 2*tan(1/2*a)^4*tan(1/2*c)^3 + 7*tan(1/2*a)^3*tan(1/2*c)^4 - 6*tan(1/2*a)^2*tan(1/2*c)^5 + tan(1/2*a)*tan(1/2*c)^6 + tan(1/2*a)^4*ta n(1/2*c) - 7*tan(1/2*a)^3*tan(1/2*c)^2 + 12*tan(1/2*a)^2*tan(1/2*c)^3 - 7* tan(1/2*a)*tan(1/2*c)^4 + tan(1/2*c)^5 + tan(1/2*a)^3 - 6*tan(1/2*a)^2*tan (1/2*c) + 7*tan(1/2*a)*tan(1/2*c)^2 - 2*tan(1/2*c)^3 - tan(1/2*a) + tan(1/ 2*c))*log(abs(tan(b*x)*tan(1/2*c)^2 - tan(b*x) - 2*tan(1/2*c)))/(tan(1/...
Time = 18.51 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.60 \[ \int \cot ^2(c+b x) \sin ^2(a+b x) \, dx=-x\,\left (\frac {1}{2}-\cos \left (2\,a-2\,c\right )+\sin \left (2\,a-2\,c\right )\,1{}\mathrm {i}\right )+\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}-b\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}}{8\,b}-\frac {{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}}{8\,b}+\frac {{\mathrm {e}}^{-a\,4{}\mathrm {i}+c\,4{}\mathrm {i}}\,\ln \left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}-{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}\right )\,\left (2\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}-2\,b\,{\mathrm {e}}^{a\,6{}\mathrm {i}-c\,6{}\mathrm {i}}\right )\,1{}\mathrm {i}}{4\,b^2}+\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}+c\,2{}\mathrm {i}}\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}-2\,{\mathrm {e}}^{a\,4{}\mathrm {i}-c\,4{}\mathrm {i}}+{\mathrm {e}}^{a\,6{}\mathrm {i}-c\,6{}\mathrm {i}}\right )}{2\,b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}\,1{}\mathrm {i}-{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}\right )} \] Input:
int(cot(c + b*x)^2*sin(a + b*x)^2,x)
Output:
(exp(- a*2i - b*x*2i)*1i)/(8*b) - x*(sin(2*a - 2*c)*1i - cos(2*a - 2*c) + 1/2) - (exp(a*2i + b*x*2i)*1i)/(8*b) + (exp(c*4i - a*4i)*log(exp(a*2i)*exp (b*x*2i) - exp(a*2i)*exp(-c*2i))*(2*b*exp(a*2i - c*2i) - 2*b*exp(a*6i - c* 6i))*1i)/(4*b^2) + (exp(c*2i - a*2i)*(exp(a*2i - c*2i) - 2*exp(a*4i - c*4i ) + exp(a*6i - c*6i)))/(2*b*(exp(a*2i - c*2i)*1i - exp(a*2i + b*x*2i)*1i))
\[ \int \cot ^2(c+b x) \sin ^2(a+b x) \, dx=\int \cot \left (b x +c \right )^{2} \sin \left (b x +a \right )^{2}d x \] Input:
int(cot(b*x+c)^2*sin(b*x+a)^2,x)
Output:
int(cot(b*x + c)**2*sin(a + b*x)**2,x)