Integrand size = 29, antiderivative size = 181 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {3}{8} \left (4 a^2-b^2\right ) x-\frac {2 a b \text {arctanh}(\cos (c+d x))}{d}+\frac {a \left (a^2+28 b^2\right ) \cos (c+d x)}{6 b d}+\frac {\left (2 a^2+39 b^2\right ) \cos (c+d x) \sin (c+d x)}{24 d}+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{12 a b d}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d} \] Output:
-3/8*(4*a^2-b^2)*x-2*a*b*arctanh(cos(d*x+c))/d+1/6*a*(a^2+28*b^2)*cos(d*x+ c)/b/d+1/24*(2*a^2+39*b^2)*cos(d*x+c)*sin(d*x+c)/d+1/12*(a^2+12*b^2)*cos(d *x+c)*(a+b*sin(d*x+c))^2/a/b/d-1/4*cos(d*x+c)*(a+b*sin(d*x+c))^3/b/d-cot(d *x+c)*(a+b*sin(d*x+c))^3/a/d
Time = 0.92 (sec) , antiderivative size = 167, normalized size of antiderivative = 0.92 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {3 a^2 (c+d x)}{2 d}+\frac {3 b^2 (c+d x)}{8 d}+\frac {5 a b \cos (c+d x)}{2 d}+\frac {a b \cos (3 (c+d x))}{6 d}-\frac {a^2 \cot (c+d x)}{d}-\frac {2 a b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {2 a b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}-\frac {a^2 \sin (2 (c+d x))}{4 d}+\frac {b^2 \sin (2 (c+d x))}{4 d}+\frac {b^2 \sin (4 (c+d x))}{32 d} \] Input:
Integrate[Cos[c + d*x]^2*Cot[c + d*x]^2*(a + b*Sin[c + d*x])^2,x]
Output:
(-3*a^2*(c + d*x))/(2*d) + (3*b^2*(c + d*x))/(8*d) + (5*a*b*Cos[c + d*x])/ (2*d) + (a*b*Cos[3*(c + d*x)])/(6*d) - (a^2*Cot[c + d*x])/d - (2*a*b*Log[C os[(c + d*x)/2]])/d + (2*a*b*Log[Sin[(c + d*x)/2]])/d - (a^2*Sin[2*(c + d* x)])/(4*d) + (b^2*Sin[2*(c + d*x)])/(4*d) + (b^2*Sin[4*(c + d*x)])/(32*d)
Time = 1.35 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.12, number of steps used = 14, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.483, Rules used = {3042, 3373, 25, 3042, 3528, 3042, 3512, 3042, 3502, 27, 3042, 3214, 3042, 4257}
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 ^2(c+d x) (a+b \sin (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^4 (a+b \sin (c+d x))^2}{\sin (c+d x)^2}dx\) |
\(\Big \downarrow \) 3373 |
\(\displaystyle -\frac {\int -\csc (c+d x) (a+b \sin (c+d x))^2 \left (8 b^2-5 a \sin (c+d x) b-\left (a^2+12 b^2\right ) \sin ^2(c+d x)\right )dx}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \csc (c+d x) (a+b \sin (c+d x))^2 \left (8 b^2-5 a \sin (c+d x) b-\left (a^2+12 b^2\right ) \sin ^2(c+d x)\right )dx}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {(a+b \sin (c+d x))^2 \left (8 b^2-5 a \sin (c+d x) b-\left (a^2+12 b^2\right ) \sin (c+d x)^2\right )}{\sin (c+d x)}dx}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 3528 |
\(\displaystyle \frac {\frac {1}{3} \int \csc (c+d x) (a+b \sin (c+d x)) \left (-17 b \sin (c+d x) a^2+24 b^2 a-\left (2 a^2+39 b^2\right ) \sin ^2(c+d x) a\right )dx+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \int \frac {(a+b \sin (c+d x)) \left (-17 b \sin (c+d x) a^2+24 b^2 a-\left (2 a^2+39 b^2\right ) \sin (c+d x)^2 a\right )}{\sin (c+d x)}dx+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 3512 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \int \csc (c+d x) \left (48 a^2 b^2-9 a \left (4 a^2-b^2\right ) \sin (c+d x) b-4 a^2 \left (a^2+28 b^2\right ) \sin ^2(c+d x)\right )dx+\frac {a b \left (2 a^2+39 b^2\right ) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \int \frac {48 a^2 b^2-9 a \left (4 a^2-b^2\right ) \sin (c+d x) b-4 a^2 \left (a^2+28 b^2\right ) \sin (c+d x)^2}{\sin (c+d x)}dx+\frac {a b \left (2 a^2+39 b^2\right ) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (\int 3 \csc (c+d x) \left (16 a^2 b^2-3 a b \left (4 a^2-b^2\right ) \sin (c+d x)\right )dx+\frac {4 a^2 \left (a^2+28 b^2\right ) \cos (c+d x)}{d}\right )+\frac {a b \left (2 a^2+39 b^2\right ) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (3 \int \csc (c+d x) \left (16 a^2 b^2-3 a b \left (4 a^2-b^2\right ) \sin (c+d x)\right )dx+\frac {4 a^2 \left (a^2+28 b^2\right ) \cos (c+d x)}{d}\right )+\frac {a b \left (2 a^2+39 b^2\right ) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (3 \int \frac {16 a^2 b^2-3 a b \left (4 a^2-b^2\right ) \sin (c+d x)}{\sin (c+d x)}dx+\frac {4 a^2 \left (a^2+28 b^2\right ) \cos (c+d x)}{d}\right )+\frac {a b \left (2 a^2+39 b^2\right ) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (3 \left (16 a^2 b^2 \int \csc (c+d x)dx-3 a b x \left (4 a^2-b^2\right )\right )+\frac {4 a^2 \left (a^2+28 b^2\right ) \cos (c+d x)}{d}\right )+\frac {a b \left (2 a^2+39 b^2\right ) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (3 \left (16 a^2 b^2 \int \csc (c+d x)dx-3 a b x \left (4 a^2-b^2\right )\right )+\frac {4 a^2 \left (a^2+28 b^2\right ) \cos (c+d x)}{d}\right )+\frac {a b \left (2 a^2+39 b^2\right ) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (3 \left (-\frac {16 a^2 b^2 \text {arctanh}(\cos (c+d x))}{d}-3 a b x \left (4 a^2-b^2\right )\right )+\frac {4 a^2 \left (a^2+28 b^2\right ) \cos (c+d x)}{d}\right )+\frac {a b \left (2 a^2+39 b^2\right ) \sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\left (a^2+12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{4 a b}-\frac {\cos (c+d x) (a+b \sin (c+d x))^3}{4 b d}-\frac {\cot (c+d x) (a+b \sin (c+d x))^3}{a d}\) |
Input:
Int[Cos[c + d*x]^2*Cot[c + d*x]^2*(a + b*Sin[c + d*x])^2,x]
Output:
-1/4*(Cos[c + d*x]*(a + b*Sin[c + d*x])^3)/(b*d) - (Cot[c + d*x]*(a + b*Si n[c + d*x])^3)/(a*d) + (((a^2 + 12*b^2)*Cos[c + d*x]*(a + b*Sin[c + d*x])^ 2)/(3*d) + ((3*(-3*a*b*(4*a^2 - b^2)*x - (16*a^2*b^2*ArcTanh[Cos[c + d*x]] )/d) + (4*a^2*(a^2 + 28*b^2)*Cos[c + d*x])/d)/2 + (a*b*(2*a^2 + 39*b^2)*Co s[c + d*x]*Sin[c + d*x])/(2*d))/3)/(4*a*b)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[cos[(e_.) + (f_.)*(x_)]^4*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[Cos[e + f*x]*(a + b* Sin[e + f*x])^(m + 1)*((d*Sin[e + f*x])^(n + 1)/(a*d*f*(n + 1))), x] + (-Si mp[Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*((d*Sin[e + f*x])^(n + 2)/(b*d ^2*f*(m + n + 4))), x] + Simp[1/(a*b*d*(n + 1)*(m + n + 4)) Int[(a + b*Si n[e + f*x])^m*(d*Sin[e + f*x])^(n + 1)*Simp[a^2*(n + 1)*(n + 2) - b^2*(m + n + 2)*(m + n + 4) + a*b*(m + 3)*Sin[e + f*x] - (a^2*(n + 1)*(n + 3) - b^2* (m + n + 3)*(m + n + 4))*Sin[e + f*x]^2, x], x], x]) /; FreeQ[{a, b, d, e, f, m}, x] && NeQ[a^2 - b^2, 0] && (IGtQ[m, 0] || IntegersQ[2*m, 2*n]) && ! m < -1 && LtQ[n, -1] && NeQ[m + n + 4, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-C)*d*Cos[e + f*x]*Sin[e + f*x]*((a + b*Si n[e + f*x])^(m + 1)/(b*f*(m + 3))), x] + Simp[1/(b*(m + 3)) Int[(a + b*Si n[e + f*x])^m*Simp[a*C*d + A*b*c*(m + 3) + b*(B*c*(m + 3) + d*(C*(m + 2) + A*(m + 3)))*Sin[e + f*x] - (2*a*C*d - b*(c*C + B*d)*(m + 3))*Sin[e + f*x]^2 , x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_ .) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*(a + b*Sin[e + f*x ])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n + 2))), x] + Simp[1/(d*(m + n + 2)) Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^n*Simp[a*A* d*(m + n + 2) + C*(b*c*m + a*d*(n + 1)) + (d*(A*b + a*B)*(m + n + 2) - C*(a *c - b*d*(m + n + 1)))*Sin[e + f*x] + (C*(a*d*m - b*c*(m + 1)) + b*B*d*(m + n + 2))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n} , x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[ m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 2.54 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.75
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\cos \left (d x +c \right )^{5}}{\sin \left (d x +c \right )}-\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+2 a b \left (\frac {\cos \left (d x +c \right )^{3}}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+b^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(135\) |
default | \(\frac {a^{2} \left (-\frac {\cos \left (d x +c \right )^{5}}{\sin \left (d x +c \right )}-\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+2 a b \left (\frac {\cos \left (d x +c \right )^{3}}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+b^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(135\) |
risch | \(-\frac {3 a^{2} x}{2}+\frac {3 b^{2} x}{8}+\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}}{8 d}+\frac {5 a b \,{\mathrm e}^{i \left (d x +c \right )}}{4 d}+\frac {5 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}}{8 d}-\frac {2 i a^{2}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}-\frac {2 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {2 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}+\frac {\sin \left (4 d x +4 c \right ) b^{2}}{32 d}+\frac {a b \cos \left (3 d x +3 c \right )}{6 d}\) | \(211\) |
Input:
int(cos(d*x+c)^2*cot(d*x+c)^2*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(-1/sin(d*x+c)*cos(d*x+c)^5-(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x +c)-3/2*d*x-3/2*c)+2*a*b*(1/3*cos(d*x+c)^3+cos(d*x+c)+ln(csc(d*x+c)-cot(d* x+c)))+b^2*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c))
Time = 0.13 (sec) , antiderivative size = 155, normalized size of antiderivative = 0.86 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {6 \, b^{2} \cos \left (d x + c\right )^{5} - 3 \, {\left (4 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{3} + 24 \, a b \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 24 \, a b \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 9 \, {\left (4 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right ) - {\left (16 \, a b \cos \left (d x + c\right )^{3} - 9 \, {\left (4 \, a^{2} - b^{2}\right )} d x + 48 \, a b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d \sin \left (d x + c\right )} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="frica s")
Output:
-1/24*(6*b^2*cos(d*x + c)^5 - 3*(4*a^2 - b^2)*cos(d*x + c)^3 + 24*a*b*log( 1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 24*a*b*log(-1/2*cos(d*x + c) + 1/2) *sin(d*x + c) + 9*(4*a^2 - b^2)*cos(d*x + c) - (16*a*b*cos(d*x + c)^3 - 9* (4*a^2 - b^2)*d*x + 48*a*b*cos(d*x + c))*sin(d*x + c))/(d*sin(d*x + c))
\[ \int \cos ^2(c+d x) \cot ^2(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 ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)**2*cot(d*x+c)**2*(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)**2, x)
Time = 0.11 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.70 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {48 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} + 2}{\tan \left (d x + c\right )^{3} + \tan \left (d x + c\right )}\right )} a^{2} - 32 \, {\left (2 \, \cos \left (d x + c\right )^{3} + 6 \, \cos \left (d x + c\right ) - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} a b - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} b^{2}}{96 \, d} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="maxim a")
Output:
-1/96*(48*(3*d*x + 3*c + (3*tan(d*x + c)^2 + 2)/(tan(d*x + c)^3 + tan(d*x + c)))*a^2 - 32*(2*cos(d*x + c)^3 + 6*cos(d*x + c) - 3*log(cos(d*x + c) + 1) + 3*log(cos(d*x + c) - 1))*a*b - 3*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*b^2)/d
Time = 0.20 (sec) , antiderivative size = 274, normalized size of antiderivative = 1.51 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {48 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 9 \, {\left (4 \, a^{2} - b^{2}\right )} {\left (d x + c\right )} - \frac {12 \, {\left (4 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \frac {2 \, {\left (12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 96 \, 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} + 9 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 192 \, 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} - 9 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 160 \, 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 ) + 15 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 64 \, 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)^2*(a+b*sin(d*x+c))^2,x, algorithm="giac" )
Output:
1/24*(48*a*b*log(abs(tan(1/2*d*x + 1/2*c))) + 12*a^2*tan(1/2*d*x + 1/2*c) - 9*(4*a^2 - b^2)*(d*x + c) - 12*(4*a*b*tan(1/2*d*x + 1/2*c) + a^2)/tan(1/ 2*d*x + 1/2*c) + 2*(12*a^2*tan(1/2*d*x + 1/2*c)^7 - 15*b^2*tan(1/2*d*x + 1 /2*c)^7 + 96*a*b*tan(1/2*d*x + 1/2*c)^6 + 12*a^2*tan(1/2*d*x + 1/2*c)^5 + 9*b^2*tan(1/2*d*x + 1/2*c)^5 + 192*a*b*tan(1/2*d*x + 1/2*c)^4 - 12*a^2*tan (1/2*d*x + 1/2*c)^3 - 9*b^2*tan(1/2*d*x + 1/2*c)^3 + 160*a*b*tan(1/2*d*x + 1/2*c)^2 - 12*a^2*tan(1/2*d*x + 1/2*c) + 15*b^2*tan(1/2*d*x + 1/2*c) + 64 *a*b)/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d
Time = 34.41 (sec) , antiderivative size = 578, normalized size of antiderivative = 3.19 \[ \int \cos ^2(c+d x) \cot ^2(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)^2*(a + b*sin(c + d*x))^2,x)
Output:
(tan(c/2 + (d*x)/2)^8*(a^2 - (5*b^2)/2) - tan(c/2 + (d*x)/2)^2*(6*a^2 - (5 *b^2)/2) - tan(c/2 + (d*x)/2)^4*(8*a^2 + (3*b^2)/2) - a^2 - tan(c/2 + (d*x )/2)^6*(2*a^2 - (3*b^2)/2) + (80*a*b*tan(c/2 + (d*x)/2)^3)/3 + 32*a*b*tan( c/2 + (d*x)/2)^5 + 16*a*b*tan(c/2 + (d*x)/2)^7 + (32*a*b*tan(c/2 + (d*x)/2 ))/3)/(d*(2*tan(c/2 + (d*x)/2) + 8*tan(c/2 + (d*x)/2)^3 + 12*tan(c/2 + (d* x)/2)^5 + 8*tan(c/2 + (d*x)/2)^7 + 2*tan(c/2 + (d*x)/2)^9)) + (a^2*tan(c/2 + (d*x)/2))/(2*d) - (atan((((a^2*3i)/2 - (b^2*3i)/8)*((3*b^2)/4 - 3*a^2 + 6*tan(c/2 + (d*x)/2)*((a^2*3i)/2 - (b^2*3i)/8) + 4*a*b*tan(c/2 + (d*x)/2) )*1i - ((a^2*3i)/2 - (b^2*3i)/8)*(3*a^2 - (3*b^2)/4 + 6*tan(c/2 + (d*x)/2) *((a^2*3i)/2 - (b^2*3i)/8) - 4*a*b*tan(c/2 + (d*x)/2))*1i)/(((a^2*3i)/2 - (b^2*3i)/8)*((3*b^2)/4 - 3*a^2 + 6*tan(c/2 + (d*x)/2)*((a^2*3i)/2 - (b^2*3 i)/8) + 4*a*b*tan(c/2 + (d*x)/2)) + ((a^2*3i)/2 - (b^2*3i)/8)*(3*a^2 - (3* b^2)/4 + 6*tan(c/2 + (d*x)/2)*((a^2*3i)/2 - (b^2*3i)/8) - 4*a*b*tan(c/2 + (d*x)/2)) + 3*a*b^3 - 12*a^3*b + 2*tan(c/2 + (d*x)/2)*(9*a^4 + (9*b^4)/16 - (9*a^2*b^2)/2)))*(3*a^2 - (3*b^2)/4))/d + (2*a*b*log(tan(c/2 + (d*x)/2)) )/d
Time = 0.19 (sec) , antiderivative size = 172, normalized size of antiderivative = 0.95 \[ \int \cos ^2(c+d x) \cot ^2(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 )^{4} b^{2}-16 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a b -12 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{2}+15 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b^{2}+64 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a b -24 \cos \left (d x +c \right ) a^{2}+48 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right ) a b -36 \sin \left (d x +c \right ) a^{2} d x -64 \sin \left (d x +c \right ) a b +9 \sin \left (d x +c \right ) b^{2} d x}{24 \sin \left (d x +c \right ) d} \] Input:
int(cos(d*x+c)^2*cot(d*x+c)^2*(a+b*sin(d*x+c))^2,x)
Output:
( - 6*cos(c + d*x)*sin(c + d*x)**4*b**2 - 16*cos(c + d*x)*sin(c + d*x)**3* a*b - 12*cos(c + d*x)*sin(c + d*x)**2*a**2 + 15*cos(c + d*x)*sin(c + d*x)* *2*b**2 + 64*cos(c + d*x)*sin(c + d*x)*a*b - 24*cos(c + d*x)*a**2 + 48*log (tan((c + d*x)/2))*sin(c + d*x)*a*b - 36*sin(c + d*x)*a**2*d*x - 64*sin(c + d*x)*a*b + 9*sin(c + d*x)*b**2*d*x)/(24*sin(c + d*x)*d)