Integrand size = 21, antiderivative size = 122 \[ \int \cot ^6(c+d x) (a+b \sec (c+d x))^2 \, dx=-a^2 x-\frac {a^2 \cot (c+d x)}{d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}-\frac {b^2 \cot ^5(c+d x)}{5 d}-\frac {2 a b \csc (c+d x)}{d}+\frac {4 a b \csc ^3(c+d x)}{3 d}-\frac {2 a b \csc ^5(c+d x)}{5 d} \] Output:
-a^2*x-a^2*cot(d*x+c)/d+1/3*a^2*cot(d*x+c)^3/d-1/5*a^2*cot(d*x+c)^5/d-1/5* b^2*cot(d*x+c)^5/d-2*a*b*csc(d*x+c)/d+4/3*a*b*csc(d*x+c)^3/d-2/5*a*b*csc(d *x+c)^5/d
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.36 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.69 \[ \int \cot ^6(c+d x) (a+b \sec (c+d x))^2 \, dx=-\frac {b \left (3 b \cot ^5(c+d x)+2 a \csc (c+d x) \left (15-10 \csc ^2(c+d x)+3 \csc ^4(c+d x)\right )\right )+3 a^2 \cot ^5(c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {5}{2},1,-\frac {3}{2},-\tan ^2(c+d x)\right )}{15 d} \] Input:
Integrate[Cot[c + d*x]^6*(a + b*Sec[c + d*x])^2,x]
Output:
-1/15*(b*(3*b*Cot[c + d*x]^5 + 2*a*Csc[c + d*x]*(15 - 10*Csc[c + d*x]^2 + 3*Csc[c + d*x]^4)) + 3*a^2*Cot[c + d*x]^5*Hypergeometric2F1[-5/2, 1, -3/2, -Tan[c + d*x]^2])/d
Time = 0.35 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 4374, 2009}
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 \cot ^6(c+d x) (a+b \sec (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}{\cot \left (c+d x+\frac {\pi }{2}\right )^6}dx\) |
\(\Big \downarrow \) 4374 |
\(\displaystyle \int \left (a^2 \cot ^6(c+d x)+2 a b \cot ^5(c+d x) \csc (c+d x)+b^2 \cot ^4(c+d x) \csc ^2(c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot (c+d x)}{d}-a^2 x-\frac {2 a b \csc ^5(c+d x)}{5 d}+\frac {4 a b \csc ^3(c+d x)}{3 d}-\frac {2 a b \csc (c+d x)}{d}-\frac {b^2 \cot ^5(c+d x)}{5 d}\) |
Input:
Int[Cot[c + d*x]^6*(a + b*Sec[c + d*x])^2,x]
Output:
-(a^2*x) - (a^2*Cot[c + d*x])/d + (a^2*Cot[c + d*x]^3)/(3*d) - (a^2*Cot[c + d*x]^5)/(5*d) - (b^2*Cot[c + d*x]^5)/(5*d) - (2*a*b*Csc[c + d*x])/d + (4 *a*b*Csc[c + d*x]^3)/(3*d) - (2*a*b*Csc[c + d*x]^5)/(5*d)
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_))^(n_), x_Symbol] :> Int[ExpandIntegrand[(e*Cot[c + d*x])^m, (a + b*Csc[ c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[n, 0]
Time = 1.25 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.26
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\cot \left (d x +c \right )^{5}}{5}+\frac {\cot \left (d x +c \right )^{3}}{3}-\cot \left (d x +c \right )-d x -c \right )+2 a b \left (-\frac {\cos \left (d x +c \right )^{6}}{5 \sin \left (d x +c \right )^{5}}+\frac {\cos \left (d x +c \right )^{6}}{15 \sin \left (d x +c \right )^{3}}-\frac {\cos \left (d x +c \right )^{6}}{5 \sin \left (d x +c \right )}-\frac {\left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}\right )-\frac {b^{2} \cos \left (d x +c \right )^{5}}{5 \sin \left (d x +c \right )^{5}}}{d}\) | \(154\) |
default | \(\frac {a^{2} \left (-\frac {\cot \left (d x +c \right )^{5}}{5}+\frac {\cot \left (d x +c \right )^{3}}{3}-\cot \left (d x +c \right )-d x -c \right )+2 a b \left (-\frac {\cos \left (d x +c \right )^{6}}{5 \sin \left (d x +c \right )^{5}}+\frac {\cos \left (d x +c \right )^{6}}{15 \sin \left (d x +c \right )^{3}}-\frac {\cos \left (d x +c \right )^{6}}{5 \sin \left (d x +c \right )}-\frac {\left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}\right )-\frac {b^{2} \cos \left (d x +c \right )^{5}}{5 \sin \left (d x +c \right )^{5}}}{d}\) | \(154\) |
risch | \(-a^{2} x -\frac {2 i \left (30 a b \,{\mathrm e}^{9 i \left (d x +c \right )}+45 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}+15 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}-40 a b \,{\mathrm e}^{7 i \left (d x +c \right )}-90 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+116 a b \,{\mathrm e}^{5 i \left (d x +c \right )}+140 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+30 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-40 a b \,{\mathrm e}^{3 i \left (d x +c \right )}-70 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+30 a b \,{\mathrm e}^{i \left (d x +c \right )}+23 a^{2}+3 b^{2}\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}\) | \(187\) |
Input:
int(cot(d*x+c)^6*(a+b*sec(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(-1/5*cot(d*x+c)^5+1/3*cot(d*x+c)^3-cot(d*x+c)-d*x-c)+2*a*b*(-1/5 /sin(d*x+c)^5*cos(d*x+c)^6+1/15/sin(d*x+c)^3*cos(d*x+c)^6-1/5/sin(d*x+c)*c os(d*x+c)^6-1/5*(8/3+cos(d*x+c)^4+4/3*cos(d*x+c)^2)*sin(d*x+c))-1/5*b^2/si n(d*x+c)^5*cos(d*x+c)^5)
Time = 0.11 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.25 \[ \int \cot ^6(c+d x) (a+b \sec (c+d x))^2 \, dx=-\frac {30 \, a b \cos \left (d x + c\right )^{4} + {\left (23 \, a^{2} + 3 \, b^{2}\right )} \cos \left (d x + c\right )^{5} - 35 \, a^{2} \cos \left (d x + c\right )^{3} - 40 \, a b \cos \left (d x + c\right )^{2} + 15 \, a^{2} \cos \left (d x + c\right ) + 16 \, a b + 15 \, {\left (a^{2} d x \cos \left (d x + c\right )^{4} - 2 \, a^{2} d x \cos \left (d x + c\right )^{2} + a^{2} d x\right )} \sin \left (d x + c\right )}{15 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \] Input:
integrate(cot(d*x+c)^6*(a+b*sec(d*x+c))^2,x, algorithm="fricas")
Output:
-1/15*(30*a*b*cos(d*x + c)^4 + (23*a^2 + 3*b^2)*cos(d*x + c)^5 - 35*a^2*co s(d*x + c)^3 - 40*a*b*cos(d*x + c)^2 + 15*a^2*cos(d*x + c) + 16*a*b + 15*( a^2*d*x*cos(d*x + c)^4 - 2*a^2*d*x*cos(d*x + c)^2 + a^2*d*x)*sin(d*x + c)) /((d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + d)*sin(d*x + c))
\[ \int \cot ^6(c+d x) (a+b \sec (c+d x))^2 \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{2} \cot ^{6}{\left (c + d x \right )}\, dx \] Input:
integrate(cot(d*x+c)**6*(a+b*sec(d*x+c))**2,x)
Output:
Integral((a + b*sec(c + d*x))**2*cot(c + d*x)**6, x)
Time = 0.11 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.79 \[ \int \cot ^6(c+d x) (a+b \sec (c+d x))^2 \, dx=-\frac {{\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} - 5 \, \tan \left (d x + c\right )^{2} + 3}{\tan \left (d x + c\right )^{5}}\right )} a^{2} + \frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{4} - 10 \, \sin \left (d x + c\right )^{2} + 3\right )} a b}{\sin \left (d x + c\right )^{5}} + \frac {3 \, b^{2}}{\tan \left (d x + c\right )^{5}}}{15 \, d} \] Input:
integrate(cot(d*x+c)^6*(a+b*sec(d*x+c))^2,x, algorithm="maxima")
Output:
-1/15*((15*d*x + 15*c + (15*tan(d*x + c)^4 - 5*tan(d*x + c)^2 + 3)/tan(d*x + c)^5)*a^2 + 2*(15*sin(d*x + c)^4 - 10*sin(d*x + c)^2 + 3)*a*b/sin(d*x + c)^5 + 3*b^2/tan(d*x + c)^5)/d
Leaf count of result is larger than twice the leaf count of optimal. 273 vs. \(2 (112) = 224\).
Time = 0.22 (sec) , antiderivative size = 273, normalized size of antiderivative = 2.24 \[ \int \cot ^6(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 35 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 50 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 480 \, {\left (d x + c\right )} a^{2} + 330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 300 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 30 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 300 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 30 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 35 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 50 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{480 \, d} \] Input:
integrate(cot(d*x+c)^6*(a+b*sec(d*x+c))^2,x, algorithm="giac")
Output:
1/480*(3*a^2*tan(1/2*d*x + 1/2*c)^5 - 6*a*b*tan(1/2*d*x + 1/2*c)^5 + 3*b^2 *tan(1/2*d*x + 1/2*c)^5 - 35*a^2*tan(1/2*d*x + 1/2*c)^3 + 50*a*b*tan(1/2*d *x + 1/2*c)^3 - 15*b^2*tan(1/2*d*x + 1/2*c)^3 - 480*(d*x + c)*a^2 + 330*a^ 2*tan(1/2*d*x + 1/2*c) - 300*a*b*tan(1/2*d*x + 1/2*c) + 30*b^2*tan(1/2*d*x + 1/2*c) - (330*a^2*tan(1/2*d*x + 1/2*c)^4 + 300*a*b*tan(1/2*d*x + 1/2*c) ^4 + 30*b^2*tan(1/2*d*x + 1/2*c)^4 - 35*a^2*tan(1/2*d*x + 1/2*c)^2 - 50*a* b*tan(1/2*d*x + 1/2*c)^2 - 15*b^2*tan(1/2*d*x + 1/2*c)^2 + 3*a^2 + 6*a*b + 3*b^2)/tan(1/2*d*x + 1/2*c)^5)/d
Time = 11.16 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.57 \[ \int \cot ^6(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\left (a-b\right )}^2}{160\,d}-a^2\,x-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {a^2}{16}-\frac {a\,b}{12}+\frac {b^2}{48}+\frac {{\left (a-b\right )}^2}{96}\right )}{d}-\frac {\frac {2\,a\,b}{5}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (22\,a^2+20\,a\,b+2\,b^2\right )+\frac {a^2}{5}+\frac {b^2}{5}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {7\,a^2}{3}+\frac {10\,a\,b}{3}+b^2\right )}{32\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {21\,a^2}{32}-\frac {9\,a\,b}{16}+\frac {b^2}{32}+\frac {{\left (a-b\right )}^2}{32}\right )}{d} \] Input:
int(cot(c + d*x)^6*(a + b/cos(c + d*x))^2,x)
Output:
(tan(c/2 + (d*x)/2)^5*(a - b)^2)/(160*d) - a^2*x - (tan(c/2 + (d*x)/2)^3*( a^2/16 - (a*b)/12 + b^2/48 + (a - b)^2/96))/d - ((2*a*b)/5 + tan(c/2 + (d* x)/2)^4*(20*a*b + 22*a^2 + 2*b^2) + a^2/5 + b^2/5 - tan(c/2 + (d*x)/2)^2*( (10*a*b)/3 + (7*a^2)/3 + b^2))/(32*d*tan(c/2 + (d*x)/2)^5) + (tan(c/2 + (d *x)/2)*((21*a^2)/32 - (9*a*b)/16 + b^2/32 + (a - b)^2/32))/d
Time = 0.16 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.27 \[ \int \cot ^6(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {-23 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a^{2}-3 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} b^{2}+11 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{2}+6 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b^{2}-3 \cos \left (d x +c \right ) a^{2}-3 \cos \left (d x +c \right ) b^{2}-15 \sin \left (d x +c \right )^{5} a^{2} d x -30 \sin \left (d x +c \right )^{4} a b +20 \sin \left (d x +c \right )^{2} a b -6 a b}{15 \sin \left (d x +c \right )^{5} d} \] Input:
int(cot(d*x+c)^6*(a+b*sec(d*x+c))^2,x)
Output:
( - 23*cos(c + d*x)*sin(c + d*x)**4*a**2 - 3*cos(c + d*x)*sin(c + d*x)**4* b**2 + 11*cos(c + d*x)*sin(c + d*x)**2*a**2 + 6*cos(c + d*x)*sin(c + d*x)* *2*b**2 - 3*cos(c + d*x)*a**2 - 3*cos(c + d*x)*b**2 - 15*sin(c + d*x)**5*a **2*d*x - 30*sin(c + d*x)**4*a*b + 20*sin(c + d*x)**2*a*b - 6*a*b)/(15*sin (c + d*x)**5*d)