Integrand size = 27, antiderivative size = 170 \[ \int \cos (c+d x) \cot ^5(c+d x) (a+b \sin (c+d x))^2 \, dx=5 a b x-\frac {5 \left (3 a^2-4 b^2\right ) \text {arctanh}(\cos (c+d x))}{8 d}+\frac {\left (a^2-2 b^2\right ) \cos (c+d x)}{d}-\frac {b^2 \cos ^3(c+d x)}{3 d}+\frac {4 a b \cot (c+d x)}{d}-\frac {2 a b \cot ^3(c+d x)}{3 d}+\frac {\left (9 a^2-4 b^2\right ) \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {a b \cos (c+d x) \sin (c+d x)}{d} \] Output:
5*a*b*x-5/8*(3*a^2-4*b^2)*arctanh(cos(d*x+c))/d+(a^2-2*b^2)*cos(d*x+c)/d-1 /3*b^2*cos(d*x+c)^3/d+4*a*b*cot(d*x+c)/d-2/3*a*b*cot(d*x+c)^3/d+1/8*(9*a^2 -4*b^2)*cot(d*x+c)*csc(d*x+c)/d-1/4*a^2*cot(d*x+c)*csc(d*x+c)^3/d+a*b*cos( d*x+c)*sin(d*x+c)/d
Time = 7.11 (sec) , antiderivative size = 337, normalized size of antiderivative = 1.98 \[ \int \cos (c+d x) \cot ^5(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {5 a b (c+d x)}{d}+\frac {(2 a-3 b) (2 a+3 b) \cos (c+d x)}{4 d}-\frac {b^2 \cos (3 (c+d x))}{12 d}+\frac {7 a b \cot \left (\frac {1}{2} (c+d x)\right )}{3 d}+\frac {\left (9 a^2-4 b^2\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {a b \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{12 d}-\frac {a^2 \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {5 \left (3 a^2-4 b^2\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {5 \left (3 a^2-4 b^2\right ) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {\left (-9 a^2+4 b^2\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {a^2 \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a b \sin (2 (c+d x))}{2 d}-\frac {7 a b \tan \left (\frac {1}{2} (c+d x)\right )}{3 d}+\frac {a b \sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{12 d} \] Input:
Integrate[Cos[c + d*x]*Cot[c + d*x]^5*(a + b*Sin[c + d*x])^2,x]
Output:
(5*a*b*(c + d*x))/d + ((2*a - 3*b)*(2*a + 3*b)*Cos[c + d*x])/(4*d) - (b^2* Cos[3*(c + d*x)])/(12*d) + (7*a*b*Cot[(c + d*x)/2])/(3*d) + ((9*a^2 - 4*b^ 2)*Csc[(c + d*x)/2]^2)/(32*d) - (a*b*Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^2)/ (12*d) - (a^2*Csc[(c + d*x)/2]^4)/(64*d) - (5*(3*a^2 - 4*b^2)*Log[Cos[(c + d*x)/2]])/(8*d) + (5*(3*a^2 - 4*b^2)*Log[Sin[(c + d*x)/2]])/(8*d) + ((-9* a^2 + 4*b^2)*Sec[(c + d*x)/2]^2)/(32*d) + (a^2*Sec[(c + d*x)/2]^4)/(64*d) + (a*b*Sin[2*(c + d*x)])/(2*d) - (7*a*b*Tan[(c + d*x)/2])/(3*d) + (a*b*Sec [(c + d*x)/2]^2*Tan[(c + d*x)/2])/(12*d)
Time = 0.70 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.15, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {3042, 3390, 3042, 3071, 252, 254, 2009, 4879, 360, 2345, 1467, 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 \cos (c+d x) \cot ^5(c+d x) (a+b \sin (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^6 (a+b \sin (c+d x))^2}{\sin (c+d x)^5}dx\) |
\(\Big \downarrow \) 3390 |
\(\displaystyle \int \cos (c+d x) \cot ^5(c+d x) \left (a^2+b^2 \sin ^2(c+d x)\right )dx+2 a b \int \cos ^2(c+d x) \cot ^4(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x) \cot (c+d x)^5 \left (a^2+b^2 \sin (c+d x)^2\right )dx+2 a b \int \sin \left (c+d x+\frac {\pi }{2}\right )^2 \tan \left (c+d x+\frac {\pi }{2}\right )^4dx\) |
\(\Big \downarrow \) 3071 |
\(\displaystyle \int \cos (c+d x) \cot (c+d x)^5 \left (a^2+b^2 \sin (c+d x)^2\right )dx-\frac {2 a b \int \frac {\cot ^6(c+d x)}{\left (\cot ^2(c+d x)+1\right )^2}d\cot (c+d x)}{d}\) |
\(\Big \downarrow \) 252 |
\(\displaystyle \int \cos (c+d x) \cot (c+d x)^5 \left (a^2+b^2 \sin (c+d x)^2\right )dx-\frac {2 a b \left (\frac {5}{2} \int \frac {\cot ^4(c+d x)}{\cot ^2(c+d x)+1}d\cot (c+d x)-\frac {\cot ^5(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )}{d}\) |
\(\Big \downarrow \) 254 |
\(\displaystyle \int \cos (c+d x) \cot (c+d x)^5 \left (a^2+b^2 \sin (c+d x)^2\right )dx-\frac {2 a b \left (\frac {5}{2} \int \left (\cot ^2(c+d x)+\frac {1}{\cot ^2(c+d x)+1}-1\right )d\cot (c+d x)-\frac {\cot ^5(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \int \cos (c+d x) \cot (c+d x)^5 \left (a^2+b^2 \sin (c+d x)^2\right )dx-\frac {2 a b \left (\frac {5}{2} \left (\arctan (\cot (c+d x))+\frac {1}{3} \cot ^3(c+d x)-\cot (c+d x)\right )-\frac {\cot ^5(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )}{d}\) |
\(\Big \downarrow \) 4879 |
\(\displaystyle -\frac {\int \frac {\cos ^6(c+d x) \left (a^2+b^2-b^2 \cos ^2(c+d x)\right )}{\left (1-\cos ^2(c+d x)\right )^3}d\cos (c+d x)}{d}-\frac {2 a b \left (\frac {5}{2} \left (\arctan (\cot (c+d x))+\frac {1}{3} \cot ^3(c+d x)-\cot (c+d x)\right )-\frac {\cot ^5(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )}{d}\) |
\(\Big \downarrow \) 360 |
\(\displaystyle -\frac {\frac {a^2 \cos (c+d x)}{4 \left (1-\cos ^2(c+d x)\right )^2}-\frac {1}{4} \int \frac {-4 b^2 \cos ^6(c+d x)+4 a^2 \cos ^4(c+d x)+4 a^2 \cos ^2(c+d x)+a^2}{\left (1-\cos ^2(c+d x)\right )^2}d\cos (c+d x)}{d}-\frac {2 a b \left (\frac {5}{2} \left (\arctan (\cot (c+d x))+\frac {1}{3} \cot ^3(c+d x)-\cot (c+d x)\right )-\frac {\cot ^5(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )}{d}\) |
\(\Big \downarrow \) 2345 |
\(\displaystyle -\frac {\frac {1}{4} \left (\frac {1}{2} \int \frac {-8 b^2 \cos ^4(c+d x)+8 \left (a^2-b^2\right ) \cos ^2(c+d x)+7 a^2-4 b^2}{1-\cos ^2(c+d x)}d\cos (c+d x)-\frac {\left (9 a^2-4 b^2\right ) \cos (c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}\right )+\frac {a^2 \cos (c+d x)}{4 \left (1-\cos ^2(c+d x)\right )^2}}{d}-\frac {2 a b \left (\frac {5}{2} \left (\arctan (\cot (c+d x))+\frac {1}{3} \cot ^3(c+d x)-\cot (c+d x)\right )-\frac {\cot ^5(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )}{d}\) |
\(\Big \downarrow \) 1467 |
\(\displaystyle -\frac {\frac {1}{4} \left (\frac {1}{2} \int \left (8 b^2 \cos ^2(c+d x)-8 \left (a^2-2 b^2\right )+\frac {5 \left (3 a^2-4 b^2\right )}{1-\cos ^2(c+d x)}\right )d\cos (c+d x)-\frac {\left (9 a^2-4 b^2\right ) \cos (c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}\right )+\frac {a^2 \cos (c+d x)}{4 \left (1-\cos ^2(c+d x)\right )^2}}{d}-\frac {2 a b \left (\frac {5}{2} \left (\arctan (\cot (c+d x))+\frac {1}{3} \cot ^3(c+d x)-\cot (c+d x)\right )-\frac {\cot ^5(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {1}{4} \left (\frac {1}{2} \left (5 \left (3 a^2-4 b^2\right ) \text {arctanh}(\cos (c+d x))-8 \left (a^2-2 b^2\right ) \cos (c+d x)+\frac {8}{3} b^2 \cos ^3(c+d x)\right )-\frac {\left (9 a^2-4 b^2\right ) \cos (c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}\right )+\frac {a^2 \cos (c+d x)}{4 \left (1-\cos ^2(c+d x)\right )^2}}{d}-\frac {2 a b \left (\frac {5}{2} \left (\arctan (\cot (c+d x))+\frac {1}{3} \cot ^3(c+d x)-\cot (c+d x)\right )-\frac {\cot ^5(c+d x)}{2 \left (\cot ^2(c+d x)+1\right )}\right )}{d}\) |
Input:
Int[Cos[c + d*x]*Cot[c + d*x]^5*(a + b*Sin[c + d*x])^2,x]
Output:
-(((a^2*Cos[c + d*x])/(4*(1 - Cos[c + d*x]^2)^2) + (-1/2*((9*a^2 - 4*b^2)* Cos[c + d*x])/(1 - Cos[c + d*x]^2) + (5*(3*a^2 - 4*b^2)*ArcTanh[Cos[c + d* x]] - 8*(a^2 - 2*b^2)*Cos[c + d*x] + (8*b^2*Cos[c + d*x]^3)/3)/2)/4)/d) - (2*a*b*(-1/2*Cot[c + d*x]^5/(1 + Cot[c + d*x]^2) + (5*(ArcTan[Cot[c + d*x] ] - Cot[c + d*x] + Cot[c + d*x]^3/3))/2))/d
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x )^(m - 1)*((a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] - Simp[c^2*((m - 1)/(2*b* (p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c }, x] && LtQ[p, -1] && GtQ[m, 1] && !ILtQ[(m + 2*p + 3)/2, 0] && IntBinomi alQ[a, b, c, 2, m, p, x]
Int[(x_)^(m_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^2, x], x] /; FreeQ[{a, b}, x] && IGtQ[m, 3]
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] + Simp[1/(2*b^(m/2 + 1)*(p + 1)) Int[(a + b*x^2)^(p + 1)*Expan dToSum[2*b*(p + 1)*x^2*Together[(b^(m/2)*x^(m - 2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d))/(a + b*x^2)] - (-a)^(m/2 - 1)*(b*c - a*d), x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IGtQ[m/2, 0] & & (IntegerQ[p] || EqQ[m + 2*p + 1, 0])
Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]
Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuot ient[Pq, a + b*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*g - b *f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1)) In t[(a + b*x^2)^(p + 1)*ExpandToSum[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S ymbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[b*(ff/f) Subst[I nt[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, b*(Tan[e + f*x]/ff)], x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[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]
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, Simp[With[{d = FreeFa ctors[Cos[v], x]}, -d/Coefficient[v, x, 1] Subst[Int[SubstFor[1, Cos[v]/d , u/Sin[v], x], x], x, Cos[v]/d]], x] /; !FalseQ[v] && FunctionOfQ[Nonfree Factors[Cos[v], x], u/Sin[v], x]]
Time = 3.85 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.44
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\cos \left (d x +c \right )^{7}}{4 \sin \left (d x +c \right )^{4}}+\frac {3 \cos \left (d x +c \right )^{7}}{8 \sin \left (d x +c \right )^{2}}+\frac {3 \cos \left (d x +c \right )^{5}}{8}+\frac {5 \cos \left (d x +c \right )^{3}}{8}+\frac {15 \cos \left (d x +c \right )}{8}+\frac {15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+2 a b \left (-\frac {\cos \left (d x +c \right )^{7}}{3 \sin \left (d x +c \right )^{3}}+\frac {4 \cos \left (d x +c \right )^{7}}{3 \sin \left (d x +c \right )}+\frac {4 \left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )+b^{2} \left (-\frac {\cos \left (d x +c \right )^{7}}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )^{5}}{2}-\frac {5 \cos \left (d x +c \right )^{3}}{6}-\frac {5 \cos \left (d x +c \right )}{2}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) | \(245\) |
default | \(\frac {a^{2} \left (-\frac {\cos \left (d x +c \right )^{7}}{4 \sin \left (d x +c \right )^{4}}+\frac {3 \cos \left (d x +c \right )^{7}}{8 \sin \left (d x +c \right )^{2}}+\frac {3 \cos \left (d x +c \right )^{5}}{8}+\frac {5 \cos \left (d x +c \right )^{3}}{8}+\frac {15 \cos \left (d x +c \right )}{8}+\frac {15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+2 a b \left (-\frac {\cos \left (d x +c \right )^{7}}{3 \sin \left (d x +c \right )^{3}}+\frac {4 \cos \left (d x +c \right )^{7}}{3 \sin \left (d x +c \right )}+\frac {4 \left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )+b^{2} \left (-\frac {\cos \left (d x +c \right )^{7}}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )^{5}}{2}-\frac {5 \cos \left (d x +c \right )^{3}}{6}-\frac {5 \cos \left (d x +c \right )}{2}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) | \(245\) |
risch | \(5 a b x -\frac {{\mathrm e}^{3 i \left (d x +c \right )} b^{2}}{24 d}-\frac {i a b \,{\mathrm e}^{2 i \left (d x +c \right )}}{4 d}+\frac {a^{2} {\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {9 \,{\mathrm e}^{i \left (d x +c \right )} b^{2}}{8 d}+\frac {a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{2 d}-\frac {9 \,{\mathrm e}^{-i \left (d x +c \right )} b^{2}}{8 d}+\frac {i a b \,{\mathrm e}^{-2 i \left (d x +c \right )}}{4 d}-\frac {{\mathrm e}^{-3 i \left (d x +c \right )} b^{2}}{24 d}+\frac {144 i a b \,{\mathrm e}^{6 i \left (d x +c \right )}-27 a^{2} {\mathrm e}^{7 i \left (d x +c \right )}+12 b^{2} {\mathrm e}^{7 i \left (d x +c \right )}-336 i a b \,{\mathrm e}^{4 i \left (d x +c \right )}+3 a^{2} {\mathrm e}^{5 i \left (d x +c \right )}-12 b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+304 i a b \,{\mathrm e}^{2 i \left (d x +c \right )}+3 a^{2} {\mathrm e}^{3 i \left (d x +c \right )}-12 b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-112 i a b -27 a^{2} {\mathrm e}^{i \left (d x +c \right )}+12 b^{2} {\mathrm e}^{i \left (d x +c \right )}}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}+\frac {15 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b^{2}}{2 d}-\frac {15 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b^{2}}{2 d}\) | \(401\) |
Input:
int(cos(d*x+c)*cot(d*x+c)^5*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(-1/4/sin(d*x+c)^4*cos(d*x+c)^7+3/8/sin(d*x+c)^2*cos(d*x+c)^7+3/8 *cos(d*x+c)^5+5/8*cos(d*x+c)^3+15/8*cos(d*x+c)+15/8*ln(csc(d*x+c)-cot(d*x+ c)))+2*a*b*(-1/3/sin(d*x+c)^3*cos(d*x+c)^7+4/3/sin(d*x+c)*cos(d*x+c)^7+4/3 *(cos(d*x+c)^5+5/4*cos(d*x+c)^3+15/8*cos(d*x+c))*sin(d*x+c)+5/2*d*x+5/2*c) +b^2*(-1/2/sin(d*x+c)^2*cos(d*x+c)^7-1/2*cos(d*x+c)^5-5/6*cos(d*x+c)^3-5/2 *cos(d*x+c)-5/2*ln(csc(d*x+c)-cot(d*x+c))))
Time = 0.11 (sec) , antiderivative size = 309, normalized size of antiderivative = 1.82 \[ \int \cos (c+d x) \cot ^5(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {16 \, b^{2} \cos \left (d x + c\right )^{7} - 240 \, a b d x \cos \left (d x + c\right )^{4} + 480 \, a b d x \cos \left (d x + c\right )^{2} - 16 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )} \cos \left (d x + c\right )^{5} - 240 \, a b d x + 50 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )} \cos \left (d x + c\right )^{3} - 30 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )} \cos \left (d x + c\right ) + 15 \, {\left ({\left (3 \, a^{2} - 4 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 3 \, a^{2} - 4 \, b^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 15 \, {\left ({\left (3 \, a^{2} - 4 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 3 \, a^{2} - 4 \, b^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 16 \, {\left (3 \, a b \cos \left (d x + c\right )^{5} - 20 \, a b \cos \left (d x + c\right )^{3} + 15 \, a b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{48 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \] Input:
integrate(cos(d*x+c)*cot(d*x+c)^5*(a+b*sin(d*x+c))^2,x, algorithm="fricas" )
Output:
-1/48*(16*b^2*cos(d*x + c)^7 - 240*a*b*d*x*cos(d*x + c)^4 + 480*a*b*d*x*co s(d*x + c)^2 - 16*(3*a^2 - 4*b^2)*cos(d*x + c)^5 - 240*a*b*d*x + 50*(3*a^2 - 4*b^2)*cos(d*x + c)^3 - 30*(3*a^2 - 4*b^2)*cos(d*x + c) + 15*((3*a^2 - 4*b^2)*cos(d*x + c)^4 - 2*(3*a^2 - 4*b^2)*cos(d*x + c)^2 + 3*a^2 - 4*b^2)* log(1/2*cos(d*x + c) + 1/2) - 15*((3*a^2 - 4*b^2)*cos(d*x + c)^4 - 2*(3*a^ 2 - 4*b^2)*cos(d*x + c)^2 + 3*a^2 - 4*b^2)*log(-1/2*cos(d*x + c) + 1/2) - 16*(3*a*b*cos(d*x + c)^5 - 20*a*b*cos(d*x + c)^3 + 15*a*b*cos(d*x + c))*si n(d*x + c))/(d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + d)
\[ \int \cos (c+d x) \cot ^5(c+d x) (a+b \sin (c+d x))^2 \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \cos {\left (c + d x \right )} \cot ^{5}{\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)*cot(d*x+c)**5*(a+b*sin(d*x+c))**2,x)
Output:
Integral((a + b*sin(c + d*x))**2*cos(c + d*x)*cot(c + d*x)**5, x)
Time = 0.11 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.21 \[ \int \cos (c+d x) \cot ^5(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {16 \, {\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 b - 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 )} b^{2} - 3 \, a^{2} {\left (\frac {2 \, {\left (9 \, \cos \left (d x + c\right )^{3} - 7 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - 16 \, \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 )}}{48 \, d} \] Input:
integrate(cos(d*x+c)*cot(d*x+c)^5*(a+b*sin(d*x+c))^2,x, algorithm="maxima" )
Output:
1/48*(16*(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*b - 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*log (cos(d*x + c) - 1))*b^2 - 3*a^2*(2*(9*cos(d*x + c)^3 - 7*cos(d*x + c))/(co s(d*x + c)^4 - 2*cos(d*x + c)^2 + 1) - 16*cos(d*x + c) + 15*log(cos(d*x + c) + 1) - 15*log(cos(d*x + c) - 1)))/d
Leaf count of result is larger than twice the leaf count of optimal. 346 vs. \(2 (160) = 320\).
Time = 0.28 (sec) , antiderivative size = 346, normalized size of antiderivative = 2.04 \[ \int \cos (c+d x) \cot ^5(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 16 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 48 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 960 \, {\left (d x + c\right )} a b - 432 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 120 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {128 \, {\left (3 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 9 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 6 \, 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} - 3 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, a^{2} + 7 \, b^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}} - \frac {750 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1000 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 432 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 48 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 16 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}}}{192 \, d} \] Input:
integrate(cos(d*x+c)*cot(d*x+c)^5*(a+b*sin(d*x+c))^2,x, algorithm="giac")
Output:
1/192*(3*a^2*tan(1/2*d*x + 1/2*c)^4 + 16*a*b*tan(1/2*d*x + 1/2*c)^3 - 48*a ^2*tan(1/2*d*x + 1/2*c)^2 + 24*b^2*tan(1/2*d*x + 1/2*c)^2 + 960*(d*x + c)* a*b - 432*a*b*tan(1/2*d*x + 1/2*c) + 120*(3*a^2 - 4*b^2)*log(abs(tan(1/2*d *x + 1/2*c))) - 128*(3*a*b*tan(1/2*d*x + 1/2*c)^5 - 3*a^2*tan(1/2*d*x + 1/ 2*c)^4 + 9*b^2*tan(1/2*d*x + 1/2*c)^4 - 6*a^2*tan(1/2*d*x + 1/2*c)^2 + 12* b^2*tan(1/2*d*x + 1/2*c)^2 - 3*a*b*tan(1/2*d*x + 1/2*c) - 3*a^2 + 7*b^2)/( tan(1/2*d*x + 1/2*c)^2 + 1)^3 - (750*a^2*tan(1/2*d*x + 1/2*c)^4 - 1000*b^2 *tan(1/2*d*x + 1/2*c)^4 - 432*a*b*tan(1/2*d*x + 1/2*c)^3 - 48*a^2*tan(1/2* d*x + 1/2*c)^2 + 24*b^2*tan(1/2*d*x + 1/2*c)^2 + 16*a*b*tan(1/2*d*x + 1/2* c) + 3*a^2)/tan(1/2*d*x + 1/2*c)^4)/d
Time = 22.05 (sec) , antiderivative size = 479, normalized size of antiderivative = 2.82 \[ \int \cos (c+d x) \cot ^5(c+d x) (a+b \sin (c+d x))^2 \, dx =\text {Too large to display} \] Input:
int(cos(c + d*x)*cot(c + d*x)^5*(a + b*sin(c + d*x))^2,x)
Output:
(log(tan(c/2 + (d*x)/2))*((15*a^2)/8 - (5*b^2)/2))/d + (a^2*tan(c/2 + (d*x )/2)^4)/(64*d) + (tan(c/2 + (d*x)/2)^2*((13*a^2)/4 - 2*b^2) + tan(c/2 + (d *x)/2)^8*(36*a^2 - 98*b^2) + tan(c/2 + (d*x)/2)^4*((173*a^2)/4 - (242*b^2) /3) + tan(c/2 + (d*x)/2)^6*((303*a^2)/4 - 134*b^2) - a^2/4 + 32*a*b*tan(c/ 2 + (d*x)/2)^3 + 136*a*b*tan(c/2 + (d*x)/2)^5 + (320*a*b*tan(c/2 + (d*x)/2 )^7)/3 + 4*a*b*tan(c/2 + (d*x)/2)^9 - (4*a*b*tan(c/2 + (d*x)/2))/3)/(d*(16 *tan(c/2 + (d*x)/2)^4 + 48*tan(c/2 + (d*x)/2)^6 + 48*tan(c/2 + (d*x)/2)^8 + 16*tan(c/2 + (d*x)/2)^10)) - (tan(c/2 + (d*x)/2)^2*(a^2/4 - b^2/8))/d + (a*b*tan(c/2 + (d*x)/2)^3)/(12*d) - (10*a*b*atan((100*a^2*b^2)/(50*a*b^3 - (75*a^3*b)/2 + 100*a^2*b^2*tan(c/2 + (d*x)/2)) - (50*a*b^3*tan(c/2 + (d*x )/2))/(50*a*b^3 - (75*a^3*b)/2 + 100*a^2*b^2*tan(c/2 + (d*x)/2)) + (75*a^3 *b*tan(c/2 + (d*x)/2))/(2*(50*a*b^3 - (75*a^3*b)/2 + 100*a^2*b^2*tan(c/2 + (d*x)/2)))))/d - (9*a*b*tan(c/2 + (d*x)/2))/(4*d)
Time = 0.17 (sec) , antiderivative size = 258, normalized size of antiderivative = 1.52 \[ \int \cos (c+d x) \cot ^5(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {64 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6} b^{2}+192 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5} a b +192 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a^{2}-448 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} b^{2}+896 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a b +216 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{2}-96 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b^{2}-128 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a b -48 \cos \left (d x +c \right ) a^{2}+360 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4} a^{2}-480 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4} b^{2}-327 \sin \left (d x +c \right )^{4} a^{2}+960 \sin \left (d x +c \right )^{4} a b d x +520 \sin \left (d x +c \right )^{4} b^{2}}{192 \sin \left (d x +c \right )^{4} d} \] Input:
int(cos(d*x+c)*cot(d*x+c)^5*(a+b*sin(d*x+c))^2,x)
Output:
(64*cos(c + d*x)*sin(c + d*x)**6*b**2 + 192*cos(c + d*x)*sin(c + d*x)**5*a *b + 192*cos(c + d*x)*sin(c + d*x)**4*a**2 - 448*cos(c + d*x)*sin(c + d*x) **4*b**2 + 896*cos(c + d*x)*sin(c + d*x)**3*a*b + 216*cos(c + d*x)*sin(c + d*x)**2*a**2 - 96*cos(c + d*x)*sin(c + d*x)**2*b**2 - 128*cos(c + d*x)*si n(c + d*x)*a*b - 48*cos(c + d*x)*a**2 + 360*log(tan((c + d*x)/2))*sin(c + d*x)**4*a**2 - 480*log(tan((c + d*x)/2))*sin(c + d*x)**4*b**2 - 327*sin(c + d*x)**4*a**2 + 960*sin(c + d*x)**4*a*b*d*x + 520*sin(c + d*x)**4*b**2)/( 192*sin(c + d*x)**4*d)