Integrand size = 15, antiderivative size = 48 \[ \int \cot (c+b x) \sin ^2(a+b x) \, dx=-\frac {\cos (2 (a+b x))}{4 b}+\frac {\log (\sin (c+b x)) \sin ^2(a-c)}{b}+\frac {1}{2} x \sin (2 (a-c)) \] Output:
-1/4*cos(2*b*x+2*a)/b+ln(sin(b*x+c))*sin(a-c)^2/b+1/2*x*sin(2*a-2*c)
Result contains complex when optimal does not.
Time = 0.21 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.90 \[ \int \cot (c+b x) \sin ^2(a+b x) \, dx=\frac {2 i b x-\cos (2 (a+b x))+\cos (2 (a-c)) \left (-2 i b x-\log \left (\sin ^2(c+b x)\right )\right )+\log \left (\sin ^2(c+b x)\right )-4 i \arctan (\tan (c+b x)) \sin ^2(a-c)+2 b x \sin (2 (a-c))}{4 b} \] Input:
Integrate[Cot[c + b*x]*Sin[a + b*x]^2,x]
Output:
((2*I)*b*x - Cos[2*(a + b*x)] + Cos[2*(a - c)]*((-2*I)*b*x - Log[Sin[c + b *x]^2]) + Log[Sin[c + b*x]^2] - (4*I)*ArcTan[Tan[c + b*x]]*Sin[a - c]^2 + 2*b*x*Sin[2*(a - c)])/(4*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 (b x+c) \, dx\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle \int \sin ^2(a+b x) \cot (b x+c)dx\) |
Input:
Int[Cot[c + b*x]*Sin[a + b*x]^2,x]
Output:
$Aborted
Result contains complex when optimal does not.
Time = 0.33 (sec) , antiderivative size = 143, normalized size of antiderivative = 2.98
method | result | size |
risch | \(i \cos \left (2 a -2 c \right ) x -\frac {i x \,{\mathrm e}^{2 i \left (a -c \right )}}{2}+\frac {i \cos \left (2 a -2 c \right ) a}{b}-\frac {i x}{2}-\frac {\ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-{\mathrm e}^{2 i \left (a -c \right )}\right ) \cos \left (2 a -2 c \right )}{2 b}-\frac {i a}{b}-\frac {{\mathrm e}^{2 i \left (b x +a \right )}}{8 b}-\frac {{\mathrm e}^{-2 i \left (b x +a \right )}}{8 b}+\frac {\ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-{\mathrm e}^{2 i \left (a -c \right )}\right )}{2 b}\) | \(143\) |
Input:
int(cot(b*x+c)*sin(b*x+a)^2,x,method=_RETURNVERBOSE)
Output:
I*cos(2*a-2*c)*x-1/2*I*x*exp(2*I*(a-c))+I/b*cos(2*a-2*c)*a-1/2*I*x-1/2/b*l n(exp(2*I*(b*x+a))-exp(2*I*(a-c)))*cos(2*a-2*c)-I/b*a-1/8/b*exp(2*I*(b*x+a ))-1/8/b*exp(-2*I*(b*x+a))+1/2/b*ln(exp(2*I*(b*x+a))-exp(2*I*(a-c)))
Leaf count of result is larger than twice the leaf count of optimal. 106 vs. \(2 (45) = 90\).
Time = 0.08 (sec) , antiderivative size = 106, normalized size of antiderivative = 2.21 \[ \int \cot (c+b x) \sin ^2(a+b x) \, dx=-\frac {2 \, b x \sin \left (-2 \, a + 2 \, c\right ) + 2 \, \cos \left (b x + a\right )^{2} + {\left (\cos \left (-2 \, a + 2 \, c\right ) - 1\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 )}{4 \, b} \] Input:
integrate(cot(b*x+c)*sin(b*x+a)^2,x, algorithm="fricas")
Output:
-1/4*(2*b*x*sin(-2*a + 2*c) + 2*cos(b*x + a)^2 + (cos(-2*a + 2*c) - 1)*log (-(2*cos(b*x + a)^2*cos(-2*a + 2*c) - 2*cos(b*x + a)*sin(b*x + a)*sin(-2*a + 2*c) - cos(-2*a + 2*c) - 1)/(cos(-2*a + 2*c) + 1)))/b
\[ \int \cot (c+b x) \sin ^2(a+b x) \, dx=\int \sin ^{2}{\left (a + b x \right )} \cot {\left (b x + c \right )}\, dx \] Input:
integrate(cot(b*x+c)*sin(b*x+a)**2,x)
Output:
Integral(sin(a + b*x)**2*cot(b*x + c), x)
Leaf count of result is larger than twice the leaf count of optimal. 125 vs. \(2 (45) = 90\).
Time = 0.07 (sec) , antiderivative size = 125, normalized size of antiderivative = 2.60 \[ \int \cot (c+b x) \sin ^2(a+b x) \, dx=-\frac {2 \, b x \sin \left (-2 \, a + 2 \, c\right ) + {\left (\cos \left (-2 \, a + 2 \, c\right ) - 1\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 (-2 \, a + 2 \, c\right ) - 1\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 ) + \cos \left (2 \, b x + 2 \, a\right )}{4 \, b} \] Input:
integrate(cot(b*x+c)*sin(b*x+a)^2,x, algorithm="maxima")
Output:
-1/4*(2*b*x*sin(-2*a + 2*c) + (cos(-2*a + 2*c) - 1)*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) + (co s(-2*a + 2*c) - 1)*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(2*b*x + 2*a))/b
Leaf count of result is larger than twice the leaf count of optimal. 1224 vs. \(2 (45) = 90\).
Time = 0.17 (sec) , antiderivative size = 1224, normalized size of antiderivative = 25.50 \[ \int \cot (c+b x) \sin ^2(a+b x) \, dx=\text {Too large to display} \] Input:
integrate(cot(b*x+c)*sin(b*x+a)^2,x, algorithm="giac")
Output:
1/2*(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*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*t an(1/2*a)*tan(1/2*c)^2 + tan(1/2*c)^3 + tan(1/2*a) - tan(1/2*c))*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*ta n(1/2*a)^2 + 2*tan(1/2*c)^2 + 1) - 4*(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*tan(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*tan(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)*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)^4 - 2*tan(1/2*a)^3 *tan(1/2*c)^5 + tan(1/2*a)^2*tan(1/2*c)^6 - tan(1/2*a)^4*tan(1/2*c)^2 + 4* tan(1/2*a)^3*tan(1/2*c)^3 - 5*tan(1/2*a)^2*tan(1/2*c)^4 + 2*tan(1/2*a)*tan (1/2*c)^5 - 2*tan(1/2*a)^3*tan(1/2*c) + 5*tan(1/2*a)^2*tan(1/2*c)^2 - 4*ta n(1/2*a)*tan(1/2*c)^3 + tan(1/2*c)^4 - tan(1/2*a)^2 + 2*tan(1/2*a)*tan(1/2 *c) - tan(1/2*c)^2)*log(abs(tan(b*x)*tan(1/2*c)^2 - tan(b*x) - 2*tan(1/2*c )))/(tan(1/2*a)^4*tan(1/2*c)^6 + tan(1/2*a)^4*tan(1/2*c)^4 + 2*tan(1/2*a)^ 2*tan(1/2*c)^6 - tan(1/2*a)^4*tan(1/2*c)^2 + 2*tan(1/2*a)^2*tan(1/2*c)^...
Time = 17.72 (sec) , antiderivative size = 132, normalized size of antiderivative = 2.75 \[ \int \cot (c+b x) \sin ^2(a+b x) \, dx=x\,\left (\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}+c\,2{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {1}{2}{}\mathrm {i}\right )-\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}-b\,x\,2{}\mathrm {i}}}{8\,b}-\frac {{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\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 (4\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}-8\,b\,{\mathrm {e}}^{a\,4{}\mathrm {i}-c\,4{}\mathrm {i}}+4\,b\,{\mathrm {e}}^{a\,6{}\mathrm {i}-c\,6{}\mathrm {i}}\right )}{16\,b^2} \] Input:
int(cot(c + b*x)*sin(a + b*x)^2,x)
Output:
x*((exp(c*2i - a*2i)*1i)/2 - 1i/2) - exp(- a*2i - b*x*2i)/(8*b) - exp(a*2i + b*x*2i)/(8*b) - (exp(c*4i - a*4i)*log(exp(a*2i)*exp(b*x*2i) - exp(a*2i) *exp(-c*2i))*(4*b*exp(a*2i - c*2i) - 8*b*exp(a*4i - c*4i) + 4*b*exp(a*6i - c*6i)))/(16*b^2)
\[ \int \cot (c+b x) \sin ^2(a+b x) \, dx=\int \cot \left (b x +c \right ) \sin \left (b x +a \right )^{2}d x \] Input:
int(cot(b*x+c)*sin(b*x+a)^2,x)
Output:
int(cot(b*x + c)*sin(a + b*x)**2,x)