Integrand size = 21, antiderivative size = 107 \[ \int \cot ^6(c+d x) (a+a \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 {2 a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \csc (c+d x)}{d}+\frac {4 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \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-2/5*a^2*cot(d*x+c)^5/d-2*a^ 2*csc(d*x+c)/d+4/3*a^2*csc(d*x+c)^3/d-2/5*a^2*csc(d*x+c)^5/d
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.30 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.98 \[ \int \cot ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \csc (c+d x)}{d}+\frac {4 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}-\frac {a^2 \cot ^5(c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {5}{2},1,-\frac {3}{2},-\tan ^2(c+d x)\right )}{5 d} \] Input:
Integrate[Cot[c + d*x]^6*(a + a*Sec[c + d*x])^2,x]
Output:
-1/5*(a^2*Cot[c + d*x]^5)/d - (2*a^2*Csc[c + d*x])/d + (4*a^2*Csc[c + d*x] ^3)/(3*d) - (2*a^2*Csc[c + d*x]^5)/(5*d) - (a^2*Cot[c + d*x]^5*Hypergeomet ric2F1[-5/2, 1, -3/2, -Tan[c + d*x]^2])/(5*d)
Time = 0.35 (sec) , antiderivative size = 107, 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 \sec (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\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^2 \cot ^5(c+d x) \csc (c+d x)+a^2 \cot ^4(c+d x) \csc ^2(c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 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}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}+\frac {4 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc (c+d x)}{d}-a^2 x\) |
Input:
Int[Cot[c + d*x]^6*(a + a*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) - (2*a^2*Cot[ c + d*x]^5)/(5*d) - (2*a^2*Csc[c + d*x])/d + (4*a^2*Csc[c + d*x]^3)/(3*d) - (2*a^2*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]
Result contains complex when optimal does not.
Time = 1.01 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.93
method | result | size |
risch | \(-a^{2} x -\frac {4 i a^{2} \left (15 \,{\mathrm e}^{5 i \left (d x +c \right )}-30 \,{\mathrm e}^{4 i \left (d x +c \right )}+10 \,{\mathrm e}^{3 i \left (d x +c \right )}+35 \,{\mathrm e}^{2 i \left (d x +c \right )}-37 \,{\mathrm e}^{i \left (d x +c \right )}+13\right )}{15 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{5} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}\) | \(100\) |
derivativedivides | \(\frac {-\frac {a^{2} \cos \left (d x +c \right )^{5}}{5 \sin \left (d x +c \right )^{5}}+2 a^{2} \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 )+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 )}{d}\) | \(155\) |
default | \(\frac {-\frac {a^{2} \cos \left (d x +c \right )^{5}}{5 \sin \left (d x +c \right )^{5}}+2 a^{2} \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 )+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 )}{d}\) | \(155\) |
Input:
int(cot(d*x+c)^6*(a+a*sec(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
-a^2*x-4/15*I*a^2*(15*exp(5*I*(d*x+c))-30*exp(4*I*(d*x+c))+10*exp(3*I*(d*x +c))+35*exp(2*I*(d*x+c))-37*exp(I*(d*x+c))+13)/d/(exp(I*(d*x+c))-1)^5/(exp (I*(d*x+c))+1)
Time = 0.08 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.10 \[ \int \cot ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {26 \, a^{2} \cos \left (d x + c\right )^{3} - 22 \, a^{2} \cos \left (d x + c\right )^{2} - 17 \, a^{2} \cos \left (d x + c\right ) + 16 \, a^{2} + 15 \, {\left (a^{2} d x \cos \left (d x + c\right )^{2} - 2 \, a^{2} d x \cos \left (d x + c\right ) + a^{2} d x\right )} \sin \left (d x + c\right )}{15 \, {\left (d \cos \left (d x + c\right )^{2} - 2 \, d \cos \left (d x + c\right ) + d\right )} \sin \left (d x + c\right )} \] Input:
integrate(cot(d*x+c)^6*(a+a*sec(d*x+c))^2,x, algorithm="fricas")
Output:
-1/15*(26*a^2*cos(d*x + c)^3 - 22*a^2*cos(d*x + c)^2 - 17*a^2*cos(d*x + c) + 16*a^2 + 15*(a^2*d*x*cos(d*x + c)^2 - 2*a^2*d*x*cos(d*x + c) + a^2*d*x) *sin(d*x + c))/((d*cos(d*x + c)^2 - 2*d*cos(d*x + c) + d)*sin(d*x + c))
\[ \int \cot ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=a^{2} \left (\int 2 \cot ^{6}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cot ^{6}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cot ^{6}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(cot(d*x+c)**6*(a+a*sec(d*x+c))**2,x)
Output:
a**2*(Integral(2*cot(c + d*x)**6*sec(c + d*x), x) + Integral(cot(c + d*x)* *6*sec(c + d*x)**2, x) + Integral(cot(c + d*x)**6, x))
Time = 0.11 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.91 \[ \int \cot ^6(c+d x) (a+a \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^{2}}{\sin \left (d x + c\right )^{5}} + \frac {3 \, a^{2}}{\tan \left (d x + c\right )^{5}}}{15 \, d} \] Input:
integrate(cot(d*x+c)^6*(a+a*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^2/sin(d*x + c)^5 + 3*a^2/tan(d*x + c)^5)/d
Time = 0.20 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.75 \[ \int \cot ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {120 \, {\left (d x + c\right )} a^{2} - 15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {165 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 25 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{120 \, d} \] Input:
integrate(cot(d*x+c)^6*(a+a*sec(d*x+c))^2,x, algorithm="giac")
Output:
-1/120*(120*(d*x + c)*a^2 - 15*a^2*tan(1/2*d*x + 1/2*c) + (165*a^2*tan(1/2 *d*x + 1/2*c)^4 - 25*a^2*tan(1/2*d*x + 1/2*c)^2 + 3*a^2)/tan(1/2*d*x + 1/2 *c)^5)/d
Time = 12.80 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.73 \[ \int \cot ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}-\frac {\frac {11\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{8}-\frac {5\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{24}+\frac {a^2}{40}}{d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}-a^2\,x \] Input:
int(cot(c + d*x)^6*(a + a/cos(c + d*x))^2,x)
Output:
(a^2*tan(c/2 + (d*x)/2))/(8*d) - ((11*a^2*tan(c/2 + (d*x)/2)^4)/8 - (5*a^2 *tan(c/2 + (d*x)/2)^2)/24 + a^2/40)/(d*tan(c/2 + (d*x)/2)^5) - a^2*x
Time = 0.16 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.70 \[ \int \cot ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^{2} \left (15 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-120 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} d x -165 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+25 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-3\right )}{120 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} d} \] Input:
int(cot(d*x+c)^6*(a+a*sec(d*x+c))^2,x)
Output:
(a**2*(15*tan((c + d*x)/2)**6 - 120*tan((c + d*x)/2)**5*d*x - 165*tan((c + d*x)/2)**4 + 25*tan((c + d*x)/2)**2 - 3))/(120*tan((c + d*x)/2)**5*d)