\(\int \frac {\cos ^7(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx\) [727]

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

Optimal result

Integrand size = 27, antiderivative size = 119 \[ \int \frac {\cos ^7(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {3 x}{4 a^2}-\frac {\text {arctanh}(\cos (c+d x))}{a^2 d}+\frac {\cos (c+d x)}{a^2 d}+\frac {\cos ^3(c+d x)}{3 a^2 d}-\frac {\cos ^5(c+d x)}{5 a^2 d}-\frac {3 \cos (c+d x) \sin (c+d x)}{4 a^2 d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{2 a^2 d} \] Output:

-3/4*x/a^2-arctanh(cos(d*x+c))/a^2/d+cos(d*x+c)/a^2/d+1/3*cos(d*x+c)^3/a^2 
/d-1/5*cos(d*x+c)^5/a^2/d-3/4*cos(d*x+c)*sin(d*x+c)/a^2/d-1/2*cos(d*x+c)^3 
*sin(d*x+c)/a^2/d
 

Mathematica [A] (verified)

Time = 1.94 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.78 \[ \int \frac {\cos ^7(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {270 \cos (c+d x)+5 \cos (3 (c+d x))-3 \left (60 c+60 d x+\cos (5 (c+d x))+80 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-80 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+40 \sin (2 (c+d x))+5 \sin (4 (c+d x))\right )}{240 a^2 d} \] Input:

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

Output:

(270*Cos[c + d*x] + 5*Cos[3*(c + d*x)] - 3*(60*c + 60*d*x + Cos[5*(c + d*x 
)] + 80*Log[Cos[(c + d*x)/2]] - 80*Log[Sin[(c + d*x)/2]] + 40*Sin[2*(c + d 
*x)] + 5*Sin[4*(c + d*x)]))/(240*a^2*d)
 

Rubi [A] (verified)

Time = 0.52 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.03, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 3354, 3042, 3352, 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 \frac {\cos ^7(c+d x) \cot (c+d x)}{(a \sin (c+d x)+a)^2} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3354

\(\displaystyle \frac {\int \cos ^3(c+d x) \cot (c+d x) (a-a \sin (c+d x))^2dx}{a^4}\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3352

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

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 3352
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig 
[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x] /; F 
reeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
 

rule 3354
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(a/g)^(2* 
m)   Int[(g*Cos[e + f*x])^(2*m + p)*((d*Sin[e + f*x])^n/(a - b*Sin[e + f*x] 
)^m), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && 
ILtQ[m, 0]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 3.83 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.25

method result size
risch \(-\frac {3 x}{4 a^{2}}+\frac {9 \,{\mathrm e}^{i \left (d x +c \right )}}{16 d \,a^{2}}+\frac {9 \,{\mathrm e}^{-i \left (d x +c \right )}}{16 d \,a^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d \,a^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \,a^{2}}-\frac {\cos \left (5 d x +5 c \right )}{80 a^{2} d}-\frac {\sin \left (4 d x +4 c \right )}{16 d \,a^{2}}+\frac {\cos \left (3 d x +3 c \right )}{48 d \,a^{2}}-\frac {\sin \left (2 d x +2 c \right )}{2 d \,a^{2}}\) \(149\)
derivativedivides \(\frac {-\frac {4 \left (-\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{8}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-\frac {8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{3}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{4}-\frac {7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3}+\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}-\frac {17}{30}\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}-\frac {3 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}\) \(152\)
default \(\frac {-\frac {4 \left (-\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{8}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-\frac {8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{3}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{4}-\frac {7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3}+\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}-\frac {17}{30}\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}-\frac {3 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}\) \(152\)

Input:

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

Output:

-3/4*x/a^2+9/16/d/a^2*exp(I*(d*x+c))+9/16/d/a^2*exp(-I*(d*x+c))+1/d/a^2*ln 
(exp(I*(d*x+c))-1)-1/d/a^2*ln(exp(I*(d*x+c))+1)-1/80/a^2/d*cos(5*d*x+5*c)- 
1/16/d/a^2*sin(4*d*x+4*c)+1/48/d/a^2*cos(3*d*x+3*c)-1/2/d/a^2*sin(2*d*x+2* 
c)
 

Fricas [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.79 \[ \int \frac {\cos ^7(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {12 \, \cos \left (d x + c\right )^{5} - 20 \, \cos \left (d x + c\right )^{3} + 45 \, d x + 15 \, {\left (2 \, \cos \left (d x + c\right )^{3} + 3 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) - 60 \, \cos \left (d x + c\right ) + 30 \, \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 30 \, \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{60 \, a^{2} d} \] Input:

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

Output:

-1/60*(12*cos(d*x + c)^5 - 20*cos(d*x + c)^3 + 45*d*x + 15*(2*cos(d*x + c) 
^3 + 3*cos(d*x + c))*sin(d*x + c) - 60*cos(d*x + c) + 30*log(1/2*cos(d*x + 
 c) + 1/2) - 30*log(-1/2*cos(d*x + c) + 1/2))/(a^2*d)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\cos ^7(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 333 vs. \(2 (109) = 218\).

Time = 0.12 (sec) , antiderivative size = 333, normalized size of antiderivative = 2.80 \[ \int \frac {\cos ^7(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {\frac {75 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {280 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {30 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {320 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {360 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {30 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {60 \, \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {75 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - 68}{a^{2} + \frac {5 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {10 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {10 \, a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {5 \, a^{2} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + \frac {a^{2} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}}} + \frac {45 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {30 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}}{30 \, d} \] Input:

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

Output:

-1/30*((75*sin(d*x + c)/(cos(d*x + c) + 1) - 280*sin(d*x + c)^2/(cos(d*x + 
 c) + 1)^2 + 30*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 320*sin(d*x + c)^4/( 
cos(d*x + c) + 1)^4 - 360*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 30*sin(d*x 
 + c)^7/(cos(d*x + c) + 1)^7 - 60*sin(d*x + c)^8/(cos(d*x + c) + 1)^8 - 75 
*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 - 68)/(a^2 + 5*a^2*sin(d*x + c)^2/(co 
s(d*x + c) + 1)^2 + 10*a^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 10*a^2*si 
n(d*x + c)^6/(cos(d*x + c) + 1)^6 + 5*a^2*sin(d*x + c)^8/(cos(d*x + c) + 1 
)^8 + a^2*sin(d*x + c)^10/(cos(d*x + c) + 1)^10) + 45*arctan(sin(d*x + c)/ 
(cos(d*x + c) + 1))/a^2 - 30*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^2)/d
 

Giac [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.31 \[ \int \frac {\cos ^7(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {45 \, {\left (d x + c\right )}}{a^{2}} - \frac {60 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {2 \, {\left (75 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 60 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 30 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 360 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 320 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 30 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 280 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 75 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 68\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{5} a^{2}}}{60 \, d} \] Input:

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

Output:

-1/60*(45*(d*x + c)/a^2 - 60*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 - 2*(75*ta 
n(1/2*d*x + 1/2*c)^9 + 60*tan(1/2*d*x + 1/2*c)^8 + 30*tan(1/2*d*x + 1/2*c) 
^7 + 360*tan(1/2*d*x + 1/2*c)^6 + 320*tan(1/2*d*x + 1/2*c)^4 - 30*tan(1/2* 
d*x + 1/2*c)^3 + 280*tan(1/2*d*x + 1/2*c)^2 - 75*tan(1/2*d*x + 1/2*c) + 68 
)/((tan(1/2*d*x + 1/2*c)^2 + 1)^5*a^2))/d
 

Mupad [B] (verification not implemented)

Time = 32.79 (sec) , antiderivative size = 262, normalized size of antiderivative = 2.20 \[ \int \frac {\cos ^7(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {3\,\mathrm {atan}\left (\frac {9}{4\,\left (\frac {9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+3\right )}-\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\frac {9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+3}\right )}{2\,a^2\,d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}+\frac {\frac {5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{2}+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {28\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}-\frac {5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}+\frac {34}{15}}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+5\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+10\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )} \] Input:

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

Output:

(3*atan(9/(4*((9*tan(c/2 + (d*x)/2))/4 + 3)) - (3*tan(c/2 + (d*x)/2))/((9* 
tan(c/2 + (d*x)/2))/4 + 3)))/(2*a^2*d) + log(tan(c/2 + (d*x)/2))/(a^2*d) + 
 ((28*tan(c/2 + (d*x)/2)^2)/3 - (5*tan(c/2 + (d*x)/2))/2 - tan(c/2 + (d*x) 
/2)^3 + (32*tan(c/2 + (d*x)/2)^4)/3 + 12*tan(c/2 + (d*x)/2)^6 + tan(c/2 + 
(d*x)/2)^7 + 2*tan(c/2 + (d*x)/2)^8 + (5*tan(c/2 + (d*x)/2)^9)/2 + 34/15)/ 
(d*(5*a^2*tan(c/2 + (d*x)/2)^2 + 10*a^2*tan(c/2 + (d*x)/2)^4 + 10*a^2*tan( 
c/2 + (d*x)/2)^6 + 5*a^2*tan(c/2 + (d*x)/2)^8 + a^2*tan(c/2 + (d*x)/2)^10 
+ a^2))
 

Reduce [F]

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

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

Output:

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