Integrand size = 21, antiderivative size = 126 \[ \int \cot ^5(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {a^2 \log (\cos (c+d x))}{d}+\frac {a (4 a+3 b) \log (1-\sec (c+d x))}{8 d}+\frac {a (4 a-3 b) \log (1+\sec (c+d x))}{8 d}+\frac {a \cot ^2(c+d x) (2 a+3 b \sec (c+d x))}{4 d}-\frac {\cot ^4(c+d x) \left (a^2+b^2+2 a b \sec (c+d x)\right )}{4 d} \] Output:
a^2*ln(cos(d*x+c))/d+1/8*a*(4*a+3*b)*ln(1-sec(d*x+c))/d+1/8*a*(4*a-3*b)*ln (1+sec(d*x+c))/d+1/4*a*cot(d*x+c)^2*(2*a+3*b*sec(d*x+c))/d-1/4*cot(d*x+c)^ 4*(a^2+b^2+2*a*b*sec(d*x+c))/d
Time = 2.72 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.10 \[ \int \cot ^5(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {16 a^2 \log (\cos (c+d x))+2 a (4 a+3 b) \log (1-\sec (c+d x))+2 a (4 a-3 b) \log (1+\sec (c+d x))-\frac {(a+b)^2}{(-1+\sec (c+d x))^2}+\frac {(a+b) (5 a+b)}{-1+\sec (c+d x)}-\frac {(a-b)^2}{(1+\sec (c+d x))^2}-\frac {(a-b) (5 a-b)}{1+\sec (c+d x)}}{16 d} \] Input:
Integrate[Cot[c + d*x]^5*(a + b*Sec[c + d*x])^2,x]
Output:
(16*a^2*Log[Cos[c + d*x]] + 2*a*(4*a + 3*b)*Log[1 - Sec[c + d*x]] + 2*a*(4 *a - 3*b)*Log[1 + Sec[c + d*x]] - (a + b)^2/(-1 + Sec[c + d*x])^2 + ((a + b)*(5*a + b))/(-1 + Sec[c + d*x]) - (a - b)^2/(1 + Sec[c + d*x])^2 - ((a - b)*(5*a - b))/(1 + Sec[c + d*x]))/(16*d)
Time = 0.38 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.38, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 25, 4373, 532, 27, 532, 25, 523, 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+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 )^5}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\left (a+b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )\right )^2}{\cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^5}dx\) |
\(\Big \downarrow \) 4373 |
\(\displaystyle -\frac {b^6 \int \frac {\cos (c+d x) (a+b \sec (c+d x))^2}{b \left (b^2-b^2 \sec ^2(c+d x)\right )^3}d(b \sec (c+d x))}{d}\) |
\(\Big \downarrow \) 532 |
\(\displaystyle -\frac {b^6 \left (\frac {a^2+2 a b \sec (c+d x)+b^2}{4 b^2 \left (b^2-b^2 \sec ^2(c+d x)\right )^2}-\frac {\int -\frac {2 a \cos (c+d x) (2 a+3 b \sec (c+d x))}{b \left (b^2-b^2 \sec ^2(c+d x)\right )^2}d(b \sec (c+d x))}{4 b^2}\right )}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {b^6 \left (\frac {a \int \frac {\cos (c+d x) (2 a+3 b \sec (c+d x))}{b \left (b^2-b^2 \sec ^2(c+d x)\right )^2}d(b \sec (c+d x))}{2 b^2}+\frac {a^2+2 a b \sec (c+d x)+b^2}{4 b^2 \left (b^2-b^2 \sec ^2(c+d x)\right )^2}\right )}{d}\) |
\(\Big \downarrow \) 532 |
\(\displaystyle -\frac {b^6 \left (\frac {a \left (\frac {2 a+3 b \sec (c+d x)}{2 b^2 \left (b^2-b^2 \sec ^2(c+d x)\right )}-\frac {\int -\frac {\cos (c+d x) (4 a+3 b \sec (c+d x))}{b \left (b^2-b^2 \sec ^2(c+d x)\right )}d(b \sec (c+d x))}{2 b^2}\right )}{2 b^2}+\frac {a^2+2 a b \sec (c+d x)+b^2}{4 b^2 \left (b^2-b^2 \sec ^2(c+d x)\right )^2}\right )}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {b^6 \left (\frac {a \left (\frac {\int \frac {\cos (c+d x) (4 a+3 b \sec (c+d x))}{b \left (b^2-b^2 \sec ^2(c+d x)\right )}d(b \sec (c+d x))}{2 b^2}+\frac {2 a+3 b \sec (c+d x)}{2 b^2 \left (b^2-b^2 \sec ^2(c+d x)\right )}\right )}{2 b^2}+\frac {a^2+2 a b \sec (c+d x)+b^2}{4 b^2 \left (b^2-b^2 \sec ^2(c+d x)\right )^2}\right )}{d}\) |
\(\Big \downarrow \) 523 |
\(\displaystyle -\frac {b^6 \left (\frac {a \left (\frac {\int \left (\frac {3 b-4 a}{2 b^2 (\sec (c+d x) b+b)}+\frac {4 a \cos (c+d x)}{b^3}+\frac {4 a+3 b}{2 b^2 (b-b \sec (c+d x))}\right )d(b \sec (c+d x))}{2 b^2}+\frac {2 a+3 b \sec (c+d x)}{2 b^2 \left (b^2-b^2 \sec ^2(c+d x)\right )}\right )}{2 b^2}+\frac {a^2+2 a b \sec (c+d x)+b^2}{4 b^2 \left (b^2-b^2 \sec ^2(c+d x)\right )^2}\right )}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {b^6 \left (\frac {a^2+2 a b \sec (c+d x)+b^2}{4 b^2 \left (b^2-b^2 \sec ^2(c+d x)\right )^2}+\frac {a \left (\frac {2 a+3 b \sec (c+d x)}{2 b^2 \left (b^2-b^2 \sec ^2(c+d x)\right )}+\frac {\frac {4 a \log (b \sec (c+d x))}{b^2}-\frac {(4 a+3 b) \log (b-b \sec (c+d x))}{2 b^2}-\frac {(4 a-3 b) \log (b \sec (c+d x)+b)}{2 b^2}}{2 b^2}\right )}{2 b^2}\right )}{d}\) |
Input:
Int[Cot[c + d*x]^5*(a + b*Sec[c + d*x])^2,x]
Output:
-((b^6*((a^2 + b^2 + 2*a*b*Sec[c + d*x])/(4*b^2*(b^2 - b^2*Sec[c + d*x]^2) ^2) + (a*(((4*a*Log[b*Sec[c + d*x]])/b^2 - ((4*a + 3*b)*Log[b - b*Sec[c + d*x]])/(2*b^2) - ((4*a - 3*b)*Log[b + b*Sec[c + d*x]])/(2*b^2))/(2*b^2) + (2*a + 3*b*Sec[c + d*x])/(2*b^2*(b^2 - b^2*Sec[c + d*x]^2))))/(2*b^2)))/d)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((x_)^(m_.)*((c_) + (d_.)*(x_)))/((a_) + (b_.)*(x_)^2), x_Symbol] :> In t[ExpandIntegrand[x^m*((c + d*x)/(a + b*x^2)), x], x] /; FreeQ[{a, b, c, d} , x] && IntegerQ[m]
Int[(x_)^(m_)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbo l] :> With[{Qx = PolynomialQuotient[x^m*(c + d*x)^n, a + b*x^2, x], e = Coe ff[PolynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 0], f = Coeff[Pol ynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 1]}, Simp[(a*f - b*e*x) *((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1)) Int[x^m *(a + b*x^2)^(p + 1)*ExpandToSum[2*a*(p + 1)*(Qx/x^m) + e*((2*p + 3)/x^m), x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGtQ[n, 0] && ILtQ[m, 0] && LtQ[p, -1] && IntegerQ[2*p]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Simp[-(-1)^((m - 1)/2)/(d*b^(m - 1)) Subst[Int[(b^2 - x^ 2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]
Time = 0.81 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.08
method | result | size |
derivativedivides | \(\frac {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 )+2 a b \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 )-\frac {b^{2} \cos \left (d x +c \right )^{4}}{4 \sin \left (d x +c \right )^{4}}}{d}\) | \(136\) |
default | \(\frac {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 )+2 a b \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 )-\frac {b^{2} \cos \left (d x +c \right )^{4}}{4 \sin \left (d x +c \right )^{4}}}{d}\) | \(136\) |
risch | \(-i a^{2} x -\frac {2 i a^{2} c}{d}-\frac {5 a b \,{\mathrm e}^{7 i \left (d x +c \right )}+8 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+4 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+3 a b \,{\mathrm e}^{5 i \left (d x +c \right )}-8 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+3 a b \,{\mathrm e}^{3 i \left (d x +c \right )}+8 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+4 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+5 a b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) a b}{4 d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) a b}{4 d}\) | \(236\) |
Input:
int(cot(d*x+c)^5*(a+b*sec(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(-1/4*cot(d*x+c)^4+1/2*cot(d*x+c)^2+ln(sin(d*x+c)))+2*a*b*(-1/4/s in(d*x+c)^4*cos(d*x+c)^5+1/8/sin(d*x+c)^2*cos(d*x+c)^5+1/8*cos(d*x+c)^3+3/ 8*cos(d*x+c)+3/8*ln(csc(d*x+c)-cot(d*x+c)))-1/4*b^2/sin(d*x+c)^4*cos(d*x+c )^4)
Time = 0.12 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.61 \[ \int \cot ^5(c+d x) (a+b \sec (c+d x))^2 \, dx=-\frac {10 \, a b \cos \left (d x + c\right )^{3} - 6 \, a b \cos \left (d x + c\right ) + 4 \, {\left (2 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} - 6 \, a^{2} - 2 \, b^{2} - {\left ({\left (4 \, a^{2} - 3 \, a b\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (4 \, a^{2} - 3 \, a b\right )} \cos \left (d x + c\right )^{2} + 4 \, a^{2} - 3 \, a b\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left ({\left (4 \, a^{2} + 3 \, a b\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (4 \, a^{2} + 3 \, a b\right )} \cos \left (d x + c\right )^{2} + 4 \, a^{2} + 3 \, a b\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 )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \] Input:
integrate(cot(d*x+c)^5*(a+b*sec(d*x+c))^2,x, algorithm="fricas")
Output:
-1/8*(10*a*b*cos(d*x + c)^3 - 6*a*b*cos(d*x + c) + 4*(2*a^2 + b^2)*cos(d*x + c)^2 - 6*a^2 - 2*b^2 - ((4*a^2 - 3*a*b)*cos(d*x + c)^4 - 2*(4*a^2 - 3*a *b)*cos(d*x + c)^2 + 4*a^2 - 3*a*b)*log(1/2*cos(d*x + c) + 1/2) - ((4*a^2 + 3*a*b)*cos(d*x + c)^4 - 2*(4*a^2 + 3*a*b)*cos(d*x + c)^2 + 4*a^2 + 3*a*b )*log(-1/2*cos(d*x + c) + 1/2))/(d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + d )
\[ \int \cot ^5(c+d x) (a+b \sec (c+d x))^2 \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{2} \cot ^{5}{\left (c + d x \right )}\, dx \] Input:
integrate(cot(d*x+c)**5*(a+b*sec(d*x+c))**2,x)
Output:
Integral((a + b*sec(c + d*x))**2*cot(c + d*x)**5, x)
Time = 0.04 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.97 \[ \int \cot ^5(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {{\left (4 \, a^{2} - 3 \, a b\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) + {\left (4 \, a^{2} + 3 \, a b\right )} \log \left (\cos \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (5 \, a b \cos \left (d x + c\right )^{3} - 3 \, a b \cos \left (d x + c\right ) + 2 \, {\left (2 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} - 3 \, a^{2} - b^{2}\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1}}{8 \, d} \] Input:
integrate(cot(d*x+c)^5*(a+b*sec(d*x+c))^2,x, algorithm="maxima")
Output:
1/8*((4*a^2 - 3*a*b)*log(cos(d*x + c) + 1) + (4*a^2 + 3*a*b)*log(cos(d*x + c) - 1) - 2*(5*a*b*cos(d*x + c)^3 - 3*a*b*cos(d*x + c) + 2*(2*a^2 + b^2)* cos(d*x + c)^2 - 3*a^2 - b^2)/(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1))/d
Time = 0.13 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.02 \[ \int \cot ^5(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {{\left (4 \, a^{2} - 3 \, a b\right )} \log \left ({\left | \cos \left (d x + c\right ) + 1 \right |}\right )}{8 \, d} + \frac {{\left (4 \, a^{2} + 3 \, a b\right )} \log \left ({\left | \cos \left (d x + c\right ) - 1 \right |}\right )}{8 \, d} - \frac {5 \, a b \cos \left (d x + c\right )^{3} - 3 \, a b \cos \left (d x + c\right ) + 2 \, {\left (2 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} - 3 \, a^{2} - b^{2}}{4 \, d {\left (\cos \left (d x + c\right ) + 1\right )}^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}} \] Input:
integrate(cot(d*x+c)^5*(a+b*sec(d*x+c))^2,x, algorithm="giac")
Output:
1/8*(4*a^2 - 3*a*b)*log(abs(cos(d*x + c) + 1))/d + 1/8*(4*a^2 + 3*a*b)*log (abs(cos(d*x + c) - 1))/d - 1/4*(5*a*b*cos(d*x + c)^3 - 3*a*b*cos(d*x + c) + 2*(2*a^2 + b^2)*cos(d*x + c)^2 - 3*a^2 - b^2)/(d*(cos(d*x + c) + 1)^2*( cos(d*x + c) - 1)^2)
Time = 10.26 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.30 \[ \int \cot ^5(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {5\,a^2}{32}-\frac {3\,a\,b}{16}+\frac {b^2}{32}+\frac {{\left (a-b\right )}^2}{32}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\left (a-b\right )}^2}{64\,d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a^2+\frac {3\,b\,a}{4}\right )}{d}-\frac {a^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {a\,b}{2}+\frac {a^2}{4}+\frac {b^2}{4}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (3\,a^2+4\,a\,b+b^2\right )\right )}{16\,d} \] Input:
int(cot(c + d*x)^5*(a + b/cos(c + d*x))^2,x)
Output:
(tan(c/2 + (d*x)/2)^2*((5*a^2)/32 - (3*a*b)/16 + b^2/32 + (a - b)^2/32))/d - (tan(c/2 + (d*x)/2)^4*(a - b)^2)/(64*d) + (log(tan(c/2 + (d*x)/2))*((3* a*b)/4 + a^2))/d - (a^2*log(tan(c/2 + (d*x)/2)^2 + 1))/d - (cot(c/2 + (d*x )/2)^4*((a*b)/2 + a^2/4 + b^2/4 - tan(c/2 + (d*x)/2)^2*(4*a*b + 3*a^2 + b^ 2)))/(16*d)
Time = 0.15 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.40 \[ \int \cot ^5(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {40 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a b -16 \cos \left (d x +c \right ) a b -32 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{4} a^{2}+32 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4} a^{2}+24 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4} a b -13 \sin \left (d x +c \right )^{4} a^{2}-5 \sin \left (d x +c \right )^{4} b^{2}+32 \sin \left (d x +c \right )^{2} a^{2}+16 \sin \left (d x +c \right )^{2} b^{2}-8 a^{2}-8 b^{2}}{32 \sin \left (d x +c \right )^{4} d} \] Input:
int(cot(d*x+c)^5*(a+b*sec(d*x+c))^2,x)
Output:
(40*cos(c + d*x)*sin(c + d*x)**2*a*b - 16*cos(c + d*x)*a*b - 32*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**4*a**2 + 32*log(tan((c + d*x)/2))*sin(c + d*x)**4*a**2 + 24*log(tan((c + d*x)/2))*sin(c + d*x)**4*a*b - 13*sin(c + d*x)**4*a**2 - 5*sin(c + d*x)**4*b**2 + 32*sin(c + d*x)**2*a**2 + 16*sin(c + d*x)**2*b**2 - 8*a**2 - 8*b**2)/(32*sin(c + d*x)**4*d)