Integrand size = 27, antiderivative size = 116 \[ \int \cos ^3(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {3 a b x}{4}-\frac {a^2 \text {arctanh}(\cos (c+d x))}{d}+\frac {a^2 \cos (c+d x)}{d}+\frac {a^2 \cos ^3(c+d x)}{3 d}-\frac {b^2 \cos ^5(c+d x)}{5 d}+\frac {3 a b \cos (c+d x) \sin (c+d x)}{4 d}+\frac {a b \cos ^3(c+d x) \sin (c+d x)}{2 d} \] Output:
3/4*a*b*x-a^2*arctanh(cos(d*x+c))/d+a^2*cos(d*x+c)/d+1/3*a^2*cos(d*x+c)^3/ d-1/5*b^2*cos(d*x+c)^5/d+3/4*a*b*cos(d*x+c)*sin(d*x+c)/d+1/2*a*b*cos(d*x+c )^3*sin(d*x+c)/d
Time = 1.16 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.08 \[ \int \cos ^3(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {30 \left (10 a^2-b^2\right ) \cos (c+d x)+5 \left (4 a^2-3 b^2\right ) \cos (3 (c+d x))-3 b^2 \cos (5 (c+d x))+15 a \left (4 \left (3 b (c+d x)-4 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+4 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+8 b \sin (2 (c+d x))+b \sin (4 (c+d x))\right )}{240 d} \] Input:
Integrate[Cos[c + d*x]^3*Cot[c + d*x]*(a + b*Sin[c + d*x])^2,x]
Output:
(30*(10*a^2 - b^2)*Cos[c + d*x] + 5*(4*a^2 - 3*b^2)*Cos[3*(c + d*x)] - 3*b ^2*Cos[5*(c + d*x)] + 15*a*(4*(3*b*(c + d*x) - 4*a*Log[Cos[(c + d*x)/2]] + 4*a*Log[Sin[(c + d*x)/2]]) + 8*b*Sin[2*(c + d*x)] + b*Sin[4*(c + d*x)]))/ (240*d)
Time = 1.26 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.76, number of steps used = 14, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.519, Rules used = {3042, 3374, 27, 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 ^3(c+d x) \cot (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)}dx\) |
\(\Big \downarrow \) 3374 |
\(\displaystyle -\frac {\int -2 \csc (c+d x) (a+b \sin (c+d x))^2 \left (10 b^2-a \sin (c+d x) b+\left (a^2-12 b^2\right ) \sin ^2(c+d x)\right )dx}{20 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \csc (c+d x) (a+b \sin (c+d x))^2 \left (10 b^2-a \sin (c+d x) b+\left (a^2-12 b^2\right ) \sin ^2(c+d x)\right )dx}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {(a+b \sin (c+d x))^2 \left (10 b^2-a \sin (c+d x) b+\left (a^2-12 b^2\right ) \sin (c+d x)^2\right )}{\sin (c+d x)}dx}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 3528 |
\(\displaystyle \frac {\frac {1}{3} \int \csc (c+d x) (a+b \sin (c+d x)) \left (30 a b^2-\left (a^2-6 b^2\right ) \sin (c+d x) b+a \left (2 a^2-27 b^2\right ) \sin ^2(c+d x)\right )dx-\frac {\left (a^2-12 b^2\right ) \cos (c+d x) (a+b \sin (c+d x))^2}{3 d}}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \int \frac {(a+b \sin (c+d x)) \left (30 a b^2-\left (a^2-6 b^2\right ) \sin (c+d x) b+a \left (2 a^2-27 b^2\right ) \sin (c+d x)^2\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}}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 3512 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \int \csc (c+d x) \left (45 a \sin (c+d x) b^3+60 a^2 b^2+4 \left (a^4-14 b^2 a^2+3 b^4\right ) \sin ^2(c+d x)\right )dx-\frac {a b \left (2 a^2-27 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}}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \int \frac {45 a \sin (c+d x) b^3+60 a^2 b^2+4 \left (a^4-14 b^2 a^2+3 b^4\right ) \sin (c+d x)^2}{\sin (c+d x)}dx-\frac {a b \left (2 a^2-27 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}}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (\int 15 \csc (c+d x) \left (3 a \sin (c+d x) b^3+4 a^2 b^2\right )dx-\frac {4 \left (a^4-14 a^2 b^2+3 b^4\right ) \cos (c+d x)}{d}\right )-\frac {a b \left (2 a^2-27 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}}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (15 \int \csc (c+d x) \left (3 a \sin (c+d x) b^3+4 a^2 b^2\right )dx-\frac {4 \left (a^4-14 a^2 b^2+3 b^4\right ) \cos (c+d x)}{d}\right )-\frac {a b \left (2 a^2-27 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}}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (15 \int \frac {3 a \sin (c+d x) b^3+4 a^2 b^2}{\sin (c+d x)}dx-\frac {4 \left (a^4-14 a^2 b^2+3 b^4\right ) \cos (c+d x)}{d}\right )-\frac {a b \left (2 a^2-27 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}}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (15 \left (4 a^2 b^2 \int \csc (c+d x)dx+3 a b^3 x\right )-\frac {4 \left (a^4-14 a^2 b^2+3 b^4\right ) \cos (c+d x)}{d}\right )-\frac {a b \left (2 a^2-27 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}}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (15 \left (4 a^2 b^2 \int \csc (c+d x)dx+3 a b^3 x\right )-\frac {4 \left (a^4-14 a^2 b^2+3 b^4\right ) \cos (c+d x)}{d}\right )-\frac {a b \left (2 a^2-27 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}}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {1}{2} \left (15 \left (3 a b^3 x-\frac {4 a^2 b^2 \text {arctanh}(\cos (c+d x))}{d}\right )-\frac {4 \left (a^4-14 a^2 b^2+3 b^4\right ) \cos (c+d x)}{d}\right )-\frac {a b \left (2 a^2-27 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}}{10 b^2}+\frac {a \cos (c+d x) (a+b \sin (c+d x))^3}{10 b^2 d}-\frac {\sin (c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{5 b d}\) |
Input:
Int[Cos[c + d*x]^3*Cot[c + d*x]*(a + b*Sin[c + d*x])^2,x]
Output:
(a*Cos[c + d*x]*(a + b*Sin[c + d*x])^3)/(10*b^2*d) - (Cos[c + d*x]*Sin[c + d*x]*(a + b*Sin[c + d*x])^3)/(5*b*d) + (-1/3*((a^2 - 12*b^2)*Cos[c + d*x] *(a + b*Sin[c + d*x])^2)/d + ((15*(3*a*b^3*x - (4*a^2*b^2*ArcTanh[Cos[c + d*x]])/d) - (4*(a^4 - 14*a^2*b^2 + 3*b^4)*Cos[c + d*x])/d)/2 - (a*b*(2*a^2 - 27*b^2)*Cos[c + d*x]*Sin[c + d*x])/(2*d))/3)/(10*b^2)
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[a*(n + 3)*Cos[e + f* x]*(d*Sin[e + f*x])^(n + 1)*((a + b*Sin[e + f*x])^(m + 1)/(b^2*d*f*(m + n + 3)*(m + n + 4))), x] + (-Simp[Cos[e + f*x]*(d*Sin[e + f*x])^(n + 2)*((a + b*Sin[e + f*x])^(m + 1)/(b*d^2*f*(m + n + 4))), x] - Simp[1/(b^2*(m + n + 3 )*(m + n + 4)) Int[(d*Sin[e + f*x])^n*(a + b*Sin[e + f*x])^m*Simp[a^2*(n + 1)*(n + 3) - b^2*(m + n + 3)*(m + n + 4) + a*b*m*Sin[e + f*x] - (a^2*(n + 2)*(n + 3) - b^2*(m + n + 3)*(m + n + 5))*Sin[e + f*x]^2, x], x], x]) /; F reeQ[{a, b, d, e, f, m, n}, x] && NeQ[a^2 - b^2, 0] && (IGtQ[m, 0] || Integ ersQ[2*m, 2*n]) && !m < -1 && !LtQ[n, -1] && NeQ[m + n + 3, 0] && 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.49 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.80
method | result | size |
derivativedivides | \(\frac {a^{2} \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 )+2 a b \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 )-\frac {b^{2} \cos \left (d x +c \right )^{5}}{5}}{d}\) | \(93\) |
default | \(\frac {a^{2} \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 )+2 a b \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 )-\frac {b^{2} \cos \left (d x +c \right )^{5}}{5}}{d}\) | \(93\) |
risch | \(\frac {3 a b x}{4}+\frac {5 a^{2} {\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {{\mathrm e}^{i \left (d x +c \right )} b^{2}}{16 d}+\frac {5 a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}-\frac {{\mathrm e}^{-i \left (d x +c \right )} b^{2}}{16 d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}-\frac {\cos \left (5 d x +5 c \right ) b^{2}}{80 d}+\frac {a b \sin \left (4 d x +4 c \right )}{16 d}+\frac {a^{2} \cos \left (3 d x +3 c \right )}{12 d}-\frac {\cos \left (3 d x +3 c \right ) b^{2}}{16 d}+\frac {a b \sin \left (2 d x +2 c \right )}{2 d}\) | \(197\) |
Input:
int(cos(d*x+c)^3*cot(d*x+c)*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(1/3*cos(d*x+c)^3+cos(d*x+c)+ln(csc(d*x+c)-cot(d*x+c)))+2*a*b*(1/ 4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c)-1/5*b^2*cos(d*x+ c)^5)
Time = 0.14 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.97 \[ \int \cos ^3(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {12 \, b^{2} \cos \left (d x + c\right )^{5} - 20 \, a^{2} \cos \left (d x + c\right )^{3} - 45 \, a b d x - 60 \, a^{2} \cos \left (d x + c\right ) + 30 \, a^{2} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 30 \, a^{2} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 15 \, {\left (2 \, a b \cos \left (d x + c\right )^{3} + 3 \, a b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{60 \, d} \] Input:
integrate(cos(d*x+c)^3*cot(d*x+c)*(a+b*sin(d*x+c))^2,x, algorithm="fricas" )
Output:
-1/60*(12*b^2*cos(d*x + c)^5 - 20*a^2*cos(d*x + c)^3 - 45*a*b*d*x - 60*a^2 *cos(d*x + c) + 30*a^2*log(1/2*cos(d*x + c) + 1/2) - 30*a^2*log(-1/2*cos(d *x + c) + 1/2) - 15*(2*a*b*cos(d*x + c)^3 + 3*a*b*cos(d*x + c))*sin(d*x + c))/d
\[ \int \cos ^3(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \cos ^{3}{\left (c + d x \right )} \cot {\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)**3*cot(d*x+c)*(a+b*sin(d*x+c))**2,x)
Output:
Integral((a + b*sin(c + d*x))**2*cos(c + d*x)**3*cot(c + d*x), x)
Time = 0.04 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.84 \[ \int \cos ^3(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {48 \, b^{2} \cos \left (d x + c\right )^{5} - 40 \, {\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^{2} - 15 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a b}{240 \, d} \] Input:
integrate(cos(d*x+c)^3*cot(d*x+c)*(a+b*sin(d*x+c))^2,x, algorithm="maxima" )
Output:
-1/240*(48*b^2*cos(d*x + c)^5 - 40*(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^2 - 15*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*a*b)/d
Leaf count of result is larger than twice the leaf count of optimal. 213 vs. \(2 (106) = 212\).
Time = 0.15 (sec) , antiderivative size = 213, normalized size of antiderivative = 1.84 \[ \int \cos ^3(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {45 \, {\left (d x + c\right )} a b + 60 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {2 \, {\left (75 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 120 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 60 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 30 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 360 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 440 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 120 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 30 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 280 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 75 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 80 \, a^{2} + 12 \, b^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{5}}}{60 \, d} \] Input:
integrate(cos(d*x+c)^3*cot(d*x+c)*(a+b*sin(d*x+c))^2,x, algorithm="giac")
Output:
1/60*(45*(d*x + c)*a*b + 60*a^2*log(abs(tan(1/2*d*x + 1/2*c))) - 2*(75*a*b *tan(1/2*d*x + 1/2*c)^9 - 120*a^2*tan(1/2*d*x + 1/2*c)^8 + 60*b^2*tan(1/2* d*x + 1/2*c)^8 + 30*a*b*tan(1/2*d*x + 1/2*c)^7 - 360*a^2*tan(1/2*d*x + 1/2 *c)^6 - 440*a^2*tan(1/2*d*x + 1/2*c)^4 + 120*b^2*tan(1/2*d*x + 1/2*c)^4 - 30*a*b*tan(1/2*d*x + 1/2*c)^3 - 280*a^2*tan(1/2*d*x + 1/2*c)^2 - 75*a*b*ta n(1/2*d*x + 1/2*c) - 80*a^2 + 12*b^2)/(tan(1/2*d*x + 1/2*c)^2 + 1)^5)/d
Time = 35.86 (sec) , antiderivative size = 319, normalized size of antiderivative = 2.75 \[ \int \cos ^3(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (4\,a^2-2\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {44\,a^2}{3}-4\,b^2\right )+\frac {28\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+12\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {8\,a^2}{3}-\frac {2\,b^2}{5}+a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-\frac {5\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{2}+\frac {5\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {3\,a\,b\,\mathrm {atan}\left (\frac {9\,a^2\,b^2}{4\,\left (3\,a^3\,b-\frac {9\,a^2\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}\right )}+\frac {3\,a^3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3\,a^3\,b-\frac {9\,a^2\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}\right )}{2\,d} \] Input:
int(cos(c + d*x)^3*cot(c + d*x)*(a + b*sin(c + d*x))^2,x)
Output:
(a^2*log(tan(c/2 + (d*x)/2)))/d + (tan(c/2 + (d*x)/2)^8*(4*a^2 - 2*b^2) + tan(c/2 + (d*x)/2)^4*((44*a^2)/3 - 4*b^2) + (28*a^2*tan(c/2 + (d*x)/2)^2)/ 3 + 12*a^2*tan(c/2 + (d*x)/2)^6 + (8*a^2)/3 - (2*b^2)/5 + a*b*tan(c/2 + (d *x)/2)^3 - a*b*tan(c/2 + (d*x)/2)^7 - (5*a*b*tan(c/2 + (d*x)/2)^9)/2 + (5* a*b*tan(c/2 + (d*x)/2))/2)/(d*(5*tan(c/2 + (d*x)/2)^2 + 10*tan(c/2 + (d*x) /2)^4 + 10*tan(c/2 + (d*x)/2)^6 + 5*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x) /2)^10 + 1)) + (3*a*b*atan((9*a^2*b^2)/(4*(3*a^3*b - (9*a^2*b^2*tan(c/2 + (d*x)/2))/4)) + (3*a^3*b*tan(c/2 + (d*x)/2))/(3*a^3*b - (9*a^2*b^2*tan(c/2 + (d*x)/2))/4)))/(2*d)
Time = 0.18 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.34 \[ \int \cos ^3(c+d x) \cot (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {-12 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} b^{2}-30 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a b -20 \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}+75 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a b +80 \cos \left (d x +c \right ) a^{2}-12 \cos \left (d x +c \right ) b^{2}+60 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2}-80 a^{2}+45 a b c +45 a b d x +12 b^{2}}{60 d} \] Input:
int(cos(d*x+c)^3*cot(d*x+c)*(a+b*sin(d*x+c))^2,x)
Output:
( - 12*cos(c + d*x)*sin(c + d*x)**4*b**2 - 30*cos(c + d*x)*sin(c + d*x)**3 *a*b - 20*cos(c + d*x)*sin(c + d*x)**2*a**2 + 24*cos(c + d*x)*sin(c + d*x) **2*b**2 + 75*cos(c + d*x)*sin(c + d*x)*a*b + 80*cos(c + d*x)*a**2 - 12*co s(c + d*x)*b**2 + 60*log(tan((c + d*x)/2))*a**2 - 80*a**2 + 45*a*b*c + 45* a*b*d*x + 12*b**2)/(60*d)