\(\int \frac {\cos ^4(c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx\) [1309]

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 = 107 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\log (\sin (c+d x))}{a d}-\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a b^4 d}+\frac {\left (a^2-2 b^2\right ) \sin (c+d x)}{b^3 d}-\frac {a \sin ^2(c+d x)}{2 b^2 d}+\frac {\sin ^3(c+d x)}{3 b d} \] Output:

ln(sin(d*x+c))/a/d-(a^2-b^2)^2*ln(a+b*sin(d*x+c))/a/b^4/d+(a^2-2*b^2)*sin( 
d*x+c)/b^3/d-1/2*a*sin(d*x+c)^2/b^2/d+1/3*sin(d*x+c)^3/b/d
 

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.94 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {6 \left (b^4 \log (\sin (c+d x))-\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))\right )+6 a b \left (a^2-2 b^2\right ) \sin (c+d x)-3 a^2 b^2 \sin ^2(c+d x)+2 a b^3 \sin ^3(c+d x)}{6 a b^4 d} \] Input:

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

Output:

(6*(b^4*Log[Sin[c + d*x]] - (a^2 - b^2)^2*Log[a + b*Sin[c + d*x]]) + 6*a*b 
*(a^2 - 2*b^2)*Sin[c + d*x] - 3*a^2*b^2*Sin[c + d*x]^2 + 2*a*b^3*Sin[c + d 
*x]^3)/(6*a*b^4*d)
 

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.93, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 3316, 27, 522, 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 ^4(c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3316

\(\displaystyle \frac {\int \frac {\csc (c+d x) \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{a+b \sin (c+d x)}d(b \sin (c+d x))}{b^5 d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {\csc (c+d x) \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{b (a+b \sin (c+d x))}d(b \sin (c+d x))}{b^4 d}\)

\(\Big \downarrow \) 522

\(\displaystyle \frac {\int \left (\frac {\csc (c+d x) b^3}{a}+\sin ^2(c+d x) b^2-a \sin (c+d x) b+a^2 \left (1-\frac {2 b^2}{a^2}\right )-\frac {\left (a^2-b^2\right )^2}{a (a+b \sin (c+d x))}\right )d(b \sin (c+d x))}{b^4 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b \left (a^2-2 b^2\right ) \sin (c+d x)-\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a}+\frac {b^4 \log (b \sin (c+d x))}{a}-\frac {1}{2} a b^2 \sin ^2(c+d x)+\frac {1}{3} b^3 \sin ^3(c+d x)}{b^4 d}\)

Input:

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

Output:

((b^4*Log[b*Sin[c + d*x]])/a - ((a^2 - b^2)^2*Log[a + b*Sin[c + d*x]])/a + 
 b*(a^2 - 2*b^2)*Sin[c + d*x] - (a*b^2*Sin[c + d*x]^2)/2 + (b^3*Sin[c + d* 
x]^3)/3)/(b^4*d)
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

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 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
Maple [A] (verified)

Time = 3.75 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.98

method result size
derivativedivides \(\frac {\frac {\frac {\sin \left (d x +c \right )^{3} b^{2}}{3}-\frac {b a \sin \left (d x +c \right )^{2}}{2}+a^{2} \sin \left (d x +c \right )-2 \sin \left (d x +c \right ) b^{2}}{b^{3}}+\frac {\left (-a^{4}+2 a^{2} b^{2}-b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a \,b^{4}}+\frac {\ln \left (\sin \left (d x +c \right )\right )}{a}}{d}\) \(105\)
default \(\frac {\frac {\frac {\sin \left (d x +c \right )^{3} b^{2}}{3}-\frac {b a \sin \left (d x +c \right )^{2}}{2}+a^{2} \sin \left (d x +c \right )-2 \sin \left (d x +c \right ) b^{2}}{b^{3}}+\frac {\left (-a^{4}+2 a^{2} b^{2}-b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a \,b^{4}}+\frac {\ln \left (\sin \left (d x +c \right )\right )}{a}}{d}\) \(105\)
risch \(-\frac {i {\mathrm e}^{i \left (d x +c \right )} a^{2}}{2 b^{3} d}-\frac {7 i {\mathrm e}^{-i \left (d x +c \right )}}{8 b d}+\frac {a \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 b^{2} d}-\frac {2 i x a}{b^{2}}+\frac {7 i {\mathrm e}^{i \left (d x +c \right )}}{8 b d}+\frac {i a^{3} x}{b^{4}}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} a^{2}}{2 b^{3} d}+\frac {a \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 b^{2} d}-\frac {4 i a c}{b^{2} d}+\frac {2 i a^{3} c}{b^{4} d}-\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{b^{4} d}+\frac {2 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{b^{2} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d a}-\frac {\sin \left (3 d x +3 c \right )}{12 b d}\) \(306\)

Input:

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

Output:

1/d*(1/b^3*(1/3*sin(d*x+c)^3*b^2-1/2*b*a*sin(d*x+c)^2+a^2*sin(d*x+c)-2*sin 
(d*x+c)*b^2)+(-a^4+2*a^2*b^2-b^4)/a/b^4*ln(a+b*sin(d*x+c))+1/a*ln(sin(d*x+ 
c)))
 

Fricas [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.97 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {3 \, a^{2} b^{2} \cos \left (d x + c\right )^{2} + 6 \, b^{4} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) - 2 \, {\left (a b^{3} \cos \left (d x + c\right )^{2} - 3 \, a^{3} b + 5 \, a b^{3}\right )} \sin \left (d x + c\right )}{6 \, a b^{4} d} \] Input:

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

Output:

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

Sympy [F]

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

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

Output:

Integral(cos(c + d*x)**4*cot(c + d*x)/(a + b*sin(c + d*x)), x)
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.93 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\frac {6 \, \log \left (\sin \left (d x + c\right )\right )}{a} + \frac {2 \, b^{2} \sin \left (d x + c\right )^{3} - 3 \, a b \sin \left (d x + c\right )^{2} + 6 \, {\left (a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )}{b^{3}} - \frac {6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a b^{4}}}{6 \, d} \] Input:

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

Output:

1/6*(6*log(sin(d*x + c))/a + (2*b^2*sin(d*x + c)^3 - 3*a*b*sin(d*x + c)^2 
+ 6*(a^2 - 2*b^2)*sin(d*x + c))/b^3 - 6*(a^4 - 2*a^2*b^2 + b^4)*log(b*sin( 
d*x + c) + a)/(a*b^4))/d
 

Giac [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.14 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a d} - \frac {{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a b^{4} d} + \frac {2 \, b^{2} d^{2} \sin \left (d x + c\right )^{3} - 3 \, a b d^{2} \sin \left (d x + c\right )^{2} + 6 \, a^{2} d^{2} \sin \left (d x + c\right ) - 12 \, b^{2} d^{2} \sin \left (d x + c\right )}{6 \, b^{3} d^{3}} \] Input:

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

Output:

log(abs(sin(d*x + c)))/(a*d) - (a^4 - 2*a^2*b^2 + b^4)*log(abs(b*sin(d*x + 
 c) + a))/(a*b^4*d) + 1/6*(2*b^2*d^2*sin(d*x + c)^3 - 3*a*b*d^2*sin(d*x + 
c)^2 + 6*a^2*d^2*sin(d*x + c) - 12*b^2*d^2*sin(d*x + c))/(b^3*d^3)
 

Mupad [B] (verification not implemented)

Time = 20.50 (sec) , antiderivative size = 254, normalized size of antiderivative = 2.37 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (a^2-2\,b^2\right )}{b^3}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (a^2-2\,b^2\right )}{b^3}-\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b^2}-\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{b^2}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (3\,a^2-4\,b^2\right )}{3\,b^3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (a^2-2\,b^2\right )}{b^4\,d}-\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,{\left (a^2-b^2\right )}^2}{a\,b^4\,d} \] Input:

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

Output:

log(tan(c/2 + (d*x)/2))/(a*d) + ((2*tan(c/2 + (d*x)/2)*(a^2 - 2*b^2))/b^3 
+ (2*tan(c/2 + (d*x)/2)^5*(a^2 - 2*b^2))/b^3 - (2*a*tan(c/2 + (d*x)/2)^2)/ 
b^2 - (2*a*tan(c/2 + (d*x)/2)^4)/b^2 + (4*tan(c/2 + (d*x)/2)^3*(3*a^2 - 4* 
b^2))/(3*b^3))/(d*(3*tan(c/2 + (d*x)/2)^2 + 3*tan(c/2 + (d*x)/2)^4 + tan(c 
/2 + (d*x)/2)^6 + 1)) + (a*log(tan(c/2 + (d*x)/2)^2 + 1)*(a^2 - 2*b^2))/(b 
^4*d) - (log(a + 2*b*tan(c/2 + (d*x)/2) + a*tan(c/2 + (d*x)/2)^2)*(a^2 - b 
^2)^2)/(a*b^4*d)
 

Reduce [B] (verification not implemented)

Time = 66.67 (sec) , antiderivative size = 232, normalized size of antiderivative = 2.17 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) a^{4}-12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) a^{2} b^{2}-6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b +a \right ) a^{4}+12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b +a \right ) a^{2} b^{2}-6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b +a \right ) b^{4}+6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{4}+2 \sin \left (d x +c \right )^{3} a \,b^{3}-3 \sin \left (d x +c \right )^{2} a^{2} b^{2}+6 \sin \left (d x +c \right ) a^{3} b -12 \sin \left (d x +c \right ) a \,b^{3}+4 a^{2} b^{2}}{6 a \,b^{4} d} \] Input:

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

Output:

(6*log(tan((c + d*x)/2)**2 + 1)*a**4 - 12*log(tan((c + d*x)/2)**2 + 1)*a** 
2*b**2 - 6*log(tan((c + d*x)/2)**2*a + 2*tan((c + d*x)/2)*b + a)*a**4 + 12 
*log(tan((c + d*x)/2)**2*a + 2*tan((c + d*x)/2)*b + a)*a**2*b**2 - 6*log(t 
an((c + d*x)/2)**2*a + 2*tan((c + d*x)/2)*b + a)*b**4 + 6*log(tan((c + d*x 
)/2))*b**4 + 2*sin(c + d*x)**3*a*b**3 - 3*sin(c + d*x)**2*a**2*b**2 + 6*si 
n(c + d*x)*a**3*b - 12*sin(c + d*x)*a*b**3 + 4*a**2*b**2)/(6*a*b**4*d)