Integrand size = 29, antiderivative size = 173 \[ \int \cos ^2(c+d x) \cot ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {5}{8} \left (4 a^2-3 b^2\right ) x+\frac {5 a b \text {arctanh}(\cos (c+d x))}{d}-\frac {4 a b \cos (c+d x)}{d}-\frac {2 a b \cos ^3(c+d x)}{3 d}+\frac {\left (2 a^2-b^2\right ) \cot (c+d x)}{d}-\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {a b \cot (c+d x) \csc (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} \] Output:
5/8*(4*a^2-3*b^2)*x+5*a*b*arctanh(cos(d*x+c))/d-4*a*b*cos(d*x+c)/d-2/3*a*b *cos(d*x+c)^3/d+(2*a^2-b^2)*cot(d*x+c)/d-1/3*a^2*cot(d*x+c)^3/d-a*b*cot(d* x+c)*csc(d*x+c)/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
Time = 6.97 (sec) , antiderivative size = 336, normalized size of antiderivative = 1.94 \[ \int \cos ^2(c+d x) \cot ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {5 \left (4 a^2-3 b^2\right ) (c+d x)}{8 d}-\frac {9 a b \cos (c+d x)}{2 d}-\frac {a b \cos (3 (c+d x))}{6 d}+\frac {\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 ) \csc \left (\frac {1}{2} (c+d x)\right )}{6 d}-\frac {a b \csc ^2\left (\frac {1}{2} (c+d x)\right )}{4 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 {5 a b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}-\frac {5 a b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {a b \sec ^2\left (\frac {1}{2} (c+d x)\right )}{4 d}+\frac {\sec \left (\frac {1}{2} (c+d x)\right ) \left (-7 a^2 \sin \left (\frac {1}{2} (c+d x)\right )+3 b^2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{6 d}+\frac {\left (a^2-2 b^2\right ) \sin (2 (c+d x))}{4 d}-\frac {b^2 \sin (4 (c+d x))}{32 d}+\frac {a^2 \sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{24 d} \] Input:
Integrate[Cos[c + d*x]^2*Cot[c + d*x]^4*(a + b*Sin[c + d*x])^2,x]
Output:
(5*(4*a^2 - 3*b^2)*(c + d*x))/(8*d) - (9*a*b*Cos[c + d*x])/(2*d) - (a*b*Co s[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*Se c[(c + d*x)/2]^2*Tan[(c + d*x)/2])/(24*d)
Time = 0.83 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.12, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.483, Rules used = {3042, 3390, 3042, 25, 3072, 252, 254, 2009, 4889, 361, 25, 1582, 1584, 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 ^2(c+d x) \cot ^4(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)^4}dx\) |
\(\Big \downarrow \) 3390 |
\(\displaystyle \int \cos ^2(c+d x) \cot ^4(c+d x) \left (a^2+b^2 \sin ^2(c+d x)\right )dx+2 a b \int \cos ^3(c+d x) \cot ^3(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^2 \cot (c+d x)^4 \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 )^3 \tan \left (c+d x+\frac {\pi }{2}\right )^3dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \cos (c+d x)^2 \cot (c+d x)^4 \left (a^2+b^2 \sin (c+d x)^2\right )dx-2 a b \int \sin \left (\frac {1}{2} (2 c+\pi )+d x\right )^3 \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )^3dx\) |
\(\Big \downarrow \) 3072 |
\(\displaystyle \int \cos (c+d x)^2 \cot (c+d x)^4 \left (a^2+b^2 \sin (c+d x)^2\right )dx-\frac {2 a b \int \frac {\cos ^6(c+d x)}{\left (1-\cos ^2(c+d x)\right )^2}d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 252 |
\(\displaystyle \int \cos (c+d x)^2 \cot (c+d x)^4 \left (a^2+b^2 \sin (c+d x)^2\right )dx-\frac {2 a b \left (\frac {\cos ^5(c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}-\frac {5}{2} \int \frac {\cos ^4(c+d x)}{1-\cos ^2(c+d x)}d\cos (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 254 |
\(\displaystyle \int \cos (c+d x)^2 \cot (c+d x)^4 \left (a^2+b^2 \sin (c+d x)^2\right )dx-\frac {2 a b \left (\frac {\cos ^5(c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}-\frac {5}{2} \int \left (-\cos ^2(c+d x)+\frac {1}{1-\cos ^2(c+d x)}-1\right )d\cos (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \int \cos (c+d x)^2 \cot (c+d x)^4 \left (a^2+b^2 \sin (c+d x)^2\right )dx-\frac {2 a b \left (\frac {\cos ^5(c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}-\frac {5}{2} \left (\text {arctanh}(\cos (c+d x))-\frac {1}{3} \cos ^3(c+d x)-\cos (c+d x)\right )\right )}{d}\) |
\(\Big \downarrow \) 4889 |
\(\displaystyle \frac {\int \frac {\cot ^4(c+d x) \left (a^2+\left (a^2+b^2\right ) \tan ^2(c+d x)\right )}{\left (\tan ^2(c+d x)+1\right )^3}d\tan (c+d x)}{d}-\frac {2 a b \left (\frac {\cos ^5(c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}-\frac {5}{2} \left (\text {arctanh}(\cos (c+d x))-\frac {1}{3} \cos ^3(c+d x)-\cos (c+d x)\right )\right )}{d}\) |
\(\Big \downarrow \) 361 |
\(\displaystyle \frac {-\frac {1}{4} \int -\frac {\cot ^4(c+d x) \left (-3 b^2 \tan ^4(c+d x)+4 b^2 \tan ^2(c+d x)+4 a^2\right )}{\left (\tan ^2(c+d x)+1\right )^2}d\tan (c+d x)-\frac {b^2 \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}}{d}-\frac {2 a b \left (\frac {\cos ^5(c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}-\frac {5}{2} \left (\text {arctanh}(\cos (c+d x))-\frac {1}{3} \cos ^3(c+d x)-\cos (c+d x)\right )\right )}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {1}{4} \int \frac {\cot ^4(c+d x) \left (-3 b^2 \tan ^4(c+d x)+4 b^2 \tan ^2(c+d x)+4 a^2\right )}{\left (\tan ^2(c+d x)+1\right )^2}d\tan (c+d x)-\frac {b^2 \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}}{d}-\frac {2 a b \left (\frac {\cos ^5(c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}-\frac {5}{2} \left (\text {arctanh}(\cos (c+d x))-\frac {1}{3} \cos ^3(c+d x)-\cos (c+d x)\right )\right )}{d}\) |
\(\Big \downarrow \) 1582 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \int \frac {\cot ^4(c+d x) \left (\left (4 a^2-7 b^2\right ) \tan ^4(c+d x)-8 \left (a^2-b^2\right ) \tan ^2(c+d x)+8 a^2\right )}{\tan ^2(c+d x)+1}d\tan (c+d x)+\frac {\left (4 a^2-7 b^2\right ) \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}\right )-\frac {b^2 \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}}{d}-\frac {2 a b \left (\frac {\cos ^5(c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}-\frac {5}{2} \left (\text {arctanh}(\cos (c+d x))-\frac {1}{3} \cos ^3(c+d x)-\cos (c+d x)\right )\right )}{d}\) |
\(\Big \downarrow \) 1584 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \int \left (8 a^2 \cot ^4(c+d x)-8 \left (2 a^2-b^2\right ) \cot ^2(c+d x)+\frac {5 \left (4 a^2-3 b^2\right )}{\tan ^2(c+d x)+1}\right )d\tan (c+d x)+\frac {\left (4 a^2-7 b^2\right ) \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}\right )-\frac {b^2 \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}}{d}-\frac {2 a b \left (\frac {\cos ^5(c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}-\frac {5}{2} \left (\text {arctanh}(\cos (c+d x))-\frac {1}{3} \cos ^3(c+d x)-\cos (c+d x)\right )\right )}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \left (5 \left (4 a^2-3 b^2\right ) \arctan (\tan (c+d x))+8 \left (2 a^2-b^2\right ) \cot (c+d x)-\frac {8}{3} a^2 \cot ^3(c+d x)\right )+\frac {\left (4 a^2-7 b^2\right ) \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}\right )-\frac {b^2 \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}}{d}-\frac {2 a b \left (\frac {\cos ^5(c+d x)}{2 \left (1-\cos ^2(c+d x)\right )}-\frac {5}{2} \left (\text {arctanh}(\cos (c+d x))-\frac {1}{3} \cos ^3(c+d x)-\cos (c+d x)\right )\right )}{d}\) |
Input:
Int[Cos[c + d*x]^2*Cot[c + d*x]^4*(a + b*Sin[c + d*x])^2,x]
Output:
(-2*a*b*(Cos[c + d*x]^5/(2*(1 - Cos[c + d*x]^2)) - (5*(ArcTanh[Cos[c + d*x ]] - Cos[c + d*x] - Cos[c + d*x]^3/3))/2))/d + (-1/4*(b^2*Tan[c + d*x])/(1 + Tan[c + d*x]^2)^2 + ((5*(4*a^2 - 3*b^2)*ArcTan[Tan[c + d*x]] + 8*(2*a^2 - b^2)*Cot[c + d*x] - (8*a^2*Cot[c + d*x]^3)/3)/2 + ((4*a^2 - 7*b^2)*Tan[ c + d*x])/(2*(1 + Tan[c + d*x]^2)))/4)/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[x^m*(a + b*x^2)^(p + 1)*E xpandToSum[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])
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] + Simp[(-d)^(m/2 - 1)/(2*e^ (2*p)*(q + 1)) Int[x^m*(d + e*x^2)^(q + 1)*ExpandToSum[Together[(1/(d + e *x^2))*(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))], x], x], x] /; Fre eQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && ILtQ[q, -1] && ILtQ[m/2, 0]
Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + ( c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[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]
Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_ Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[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]
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]}, With[{d = FreeFactors [Tan[v], x]}, Simp[d/Coefficient[v, x, 1] Subst[Int[SubstFor[1/(1 + d^2*x ^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /; !FalseQ[v] && FunctionOfQ[N onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] && !MatchQ[ u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
Time = 5.22 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.29
method | result | size |
derivativedivides | \(\frac {a^{2} \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 )+2 a b \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 )+b^{2} \left (-\frac {\cos \left (d x +c \right )^{7}}{\sin \left (d x +c \right )}-\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 )-\frac {15 d x}{8}-\frac {15 c}{8}\right )}{d}\) | \(223\) |
default | \(\frac {a^{2} \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 )+2 a b \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 )+b^{2} \left (-\frac {\cos \left (d x +c \right )^{7}}{\sin \left (d x +c \right )}-\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 )-\frac {15 d x}{8}-\frac {15 c}{8}\right )}{d}\) | \(223\) |
risch | \(\frac {5 a^{2} x}{2}-\frac {15 b^{2} x}{8}+\frac {i b^{2} {\mathrm e}^{4 i \left (d x +c \right )}}{64 d}-\frac {i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )} b^{2}}{4 d}-\frac {9 a b \,{\mathrm e}^{i \left (d x +c \right )}}{4 d}-\frac {9 a b \,{\mathrm e}^{-i \left (d x +c \right )}}{4 d}+\frac {i a^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} b^{2}}{4 d}-\frac {i b^{2} {\mathrm e}^{-4 i \left (d x +c \right )}}{64 d}+\frac {6 i a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-2 i b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+2 a b \,{\mathrm e}^{5 i \left (d x +c \right )}-8 i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+4 i b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+\frac {14 i a^{2}}{3}-2 i b^{2}-2 a b \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {5 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}-\frac {5 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {a b \cos \left (3 d x +3 c \right )}{6 d}\) | \(325\) |
Input:
int(cos(d*x+c)^2*cot(d*x+c)^4*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(-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)+2 *a*b*(-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)))+b^2*(-1/sin(d*x+c)*cos(d*x+c)^7 -(cos(d*x+c)^5+5/4*cos(d*x+c)^3+15/8*cos(d*x+c))*sin(d*x+c)-15/8*d*x-15/8* c))
Time = 0.11 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.46 \[ \int \cos ^2(c+d x) \cot ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\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 )} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^4*(a+b*sin(d*x+c))^2,x, algorithm="frica s")
Output:
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*cos(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*cos(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))
\[ \int \cos ^2(c+d x) \cot ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \cos ^{2}{\left (c + d x \right )} \cot ^{4}{\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)**2*cot(d*x+c)**4*(a+b*sin(d*x+c))**2,x)
Output:
Integral((a + b*sin(c + d*x))**2*cos(c + d*x)**2*cot(c + d*x)**4, x)
Time = 0.11 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.09 \[ \int \cos ^2(c+d x) \cot ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\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} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^4*(a+b*sin(d*x+c))^2,x, algorithm="maxim a")
Output:
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*log( 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
Leaf count of result is larger than twice the leaf count of optimal. 366 vs. \(2 (163) = 326\).
Time = 0.29 (sec) , antiderivative size = 366, normalized size of antiderivative = 2.12 \[ \int \cos ^2(c+d x) \cot ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\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} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^4*(a+b*sin(d*x+c))^2,x, algorithm="giac" )
Output:
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
Time = 21.82 (sec) , antiderivative size = 665, normalized size of antiderivative = 3.84 \[ \int \cos ^2(c+d x) \cot ^4(c+d x) (a+b \sin (c+d x))^2 \, dx =\text {Too large to display} \] Input:
int(cos(c + d*x)^2*cot(c + d*x)^4*(a + b*sin(c + d*x))^2,x)
Output:
(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*((83*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) - t an(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*ta n(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
Time = 0.18 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.36 \[ \int \cos ^2(c+d x) \cot ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {6 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6} b^{2}+16 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5} a b +12 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a^{2}-27 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} b^{2}-112 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a b +56 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{2}-24 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b^{2}-24 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a b -8 \cos \left (d x +c \right ) a^{2}-120 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{3} a b +60 \sin \left (d x +c \right )^{3} a^{2} d x +136 \sin \left (d x +c \right )^{3} a b -45 \sin \left (d x +c \right )^{3} b^{2} d x}{24 \sin \left (d x +c \right )^{3} d} \] Input:
int(cos(d*x+c)^2*cot(d*x+c)^4*(a+b*sin(d*x+c))^2,x)
Output:
(6*cos(c + d*x)*sin(c + d*x)**6*b**2 + 16*cos(c + d*x)*sin(c + d*x)**5*a*b + 12*cos(c + d*x)*sin(c + d*x)**4*a**2 - 27*cos(c + d*x)*sin(c + d*x)**4* b**2 - 112*cos(c + d*x)*sin(c + d*x)**3*a*b + 56*cos(c + d*x)*sin(c + d*x) **2*a**2 - 24*cos(c + d*x)*sin(c + d*x)**2*b**2 - 24*cos(c + d*x)*sin(c + d*x)*a*b - 8*cos(c + d*x)*a**2 - 120*log(tan((c + d*x)/2))*sin(c + d*x)**3 *a*b + 60*sin(c + d*x)**3*a**2*d*x + 136*sin(c + d*x)**3*a*b - 45*sin(c + d*x)**3*b**2*d*x)/(24*sin(c + d*x)**3*d)