\(\int \cos ^4(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x)) \, dx\) [577]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (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 = 27, antiderivative size = 117 \[ \int \cos ^4(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {15 a x}{8}-\frac {a \text {arctanh}(\cos (c+d x))}{d}+\frac {a \cos (c+d x)}{d}+\frac {a \cos ^3(c+d x)}{3 d}+\frac {a \cos ^5(c+d x)}{5 d}-\frac {a \cot (c+d x)}{d}-\frac {9 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos (c+d x) \sin ^3(c+d x)}{4 d} \] Output:

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

Mathematica [A] (verified)

Time = 0.51 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.84 \[ \int \cos ^4(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \left (900 c+900 d x-660 \cos (c+d x)-70 \cos (3 (c+d x))-6 \cos (5 (c+d x))+480 \cot (c+d x)+480 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-480 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+240 \sin (2 (c+d x))+15 \sin (4 (c+d x))\right )}{480 d} \] Input:

Integrate[Cos[c + d*x]^4*Cot[c + d*x]^2*(a + a*Sin[c + d*x]),x]
 

Output:

-1/480*(a*(900*c + 900*d*x - 660*Cos[c + d*x] - 70*Cos[3*(c + d*x)] - 6*Co 
s[5*(c + d*x)] + 480*Cot[c + d*x] + 480*Log[Cos[(c + d*x)/2]] - 480*Log[Si 
n[(c + d*x)/2]] + 240*Sin[2*(c + d*x)] + 15*Sin[4*(c + d*x)]))/d
 

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.09, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {3042, 3317, 3042, 25, 3071, 252, 252, 262, 216, 3072, 254, 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 \cos ^4(c+d x) \cot ^2(c+d x) (a \sin (c+d x)+a) \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3317

\(\displaystyle a \int \cos ^5(c+d x) \cot (c+d x)dx+a \int \cos ^4(c+d x) \cot ^2(c+d x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle a \int -\sin \left (c+d x+\frac {\pi }{2}\right )^5 \tan \left (c+d x+\frac {\pi }{2}\right )dx+a \int \sin \left (c+d x+\frac {\pi }{2}\right )^4 \tan \left (c+d x+\frac {\pi }{2}\right )^2dx\)

\(\Big \downarrow \) 25

\(\displaystyle a \int \sin \left (c+d x+\frac {\pi }{2}\right )^4 \tan \left (c+d x+\frac {\pi }{2}\right )^2dx-a \int \sin \left (\frac {1}{2} (2 c+\pi )+d x\right )^5 \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx\)

\(\Big \downarrow \) 3071

\(\displaystyle -\frac {a \int \frac {\cot ^6(c+d x)}{\left (\cot ^2(c+d x)+1\right )^3}d\cot (c+d x)}{d}-a \int \sin \left (\frac {1}{2} (2 c+\pi )+d x\right )^5 \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx\)

\(\Big \downarrow \) 252

\(\displaystyle -\frac {a \left (\frac {5}{4} \int \frac {\cot ^4(c+d x)}{\left (\cot ^2(c+d x)+1\right )^2}d\cot (c+d x)-\frac {\cot ^5(c+d x)}{4 \left (\cot ^2(c+d x)+1\right )^2}\right )}{d}-a \int \sin \left (\frac {1}{2} (2 c+\pi )+d x\right )^5 \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx\)

\(\Big \downarrow \) 252

\(\displaystyle -\frac {a \left (\frac {5}{4} \left (\frac {3}{2} \int \frac {\cot ^2(c+d x)}{\cot ^2(c+d x)+1}d\cot (c+d x)-\frac {\cot ^3(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )-\frac {\cot ^5(c+d x)}{4 \left (\cot ^2(c+d x)+1\right )^2}\right )}{d}-a \int \sin \left (\frac {1}{2} (2 c+\pi )+d x\right )^5 \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx\)

\(\Big \downarrow \) 262

\(\displaystyle -\frac {a \left (\frac {5}{4} \left (\frac {3}{2} \left (\cot (c+d x)-\int \frac {1}{\cot ^2(c+d x)+1}d\cot (c+d x)\right )-\frac {\cot ^3(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )-\frac {\cot ^5(c+d x)}{4 \left (\cot ^2(c+d x)+1\right )^2}\right )}{d}-a \int \sin \left (\frac {1}{2} (2 c+\pi )+d x\right )^5 \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx\)

\(\Big \downarrow \) 216

\(\displaystyle -a \int \sin \left (\frac {1}{2} (2 c+\pi )+d x\right )^5 \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx-\frac {a \left (\frac {5}{4} \left (\frac {3}{2} (\cot (c+d x)-\arctan (\cot (c+d x)))-\frac {\cot ^3(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )-\frac {\cot ^5(c+d x)}{4 \left (\cot ^2(c+d x)+1\right )^2}\right )}{d}\)

\(\Big \downarrow \) 3072

\(\displaystyle -\frac {a \int \frac {\cos ^6(c+d x)}{1-\cos ^2(c+d x)}d\cos (c+d x)}{d}-\frac {a \left (\frac {5}{4} \left (\frac {3}{2} (\cot (c+d x)-\arctan (\cot (c+d x)))-\frac {\cot ^3(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )-\frac {\cot ^5(c+d x)}{4 \left (\cot ^2(c+d x)+1\right )^2}\right )}{d}\)

\(\Big \downarrow \) 254

\(\displaystyle -\frac {a \int \left (-\cos ^4(c+d x)-\cos ^2(c+d x)+\frac {1}{1-\cos ^2(c+d x)}-1\right )d\cos (c+d x)}{d}-\frac {a \left (\frac {5}{4} \left (\frac {3}{2} (\cot (c+d x)-\arctan (\cot (c+d x)))-\frac {\cot ^3(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )-\frac {\cot ^5(c+d x)}{4 \left (\cot ^2(c+d x)+1\right )^2}\right )}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {a \left (\frac {5}{4} \left (\frac {3}{2} (\cot (c+d x)-\arctan (\cot (c+d x)))-\frac {\cot ^3(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )-\frac {\cot ^5(c+d x)}{4 \left (\cot ^2(c+d x)+1\right )^2}\right )}{d}-\frac {a \left (\text {arctanh}(\cos (c+d x))-\frac {1}{5} \cos ^5(c+d x)-\frac {1}{3} \cos ^3(c+d x)-\cos (c+d x)\right )}{d}\)

Input:

Int[Cos[c + d*x]^4*Cot[c + d*x]^2*(a + a*Sin[c + d*x]),x]
 

Output:

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

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 252
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x 
)^(m - 1)*((a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] - Simp[c^2*((m - 1)/(2*b* 
(p + 1)))   Int[(c*x)^(m - 2)*(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c 
}, x] && LtQ[p, -1] && GtQ[m, 1] &&  !ILtQ[(m + 2*p + 3)/2, 0] && IntBinomi 
alQ[a, b, c, 2, m, p, x]
 

rule 254
Int[(x_)^(m_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[x^m, 
 a + b*x^2, x], x] /; FreeQ[{a, b}, x] && IGtQ[m, 3]
 

rule 262
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) 
^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ 
(b*(m + 2*p + 1)))   Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b 
, c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c 
, 2, m, p, x]
 

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 3071
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S 
ymbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[b*(ff/f)   Subst[I 
nt[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, b*(Tan[e + f*x]/ff)], 
x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]
 

rule 3072
Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_ 
Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f   Subst[Int[ 
(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)], x 
]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]
 

rule 3317
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a   Int[(g*Co 
s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d   Int[(g*Cos[e + f*x])^ 
p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
 
Maple [A] (verified)

Time = 4.88 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.97

method result size
derivativedivides \(\frac {a \left (\frac {\cos \left (d x +c \right )^{5}}{5}+\frac {\cos \left (d x +c \right )^{3}}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+a \left (-\frac {\cos \left (d x +c \right )^{7}}{\sin \left (d x +c \right )}-\left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )-\frac {15 d x}{8}-\frac {15 c}{8}\right )}{d}\) \(114\)
default \(\frac {a \left (\frac {\cos \left (d x +c \right )^{5}}{5}+\frac {\cos \left (d x +c \right )^{3}}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+a \left (-\frac {\cos \left (d x +c \right )^{7}}{\sin \left (d x +c \right )}-\left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )-\frac {15 d x}{8}-\frac {15 c}{8}\right )}{d}\) \(114\)
risch \(-\frac {15 a x}{8}+\frac {i a \,{\mathrm e}^{2 i \left (d x +c \right )}}{4 d}+\frac {11 a \,{\mathrm e}^{i \left (d x +c \right )}}{16 d}+\frac {11 a \,{\mathrm e}^{-i \left (d x +c \right )}}{16 d}-\frac {i a \,{\mathrm e}^{-2 i \left (d x +c \right )}}{4 d}-\frac {2 i a}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}+\frac {a \cos \left (5 d x +5 c \right )}{80 d}-\frac {a \sin \left (4 d x +4 c \right )}{32 d}+\frac {7 a \cos \left (3 d x +3 c \right )}{48 d}\) \(168\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.10 \[ \int \cos ^4(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {30 \, a \cos \left (d x + c\right )^{5} + 75 \, a \cos \left (d x + c\right )^{3} - 60 \, a \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 60 \, a \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 225 \, a \cos \left (d x + c\right ) + {\left (24 \, a \cos \left (d x + c\right )^{5} + 40 \, a \cos \left (d x + c\right )^{3} - 225 \, a d x + 120 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \, d \sin \left (d x + c\right )} \] Input:

integrate(cos(d*x+c)^4*cot(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="fricas" 
)
 

Output:

1/120*(30*a*cos(d*x + c)^5 + 75*a*cos(d*x + c)^3 - 60*a*log(1/2*cos(d*x + 
c) + 1/2)*sin(d*x + c) + 60*a*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 
225*a*cos(d*x + c) + (24*a*cos(d*x + c)^5 + 40*a*cos(d*x + c)^3 - 225*a*d* 
x + 120*a*cos(d*x + c))*sin(d*x + c))/(d*sin(d*x + c))
 

Sympy [F]

\[ \int \cos ^4(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x)) \, dx=a \left (\int \cos ^{4}{\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )}\, dx + \int \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )}\, dx\right ) \] Input:

integrate(cos(d*x+c)**4*cot(d*x+c)**2*(a+a*sin(d*x+c)),x)
 

Output:

a*(Integral(cos(c + d*x)**4*cot(c + d*x)**2, x) + Integral(sin(c + d*x)*co 
s(c + d*x)**4*cot(c + d*x)**2, x))
 

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.03 \[ \int \cos ^4(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {4 \, {\left (6 \, \cos \left (d x + c\right )^{5} + 10 \, \cos \left (d x + c\right )^{3} + 30 \, \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 )} a - 15 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} + 25 \, \tan \left (d x + c\right )^{2} + 8}{\tan \left (d x + c\right )^{5} + 2 \, \tan \left (d x + c\right )^{3} + \tan \left (d x + c\right )}\right )} a}{120 \, d} \] Input:

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

Output:

1/120*(4*(6*cos(d*x + c)^5 + 10*cos(d*x + c)^3 + 30*cos(d*x + c) - 15*log( 
cos(d*x + c) + 1) + 15*log(cos(d*x + c) - 1))*a - 15*(15*d*x + 15*c + (15* 
tan(d*x + c)^4 + 25*tan(d*x + c)^2 + 8)/(tan(d*x + c)^5 + 2*tan(d*x + c)^3 
 + tan(d*x + c)))*a)/d
 

Giac [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.69 \[ \int \cos ^4(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {225 \, {\left (d x + c\right )} a - 120 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 60 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {60 \, {\left (2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} - \frac {2 \, {\left (135 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 360 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 150 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 720 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 1120 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 150 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 560 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 135 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 184 \, a\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{5}}}{120 \, d} \] Input:

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

Output:

-1/120*(225*(d*x + c)*a - 120*a*log(abs(tan(1/2*d*x + 1/2*c))) - 60*a*tan( 
1/2*d*x + 1/2*c) + 60*(2*a*tan(1/2*d*x + 1/2*c) + a)/tan(1/2*d*x + 1/2*c) 
- 2*(135*a*tan(1/2*d*x + 1/2*c)^9 + 360*a*tan(1/2*d*x + 1/2*c)^8 + 150*a*t 
an(1/2*d*x + 1/2*c)^7 + 720*a*tan(1/2*d*x + 1/2*c)^6 + 1120*a*tan(1/2*d*x 
+ 1/2*c)^4 - 150*a*tan(1/2*d*x + 1/2*c)^3 + 560*a*tan(1/2*d*x + 1/2*c)^2 - 
 135*a*tan(1/2*d*x + 1/2*c) + 184*a)/(tan(1/2*d*x + 1/2*c)^2 + 1)^5)/d
                                                                                    
                                                                                    
 

Mupad [B] (verification not implemented)

Time = 34.07 (sec) , antiderivative size = 313, normalized size of antiderivative = 2.68 \[ \int \cos ^4(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{2}+12\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+24\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-10\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {112\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{3}-15\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {56\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}-\frac {19\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+\frac {92\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{15}-a}{d\,\left (2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}+\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}+\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {15\,a\,\mathrm {atan}\left (\frac {225\,a^2}{16\,\left (\frac {15\,a^2}{2}+\frac {225\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}-\frac {15\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,\left (\frac {15\,a^2}{2}+\frac {225\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}\right )}{4\,d} \] Input:

int(cos(c + d*x)^4*cot(c + d*x)^2*(a + a*sin(c + d*x)),x)
 

Output:

((92*a*tan(c/2 + (d*x)/2))/15 - a - (19*a*tan(c/2 + (d*x)/2)^2)/2 + (56*a* 
tan(c/2 + (d*x)/2)^3)/3 - 15*a*tan(c/2 + (d*x)/2)^4 + (112*a*tan(c/2 + (d* 
x)/2)^5)/3 - 10*a*tan(c/2 + (d*x)/2)^6 + 24*a*tan(c/2 + (d*x)/2)^7 + 12*a* 
tan(c/2 + (d*x)/2)^9 + (7*a*tan(c/2 + (d*x)/2)^10)/2)/(d*(2*tan(c/2 + (d*x 
)/2) + 10*tan(c/2 + (d*x)/2)^3 + 20*tan(c/2 + (d*x)/2)^5 + 20*tan(c/2 + (d 
*x)/2)^7 + 10*tan(c/2 + (d*x)/2)^9 + 2*tan(c/2 + (d*x)/2)^11)) + (a*tan(c/ 
2 + (d*x)/2))/(2*d) + (a*log(tan(c/2 + (d*x)/2)))/d + (15*a*atan((225*a^2) 
/(16*((15*a^2)/2 + (225*a^2*tan(c/2 + (d*x)/2))/16)) - (15*a^2*tan(c/2 + ( 
d*x)/2))/(2*((15*a^2)/2 + (225*a^2*tan(c/2 + (d*x)/2))/16))))/(4*d)
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.17 \[ \int \cos ^4(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \left (24 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}+30 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}-88 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}-135 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+184 \cos \left (d x +c \right ) \sin \left (d x +c \right )-120 \cos \left (d x +c \right )+120 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )-225 \sin \left (d x +c \right ) d x -184 \sin \left (d x +c \right )\right )}{120 \sin \left (d x +c \right ) d} \] Input:

int(cos(d*x+c)^4*cot(d*x+c)^2*(a+a*sin(d*x+c)),x)
 

Output:

(a*(24*cos(c + d*x)*sin(c + d*x)**5 + 30*cos(c + d*x)*sin(c + d*x)**4 - 88 
*cos(c + d*x)*sin(c + d*x)**3 - 135*cos(c + d*x)*sin(c + d*x)**2 + 184*cos 
(c + d*x)*sin(c + d*x) - 120*cos(c + d*x) + 120*log(tan((c + d*x)/2))*sin( 
c + d*x) - 225*sin(c + d*x)*d*x - 184*sin(c + d*x)))/(120*sin(c + d*x)*d)