Integrand size = 21, antiderivative size = 169 \[ \int \cot ^9(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^2}{32 d (1-\cos (c+d x))^4}+\frac {11 a^2}{48 d (1-\cos (c+d x))^3}-\frac {3 a^2}{4 d (1-\cos (c+d x))^2}+\frac {51 a^2}{32 d (1-\cos (c+d x))}-\frac {a^2}{64 d (1+\cos (c+d x))^2}+\frac {9 a^2}{64 d (1+\cos (c+d x))}+\frac {99 a^2 \log (1-\cos (c+d x))}{128 d}+\frac {29 a^2 \log (1+\cos (c+d x))}{128 d} \] Output:
-1/32*a^2/d/(1-cos(d*x+c))^4+11/48*a^2/d/(1-cos(d*x+c))^3-3/4*a^2/d/(1-cos (d*x+c))^2+51/32*a^2/d/(1-cos(d*x+c))-1/64*a^2/d/(1+cos(d*x+c))^2+9/64*a^2 /d/(1+cos(d*x+c))+99/128*a^2*ln(1-cos(d*x+c))/d+29/128*a^2*ln(1+cos(d*x+c) )/d
Time = 0.23 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.86 \[ \int \cot ^9(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^2 (1+\cos (c+d x))^2 \sec ^4\left (\frac {1}{2} (c+d x)\right ) \left (-1224 \csc ^2\left (\frac {1}{2} (c+d x)\right )+288 \csc ^4\left (\frac {1}{2} (c+d x)\right )-44 \csc ^6\left (\frac {1}{2} (c+d x)\right )+3 \csc ^8\left (\frac {1}{2} (c+d x)\right )-6 \left (116 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+396 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+18 \sec ^2\left (\frac {1}{2} (c+d x)\right )-\sec ^4\left (\frac {1}{2} (c+d x)\right )\right )\right )}{6144 d} \] Input:
Integrate[Cot[c + d*x]^9*(a + a*Sec[c + d*x])^2,x]
Output:
-1/6144*(a^2*(1 + Cos[c + d*x])^2*Sec[(c + d*x)/2]^4*(-1224*Csc[(c + d*x)/ 2]^2 + 288*Csc[(c + d*x)/2]^4 - 44*Csc[(c + d*x)/2]^6 + 3*Csc[(c + d*x)/2] ^8 - 6*(116*Log[Cos[(c + d*x)/2]] + 396*Log[Sin[(c + d*x)/2]] + 18*Sec[(c + d*x)/2]^2 - Sec[(c + d*x)/2]^4)))/d
Time = 0.32 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.76, 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 ^9(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 )^9}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 )^9}dx\) |
\(\Big \downarrow \) 4367 |
\(\displaystyle -\frac {a^{10} \int \frac {\cos ^7(c+d x)}{a^8 (1-\cos (c+d x))^5 (\cos (c+d x)+1)^3}d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a^2 \int \frac {\cos ^7(c+d x)}{(1-\cos (c+d x))^5 (\cos (c+d x)+1)^3}d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 99 |
\(\displaystyle -\frac {a^2 \int \left (-\frac {29}{128 (\cos (c+d x)+1)}+\frac {9}{64 (\cos (c+d x)+1)^2}-\frac {1}{32 (\cos (c+d x)+1)^3}-\frac {99}{128 (\cos (c+d x)-1)}-\frac {51}{32 (\cos (c+d x)-1)^2}-\frac {3}{2 (\cos (c+d x)-1)^3}-\frac {11}{16 (\cos (c+d x)-1)^4}-\frac {1}{8 (\cos (c+d x)-1)^5}\right )d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a^2 \left (-\frac {51}{32 (1-\cos (c+d x))}-\frac {9}{64 (\cos (c+d x)+1)}+\frac {3}{4 (1-\cos (c+d x))^2}+\frac {1}{64 (\cos (c+d x)+1)^2}-\frac {11}{48 (1-\cos (c+d x))^3}+\frac {1}{32 (1-\cos (c+d x))^4}-\frac {99}{128} \log (1-\cos (c+d x))-\frac {29}{128} \log (\cos (c+d x)+1)\right )}{d}\) |
Input:
Int[Cot[c + d*x]^9*(a + a*Sec[c + d*x])^2,x]
Output:
-((a^2*(1/(32*(1 - Cos[c + d*x])^4) - 11/(48*(1 - Cos[c + d*x])^3) + 3/(4* (1 - Cos[c + d*x])^2) - 51/(32*(1 - Cos[c + d*x])) + 1/(64*(1 + Cos[c + d* x])^2) - 9/(64*(1 + Cos[c + d*x])) - (99*Log[1 - Cos[c + d*x]])/128 - (29* Log[1 + Cos[c + d*x]])/128))/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]
Time = 2.76 (sec) , antiderivative size = 213, normalized size of antiderivative = 1.26
method | result | size |
derivativedivides | \(\frac {-\frac {a^{2} \cos \left (d x +c \right )^{8}}{8 \sin \left (d x +c \right )^{8}}+2 a^{2} \left (-\frac {\cos \left (d x +c \right )^{9}}{8 \sin \left (d x +c \right )^{8}}+\frac {\cos \left (d x +c \right )^{9}}{48 \sin \left (d x +c \right )^{6}}-\frac {\cos \left (d x +c \right )^{9}}{64 \sin \left (d x +c \right )^{4}}+\frac {5 \cos \left (d x +c \right )^{9}}{128 \sin \left (d x +c \right )^{2}}+\frac {5 \cos \left (d x +c \right )^{7}}{128}+\frac {7 \cos \left (d x +c \right )^{5}}{128}+\frac {35 \cos \left (d x +c \right )^{3}}{384}+\frac {35 \cos \left (d x +c \right )}{128}+\frac {35 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{128}\right )+a^{2} \left (-\frac {\cot \left (d x +c \right )^{8}}{8}+\frac {\cot \left (d x +c \right )^{6}}{6}-\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}\) | \(213\) |
default | \(\frac {-\frac {a^{2} \cos \left (d x +c \right )^{8}}{8 \sin \left (d x +c \right )^{8}}+2 a^{2} \left (-\frac {\cos \left (d x +c \right )^{9}}{8 \sin \left (d x +c \right )^{8}}+\frac {\cos \left (d x +c \right )^{9}}{48 \sin \left (d x +c \right )^{6}}-\frac {\cos \left (d x +c \right )^{9}}{64 \sin \left (d x +c \right )^{4}}+\frac {5 \cos \left (d x +c \right )^{9}}{128 \sin \left (d x +c \right )^{2}}+\frac {5 \cos \left (d x +c \right )^{7}}{128}+\frac {7 \cos \left (d x +c \right )^{5}}{128}+\frac {35 \cos \left (d x +c \right )^{3}}{384}+\frac {35 \cos \left (d x +c \right )}{128}+\frac {35 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{128}\right )+a^{2} \left (-\frac {\cot \left (d x +c \right )^{8}}{8}+\frac {\cot \left (d x +c \right )^{6}}{6}-\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}\) | \(213\) |
risch | \(-i a^{2} x -\frac {2 i a^{2} c}{d}-\frac {a^{2} \left (279 \,{\mathrm e}^{11 i \left (d x +c \right )}-156 \,{\mathrm e}^{10 i \left (d x +c \right )}-1141 \,{\mathrm e}^{9 i \left (d x +c \right )}+2080 \,{\mathrm e}^{8 i \left (d x +c \right )}+670 \,{\mathrm e}^{7 i \left (d x +c \right )}-2696 \,{\mathrm e}^{6 i \left (d x +c \right )}+670 \,{\mathrm e}^{5 i \left (d x +c \right )}+2080 \,{\mathrm e}^{4 i \left (d x +c \right )}-1141 \,{\mathrm e}^{3 i \left (d x +c \right )}-156 \,{\mathrm e}^{2 i \left (d x +c \right )}+279 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{96 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{8} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{4}}+\frac {99 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{64 d}+\frac {29 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{64 d}\) | \(215\) |
Input:
int(cot(d*x+c)^9*(a+a*sec(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(-1/8*a^2/sin(d*x+c)^8*cos(d*x+c)^8+2*a^2*(-1/8/sin(d*x+c)^8*cos(d*x+c )^9+1/48/sin(d*x+c)^6*cos(d*x+c)^9-1/64/sin(d*x+c)^4*cos(d*x+c)^9+5/128/si n(d*x+c)^2*cos(d*x+c)^9+5/128*cos(d*x+c)^7+7/128*cos(d*x+c)^5+35/384*cos(d *x+c)^3+35/128*cos(d*x+c)+35/128*ln(csc(d*x+c)-cot(d*x+c)))+a^2*(-1/8*cot( d*x+c)^8+1/6*cot(d*x+c)^6-1/4*cot(d*x+c)^4+1/2*cot(d*x+c)^2+ln(sin(d*x+c)) ))
Leaf count of result is larger than twice the leaf count of optimal. 322 vs. \(2 (145) = 290\).
Time = 0.13 (sec) , antiderivative size = 322, normalized size of antiderivative = 1.91 \[ \int \cot ^9(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {558 \, a^{2} \cos \left (d x + c\right )^{5} - 156 \, a^{2} \cos \left (d x + c\right )^{4} - 1268 \, a^{2} \cos \left (d x + c\right )^{3} + 676 \, a^{2} \cos \left (d x + c\right )^{2} + 686 \, a^{2} \cos \left (d x + c\right ) - 448 \, a^{2} - 87 \, {\left (a^{2} \cos \left (d x + c\right )^{6} - 2 \, a^{2} \cos \left (d x + c\right )^{5} - a^{2} \cos \left (d x + c\right )^{4} + 4 \, a^{2} \cos \left (d x + c\right )^{3} - 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 ) - 297 \, {\left (a^{2} \cos \left (d x + c\right )^{6} - 2 \, a^{2} \cos \left (d x + c\right )^{5} - a^{2} \cos \left (d x + c\right )^{4} + 4 \, a^{2} \cos \left (d x + c\right )^{3} - 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 )}{384 \, {\left (d \cos \left (d x + c\right )^{6} - 2 \, d \cos \left (d x + c\right )^{5} - d \cos \left (d x + c\right )^{4} + 4 \, d \cos \left (d x + c\right )^{3} - d \cos \left (d x + c\right )^{2} - 2 \, d \cos \left (d x + c\right ) + d\right )}} \] Input:
integrate(cot(d*x+c)^9*(a+a*sec(d*x+c))^2,x, algorithm="fricas")
Output:
-1/384*(558*a^2*cos(d*x + c)^5 - 156*a^2*cos(d*x + c)^4 - 1268*a^2*cos(d*x + c)^3 + 676*a^2*cos(d*x + c)^2 + 686*a^2*cos(d*x + c) - 448*a^2 - 87*(a^ 2*cos(d*x + c)^6 - 2*a^2*cos(d*x + c)^5 - a^2*cos(d*x + c)^4 + 4*a^2*cos(d *x + c)^3 - 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) - 297*(a^2*cos(d*x + c)^6 - 2*a^2*cos(d*x + c)^5 - a^2*cos(d* x + c)^4 + 4*a^2*cos(d*x + c)^3 - 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)^6 - 2*d*cos(d*x + c)^ 5 - d*cos(d*x + c)^4 + 4*d*cos(d*x + c)^3 - d*cos(d*x + c)^2 - 2*d*cos(d*x + c) + d)
Timed out. \[ \int \cot ^9(c+d x) (a+a \sec (c+d x))^2 \, dx=\text {Timed out} \] Input:
integrate(cot(d*x+c)**9*(a+a*sec(d*x+c))**2,x)
Output:
Timed out
Time = 0.04 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.98 \[ \int \cot ^9(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {87 \, a^{2} \log \left (\cos \left (d x + c\right ) + 1\right ) + 297 \, a^{2} \log \left (\cos \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (279 \, a^{2} \cos \left (d x + c\right )^{5} - 78 \, a^{2} \cos \left (d x + c\right )^{4} - 634 \, a^{2} \cos \left (d x + c\right )^{3} + 338 \, a^{2} \cos \left (d x + c\right )^{2} + 343 \, a^{2} \cos \left (d x + c\right ) - 224 \, a^{2}\right )}}{\cos \left (d x + c\right )^{6} - 2 \, \cos \left (d x + c\right )^{5} - \cos \left (d x + c\right )^{4} + 4 \, \cos \left (d x + c\right )^{3} - \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}}{384 \, d} \] Input:
integrate(cot(d*x+c)^9*(a+a*sec(d*x+c))^2,x, algorithm="maxima")
Output:
1/384*(87*a^2*log(cos(d*x + c) + 1) + 297*a^2*log(cos(d*x + c) - 1) - 2*(2 79*a^2*cos(d*x + c)^5 - 78*a^2*cos(d*x + c)^4 - 634*a^2*cos(d*x + c)^3 + 3 38*a^2*cos(d*x + c)^2 + 343*a^2*cos(d*x + c) - 224*a^2)/(cos(d*x + c)^6 - 2*cos(d*x + c)^5 - cos(d*x + c)^4 + 4*cos(d*x + c)^3 - cos(d*x + c)^2 - 2* cos(d*x + c) + 1))/d
Time = 0.17 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.66 \[ \int \cot ^9(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {1}{384} \, a^{2} {\left (\frac {87 \, \log \left ({\left | \cos \left (d x + c\right ) + 1 \right |}\right )}{d} + \frac {297 \, \log \left ({\left | \cos \left (d x + c\right ) - 1 \right |}\right )}{d} - \frac {2 \, {\left (279 \, \cos \left (d x + c\right )^{5} - 78 \, \cos \left (d x + c\right )^{4} - 634 \, \cos \left (d x + c\right )^{3} + 338 \, \cos \left (d x + c\right )^{2} + 343 \, \cos \left (d x + c\right ) - 224\right )}}{d {\left (\cos \left (d x + c\right ) + 1\right )}^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{4}}\right )} \] Input:
integrate(cot(d*x+c)^9*(a+a*sec(d*x+c))^2,x, algorithm="giac")
Output:
1/384*a^2*(87*log(abs(cos(d*x + c) + 1))/d + 297*log(abs(cos(d*x + c) - 1) )/d - 2*(279*cos(d*x + c)^5 - 78*cos(d*x + c)^4 - 634*cos(d*x + c)^3 + 338 *cos(d*x + c)^2 + 343*cos(d*x + c) - 224)/(d*(cos(d*x + c) + 1)^2*(cos(d*x + c) - 1)^4))
Time = 12.57 (sec) , antiderivative size = 149, normalized size of antiderivative = 0.88 \[ \int \cot ^9(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 )}^2}{16\,d}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{256\,d}+\frac {99\,a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{64\,d}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (32\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-\frac {29\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{4}+\frac {4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}-\frac {a^2}{8}\right )}{64\,d}-\frac {a^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d} \] Input:
int(cot(c + d*x)^9*(a + a/cos(c + d*x))^2,x)
Output:
(a^2*tan(c/2 + (d*x)/2)^2)/(16*d) - (a^2*tan(c/2 + (d*x)/2)^4)/(256*d) + ( 99*a^2*log(tan(c/2 + (d*x)/2)))/(64*d) + (cot(c/2 + (d*x)/2)^8*((4*a^2*tan (c/2 + (d*x)/2)^2)/3 - (29*a^2*tan(c/2 + (d*x)/2)^4)/4 + 32*a^2*tan(c/2 + (d*x)/2)^6 - a^2/8))/(64*d) - (a^2*log(tan(c/2 + (d*x)/2)^2 + 1))/d
Time = 0.16 (sec) , antiderivative size = 136, normalized size of antiderivative = 0.80 \[ \int \cot ^9(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^{2} \left (-1536 \,\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 )^{8}+2376 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+96 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+768 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-174 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+32 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-3\right )}{1536 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} d} \] Input:
int(cot(d*x+c)^9*(a+a*sec(d*x+c))^2,x)
Output:
(a**2*( - 1536*log(tan((c + d*x)/2)**2 + 1)*tan((c + d*x)/2)**8 + 2376*log (tan((c + d*x)/2))*tan((c + d*x)/2)**8 - 6*tan((c + d*x)/2)**12 + 96*tan(( c + d*x)/2)**10 + 768*tan((c + d*x)/2)**6 - 174*tan((c + d*x)/2)**4 + 32*t an((c + d*x)/2)**2 - 3))/(1536*tan((c + d*x)/2)**8*d)