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

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

Optimal result

Integrand size = 21, antiderivative size = 118 \[ \int \frac {\cos ^5(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{b^5 d}-\frac {a \left (a^2-2 b^2\right ) \sin (c+d x)}{b^4 d}+\frac {\left (a^2-2 b^2\right ) \sin ^2(c+d x)}{2 b^3 d}-\frac {a \sin ^3(c+d x)}{3 b^2 d}+\frac {\sin ^4(c+d x)}{4 b d} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3147, 476, 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 ^5(c+d x)}{a+b \sin (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3147

\(\displaystyle \frac {\int \frac {\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 \) 476

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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

Time = 0.79 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.90

method result size
derivativedivides \(\frac {-\frac {-\frac {\sin \left (d x +c \right )^{4} b^{3}}{4}+\frac {a \sin \left (d x +c \right )^{3} b^{2}}{3}-\frac {\left (a^{2}-2 b^{2}\right ) \sin \left (d x +c \right )^{2} b}{2}+a \left (a^{2}-2 b^{2}\right ) \sin \left (d x +c \right )}{b^{4}}+\frac {\left (a^{4}-2 b^{2} a^{2}+b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{b^{5}}}{d}\) \(106\)
default \(\frac {-\frac {-\frac {\sin \left (d x +c \right )^{4} b^{3}}{4}+\frac {a \sin \left (d x +c \right )^{3} b^{2}}{3}-\frac {\left (a^{2}-2 b^{2}\right ) \sin \left (d x +c \right )^{2} b}{2}+a \left (a^{2}-2 b^{2}\right ) \sin \left (d x +c \right )}{b^{4}}+\frac {\left (a^{4}-2 b^{2} a^{2}+b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{b^{5}}}{d}\) \(106\)
parallelrisch \(\frac {96 \left (a -b \right )^{2} \left (a +b \right )^{2} \ln \left (2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )-96 \left (a -b \right )^{2} \left (a +b \right )^{2} \ln \left (\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )+\left (-24 b^{2} a^{2}+36 b^{4}\right ) \cos \left (2 d x +2 c \right )+3 \cos \left (4 d x +4 c \right ) b^{4}+8 a \sin \left (3 d x +3 c \right ) b^{3}+\left (-96 a^{3} b +168 a \,b^{3}\right ) \sin \left (d x +c \right )+24 b^{2} a^{2}-39 b^{4}}{96 b^{5} d}\) \(163\)
risch \(\frac {i a^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 b^{4} d}-\frac {i x}{b}-\frac {i a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{2 b^{4} d}-\frac {{\mathrm e}^{2 i \left (d x +c \right )} a^{2}}{8 b^{3} d}+\frac {3 \,{\mathrm e}^{2 i \left (d x +c \right )}}{16 b d}+\frac {7 i a \,{\mathrm e}^{-i \left (d x +c \right )}}{8 b^{2} d}+\frac {2 i x \,a^{2}}{b^{3}}-\frac {i x \,a^{4}}{b^{5}}-\frac {2 i a^{4} c}{b^{5} d}-\frac {{\mathrm e}^{-2 i \left (d x +c \right )} a^{2}}{8 b^{3} d}+\frac {3 \,{\mathrm e}^{-2 i \left (d x +c \right )}}{16 b d}-\frac {7 i a \,{\mathrm e}^{i \left (d x +c \right )}}{8 b^{2} d}+\frac {4 i a^{2} c}{b^{3} d}-\frac {2 i c}{b d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right ) a^{4}}{b^{5} d}-\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right ) a^{2}}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right )}{b d}+\frac {\cos \left (4 d x +4 c \right )}{32 b d}+\frac {a \sin \left (3 d x +3 c \right )}{12 b^{2} d}\) \(366\)
norman \(\frac {\frac {\left (2 a^{2}-4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{b^{3} d}+\frac {\left (2 a^{2}-4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{b^{3} d}+\frac {2 \left (3 a^{2}-4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{b^{3} d}+\frac {2 \left (3 a^{2}-4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{b^{3} d}-\frac {2 a \left (a^{2}-2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{4} d}-\frac {2 a \left (a^{2}-2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{b^{4} d}-\frac {8 a \left (3 a^{2}-5 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 b^{4} d}-\frac {8 a \left (3 a^{2}-5 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 b^{4} d}-\frac {4 a \left (9 a^{2}-14 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 b^{4} d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}+\frac {\left (a^{4}-2 b^{2} a^{2}+b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{b^{5} d}-\frac {\left (a^{4}-2 b^{2} a^{2}+b^{4}\right ) \ln \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}{b^{5} d}\) \(373\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.91 \[ \int \frac {\cos ^5(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {3 \, b^{4} \cos \left (d x + c\right )^{4} - 6 \, {\left (a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{2} + 12 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) + 4 \, {\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 )}{12 \, b^{5} d} \] Input:

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.18 \[ \int \frac {\cos ^5(c+d x)}{a+b \sin (c+d x)} \, dx=\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 )}{b^{5} d} + \frac {3 \, b^{3} d^{3} \sin \left (d x + c\right )^{4} - 4 \, a b^{2} d^{3} \sin \left (d x + c\right )^{3} + 6 \, a^{2} b d^{3} \sin \left (d x + c\right )^{2} - 12 \, b^{3} d^{3} \sin \left (d x + c\right )^{2} - 12 \, a^{3} d^{3} \sin \left (d x + c\right ) + 24 \, a b^{2} d^{3} \sin \left (d x + c\right )}{12 \, b^{4} d^{4}} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.92 \[ \int \frac {\cos ^5(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\frac {{\sin \left (c+d\,x\right )}^4}{4\,b}-{\sin \left (c+d\,x\right )}^2\,\left (\frac {1}{b}-\frac {a^2}{2\,b^3}\right )+\frac {\ln \left (a+b\,\sin \left (c+d\,x\right )\right )\,\left (a^4-2\,a^2\,b^2+b^4\right )}{b^5}-\frac {a\,{\sin \left (c+d\,x\right )}^3}{3\,b^2}+\frac {a\,\sin \left (c+d\,x\right )\,\left (\frac {2}{b}-\frac {a^2}{b^3}\right )}{b}}{d} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 264, normalized size of antiderivative = 2.24 \[ \int \frac {\cos ^5(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {-12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) a^{4}+24 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) a^{2} b^{2}-12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) b^{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^{4}-24 \,\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}+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 ) b^{4}+3 \sin \left (d x +c \right )^{4} b^{4}-4 \sin \left (d x +c \right )^{3} a \,b^{3}+6 \sin \left (d x +c \right )^{2} a^{2} b^{2}-12 \sin \left (d x +c \right )^{2} b^{4}-12 \sin \left (d x +c \right ) a^{3} b +24 \sin \left (d x +c \right ) a \,b^{3}-6 a^{2} b^{2}+12 b^{4}}{12 b^{5} d} \] Input:

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

Output:

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