Integrand size = 18, antiderivative size = 44 \[ \int \csc ^2(c-b x) \sin ^2(a+b x) \, dx=x \cos (2 (a+c))+\frac {\cot (c-b x) \sin ^2(a+c)}{b}+\frac {\log (\sin (c-b x)) \sin (2 (a+c))}{b} \] Output:
x*cos(2*a+2*c)-cot(b*x-c)*sin(a+c)^2/b+ln(-sin(b*x-c))*sin(2*a+2*c)/b
Leaf count is larger than twice the leaf count of optimal. \(186\) vs. \(2(44)=88\).
Time = 0.43 (sec) , antiderivative size = 186, normalized size of antiderivative = 4.23 \[ \int \csc ^2(c-b x) \sin ^2(a+b x) \, dx=\frac {\csc (c) \csc (c-b x) (b x \cos (2 a+2 c-b x)-b x \cos (2 a+4 c-b x)-b x \cos (2 a+b x)+b x \cos (2 a+2 c+b x)+2 \sin (b x)+\sin (2 a+2 c-b x)+\log (\sin (c-b x)) \sin (2 a+2 c-b x)-\log (\sin (c-b x)) \sin (2 a+4 c-b x)-\log (\sin (c-b x)) \sin (2 a+b x)-\sin (2 a+2 c+b x)+\log (\sin (c-b x)) \sin (2 a+2 c+b x))}{4 b} \] Input:
Integrate[Csc[c - b*x]^2*Sin[a + b*x]^2,x]
Output:
(Csc[c]*Csc[c - b*x]*(b*x*Cos[2*a + 2*c - b*x] - b*x*Cos[2*a + 4*c - b*x] - b*x*Cos[2*a + b*x] + b*x*Cos[2*a + 2*c + b*x] + 2*Sin[b*x] + Sin[2*a + 2 *c - b*x] + Log[Sin[c - b*x]]*Sin[2*a + 2*c - b*x] - Log[Sin[c - b*x]]*Sin [2*a + 4*c - b*x] - Log[Sin[c - b*x]]*Sin[2*a + b*x] - Sin[2*a + 2*c + b*x ] + Log[Sin[c - b*x]]*Sin[2*a + 2*c + b*x]))/(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) \csc ^2(c-b x) \, dx\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle \int \sin ^2(a+b x) \csc ^2(c-b x)dx\) |
Input:
Int[Csc[c - b*x]^2*Sin[a + b*x]^2,x]
Output:
$Aborted
Result contains complex when optimal does not.
Time = 1.17 (sec) , antiderivative size = 165, normalized size of antiderivative = 3.75
method | result | size |
risch | \(x \,{\mathrm e}^{2 i \left (a +c \right )}-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}^{4 i \left (a +c \right )}}{2 b \left ({\mathrm e}^{2 i \left (a +c \right )}-{\mathrm e}^{2 i \left (b x +a \right )}\right )}+\frac {i {\mathrm e}^{2 i \left (a +c \right )}}{b \left ({\mathrm e}^{2 i \left (a +c \right )}-{\mathrm e}^{2 i \left (b x +a \right )}\right )}-\frac {i}{2 b \left ({\mathrm e}^{2 i \left (a +c \right )}-{\mathrm e}^{2 i \left (b x +a \right )}\right )}+\frac {\ln \left (-{\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{2 i \left (b x +a \right )}\right ) \sin \left (2 a +2 c \right )}{b}\) | \(165\) |
default | \(\frac {\frac {\left (2 \cos \left (c \right )^{3} \sin \left (a \right ) \cos \left (a \right )^{2}+2 \cos \left (c \right )^{2} \sin \left (c \right ) \cos \left (a \right )^{3}-4 \cos \left (c \right )^{2} \sin \left (c \right ) \sin \left (a \right )^{2} \cos \left (a \right )-4 \cos \left (c \right ) \sin \left (c \right )^{2} \sin \left (a \right ) \cos \left (a \right )^{2}+2 \cos \left (c \right ) \sin \left (c \right )^{2} \sin \left (a \right )^{3}+2 \sin \left (c \right )^{3} \sin \left (a \right )^{2} \cos \left (a \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 (\cos \left (c \right )^{2}+\sin \left (c \right )^{2}\right )^{2} \left (\cos \left (a \right )^{2}+\sin \left (a \right )^{2}\right )^{2} \left (\cos \left (a \right ) \cos \left (c \right )-\sin \left (a \right ) \sin \left (c \right )\right )}-\frac {\cos \left (c \right )^{2} \sin \left (a \right )^{2}+2 \cos \left (a \right ) \cos \left (c \right ) \sin \left (a \right ) \sin \left (c \right )+\sin \left (c \right )^{2} \cos \left (a \right )^{2}}{\left (\cos \left (a \right )^{2}+\sin \left (a \right )^{2}\right ) \left (\cos \left (c \right )^{2}+\sin \left (c \right )^{2}\right ) \left (\cos \left (a \right ) \cos \left (c \right )-\sin \left (a \right ) \sin \left (c \right )\right ) \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 )}+\frac {\frac {\left (-2 \cos \left (c \right )^{2} \cos \left (a \right ) \sin \left (a \right )-2 \cos \left (a \right )^{2} \cos \left (c \right ) \sin \left (c \right )+2 \sin \left (a \right )^{2} \cos \left (c \right ) \sin \left (c \right )+2 \cos \left (a \right ) \sin \left (a \right ) \sin \left (c \right )^{2}\right ) \ln \left (\tan \left (b x +a \right )^{2}+1\right )}{2}+\left (-\sin \left (c \right )^{2} \cos \left (a \right )^{2}+\cos \left (a \right )^{2} \cos \left (c \right )^{2}-4 \cos \left (a \right ) \cos \left (c \right ) \sin \left (a \right ) \sin \left (c \right )+\sin \left (a \right )^{2} \sin \left (c \right )^{2}-\cos \left (c \right )^{2} \sin \left (a \right )^{2}\right ) \arctan \left (\tan \left (b x +a \right )\right )}{\left (\cos \left (c \right )^{2}+\sin \left (c \right )^{2}\right )^{2} \left (\cos \left (a \right )^{2}+\sin \left (a \right )^{2}\right )^{2}}}{b}\) | \(397\) |
Input:
int(csc(b*x-c)^2*sin(b*x+a)^2,x,method=_RETURNVERBOSE)
Output:
x*exp(2*I*(a+c))-2*I*sin(2*a+2*c)*x-2*I/b*sin(2*a+2*c)*a-1/2*I/b/(exp(2*I* (a+c))-exp(2*I*(b*x+a)))*exp(4*I*(a+c))+I/b/(exp(2*I*(a+c))-exp(2*I*(b*x+a )))*exp(2*I*(a+c))-1/2*I/b/(exp(2*I*(a+c))-exp(2*I*(b*x+a)))+ln(-exp(2*I*( a+c))+exp(2*I*(b*x+a)))/b*sin(2*a+2*c)
Leaf count of result is larger than twice the leaf count of optimal. 192 vs. \(2 (53) = 106\).
Time = 0.09 (sec) , antiderivative size = 192, normalized size of antiderivative = 4.36 \[ \int \csc ^2(c-b x) \sin ^2(a+b x) \, dx=-\frac {{\left (2 \, b x \cos \left (a + c\right )^{2} - b x\right )} \cos \left (b x + a\right ) \sin \left (a + c\right ) - {\left (\cos \left (a + c\right )^{3} - \cos \left (a + c\right )\right )} \cos \left (b x + a\right ) - 2 \, {\left (\cos \left (a + c\right )^{2} \sin \left (b x + a\right ) \sin \left (a + c\right ) + {\left (\cos \left (a + c\right )^{3} - \cos \left (a + c\right )\right )} \cos \left (b x + a\right )\right )} \log \left (\frac {\cos \left (a + c\right ) \sin \left (b x + a\right ) - \cos \left (b x + a\right ) \sin \left (a + c\right )}{\cos \left (a + c\right ) + 1}\right ) - {\left (2 \, b x \cos \left (a + c\right )^{3} - b x \cos \left (a + c\right ) + {\left (\cos \left (a + c\right )^{2} - 1\right )} \sin \left (a + c\right )\right )} \sin \left (b x + a\right )}{b \cos \left (a + c\right ) \sin \left (b x + a\right ) - b \cos \left (b x + a\right ) \sin \left (a + c\right )} \] Input:
integrate(csc(b*x-c)^2*sin(b*x+a)^2,x, algorithm="fricas")
Output:
-((2*b*x*cos(a + c)^2 - b*x)*cos(b*x + a)*sin(a + c) - (cos(a + c)^3 - cos (a + c))*cos(b*x + a) - 2*(cos(a + c)^2*sin(b*x + a)*sin(a + c) + (cos(a + c)^3 - cos(a + c))*cos(b*x + a))*log((cos(a + c)*sin(b*x + a) - cos(b*x + a)*sin(a + c))/(cos(a + c) + 1)) - (2*b*x*cos(a + c)^3 - b*x*cos(a + c) + (cos(a + c)^2 - 1)*sin(a + c))*sin(b*x + a))/(b*cos(a + c)*sin(b*x + a) - b*cos(b*x + a)*sin(a + c))
Timed out. \[ \int \csc ^2(c-b x) \sin ^2(a+b x) \, dx=\text {Timed out} \] Input:
integrate(csc(b*x-c)**2*sin(b*x+a)**2,x)
Output:
Timed out
Leaf count of result is larger than twice the leaf count of optimal. 718 vs. \(2 (53) = 106\).
Time = 0.07 (sec) , antiderivative size = 718, normalized size of antiderivative = 16.32 \[ \int \csc ^2(c-b x) \sin ^2(a+b x) \, dx =\text {Too large to display} \] Input:
integrate(csc(b*x-c)^2*sin(b*x+a)^2,x, algorithm="maxima")
Output:
-1/2*(2*b*x*cos(2*b*x)*cos(2*a + 4*c) + 2*b*x*sin(2*b*x)*sin(2*a + 4*c) - 2*(b*cos(2*a + 4*c)*cos(2*c) + b*sin(2*a + 4*c)*sin(2*c))*x - (2*b*x*cos(2 *b*x) - 2*b*x*cos(2*c) - sin(4*a + 6*c) + 2*sin(2*a + 4*c) - sin(2*c))*cos (2*b*x + 2*a + 2*c) - (cos(2*b*x + 2*a + 2*c)^2*sin(2*a + 2*c) - 2*cos(2*b *x + 2*a + 2*c)*cos(2*a + 4*c)*sin(2*a + 2*c) + cos(2*a + 4*c)^2*sin(2*a + 2*c) + sin(2*b*x + 2*a + 2*c)^2*sin(2*a + 2*c) - 2*sin(2*b*x + 2*a + 2*c) *sin(2*a + 4*c)*sin(2*a + 2*c) + sin(2*a + 4*c)^2*sin(2*a + 2*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) + s in(c)^2) - (cos(2*b*x + 2*a + 2*c)^2*sin(2*a + 2*c) - 2*cos(2*b*x + 2*a + 2*c)*cos(2*a + 4*c)*sin(2*a + 2*c) + cos(2*a + 4*c)^2*sin(2*a + 2*c) + sin (2*b*x + 2*a + 2*c)^2*sin(2*a + 2*c) - 2*sin(2*b*x + 2*a + 2*c)*sin(2*a + 4*c)*sin(2*a + 2*c) + sin(2*a + 4*c)^2*sin(2*a + 2*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*x*sin(2*b*x) - 2*b*x*sin(2*c) + cos(4*a + 6*c) - 2*cos(2*a + 4*c) + c os(2*c))*sin(2*b*x + 2*a + 2*c) - cos(2*a + 4*c)*sin(4*a + 6*c) + cos(4*a + 6*c)*sin(2*a + 4*c) + cos(2*c)*sin(2*a + 4*c) - cos(2*a + 4*c)*sin(2*c)) /(b*cos(2*b*x + 2*a + 2*c)^2 - 2*b*cos(2*b*x + 2*a + 2*c)*cos(2*a + 4*c) + b*cos(2*a + 4*c)^2 + b*sin(2*b*x + 2*a + 2*c)^2 - 2*b*sin(2*b*x + 2*a + 2 *c)*sin(2*a + 4*c) + b*sin(2*a + 4*c)^2)
Leaf count of result is larger than twice the leaf count of optimal. 1410 vs. \(2 (53) = 106\).
Time = 0.18 (sec) , antiderivative size = 1410, normalized size of antiderivative = 32.05 \[ \int \csc ^2(c-b x) \sin ^2(a+b x) \, dx=\text {Too large to display} \] Input:
integrate(csc(b*x-c)^2*sin(b*x+a)^2,x, algorithm="giac")
Output:
((tan(1/2*a)^4*tan(1/2*c)^4 - 6*tan(1/2*a)^4*tan(1/2*c)^2 - 16*tan(1/2*a)^ 3*tan(1/2*c)^3 - 6*tan(1/2*a)^2*tan(1/2*c)^4 + tan(1/2*a)^4 + 16*tan(1/2*a )^3*tan(1/2*c) + 36*tan(1/2*a)^2*tan(1/2*c)^2 + 16*tan(1/2*a)*tan(1/2*c)^3 + tan(1/2*c)^4 - 6*tan(1/2*a)^2 - 16*tan(1/2*a)*tan(1/2*c) - 6*tan(1/2*c) ^2 + 1)*(b*x - c)/(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*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))*log(tan(1/2*b*x - 1/2*c)^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) - 4*(tan(1/2*a)^4*tan(1/2*c)^3 + t an(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))*log(abs(tan(1/2*b*x - 1/2*c)))/(tan(1/2*a)^4*t an(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...
Time = 18.60 (sec) , antiderivative size = 148, normalized size of antiderivative = 3.36 \[ \int \csc ^2(c-b x) \sin ^2(a+b x) \, dx=x\,\left (\cos \left (2\,a+2\,c\right )-\sin \left (2\,a+2\,c\right )\,1{}\mathrm {i}\right )-\frac {\left (1+{\mathrm {e}}^{a\,4{}\mathrm {i}+c\,4{}\mathrm {i}}-2\,{\mathrm {e}}^{a\,2{}\mathrm {i}+c\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}}{2\,b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+c\,2{}\mathrm {i}}-{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\right )}+\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} \] Input:
int(sin(a + b*x)^2/sin(c - b*x)^2,x)
Output:
x*(cos(2*a + 2*c) - sin(2*a + 2*c)*1i) - ((exp(a*4i + c*4i) - 2*exp(a*2i + c*2i) + 1)*1i)/(2*b*(exp(a*2i + c*2i) - exp(a*2i + b*x*2i))) + (exp(- a*4 i - c*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)
\[ \int \csc ^2(c-b x) \sin ^2(a+b x) \, dx=\int \csc \left (b x -c \right )^{2} \sin \left (b x +a \right )^{2}d x \] Input:
int(csc(b*x-c)^2*sin(b*x+a)^2,x)
Output:
int(csc(b*x - c)**2*sin(a + b*x)**2,x)