Integrand size = 21, antiderivative size = 85 \[ \int \cot ^5(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^2}{4 d (1-\cos (c+d x))^2}+\frac {5 a^2}{4 d (1-\cos (c+d x))}+\frac {7 a^2 \log (1-\cos (c+d x))}{8 d}+\frac {a^2 \log (1+\cos (c+d x))}{8 d} \] Output:
-1/4*a^2/d/(1-cos(d*x+c))^2+5/4*a^2/d/(1-cos(d*x+c))+7/8*a^2*ln(1-cos(d*x+ c))/d+1/8*a^2*ln(1+cos(d*x+c))/d
Time = 0.19 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.01 \[ \int \cot ^5(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^2 (1+\cos (c+d x))^2 \left (-10 \csc ^2\left (\frac {1}{2} (c+d x)\right )+\csc ^4\left (\frac {1}{2} (c+d x)\right )-4 \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+7 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right ) \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d} \] Input:
Integrate[Cot[c + d*x]^5*(a + a*Sec[c + d*x])^2,x]
Output:
-1/64*(a^2*(1 + Cos[c + d*x])^2*(-10*Csc[(c + d*x)/2]^2 + Csc[(c + d*x)/2] ^4 - 4*(Log[Cos[(c + d*x)/2]] + 7*Log[Sin[(c + d*x)/2]]))*Sec[(c + d*x)/2] ^4)/d
Time = 0.28 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.81, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 25, 4367, 27, 99, 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 ^5(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 )^5}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\left (\csc \left (\frac {1}{2} (2 c+\pi )+d x\right ) a+a\right )^2}{\cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^5}dx\) |
\(\Big \downarrow \) 4367 |
\(\displaystyle -\frac {a^6 \int \frac {\cos ^3(c+d x)}{a^4 (1-\cos (c+d x))^3 (\cos (c+d x)+1)}d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a^2 \int \frac {\cos ^3(c+d x)}{(1-\cos (c+d x))^3 (\cos (c+d x)+1)}d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 99 |
\(\displaystyle -\frac {a^2 \int \left (-\frac {1}{8 (\cos (c+d x)+1)}-\frac {7}{8 (\cos (c+d x)-1)}-\frac {5}{4 (\cos (c+d x)-1)^2}-\frac {1}{2 (\cos (c+d x)-1)^3}\right )d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a^2 \left (-\frac {5}{4 (1-\cos (c+d x))}+\frac {1}{4 (1-\cos (c+d x))^2}-\frac {7}{8} \log (1-\cos (c+d x))-\frac {1}{8} \log (\cos (c+d x)+1)\right )}{d}\) |
Input:
Int[Cot[c + d*x]^5*(a + a*Sec[c + d*x])^2,x]
Output:
-((a^2*(1/(4*(1 - Cos[c + d*x])^2) - 5/(4*(1 - Cos[c + d*x])) - (7*Log[1 - Cos[c + d*x]])/8 - Log[1 + Cos[c + d*x]]/8))/d)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | | (GtQ[m, 0] && GeQ[n, -1]))
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _.), x_Symbol] :> Simp[1/(a^(m - n - 1)*b^n*d) Subst[Int[(a - b*x)^((m - 1)/2)*((a + b*x)^((m - 1)/2 + n)/x^(m + n)), x], x, Sin[c + d*x]], x] /; Fr eeQ[{a, b, c, d}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] && Integer Q[n]
Result contains complex when optimal does not.
Time = 0.67 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.34
method | result | size |
risch | \(-i a^{2} x -\frac {2 i a^{2} c}{d}-\frac {a^{2} \left (5 \,{\mathrm e}^{3 i \left (d x +c \right )}-8 \,{\mathrm e}^{2 i \left (d x +c \right )}+5 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{2 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{4}}+\frac {7 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{4 d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{4 d}\) | \(114\) |
derivativedivides | \(\frac {-\frac {a^{2} \cos \left (d x +c \right )^{4}}{4 \sin \left (d x +c \right )^{4}}+2 a^{2} \left (-\frac {\cos \left (d x +c \right )^{5}}{4 \sin \left (d x +c \right )^{4}}+\frac {\cos \left (d x +c \right )^{5}}{8 \sin \left (d x +c \right )^{2}}+\frac {\cos \left (d x +c \right )^{3}}{8}+\frac {3 \cos \left (d x +c \right )}{8}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+a^{2} \left (-\frac {\cot \left (d x +c \right )^{4}}{4}+\frac {\cot \left (d x +c \right )^{2}}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) | \(137\) |
default | \(\frac {-\frac {a^{2} \cos \left (d x +c \right )^{4}}{4 \sin \left (d x +c \right )^{4}}+2 a^{2} \left (-\frac {\cos \left (d x +c \right )^{5}}{4 \sin \left (d x +c \right )^{4}}+\frac {\cos \left (d x +c \right )^{5}}{8 \sin \left (d x +c \right )^{2}}+\frac {\cos \left (d x +c \right )^{3}}{8}+\frac {3 \cos \left (d x +c \right )}{8}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+a^{2} \left (-\frac {\cot \left (d x +c \right )^{4}}{4}+\frac {\cot \left (d x +c \right )^{2}}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) | \(137\) |
Input:
int(cot(d*x+c)^5*(a+a*sec(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
-I*a^2*x-2*I/d*a^2*c-1/2*a^2/d/(exp(I*(d*x+c))-1)^4*(5*exp(3*I*(d*x+c))-8* exp(2*I*(d*x+c))+5*exp(I*(d*x+c)))+7/4/d*a^2*ln(exp(I*(d*x+c))-1)+1/4/d*a^ 2*ln(exp(I*(d*x+c))+1)
Time = 0.12 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.44 \[ \int \cot ^5(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {10 \, a^{2} \cos \left (d x + c\right ) - 8 \, a^{2} - {\left (a^{2} \cos \left (d x + c\right )^{2} - 2 \, a^{2} \cos \left (d x + c\right ) + a^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 7 \, {\left (a^{2} \cos \left (d x + c\right )^{2} - 2 \, a^{2} \cos \left (d x + c\right ) + a^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{8 \, {\left (d \cos \left (d x + c\right )^{2} - 2 \, d \cos \left (d x + c\right ) + d\right )}} \] Input:
integrate(cot(d*x+c)^5*(a+a*sec(d*x+c))^2,x, algorithm="fricas")
Output:
-1/8*(10*a^2*cos(d*x + c) - 8*a^2 - (a^2*cos(d*x + c)^2 - 2*a^2*cos(d*x + c) + a^2)*log(1/2*cos(d*x + c) + 1/2) - 7*(a^2*cos(d*x + c)^2 - 2*a^2*cos( d*x + c) + a^2)*log(-1/2*cos(d*x + c) + 1/2))/(d*cos(d*x + c)^2 - 2*d*cos( d*x + c) + d)
\[ \int \cot ^5(c+d x) (a+a \sec (c+d x))^2 \, dx=a^{2} \left (\int 2 \cot ^{5}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cot ^{5}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cot ^{5}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(cot(d*x+c)**5*(a+a*sec(d*x+c))**2,x)
Output:
a**2*(Integral(2*cot(c + d*x)**5*sec(c + d*x), x) + Integral(cot(c + d*x)* *5*sec(c + d*x)**2, x) + Integral(cot(c + d*x)**5, x))
Time = 0.03 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.85 \[ \int \cot ^5(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^{2} \log \left (\cos \left (d x + c\right ) + 1\right ) + 7 \, a^{2} \log \left (\cos \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (5 \, a^{2} \cos \left (d x + c\right ) - 4 \, a^{2}\right )}}{\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}}{8 \, d} \] Input:
integrate(cot(d*x+c)^5*(a+a*sec(d*x+c))^2,x, algorithm="maxima")
Output:
1/8*(a^2*log(cos(d*x + c) + 1) + 7*a^2*log(cos(d*x + c) - 1) - 2*(5*a^2*co s(d*x + c) - 4*a^2)/(cos(d*x + c)^2 - 2*cos(d*x + c) + 1))/d
Time = 0.13 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.71 \[ \int \cot ^5(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {1}{8} \, a^{2} {\left (\frac {\log \left ({\left | \cos \left (d x + c\right ) + 1 \right |}\right )}{d} + \frac {7 \, \log \left ({\left | \cos \left (d x + c\right ) - 1 \right |}\right )}{d} - \frac {2 \, {\left (5 \, \cos \left (d x + c\right ) - 4\right )}}{d {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}\right )} \] Input:
integrate(cot(d*x+c)^5*(a+a*sec(d*x+c))^2,x, algorithm="giac")
Output:
1/8*a^2*(log(abs(cos(d*x + c) + 1))/d + 7*log(abs(cos(d*x + c) - 1))/d - 2 *(5*cos(d*x + c) - 4)/(d*(cos(d*x + c) - 1)^2))
Time = 12.44 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.73 \[ \int \cot ^5(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^2\,\left (-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{16}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+\frac {7\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4}-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )}{d} \] Input:
int(cot(c + d*x)^5*(a + a/cos(c + d*x))^2,x)
Output:
(a^2*((7*log(tan(c/2 + (d*x)/2)))/4 - log(tan(c/2 + (d*x)/2)^2 + 1) + cot( c/2 + (d*x)/2)^2/2 - cot(c/2 + (d*x)/2)^4/16))/d
Time = 0.18 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.99 \[ \int \cot ^5(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^{2} \left (-16 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+28 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}{16 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} d} \] Input:
int(cot(d*x+c)^5*(a+a*sec(d*x+c))^2,x)
Output:
(a**2*( - 16*log(tan((c + d*x)/2)**2 + 1)*tan((c + d*x)/2)**4 + 28*log(tan ((c + d*x)/2))*tan((c + d*x)/2)**4 + 8*tan((c + d*x)/2)**2 - 1))/(16*tan(( c + d*x)/2)**4*d)