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

Optimal. Leaf size=177 \[ \frac {\left (2 a^2-b^2\right ) \cot (c+d x)}{d}+\frac {\left (4 a^2-7 b^2\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {5}{8} x \left (4 a^2-3 b^2\right )-\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {5 a b \cos ^3(c+d x)}{3 d}-\frac {5 a b \cos (c+d x)}{d}-\frac {a b \cos ^3(c+d x) \cot ^2(c+d x)}{d}+\frac {5 a b \tanh ^{-1}(\cos (c+d x))}{d}-\frac {b^2 \sin (c+d x) \cos ^3(c+d x)}{4 d} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.44, antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 9, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.310, Rules used = {2911, 2592, 288, 302, 206, 456, 1259, 1261, 203} \[ \frac {\left (2 a^2-b^2\right ) \cot (c+d x)}{d}+\frac {\left (4 a^2-7 b^2\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {5}{8} x \left (4 a^2-3 b^2\right )-\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {5 a b \cos ^3(c+d x)}{3 d}-\frac {5 a b \cos (c+d x)}{d}-\frac {a b \cos ^3(c+d x) \cot ^2(c+d x)}{d}+\frac {5 a b \tanh ^{-1}(\cos (c+d x))}{d}-\frac {b^2 \sin (c+d x) \cos ^3(c+d x)}{4 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 203

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

Rule 206

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

Rule 288

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^
n)^(p + 1))/(b*n*(p + 1)), x] - Dist[(c^n*(m - n + 1))/(b*n*(p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 302

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 456

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[((-a)^(m/2 - 1)*(b*c - a*d)*
x*(a + b*x^2)^(p + 1))/(2*b^(m/2 + 1)*(p + 1)), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[x^m*(a + b*x^2)^(p +
1)*ExpandToSum[2*b*(p + 1)*Together[(b^(m/2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d)*x^(-m + 2))/(a + b*x^2)]
 - ((-a)^(m/2 - 1)*(b*c - a*d))/x^m, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &
& ILtQ[m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rule 1259

Int[(x_)^(m_)*((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Simp[((-d)^(
m/2 - 1)*(c*d^2 - b*d*e + a*e^2)^p*x*(d + e*x^2)^(q + 1))/(2*e^(2*p + m/2)*(q + 1)), x] + Dist[(-d)^(m/2 - 1)/
(2*e^(2*p)*(q + 1)), Int[x^m*(d + e*x^2)^(q + 1)*ExpandToSum[Together[(1*(2*(-d)^(-(m/2) + 1)*e^(2*p)*(q + 1)*
(a + b*x^2 + c*x^4)^p - ((c*d^2 - b*d*e + a*e^2)^p/(e^(m/2)*x^m))*(d + e*(2*q + 3)*x^2)))/(d + e*x^2)], x], x]
, x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && ILtQ[q, -1] && ILtQ[m/2, 0]

Rule 1261

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(f*x)^m*(d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, q}, x] &&
 NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 2592

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[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 2911

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^2, x_Symbol] :> Dist[(2*a*b)/d, Int[(g*Cos[e + f*x])^p*(d*Sin[e + f*x])^(n + 1), x], x] + Int[(g*Cos[e
+ f*x])^p*(d*Sin[e + f*x])^n*(a^2 + b^2*Sin[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && NeQ[a^2 -
 b^2, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 6.28, size = 336, normalized size = 1.90 \[ \frac {5 \left (4 a^2-3 b^2\right ) (c+d x)}{8 d}+\frac {\left (a^2-2 b^2\right ) \sin (2 (c+d x))}{4 d}+\frac {\csc \left (\frac {1}{2} (c+d x)\right ) \left (7 a^2 \cos \left (\frac {1}{2} (c+d x)\right )-3 b^2 \cos \left (\frac {1}{2} (c+d x)\right )\right )}{6 d}+\frac {\sec \left (\frac {1}{2} (c+d x)\right ) \left (3 b^2 \sin \left (\frac {1}{2} (c+d x)\right )-7 a^2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{6 d}-\frac {a^2 \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{24 d}+\frac {a^2 \tan \left (\frac {1}{2} (c+d x)\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{24 d}-\frac {9 a b \cos (c+d x)}{2 d}-\frac {a b \cos (3 (c+d x))}{6 d}-\frac {a b \csc ^2\left (\frac {1}{2} (c+d x)\right )}{4 d}+\frac {a b \sec ^2\left (\frac {1}{2} (c+d x)\right )}{4 d}-\frac {5 a b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {5 a b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}-\frac {b^2 \sin (4 (c+d x))}{32 d} \]

Warning: Unable to verify antiderivative.

[In]

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

[Out]

(5*(4*a^2 - 3*b^2)*(c + d*x))/(8*d) - (9*a*b*Cos[c + d*x])/(2*d) - (a*b*Cos[3*(c + d*x)])/(6*d) + ((7*a^2*Cos[
(c + d*x)/2] - 3*b^2*Cos[(c + d*x)/2])*Csc[(c + d*x)/2])/(6*d) - (a*b*Csc[(c + d*x)/2]^2)/(4*d) - (a^2*Cot[(c
+ d*x)/2]*Csc[(c + d*x)/2]^2)/(24*d) + (5*a*b*Log[Cos[(c + d*x)/2]])/d - (5*a*b*Log[Sin[(c + d*x)/2]])/d + (a*
b*Sec[(c + d*x)/2]^2)/(4*d) + (Sec[(c + d*x)/2]*(-7*a^2*Sin[(c + d*x)/2] + 3*b^2*Sin[(c + d*x)/2]))/(6*d) + ((
a^2 - 2*b^2)*Sin[2*(c + d*x)])/(4*d) - (b^2*Sin[4*(c + d*x)])/(32*d) + (a^2*Sec[(c + d*x)/2]^2*Tan[(c + d*x)/2
])/(24*d)

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 252, normalized size = 1.42 \[ \frac {6 \, b^{2} \cos \left (d x + c\right )^{7} - 3 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )} \cos \left (d x + c\right )^{5} + 20 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )} \cos \left (d x + c\right )^{3} + 60 \, {\left (a b \cos \left (d x + c\right )^{2} - a b\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 60 \, {\left (a b \cos \left (d x + c\right )^{2} - a b\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 15 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )} \cos \left (d x + c\right ) - {\left (16 \, a b \cos \left (d x + c\right )^{5} - 15 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )} d x \cos \left (d x + c\right )^{2} + 80 \, a b \cos \left (d x + c\right )^{3} + 15 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )} d x - 120 \, a b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, {\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)^6*csc(d*x+c)^4*(a+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/24*(6*b^2*cos(d*x + c)^7 - 3*(4*a^2 - 3*b^2)*cos(d*x + c)^5 + 20*(4*a^2 - 3*b^2)*cos(d*x + c)^3 + 60*(a*b*co
s(d*x + c)^2 - a*b)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 60*(a*b*cos(d*x + c)^2 - a*b)*log(-1/2*cos(d*x
+ c) + 1/2)*sin(d*x + c) - 15*(4*a^2 - 3*b^2)*cos(d*x + c) - (16*a*b*cos(d*x + c)^5 - 15*(4*a^2 - 3*b^2)*d*x*c
os(d*x + c)^2 + 80*a*b*cos(d*x + c)^3 + 15*(4*a^2 - 3*b^2)*d*x - 120*a*b*cos(d*x + c))*sin(d*x + c))/((d*cos(d
*x + c)^2 - d)*sin(d*x + c))

________________________________________________________________________________________

giac [B]  time = 0.31, size = 366, normalized size = 2.07 \[ \frac {a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 120 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 27 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 12 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )} {\left (d x + c\right )} + \frac {220 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 27 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 6 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}} - \frac {2 \, {\left (12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 27 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 144 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 336 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 304 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 27 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 112 \, a b\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/24*(a^2*tan(1/2*d*x + 1/2*c)^3 + 6*a*b*tan(1/2*d*x + 1/2*c)^2 - 120*a*b*log(abs(tan(1/2*d*x + 1/2*c))) - 27*
a^2*tan(1/2*d*x + 1/2*c) + 12*b^2*tan(1/2*d*x + 1/2*c) + 15*(4*a^2 - 3*b^2)*(d*x + c) + (220*a*b*tan(1/2*d*x +
 1/2*c)^3 + 27*a^2*tan(1/2*d*x + 1/2*c)^2 - 12*b^2*tan(1/2*d*x + 1/2*c)^2 - 6*a*b*tan(1/2*d*x + 1/2*c) - a^2)/
tan(1/2*d*x + 1/2*c)^3 - 2*(12*a^2*tan(1/2*d*x + 1/2*c)^7 - 27*b^2*tan(1/2*d*x + 1/2*c)^7 + 144*a*b*tan(1/2*d*
x + 1/2*c)^6 + 12*a^2*tan(1/2*d*x + 1/2*c)^5 - 3*b^2*tan(1/2*d*x + 1/2*c)^5 + 336*a*b*tan(1/2*d*x + 1/2*c)^4 -
 12*a^2*tan(1/2*d*x + 1/2*c)^3 + 3*b^2*tan(1/2*d*x + 1/2*c)^3 + 304*a*b*tan(1/2*d*x + 1/2*c)^2 - 12*a^2*tan(1/
2*d*x + 1/2*c) + 27*b^2*tan(1/2*d*x + 1/2*c) + 112*a*b)/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d

________________________________________________________________________________________

maple [A]  time = 0.52, size = 321, normalized size = 1.81 \[ -\frac {a^{2} \left (\cos ^{7}\left (d x +c \right )\right )}{3 d \sin \left (d x +c \right )^{3}}+\frac {4 a^{2} \left (\cos ^{7}\left (d x +c \right )\right )}{3 d \sin \left (d x +c \right )}+\frac {4 a^{2} \left (\cos ^{5}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {5 a^{2} \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {5 a^{2} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{2 d}+\frac {5 a^{2} x}{2}+\frac {5 a^{2} c}{2 d}-\frac {a b \left (\cos ^{7}\left (d x +c \right )\right )}{d \sin \left (d x +c \right )^{2}}-\frac {a b \left (\cos ^{5}\left (d x +c \right )\right )}{d}-\frac {5 a b \left (\cos ^{3}\left (d x +c \right )\right )}{3 d}-\frac {5 a b \cos \left (d x +c \right )}{d}-\frac {5 a b \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}-\frac {b^{2} \left (\cos ^{7}\left (d x +c \right )\right )}{d \sin \left (d x +c \right )}-\frac {b^{2} \left (\cos ^{5}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{d}-\frac {5 b^{2} \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{4 d}-\frac {15 b^{2} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{8 d}-\frac {15 b^{2} x}{8}-\frac {15 b^{2} c}{8 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3/d*a^2/sin(d*x+c)^3*cos(d*x+c)^7+4/3/d*a^2/sin(d*x+c)*cos(d*x+c)^7+4/3*a^2*cos(d*x+c)^5*sin(d*x+c)/d+5/3*a
^2*cos(d*x+c)^3*sin(d*x+c)/d+5/2*a^2*cos(d*x+c)*sin(d*x+c)/d+5/2*a^2*x+5/2/d*a^2*c-1/d*a*b/sin(d*x+c)^2*cos(d*
x+c)^7-a*b*cos(d*x+c)^5/d-5/3*a*b*cos(d*x+c)^3/d-5*a*b*cos(d*x+c)/d-5/d*a*b*ln(csc(d*x+c)-cot(d*x+c))-1/d*b^2/
sin(d*x+c)*cos(d*x+c)^7-b^2*cos(d*x+c)^5*sin(d*x+c)/d-5/4*b^2*cos(d*x+c)^3*sin(d*x+c)/d-15/8*b^2*cos(d*x+c)*si
n(d*x+c)/d-15/8*b^2*x-15/8/d*b^2*c

________________________________________________________________________________________

maxima [A]  time = 0.58, size = 189, normalized size = 1.07 \[ \frac {4 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} - 2}{\tan \left (d x + c\right )^{5} + \tan \left (d x + c\right )^{3}}\right )} a^{2} - 4 \, {\left (4 \, \cos \left (d x + c\right )^{3} - \frac {6 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + 24 \, \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 b - 3 \, {\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 )} b^{2}}{24 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/24*(4*(15*d*x + 15*c + (15*tan(d*x + c)^4 + 10*tan(d*x + c)^2 - 2)/(tan(d*x + c)^5 + tan(d*x + c)^3))*a^2 -
4*(4*cos(d*x + c)^3 - 6*cos(d*x + c)/(cos(d*x + c)^2 - 1) + 24*cos(d*x + c) - 15*log(cos(d*x + c) + 1) + 15*lo
g(cos(d*x + c) - 1))*a*b - 3*(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)))*b^2)/d

________________________________________________________________________________________

mupad [B]  time = 12.10, size = 665, normalized size = 3.76 \[ \frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {\frac {a^2}{3}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (42\,a^2-34\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (\frac {83\,a^2}{3}-14\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {182\,a^2}{3}-26\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {23\,a^2}{3}-4\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,\left (a^2+14\,b^2\right )+\frac {248\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\frac {644\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{3}+232\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+98\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+48\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+32\,{\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 {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {9\,a^2}{8}-\frac {b^2}{2}\right )}{d}+\frac {\mathrm {atan}\left (\frac {\left (\frac {a^2\,5{}\mathrm {i}}{2}-\frac {b^2\,15{}\mathrm {i}}{8}\right )\,\left (\frac {15\,b^2}{4}-5\,a^2+6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {a^2\,5{}\mathrm {i}}{2}-\frac {b^2\,15{}\mathrm {i}}{8}\right )+10\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,1{}\mathrm {i}-\left (\frac {a^2\,5{}\mathrm {i}}{2}-\frac {b^2\,15{}\mathrm {i}}{8}\right )\,\left (5\,a^2-\frac {15\,b^2}{4}+6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {a^2\,5{}\mathrm {i}}{2}-\frac {b^2\,15{}\mathrm {i}}{8}\right )-10\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,1{}\mathrm {i}}{\left (\frac {a^2\,5{}\mathrm {i}}{2}-\frac {b^2\,15{}\mathrm {i}}{8}\right )\,\left (\frac {15\,b^2}{4}-5\,a^2+6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {a^2\,5{}\mathrm {i}}{2}-\frac {b^2\,15{}\mathrm {i}}{8}\right )+10\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )+\left (\frac {a^2\,5{}\mathrm {i}}{2}-\frac {b^2\,15{}\mathrm {i}}{8}\right )\,\left (5\,a^2-\frac {15\,b^2}{4}+6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {a^2\,5{}\mathrm {i}}{2}-\frac {b^2\,15{}\mathrm {i}}{8}\right )-10\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )+\frac {75\,a\,b^3}{2}-50\,a^3\,b+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (25\,a^4-\frac {75\,a^2\,b^2}{2}+\frac {225\,b^4}{16}\right )}\right )\,\left (5\,a^2-\frac {15\,b^2}{4}\right )}{d}+\frac {a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{4\,d}-\frac {5\,a\,b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(a^2*tan(c/2 + (d*x)/2)^3)/(24*d) - (a^2/3 - tan(c/2 + (d*x)/2)^4*(42*a^2 - 34*b^2) - tan(c/2 + (d*x)/2)^8*((8
3*a^2)/3 - 14*b^2) - tan(c/2 + (d*x)/2)^6*((182*a^2)/3 - 26*b^2) - tan(c/2 + (d*x)/2)^2*((23*a^2)/3 - 4*b^2) -
 tan(c/2 + (d*x)/2)^10*(a^2 + 14*b^2) + (248*a*b*tan(c/2 + (d*x)/2)^3)/3 + (644*a*b*tan(c/2 + (d*x)/2)^5)/3 +
232*a*b*tan(c/2 + (d*x)/2)^7 + 98*a*b*tan(c/2 + (d*x)/2)^9 + 2*a*b*tan(c/2 + (d*x)/2))/(d*(8*tan(c/2 + (d*x)/2
)^3 + 32*tan(c/2 + (d*x)/2)^5 + 48*tan(c/2 + (d*x)/2)^7 + 32*tan(c/2 + (d*x)/2)^9 + 8*tan(c/2 + (d*x)/2)^11))
- (tan(c/2 + (d*x)/2)*((9*a^2)/8 - b^2/2))/d + (atan((((a^2*5i)/2 - (b^2*15i)/8)*((15*b^2)/4 - 5*a^2 + 6*tan(c
/2 + (d*x)/2)*((a^2*5i)/2 - (b^2*15i)/8) + 10*a*b*tan(c/2 + (d*x)/2))*1i - ((a^2*5i)/2 - (b^2*15i)/8)*(5*a^2 -
 (15*b^2)/4 + 6*tan(c/2 + (d*x)/2)*((a^2*5i)/2 - (b^2*15i)/8) - 10*a*b*tan(c/2 + (d*x)/2))*1i)/(((a^2*5i)/2 -
(b^2*15i)/8)*((15*b^2)/4 - 5*a^2 + 6*tan(c/2 + (d*x)/2)*((a^2*5i)/2 - (b^2*15i)/8) + 10*a*b*tan(c/2 + (d*x)/2)
) + ((a^2*5i)/2 - (b^2*15i)/8)*(5*a^2 - (15*b^2)/4 + 6*tan(c/2 + (d*x)/2)*((a^2*5i)/2 - (b^2*15i)/8) - 10*a*b*
tan(c/2 + (d*x)/2)) + (75*a*b^3)/2 - 50*a^3*b + 2*tan(c/2 + (d*x)/2)*(25*a^4 + (225*b^4)/16 - (75*a^2*b^2)/2))
)*(5*a^2 - (15*b^2)/4))/d + (a*b*tan(c/2 + (d*x)/2)^2)/(4*d) - (5*a*b*log(tan(c/2 + (d*x)/2)))/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)**6*csc(d*x+c)**4*(a+b*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________