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

Optimal. Leaf size=110 \[ \frac {a^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \sin ^2(c+d x)}{d}-\frac {a^2 \sin (c+d x)}{d}-\frac {a^2 \csc ^3(c+d x)}{3 d}-\frac {a^2 \csc ^2(c+d x)}{d}+\frac {a^2 \csc (c+d x)}{d}-\frac {4 a^2 \log (\sin (c+d x))}{d} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2836, 12, 88} \[ \frac {a^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \sin ^2(c+d x)}{d}-\frac {a^2 \sin (c+d x)}{d}-\frac {a^2 \csc ^3(c+d x)}{3 d}-\frac {a^2 \csc ^2(c+d x)}{d}+\frac {a^2 \csc (c+d x)}{d}-\frac {4 a^2 \log (\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 2836

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d*x)/b
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps

\begin {align*} \int \cos (c+d x) \cot ^4(c+d x) (a+a \sin (c+d x))^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {a^4 (a-x)^2 (a+x)^4}{x^4} \, dx,x,a \sin (c+d x)\right )}{a^5 d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {(a-x)^2 (a+x)^4}{x^4} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-a^2+\frac {a^6}{x^4}+\frac {2 a^5}{x^3}-\frac {a^4}{x^2}-\frac {4 a^3}{x}+2 a x+x^2\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {a^2 \csc (c+d x)}{d}-\frac {a^2 \csc ^2(c+d x)}{d}-\frac {a^2 \csc ^3(c+d x)}{3 d}-\frac {4 a^2 \log (\sin (c+d x))}{d}-\frac {a^2 \sin (c+d x)}{d}+\frac {a^2 \sin ^2(c+d x)}{d}+\frac {a^2 \sin ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 74, normalized size = 0.67 \[ \frac {a^2 \left (\sin ^3(c+d x)+3 \sin ^2(c+d x)-3 \sin (c+d x)-\csc ^3(c+d x)-3 \csc ^2(c+d x)+3 \csc (c+d x)-12 \log (\sin (c+d x))\right )}{3 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.85, size = 115, normalized size = 1.05 \[ \frac {2 \, a^{2} \cos \left (d x + c\right )^{6} - 24 \, {\left (a^{2} \cos \left (d x + c\right )^{2} - a^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) - 3 \, {\left (2 \, a^{2} \cos \left (d x + c\right )^{4} - 3 \, a^{2} \cos \left (d x + c\right )^{2} - a^{2}\right )} \sin \left (d x + c\right )}{6 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.27, size = 107, normalized size = 0.97 \[ \frac {a^{2} \sin \left (d x + c\right )^{3} + 3 \, a^{2} \sin \left (d x + c\right )^{2} - 12 \, a^{2} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - 3 \, a^{2} \sin \left (d x + c\right ) + \frac {22 \, a^{2} \sin \left (d x + c\right )^{3} + 3 \, a^{2} \sin \left (d x + c\right )^{2} - 3 \, a^{2} \sin \left (d x + c\right ) - a^{2}}{\sin \left (d x + c\right )^{3}}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.42, size = 97, normalized size = 0.88 \[ -\frac {a^{2} \left (\cos ^{6}\left (d x +c \right )\right )}{d \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{4}\left (d x +c \right )\right ) a^{2}}{d}-\frac {2 a^{2} \left (\cos ^{2}\left (d x +c \right )\right )}{d}-\frac {4 a^{2} \ln \left (\sin \left (d x +c \right )\right )}{d}-\frac {a^{2} \left (\cos ^{6}\left (d x +c \right )\right )}{3 d \sin \left (d x +c \right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 93, normalized size = 0.85 \[ \frac {a^{2} \sin \left (d x + c\right )^{3} + 3 \, a^{2} \sin \left (d x + c\right )^{2} - 12 \, a^{2} \log \left (\sin \left (d x + c\right )\right ) - 3 \, a^{2} \sin \left (d x + c\right ) + \frac {3 \, a^{2} \sin \left (d x + c\right )^{2} - 3 \, a^{2} \sin \left (d x + c\right ) - a^{2}}{\sin \left (d x + c\right )^{3}}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 8.92, size = 288, normalized size = 2.62 \[ \frac {3\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {4\,a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{4\,d}-\frac {13\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-30\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-26\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+8\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+6\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a^2}{3}}{d\,\left (8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+24\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+24\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\right )}+\frac {4\,a^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(3*a^2*tan(c/2 + (d*x)/2))/(8*d) - (a^2*tan(c/2 + (d*x)/2)^3)/(24*d) - (4*a^2*log(tan(c/2 + (d*x)/2)))/d - (a^
2*tan(c/2 + (d*x)/2)^2)/(4*d) - (6*a^2*tan(c/2 + (d*x)/2)^3 - 2*a^2*tan(c/2 + (d*x)/2)^2 + 8*a^2*tan(c/2 + (d*
x)/2)^4 - 26*a^2*tan(c/2 + (d*x)/2)^5 + 2*a^2*tan(c/2 + (d*x)/2)^6 - 30*a^2*tan(c/2 + (d*x)/2)^7 + 13*a^2*tan(
c/2 + (d*x)/2)^8 + a^2/3 + 2*a^2*tan(c/2 + (d*x)/2))/(d*(8*tan(c/2 + (d*x)/2)^3 + 24*tan(c/2 + (d*x)/2)^5 + 24
*tan(c/2 + (d*x)/2)^7 + 8*tan(c/2 + (d*x)/2)^9)) + (4*a^2*log(tan(c/2 + (d*x)/2)^2 + 1))/d

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________