Integrand size = 17, antiderivative size = 87 \[ \int \cos ^2(a+b x) \csc ^3(c+b x) \, dx=-\frac {\text {arctanh}(\cos (c+b x)) \cos ^2(a-c)}{2 b}+\frac {\text {arctanh}(\cos (c+b x)) \cos (2 (a-c))}{b}-\frac {\cos ^2(a-c) \cot (c+b x) \csc (c+b x)}{2 b}+\frac {\csc (c+b x) \sin (2 (a-c))}{b} \] Output:
-1/2*arctanh(cos(b*x+c))*cos(a-c)^2/b+arctanh(cos(b*x+c))*cos(2*a-2*c)/b-1 /2*cos(a-c)^2*cot(b*x+c)*csc(b*x+c)/b+csc(b*x+c)*sin(2*a-2*c)/b
Leaf count is larger than twice the leaf count of optimal. \(247\) vs. \(2(87)=174\).
Time = 2.81 (sec) , antiderivative size = 247, normalized size of antiderivative = 2.84 \[ \int \cos ^2(a+b x) \csc ^3(c+b x) \, dx=\frac {\left (-\cos \left (2 a-2 c-\frac {b x}{2}\right )+\cos \left (2 a-2 c+\frac {b x}{2}\right )\right ) \csc \left (\frac {c}{2}\right ) \csc \left (\frac {c}{2}+\frac {b x}{2}\right )}{4 b}+\frac {(-1-\cos (2 a-2 c)) \csc ^2\left (\frac {c}{2}+\frac {b x}{2}\right )}{16 b}+\frac {(-1+3 \cos (2 a-2 c)) \log \left (\cos \left (\frac {c}{2}+\frac {b x}{2}\right )\right )}{4 b}+\frac {(1-3 \cos (2 a-2 c)) \log \left (\sin \left (\frac {c}{2}+\frac {b x}{2}\right )\right )}{4 b}+\frac {\left (\cos \left (2 a-2 c-\frac {b x}{2}\right )-\cos \left (2 a-2 c+\frac {b x}{2}\right )\right ) \sec \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}+\frac {b x}{2}\right )}{4 b}+\frac {(1+\cos (2 a-2 c)) \sec ^2\left (\frac {c}{2}+\frac {b x}{2}\right )}{16 b} \] Input:
Integrate[Cos[a + b*x]^2*Csc[c + b*x]^3,x]
Output:
((-Cos[2*a - 2*c - (b*x)/2] + Cos[2*a - 2*c + (b*x)/2])*Csc[c/2]*Csc[c/2 + (b*x)/2])/(4*b) + ((-1 - Cos[2*a - 2*c])*Csc[c/2 + (b*x)/2]^2)/(16*b) + ( (-1 + 3*Cos[2*a - 2*c])*Log[Cos[c/2 + (b*x)/2]])/(4*b) + ((1 - 3*Cos[2*a - 2*c])*Log[Sin[c/2 + (b*x)/2]])/(4*b) + ((Cos[2*a - 2*c - (b*x)/2] - Cos[2 *a - 2*c + (b*x)/2])*Sec[c/2]*Sec[c/2 + (b*x)/2])/(4*b) + ((1 + Cos[2*a - 2*c])*Sec[c/2 + (b*x)/2]^2)/(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 \cos ^2(a+b x) \csc ^3(b x+c) \, dx\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle \int \cos ^2(a+b x) \csc ^3(b x+c)dx\) |
Input:
Int[Cos[a + b*x]^2*Csc[c + b*x]^3,x]
Output:
$Aborted
Result contains complex when optimal does not.
Time = 4.08 (sec) , antiderivative size = 243, normalized size of antiderivative = 2.79
method | result | size |
risch | \(-\frac {-5 \,{\mathrm e}^{i \left (3 b x +6 a +c \right )}-2 \,{\mathrm e}^{i \left (3 b x +4 a +3 c \right )}+3 \,{\mathrm e}^{i \left (3 b x +2 a +5 c \right )}+3 \,{\mathrm e}^{i \left (b x +6 a -c \right )}-2 \,{\mathrm e}^{i \left (b x +4 a +c \right )}-5 \,{\mathrm e}^{i \left (b x +2 a +3 c \right )}}{4 \left (-{\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right )^{2} b}+\frac {\ln \left ({\mathrm e}^{i \left (b x +a \right )}-{\mathrm e}^{i \left (a -c \right )}\right )}{4 b}-\frac {3 \ln \left ({\mathrm e}^{i \left (b x +a \right )}-{\mathrm e}^{i \left (a -c \right )}\right ) \cos \left (2 a -2 c \right )}{4 b}-\frac {\ln \left ({\mathrm e}^{i \left (b x +a \right )}+{\mathrm e}^{i \left (a -c \right )}\right )}{4 b}+\frac {3 \ln \left ({\mathrm e}^{i \left (b x +a \right )}+{\mathrm e}^{i \left (a -c \right )}\right ) \cos \left (2 a -2 c \right )}{4 b}\) | \(243\) |
default | \(\text {Expression too large to display}\) | \(1488\) |
Input:
int(cos(b*x+a)^2*csc(b*x+c)^3,x,method=_RETURNVERBOSE)
Output:
-1/4/(-exp(2*I*(b*x+a+c))+exp(2*I*a))^2/b*(-5*exp(I*(3*b*x+6*a+c))-2*exp(I *(3*b*x+4*a+3*c))+3*exp(I*(3*b*x+2*a+5*c))+3*exp(I*(b*x+6*a-c))-2*exp(I*(b *x+4*a+c))-5*exp(I*(b*x+2*a+3*c)))+1/4/b*ln(exp(I*(b*x+a))-exp(I*(a-c)))-3 /4/b*ln(exp(I*(b*x+a))-exp(I*(a-c)))*cos(2*a-2*c)-1/4/b*ln(exp(I*(b*x+a))+ exp(I*(a-c)))+3/4/b*ln(exp(I*(b*x+a))+exp(I*(a-c)))*cos(2*a-2*c)
Time = 0.08 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.68 \[ \int \cos ^2(a+b x) \csc ^3(c+b x) \, dx=\frac {2 \, \cos \left (b x + c\right ) \cos \left (-a + c\right )^{2} + 8 \, \cos \left (-a + c\right ) \sin \left (b x + c\right ) \sin \left (-a + c\right ) + {\left ({\left (3 \, \cos \left (-a + c\right )^{2} - 2\right )} \cos \left (b x + c\right )^{2} - 3 \, \cos \left (-a + c\right )^{2} + 2\right )} \log \left (\frac {1}{2} \, \cos \left (b x + c\right ) + \frac {1}{2}\right ) - {\left ({\left (3 \, \cos \left (-a + c\right )^{2} - 2\right )} \cos \left (b x + c\right )^{2} - 3 \, \cos \left (-a + c\right )^{2} + 2\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + c\right ) + \frac {1}{2}\right )}{4 \, {\left (b \cos \left (b x + c\right )^{2} - b\right )}} \] Input:
integrate(cos(b*x+a)^2*csc(b*x+c)^3,x, algorithm="fricas")
Output:
1/4*(2*cos(b*x + c)*cos(-a + c)^2 + 8*cos(-a + c)*sin(b*x + c)*sin(-a + c) + ((3*cos(-a + c)^2 - 2)*cos(b*x + c)^2 - 3*cos(-a + c)^2 + 2)*log(1/2*co s(b*x + c) + 1/2) - ((3*cos(-a + c)^2 - 2)*cos(b*x + c)^2 - 3*cos(-a + c)^ 2 + 2)*log(-1/2*cos(b*x + c) + 1/2))/(b*cos(b*x + c)^2 - b)
Timed out. \[ \int \cos ^2(a+b x) \csc ^3(c+b x) \, dx=\text {Timed out} \] Input:
integrate(cos(b*x+a)**2*csc(b*x+c)**3,x)
Output:
Timed out
Leaf count of result is larger than twice the leaf count of optimal. 1603 vs. \(2 (83) = 166\).
Time = 0.10 (sec) , antiderivative size = 1603, normalized size of antiderivative = 18.43 \[ \int \cos ^2(a+b x) \csc ^3(c+b x) \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)^2*csc(b*x+c)^3,x, algorithm="maxima")
Output:
1/8*(2*(5*cos(3*b*x + 4*a + 2*c) + 2*cos(3*b*x + 2*a + 4*c) - 3*cos(3*b*x + 6*c) - 3*cos(b*x + 4*a) + 2*cos(b*x + 2*a + 2*c) + 5*cos(b*x + 4*c))*cos (4*b*x + 2*a + 5*c) - 10*(2*cos(2*b*x + 2*a + 3*c) - cos(2*a + c))*cos(3*b *x + 4*a + 2*c) - 4*(2*cos(2*b*x + 2*a + 3*c) - cos(2*a + c))*cos(3*b*x + 2*a + 4*c) + 6*(2*cos(2*b*x + 2*a + 3*c) - cos(2*a + c))*cos(3*b*x + 6*c) + 4*(3*cos(b*x + 4*a) - 2*cos(b*x + 2*a + 2*c) - 5*cos(b*x + 4*c))*cos(2*b *x + 2*a + 3*c) - 6*cos(b*x + 4*a)*cos(2*a + c) + 4*cos(b*x + 2*a + 2*c)*c os(2*a + c) + 10*cos(b*x + 4*c)*cos(2*a + c) + ((3*cos(-2*a + 2*c) - 1)*co s(4*b*x + 2*a + 5*c)^2 + 4*(3*cos(-2*a + 2*c) - 1)*cos(2*b*x + 2*a + 3*c)^ 2 + (3*cos(-2*a + 2*c) - 1)*sin(4*b*x + 2*a + 5*c)^2 + 4*(3*cos(-2*a + 2*c ) - 1)*sin(2*b*x + 2*a + 3*c)^2 - 2*(2*(3*cos(-2*a + 2*c) - 1)*cos(2*b*x + 2*a + 3*c) - 3*cos(2*a + c)*cos(-2*a + 2*c) + cos(2*a + c))*cos(4*b*x + 2 *a + 5*c) - 4*(3*cos(2*a + c)*cos(-2*a + 2*c) - cos(2*a + c))*cos(2*b*x + 2*a + 3*c) - cos(2*a + c)^2 + 3*(cos(2*a + c)^2 + sin(2*a + c)^2)*cos(-2*a + 2*c) - 2*(2*(3*cos(-2*a + 2*c) - 1)*sin(2*b*x + 2*a + 3*c) - 3*cos(-2*a + 2*c)*sin(2*a + c) + sin(2*a + c))*sin(4*b*x + 2*a + 5*c) - 4*(3*cos(-2* a + 2*c)*sin(2*a + c) - sin(2*a + c))*sin(2*b*x + 2*a + 3*c) - sin(2*a + c )^2)*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) - ((3*cos(-2*a + 2*c) - 1)*cos(4*b*x + 2*a + 5*c)^2 + 4*(3*cos(-2*a + 2*c) - 1)*cos(2*b*x + 2*a + 3*c)^2 + (3*cos(-2*a + 2*...
Leaf count of result is larger than twice the leaf count of optimal. 5628 vs. \(2 (83) = 166\).
Time = 0.44 (sec) , antiderivative size = 5628, normalized size of antiderivative = 64.69 \[ \int \cos ^2(a+b x) \csc ^3(c+b x) \, dx=\text {Too large to display} \] Input:
integrate(cos(b*x+a)^2*csc(b*x+c)^3,x, algorithm="giac")
Output:
-1/8*(4*(tan(1/2*a)^4*tan(1/2*c)^4 - 10*tan(1/2*a)^4*tan(1/2*c)^2 + 24*tan (1/2*a)^3*tan(1/2*c)^3 - 10*tan(1/2*a)^2*tan(1/2*c)^4 + tan(1/2*a)^4 - 24* tan(1/2*a)^3*tan(1/2*c) + 52*tan(1/2*a)^2*tan(1/2*c)^2 - 24*tan(1/2*a)*tan (1/2*c)^3 + tan(1/2*c)^4 - 10*tan(1/2*a)^2 + 24*tan(1/2*a)*tan(1/2*c) - 10 *tan(1/2*c)^2 + 1)*log(abs(2*tan(1/2*b*x + 1/2*a)*tan(1/2*a)^2*tan(1/2*c) - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a)*tan(1/2*c)^2 + 2*tan(1/2*b*x + 1/2*a)* tan(1/2*a) - 2*tan(1/2*a)^2 - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*c) + 4*tan(1/ 2*a)*tan(1/2*c) - 2*tan(1/2*c)^2)/abs(2*tan(1/2*b*x + 1/2*a)*tan(1/2*a)^2* tan(1/2*c) - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a)*tan(1/2*c)^2 + 2*tan(1/2*a) ^2*tan(1/2*c)^2 + 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a) - 2*tan(1/2*b*x + 1/2* a)*tan(1/2*c) + 4*tan(1/2*a)*tan(1/2*c) + 2))/(tan(1/2*a)^2*tan(1/2*c)^2 + tan(1/2*a)^2 + tan(1/2*c)^2 + 1)^2 + (2*tan(1/2*b*x + 1/2*a)^3*tan(1/2*a) ^10*tan(1/2*c)^9 - 2*tan(1/2*b*x + 1/2*a)^3*tan(1/2*a)^9*tan(1/2*c)^10 + t an(1/2*b*x + 1/2*a)^2*tan(1/2*a)^10*tan(1/2*c)^10 + 12*tan(1/2*b*x + 1/2*a )^3*tan(1/2*a)^10*tan(1/2*c)^7 - 18*tan(1/2*b*x + 1/2*a)^3*tan(1/2*a)^9*ta n(1/2*c)^8 + 9*tan(1/2*b*x + 1/2*a)^2*tan(1/2*a)^10*tan(1/2*c)^8 + 18*tan( 1/2*b*x + 1/2*a)^3*tan(1/2*a)^8*tan(1/2*c)^9 - 8*tan(1/2*b*x + 1/2*a)^2*ta n(1/2*a)^9*tan(1/2*c)^9 - 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a)^10*tan(1/2*c)^ 9 - 12*tan(1/2*b*x + 1/2*a)^3*tan(1/2*a)^7*tan(1/2*c)^10 + 9*tan(1/2*b*x + 1/2*a)^2*tan(1/2*a)^8*tan(1/2*c)^10 + 2*tan(1/2*b*x + 1/2*a)*tan(1/2*a...
Timed out. \[ \int \cos ^2(a+b x) \csc ^3(c+b x) \, dx=\text {Hanged} \] Input:
int(cos(a + b*x)^2/sin(c + b*x)^3,x)
Output:
\text{Hanged}
\[ \int \cos ^2(a+b x) \csc ^3(c+b x) \, dx=\int \cos \left (b x +a \right )^{2} \csc \left (b x +c \right )^{3}d x \] Input:
int(cos(b*x+a)^2*csc(b*x+c)^3,x)
Output:
int(cos(a + b*x)**2*csc(b*x + c)**3,x)