Integrand size = 17, antiderivative size = 166 \[ \int \cos ^2(a+b x) \csc ^3(c+d x) \, dx=-\frac {\text {arctanh}(\cos (c+d x))}{4 d}-\frac {\cot (c+d x) \csc (c+d x)}{4 d}-\frac {2 e^{-2 i a-2 i b x+3 i (c+d x)} \operatorname {Hypergeometric2F1}\left (3,\frac {3}{2}-\frac {b}{d},\frac {5}{2}-\frac {b}{d},e^{2 i (c+d x)}\right )}{2 b-3 d}+\frac {2 e^{2 i a+2 i b x+3 i (c+d x)} \operatorname {Hypergeometric2F1}\left (3,\frac {3}{2}+\frac {b}{d},\frac {5}{2}+\frac {b}{d},e^{2 i (c+d x)}\right )}{2 b+3 d} \] Output:
-1/4*arctanh(cos(d*x+c))/d-1/4*cot(d*x+c)*csc(d*x+c)/d-2*exp(-2*I*a-2*I*b* x+3*I*(d*x+c))*hypergeom([3, 3/2-b/d],[5/2-b/d],exp(2*I*(d*x+c)))/(2*b-3*d )+2*exp(2*I*a+2*I*b*x+3*I*(d*x+c))*hypergeom([3, 3/2+b/d],[5/2+b/d],exp(2* I*(d*x+c)))/(2*b+3*d)
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(365\) vs. \(2(166)=332\).
Time = 12.12 (sec) , antiderivative size = 365, normalized size of antiderivative = 2.20 \[ \int \cos ^2(a+b x) \csc ^3(c+d x) \, dx=\frac {\left (-b \cos \left (2 a+2 b x-\frac {d x}{2}\right )+b \cos \left (2 a+2 b x+\frac {d x}{2}\right )\right ) \csc \left (\frac {c}{2}\right ) \csc \left (\frac {c}{2}+\frac {d x}{2}\right )}{8 d^2}+\frac {(-1-\cos (2 a+2 b x)) \csc ^2\left (\frac {c}{2}+\frac {d x}{2}\right )}{16 d}-\frac {e^{-2 i (a+b x)} \left (2 d e^{2 i (a+b x)} \text {arctanh}\left (e^{i (c+d x)}\right )+(2 b+d) e^{i (c+d x)} \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2}-\frac {b}{d},\frac {3}{2}-\frac {b}{d},e^{2 i (c+d x)}\right )-(2 b-d) e^{i (4 a+c+4 b x+d x)} \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2}+\frac {b}{d},\frac {3}{2}+\frac {b}{d},e^{2 i (c+d x)}\right )\right )}{4 d^2}+\frac {\left (b \cos \left (2 a+2 b x-\frac {d x}{2}\right )-b \cos \left (2 a+2 b x+\frac {d x}{2}\right )\right ) \sec \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}+\frac {d x}{2}\right )}{8 d^2}+\frac {(1+\cos (2 a+2 b x)) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right )}{16 d}+\frac {b \csc (c) \sin (2 a+2 b x)}{2 d^2} \] Input:
Integrate[Cos[a + b*x]^2*Csc[c + d*x]^3,x]
Output:
((-(b*Cos[2*a + 2*b*x - (d*x)/2]) + b*Cos[2*a + 2*b*x + (d*x)/2])*Csc[c/2] *Csc[c/2 + (d*x)/2])/(8*d^2) + ((-1 - Cos[2*a + 2*b*x])*Csc[c/2 + (d*x)/2] ^2)/(16*d) - (2*d*E^((2*I)*(a + b*x))*ArcTanh[E^(I*(c + d*x))] + (2*b + d) *E^(I*(c + d*x))*Hypergeometric2F1[1, 1/2 - b/d, 3/2 - b/d, E^((2*I)*(c + d*x))] - (2*b - d)*E^(I*(4*a + c + 4*b*x + d*x))*Hypergeometric2F1[1, 1/2 + b/d, 3/2 + b/d, E^((2*I)*(c + d*x))])/(4*d^2*E^((2*I)*(a + b*x))) + ((b* Cos[2*a + 2*b*x - (d*x)/2] - b*Cos[2*a + 2*b*x + (d*x)/2])*Sec[c/2]*Sec[c/ 2 + (d*x)/2])/(8*d^2) + ((1 + Cos[2*a + 2*b*x])*Sec[c/2 + (d*x)/2]^2)/(16* d) + (b*Csc[c]*Sin[2*a + 2*b*x])/(2*d^2)
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(c+d x) \, dx\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle \int \cos ^2(a+b x) \csc ^3(c+d x)dx\) |
Input:
Int[Cos[a + b*x]^2*Csc[c + d*x]^3,x]
Output:
$Aborted
\[\int \cos \left (b x +a \right )^{2} \csc \left (d x +c \right )^{3}d x\]
Input:
int(cos(b*x+a)^2*csc(d*x+c)^3,x)
Output:
int(cos(b*x+a)^2*csc(d*x+c)^3,x)
\[ \int \cos ^2(a+b x) \csc ^3(c+d x) \, dx=\int { \cos \left (b x + a\right )^{2} \csc \left (d x + c\right )^{3} \,d x } \] Input:
integrate(cos(b*x+a)^2*csc(d*x+c)^3,x, algorithm="fricas")
Output:
integral(cos(b*x + a)^2*csc(d*x + c)^3, x)
Timed out. \[ \int \cos ^2(a+b x) \csc ^3(c+d x) \, dx=\text {Timed out} \] Input:
integrate(cos(b*x+a)**2*csc(d*x+c)**3,x)
Output:
Timed out
\[ \int \cos ^2(a+b x) \csc ^3(c+d x) \, dx=\int { \cos \left (b x + a\right )^{2} \csc \left (d x + c\right )^{3} \,d x } \] Input:
integrate(cos(b*x+a)^2*csc(d*x+c)^3,x, algorithm="maxima")
Output:
-1/4*((2*b - d)*cos((4*b + d)*x + 4*a + c)*cos(2*b*x + 2*a) - 2*d*cos((2*b + d)*x + 2*a + c)*cos(2*b*x + 2*a) + (2*b - d)*cos(2*b*x + 2*a)*cos(3*d*x + 3*c) - (2*b + d)*cos(2*b*x + 2*a)*cos(d*x + c) + (2*b - d)*sin((4*b + d )*x + 4*a + c)*sin(2*b*x + 2*a) - 2*d*sin((2*b + d)*x + 2*a + c)*sin(2*b*x + 2*a) + (2*b - d)*sin(2*b*x + 2*a)*sin(3*d*x + 3*c) - (2*b + d)*sin(2*b* x + 2*a)*sin(d*x + c) + (2*(2*b + d)*cos(2*(b + d)*x + 2*a + 2*c) - (2*b + d)*cos(2*b*x + 2*a))*cos((4*b + 3*d)*x + 4*a + 3*c) + 2*(2*d*cos(2*(b + d )*x + 2*a + 2*c) - d*cos(2*b*x + 2*a))*cos((2*b + 3*d)*x + 2*a + 3*c) - (( 2*b + d)*cos((4*b + 3*d)*x + 4*a + 3*c) - (2*b - d)*cos((4*b + d)*x + 4*a + c) + 2*d*cos((2*b + 3*d)*x + 2*a + 3*c) + 2*d*cos((2*b + d)*x + 2*a + c) - (2*b - d)*cos(3*d*x + 3*c) + (2*b + d)*cos(d*x + c))*cos(2*(b + 2*d)*x + 2*a + 4*c) - 2*((2*b - d)*cos((4*b + d)*x + 4*a + c) - 2*d*cos((2*b + d) *x + 2*a + c) + (2*b - d)*cos(3*d*x + 3*c) - (2*b + d)*cos(d*x + c))*cos(2 *(b + d)*x + 2*a + 2*c) - 4*(d^2*cos(2*(b + 2*d)*x + 2*a + 4*c)^2 + 4*d^2* cos(2*(b + d)*x + 2*a + 2*c)^2 - 4*d^2*cos(2*(b + d)*x + 2*a + 2*c)*cos(2* b*x + 2*a) + d^2*cos(2*b*x + 2*a)^2 + d^2*sin(2*(b + 2*d)*x + 2*a + 4*c)^2 + 4*d^2*sin(2*(b + d)*x + 2*a + 2*c)^2 - 4*d^2*sin(2*(b + d)*x + 2*a + 2* c)*sin(2*b*x + 2*a) + d^2*sin(2*b*x + 2*a)^2 - 2*(2*d^2*cos(2*(b + d)*x + 2*a + 2*c) - d^2*cos(2*b*x + 2*a))*cos(2*(b + 2*d)*x + 2*a + 4*c) - 2*(2*d ^2*sin(2*(b + d)*x + 2*a + 2*c) - d^2*sin(2*b*x + 2*a))*sin(2*(b + 2*d)...
\[ \int \cos ^2(a+b x) \csc ^3(c+d x) \, dx=\int { \cos \left (b x + a\right )^{2} \csc \left (d x + c\right )^{3} \,d x } \] Input:
integrate(cos(b*x+a)^2*csc(d*x+c)^3,x, algorithm="giac")
Output:
integrate(cos(b*x + a)^2*csc(d*x + c)^3, x)
Timed out. \[ \int \cos ^2(a+b x) \csc ^3(c+d x) \, dx=\int \frac {{\cos \left (a+b\,x\right )}^2}{{\sin \left (c+d\,x\right )}^3} \,d x \] Input:
int(cos(a + b*x)^2/sin(c + d*x)^3,x)
Output:
int(cos(a + b*x)^2/sin(c + d*x)^3, x)
\[ \int \cos ^2(a+b x) \csc ^3(c+d x) \, dx=\int \cos \left (b x +a \right )^{2} \csc \left (d x +c \right )^{3}d x \] Input:
int(cos(b*x+a)^2*csc(d*x+c)^3,x)
Output:
int(cos(a + b*x)**2*csc(c + d*x)**3,x)