\(\int \cot ^6(c+d x) (a+a \sin (c+d x)) \, dx\) [13]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 117 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x)) \, dx=-a x-\frac {15 a \text {arctanh}(\cos (c+d x))}{8 d}+\frac {a \cos (c+d x)}{d}-\frac {a \cot (c+d x)}{d}+\frac {a \cot ^3(c+d x)}{3 d}-\frac {a \cot ^5(c+d x)}{5 d}+\frac {9 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d} \] Output:

-a*x-15/8*a*arctanh(cos(d*x+c))/d+a*cos(d*x+c)/d-a*cot(d*x+c)/d+1/3*a*cot( 
d*x+c)^3/d-1/5*a*cot(d*x+c)^5/d+9/8*a*cot(d*x+c)*csc(d*x+c)/d-1/4*a*cot(d* 
x+c)*csc(d*x+c)^3/d
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.27 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.40 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \cos (c+d x)}{d}+\frac {9 a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {a \cot ^5(c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {5}{2},1,-\frac {3}{2},-\tan ^2(c+d x)\right )}{5 d}-\frac {15 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {15 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {9 a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d} \] Input:

Integrate[Cot[c + d*x]^6*(a + a*Sin[c + d*x]),x]
 

Output:

(a*Cos[c + d*x])/d + (9*a*Csc[(c + d*x)/2]^2)/(32*d) - (a*Csc[(c + d*x)/2] 
^4)/(64*d) - (a*Cot[c + d*x]^5*Hypergeometric2F1[-5/2, 1, -3/2, -Tan[c + d 
*x]^2])/(5*d) - (15*a*Log[Cos[(c + d*x)/2]])/(8*d) + (15*a*Log[Sin[(c + d* 
x)/2]])/(8*d) - (9*a*Sec[(c + d*x)/2]^2)/(32*d) + (a*Sec[(c + d*x)/2]^4)/( 
64*d)
 

Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.04, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 3189, 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 \sin (c+d x)+a) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {a \sin (c+d x)+a}{\tan (c+d x)^6}dx\)

\(\Big \downarrow \) 3189

\(\displaystyle \int \left (a \cot ^6(c+d x)+a \cos (c+d x) \cot ^5(c+d x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {15 a \text {arctanh}(\cos (c+d x))}{8 d}+\frac {15 a \cos (c+d x)}{8 d}-\frac {a \cot ^5(c+d x)}{5 d}+\frac {a \cot ^3(c+d x)}{3 d}-\frac {a \cot (c+d x)}{d}-\frac {a \cos (c+d x) \cot ^4(c+d x)}{4 d}+\frac {5 a \cos (c+d x) \cot ^2(c+d x)}{8 d}-a x\)

Input:

Int[Cot[c + d*x]^6*(a + a*Sin[c + d*x]),x]
 

Output:

-(a*x) - (15*a*ArcTanh[Cos[c + d*x]])/(8*d) + (15*a*Cos[c + d*x])/(8*d) - 
(a*Cot[c + d*x])/d + (5*a*Cos[c + d*x]*Cot[c + d*x]^2)/(8*d) + (a*Cot[c + 
d*x]^3)/(3*d) - (a*Cos[c + d*x]*Cot[c + d*x]^4)/(4*d) - (a*Cot[c + d*x]^5) 
/(5*d)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3189
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( 
x_)])^(p_.), x_Symbol] :> Int[ExpandIntegrand[(g*Tan[e + f*x])^p, (a + b*Si 
n[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] 
&& IGtQ[m, 0]
 
Maple [A] (verified)

Time = 1.20 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.10

method result size
derivativedivides \(\frac {a \left (-\frac {\cos \left (d x +c \right )^{7}}{4 \sin \left (d x +c \right )^{4}}+\frac {3 \cos \left (d x +c \right )^{7}}{8 \sin \left (d x +c \right )^{2}}+\frac {3 \cos \left (d x +c \right )^{5}}{8}+\frac {5 \cos \left (d x +c \right )^{3}}{8}+\frac {15 \cos \left (d x +c \right )}{8}+\frac {15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+a \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}\) \(129\)
default \(\frac {a \left (-\frac {\cos \left (d x +c \right )^{7}}{4 \sin \left (d x +c \right )^{4}}+\frac {3 \cos \left (d x +c \right )^{7}}{8 \sin \left (d x +c \right )^{2}}+\frac {3 \cos \left (d x +c \right )^{5}}{8}+\frac {5 \cos \left (d x +c \right )^{3}}{8}+\frac {15 \cos \left (d x +c \right )}{8}+\frac {15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+a \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}\) \(129\)
risch \(-a x +\frac {a \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {a \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}-\frac {a \left (360 i {\mathrm e}^{8 i \left (d x +c \right )}+135 \,{\mathrm e}^{9 i \left (d x +c \right )}-720 i {\mathrm e}^{6 i \left (d x +c \right )}-150 \,{\mathrm e}^{7 i \left (d x +c \right )}+1120 i {\mathrm e}^{4 i \left (d x +c \right )}-560 i {\mathrm e}^{2 i \left (d x +c \right )}+150 \,{\mathrm e}^{3 i \left (d x +c \right )}+184 i-135 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}-\frac {15 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}+\frac {15 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}\) \(186\)

Input:

int(cot(d*x+c)^6*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
 

Output:

1/d*(a*(-1/4/sin(d*x+c)^4*cos(d*x+c)^7+3/8/sin(d*x+c)^2*cos(d*x+c)^7+3/8*c 
os(d*x+c)^5+5/8*cos(d*x+c)^3+15/8*cos(d*x+c)+15/8*ln(csc(d*x+c)-cot(d*x+c) 
))+a*(-1/5*cot(d*x+c)^5+1/3*cot(d*x+c)^3-cot(d*x+c)-d*x-c))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 222 vs. \(2 (107) = 214\).

Time = 0.10 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.90 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {368 \, a \cos \left (d x + c\right )^{5} - 560 \, a \cos \left (d x + c\right )^{3} + 225 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 225 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 240 \, a \cos \left (d x + c\right ) + 30 \, {\left (8 \, a d x \cos \left (d x + c\right )^{4} - 8 \, a \cos \left (d x + c\right )^{5} - 16 \, a d x \cos \left (d x + c\right )^{2} + 25 \, a \cos \left (d x + c\right )^{3} + 8 \, a d x - 15 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, {\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+a*sin(d*x+c)),x, algorithm="fricas")
 

Output:

-1/240*(368*a*cos(d*x + c)^5 - 560*a*cos(d*x + c)^3 + 225*(a*cos(d*x + c)^ 
4 - 2*a*cos(d*x + c)^2 + a)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 225 
*(a*cos(d*x + c)^4 - 2*a*cos(d*x + c)^2 + a)*log(-1/2*cos(d*x + c) + 1/2)* 
sin(d*x + c) + 240*a*cos(d*x + c) + 30*(8*a*d*x*cos(d*x + c)^4 - 8*a*cos(d 
*x + c)^5 - 16*a*d*x*cos(d*x + c)^2 + 25*a*cos(d*x + c)^3 + 8*a*d*x - 15*a 
*cos(d*x + c))*sin(d*x + c))/((d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + d)* 
sin(d*x + c))
 

Sympy [F]

\[ \int \cot ^6(c+d x) (a+a \sin (c+d x)) \, dx=a \left (\int \sin {\left (c + d x \right )} \cot ^{6}{\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*sin(d*x+c)),x)
 

Output:

a*(Integral(sin(c + d*x)*cot(c + d*x)**6, x) + Integral(cot(c + d*x)**6, x 
))
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.07 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {16 \, {\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 + 15 \, a {\left (\frac {2 \, {\left (9 \, \cos \left (d x + c\right )^{3} - 7 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - 16 \, \cos \left (d x + c\right ) + 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{240 \, d} \] Input:

integrate(cot(d*x+c)^6*(a+a*sin(d*x+c)),x, algorithm="maxima")
 

Output:

-1/240*(16*(15*d*x + 15*c + (15*tan(d*x + c)^4 - 5*tan(d*x + c)^2 + 3)/tan 
(d*x + c)^5)*a + 15*a*(2*(9*cos(d*x + c)^3 - 7*cos(d*x + c))/(cos(d*x + c) 
^4 - 2*cos(d*x + c)^2 + 1) - 16*cos(d*x + c) + 15*log(cos(d*x + c) + 1) - 
15*log(cos(d*x + c) - 1)))/d
 

Giac [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.70 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x)) \, dx=\frac {6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 70 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 240 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 960 \, {\left (d x + c\right )} a + 1800 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 660 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {1920 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} - \frac {4110 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 660 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 240 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 70 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{960 \, d} \] Input:

integrate(cot(d*x+c)^6*(a+a*sin(d*x+c)),x, algorithm="giac")
 

Output:

1/960*(6*a*tan(1/2*d*x + 1/2*c)^5 + 15*a*tan(1/2*d*x + 1/2*c)^4 - 70*a*tan 
(1/2*d*x + 1/2*c)^3 - 240*a*tan(1/2*d*x + 1/2*c)^2 - 960*(d*x + c)*a + 180 
0*a*log(abs(tan(1/2*d*x + 1/2*c))) + 660*a*tan(1/2*d*x + 1/2*c) + 1920*a/( 
tan(1/2*d*x + 1/2*c)^2 + 1) - (4110*a*tan(1/2*d*x + 1/2*c)^5 + 660*a*tan(1 
/2*d*x + 1/2*c)^4 - 240*a*tan(1/2*d*x + 1/2*c)^3 - 70*a*tan(1/2*d*x + 1/2* 
c)^2 + 15*a*tan(1/2*d*x + 1/2*c) + 6*a)/tan(1/2*d*x + 1/2*c)^5)/d
 

Mupad [B] (verification not implemented)

Time = 17.15 (sec) , antiderivative size = 291, normalized size of antiderivative = 2.49 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x)) \, dx=\frac {11\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d}-\frac {22\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-72\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {59\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-\frac {15\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}-\frac {32\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{15}+\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}+\frac {a}{5}}{d\,\left (32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{4\,d}-\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{96\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}+\frac {15\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}+\frac {2\,a\,\mathrm {atan}\left (\frac {4\,a^2}{\frac {15\,a^2}{2}+4\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {15\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,\left (\frac {15\,a^2}{2}+4\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}\right )}{d} \] Input:

int(cot(c + d*x)^6*(a + a*sin(c + d*x)),x)
 

Output:

(11*a*tan(c/2 + (d*x)/2))/(16*d) - (a/5 + (a*tan(c/2 + (d*x)/2))/2 - (32*a 
*tan(c/2 + (d*x)/2)^2)/15 - (15*a*tan(c/2 + (d*x)/2)^3)/2 + (59*a*tan(c/2 
+ (d*x)/2)^4)/3 - 72*a*tan(c/2 + (d*x)/2)^5 + 22*a*tan(c/2 + (d*x)/2)^6)/( 
d*(32*tan(c/2 + (d*x)/2)^5 + 32*tan(c/2 + (d*x)/2)^7)) - (a*tan(c/2 + (d*x 
)/2)^2)/(4*d) - (7*a*tan(c/2 + (d*x)/2)^3)/(96*d) + (a*tan(c/2 + (d*x)/2)^ 
4)/(64*d) + (a*tan(c/2 + (d*x)/2)^5)/(160*d) + (15*a*log(tan(c/2 + (d*x)/2 
)))/(8*d) + (2*a*atan((4*a^2)/((15*a^2)/2 + 4*a^2*tan(c/2 + (d*x)/2)) - (1 
5*a^2*tan(c/2 + (d*x)/2))/(2*((15*a^2)/2 + 4*a^2*tan(c/2 + (d*x)/2)))))/d
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.18 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \left (-6 \cos \left (d x +c \right ) \cot \left (d x +c \right )^{4}+33 \cos \left (d x +c \right ) \cot \left (d x +c \right )^{2}+159 \cos \left (d x +c \right )-24 \cot \left (d x +c \right )^{5} \sin \left (d x +c \right )-24 \cot \left (d x +c \right )^{5}+42 \cot \left (d x +c \right )^{3} \sin \left (d x +c \right )+40 \cot \left (d x +c \right )^{3}+66 \cot \left (d x +c \right ) \sin \left (d x +c \right )-120 \cot \left (d x +c \right )+225 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-120 d x -225\right )}{120 d} \] Input:

int(cot(d*x+c)^6*(a+a*sin(d*x+c)),x)
 

Output:

(a*( - 6*cos(c + d*x)*cot(c + d*x)**4 + 33*cos(c + d*x)*cot(c + d*x)**2 + 
159*cos(c + d*x) - 24*cot(c + d*x)**5*sin(c + d*x) - 24*cot(c + d*x)**5 + 
42*cot(c + d*x)**3*sin(c + d*x) + 40*cot(c + d*x)**3 + 66*cot(c + d*x)*sin 
(c + d*x) - 120*cot(c + d*x) + 225*log(tan((c + d*x)/2)) - 120*d*x - 225)) 
/(120*d)