Integrand size = 27, antiderivative size = 138 \[ \int \cot ^2(c+d x) \csc (c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {1}{2} b \left (6 a^2-b^2\right ) x+\frac {a \left (a^2-6 b^2\right ) \text {arctanh}(\cos (c+d x))}{2 d}+\frac {15 a b^2 \cos (c+d x)}{2 d}+\frac {5 b^3 \cos (c+d x) \sin (c+d x)}{2 d}-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{2 d}-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d} \] Output:
-1/2*b*(6*a^2-b^2)*x+1/2*a*(a^2-6*b^2)*arctanh(cos(d*x+c))/d+15/2*a*b^2*co s(d*x+c)/d+5/2*b^3*cos(d*x+c)*sin(d*x+c)/d-3/2*b*cot(d*x+c)*(a+b*sin(d*x+c ))^2/d-1/2*cot(d*x+c)*csc(d*x+c)*(a+b*sin(d*x+c))^3/d
Time = 3.15 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.39 \[ \int \cot ^2(c+d x) \csc (c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {-24 a^2 b c+4 b^3 c-24 a^2 b d x+4 b^3 d x+24 a b^2 \cos (c+d x)-12 a^2 b \cot \left (\frac {1}{2} (c+d x)\right )-a^3 \csc ^2\left (\frac {1}{2} (c+d x)\right )+4 a^3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-24 a b^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-4 a^3 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+24 a b^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+a^3 \sec ^2\left (\frac {1}{2} (c+d x)\right )+2 b^3 \sin (2 (c+d x))+12 a^2 b \tan \left (\frac {1}{2} (c+d x)\right )}{8 d} \] Input:
Integrate[Cot[c + d*x]^2*Csc[c + d*x]*(a + b*Sin[c + d*x])^3,x]
Output:
(-24*a^2*b*c + 4*b^3*c - 24*a^2*b*d*x + 4*b^3*d*x + 24*a*b^2*Cos[c + d*x] - 12*a^2*b*Cot[(c + d*x)/2] - a^3*Csc[(c + d*x)/2]^2 + 4*a^3*Log[Cos[(c + d*x)/2]] - 24*a*b^2*Log[Cos[(c + d*x)/2]] - 4*a^3*Log[Sin[(c + d*x)/2]] + 24*a*b^2*Log[Sin[(c + d*x)/2]] + a^3*Sec[(c + d*x)/2]^2 + 2*b^3*Sin[2*(c + d*x)] + 12*a^2*b*Tan[(c + d*x)/2])/(8*d)
Time = 1.18 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.96, number of steps used = 16, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.593, Rules used = {3042, 3368, 3042, 3527, 3042, 3526, 25, 3042, 3512, 27, 3042, 3502, 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 \cot ^2(c+d x) \csc (c+d x) (a+b \sin (c+d x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2 (a+b \sin (c+d x))^3}{\sin (c+d x)^3}dx\) |
\(\Big \downarrow \) 3368 |
\(\displaystyle \int \left (1-\sin ^2(c+d x)\right ) \csc ^3(c+d x) (a+b \sin (c+d x))^3dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (1-\sin (c+d x)^2\right ) (a+b \sin (c+d x))^3}{\sin (c+d x)^3}dx\) |
\(\Big \downarrow \) 3527 |
\(\displaystyle \frac {1}{2} \int \csc ^2(c+d x) (a+b \sin (c+d x))^2 \left (-4 b \sin ^2(c+d x)-a \sin (c+d x)+3 b\right )dx-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {(a+b \sin (c+d x))^2 \left (-4 b \sin (c+d x)^2-a \sin (c+d x)+3 b\right )}{\sin (c+d x)^2}dx-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3526 |
\(\displaystyle \frac {1}{2} \left (\int -\csc (c+d x) (a+b \sin (c+d x)) \left (a^2+5 b \sin (c+d x) a-6 b^2+10 b^2 \sin ^2(c+d x)\right )dx-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (-\int \csc (c+d x) (a+b \sin (c+d x)) \left (a^2+5 b \sin (c+d x) a-6 b^2+10 b^2 \sin ^2(c+d x)\right )dx-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (-\int \frac {(a+b \sin (c+d x)) \left (a^2+5 b \sin (c+d x) a-6 b^2+10 b^2 \sin (c+d x)^2\right )}{\sin (c+d x)}dx-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3512 |
\(\displaystyle \frac {1}{2} \left (-\frac {1}{2} \int 2 \csc (c+d x) \left (15 a b^2 \sin ^2(c+d x)+b \left (6 a^2-b^2\right ) \sin (c+d x)+a \left (a^2-6 b^2\right )\right )dx-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}+\frac {5 b^3 \sin (c+d x) \cos (c+d x)}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{2} \left (-\int \csc (c+d x) \left (15 a b^2 \sin ^2(c+d x)+b \left (6 a^2-b^2\right ) \sin (c+d x)+a \left (a^2-6 b^2\right )\right )dx-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}+\frac {5 b^3 \sin (c+d x) \cos (c+d x)}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (-\int \frac {15 a b^2 \sin (c+d x)^2+b \left (6 a^2-b^2\right ) \sin (c+d x)+a \left (a^2-6 b^2\right )}{\sin (c+d x)}dx-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}+\frac {5 b^3 \sin (c+d x) \cos (c+d x)}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {1}{2} \left (-\int \csc (c+d x) \left (a \left (a^2-6 b^2\right )+b \left (6 a^2-b^2\right ) \sin (c+d x)\right )dx+\frac {15 a b^2 \cos (c+d x)}{d}-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}+\frac {5 b^3 \sin (c+d x) \cos (c+d x)}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (-\int \frac {a \left (a^2-6 b^2\right )+b \left (6 a^2-b^2\right ) \sin (c+d x)}{\sin (c+d x)}dx+\frac {15 a b^2 \cos (c+d x)}{d}-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}+\frac {5 b^3 \sin (c+d x) \cos (c+d x)}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {1}{2} \left (-a \left (a^2-6 b^2\right ) \int \csc (c+d x)dx-b x \left (6 a^2-b^2\right )+\frac {15 a b^2 \cos (c+d x)}{d}-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}+\frac {5 b^3 \sin (c+d x) \cos (c+d x)}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (-a \left (a^2-6 b^2\right ) \int \csc (c+d x)dx-b x \left (6 a^2-b^2\right )+\frac {15 a b^2 \cos (c+d x)}{d}-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}+\frac {5 b^3 \sin (c+d x) \cos (c+d x)}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{2} \left (\frac {a \left (a^2-6 b^2\right ) \text {arctanh}(\cos (c+d x))}{d}-b x \left (6 a^2-b^2\right )+\frac {15 a b^2 \cos (c+d x)}{d}-\frac {3 b \cot (c+d x) (a+b \sin (c+d x))^2}{d}+\frac {5 b^3 \sin (c+d x) \cos (c+d x)}{d}\right )-\frac {\cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{2 d}\) |
Input:
Int[Cot[c + d*x]^2*Csc[c + d*x]*(a + b*Sin[c + d*x])^3,x]
Output:
-1/2*(Cot[c + d*x]*Csc[c + d*x]*(a + b*Sin[c + d*x])^3)/d + (-(b*(6*a^2 - b^2)*x) + (a*(a^2 - 6*b^2)*ArcTanh[Cos[c + d*x]])/d + (15*a*b^2*Cos[c + d* x])/d + (5*b^3*Cos[c + d*x]*Sin[c + d*x])/d - (3*b*Cot[c + d*x]*(a + b*Sin [c + d*x])^2)/d)/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_)]^2*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[(d*Sin[e + f*x])^n*(a + b*Sin[e + f*x])^m*(1 - Sin[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, m, n }, x] && NeQ[a^2 - b^2, 0] && (IGtQ[m, 0] || IntegersQ[2*m, 2*n])
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^2*C - B*c*d + A*d^2))*Cos[e + f*x ]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - d^2))), x] + Simp[1/(d*(n + 1)*(c^2 - d^2)) Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[A*d*(b*d*m + a*c*(n + 1)) + (c*C - B* d)*(b*c*m + a*d*(n + 1)) - (d*(A*(a*d*(n + 2) - b*c*(n + 1)) + B*(b*d*(n + 1) - a*c*(n + 2))) - C*(b*c*d*(n + 1) - a*(c^2 + d^2*(n + 1))))*Sin[e + f*x ] + b*(d*(B*c - A*d)*(m + n + 2) - C*(c^2*(m + 1) + d^2*(n + 1)))*Sin[e + f *x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d , 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && LtQ[n, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(c^2*C + A*d^2))*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - d^2))), x] + Simp[1/(d*(n + 1)*(c^2 - d^ 2)) Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[A* d*(b*d*m + a*c*(n + 1)) + c*C*(b*c*m + a*d*(n + 1)) - (A*d*(a*d*(n + 2) - b *c*(n + 1)) - C*(b*c*d*(n + 1) - a*(c^2 + d^2*(n + 1))))*Sin[e + f*x] - b*( A*d^2*(m + n + 2) + C*(c^2*(m + 1) + d^2*(n + 1)))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && LtQ[n, -1]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.96 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.96
method | result | size |
derivativedivides | \(\frac {a^{3} \left (-\frac {\cos \left (d x +c \right )^{3}}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{2}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+3 a^{2} b \left (-\cot \left (d x +c \right )-d x -c \right )+3 a \,b^{2} \left (\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+b^{3} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(132\) |
default | \(\frac {a^{3} \left (-\frac {\cos \left (d x +c \right )^{3}}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{2}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+3 a^{2} b \left (-\cot \left (d x +c \right )-d x -c \right )+3 a \,b^{2} \left (\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+b^{3} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(132\) |
risch | \(-3 a^{2} b x +\frac {b^{3} x}{2}-\frac {i b^{3} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {3 \,{\mathrm e}^{i \left (d x +c \right )} a \,b^{2}}{2 d}+\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )} a \,b^{2}}{2 d}+\frac {i b^{3} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {i a^{2} \left (i a \,{\mathrm e}^{3 i \left (d x +c \right )}+i a \,{\mathrm e}^{i \left (d x +c \right )}+6 b \,{\mathrm e}^{2 i \left (d x +c \right )}-6 b \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b^{2}}{d}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b^{2}}{d}\) | \(233\) |
Input:
int(cot(d*x+c)^2*csc(d*x+c)*(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
1/d*(a^3*(-1/2/sin(d*x+c)^2*cos(d*x+c)^3-1/2*cos(d*x+c)-1/2*ln(csc(d*x+c)- cot(d*x+c)))+3*a^2*b*(-cot(d*x+c)-d*x-c)+3*a*b^2*(cos(d*x+c)+ln(csc(d*x+c) -cot(d*x+c)))+b^3*(1/2*sin(d*x+c)*cos(d*x+c)+1/2*d*x+1/2*c))
Time = 0.11 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.57 \[ \int \cot ^2(c+d x) \csc (c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {12 \, a b^{2} \cos \left (d x + c\right )^{3} - 2 \, {\left (6 \, a^{2} b - b^{3}\right )} d x \cos \left (d x + c\right )^{2} + 2 \, {\left (6 \, a^{2} b - b^{3}\right )} d x + 2 \, {\left (a^{3} - 6 \, a b^{2}\right )} \cos \left (d x + c\right ) - {\left (a^{3} - 6 \, a b^{2} - {\left (a^{3} - 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (a^{3} - 6 \, a b^{2} - {\left (a^{3} - 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, {\left (b^{3} \cos \left (d x + c\right )^{3} + {\left (6 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)*(a+b*sin(d*x+c))^3,x, algorithm="fricas" )
Output:
1/4*(12*a*b^2*cos(d*x + c)^3 - 2*(6*a^2*b - b^3)*d*x*cos(d*x + c)^2 + 2*(6 *a^2*b - b^3)*d*x + 2*(a^3 - 6*a*b^2)*cos(d*x + c) - (a^3 - 6*a*b^2 - (a^3 - 6*a*b^2)*cos(d*x + c)^2)*log(1/2*cos(d*x + c) + 1/2) + (a^3 - 6*a*b^2 - (a^3 - 6*a*b^2)*cos(d*x + c)^2)*log(-1/2*cos(d*x + c) + 1/2) + 2*(b^3*cos (d*x + c)^3 + (6*a^2*b - b^3)*cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^ 2 - d)
\[ \int \cot ^2(c+d x) \csc (c+d x) (a+b \sin (c+d x))^3 \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right )^{3} \cot ^{2}{\left (c + d x \right )} \csc {\left (c + d x \right )}\, dx \] Input:
integrate(cot(d*x+c)**2*csc(d*x+c)*(a+b*sin(d*x+c))**3,x)
Output:
Integral((a + b*sin(c + d*x))**3*cot(c + d*x)**2*csc(c + d*x), x)
Time = 0.15 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.93 \[ \int \cot ^2(c+d x) \csc (c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {12 \, {\left (d x + c + \frac {1}{\tan \left (d x + c\right )}\right )} a^{2} b - {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} b^{3} - a^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + \log \left (\cos \left (d x + c\right ) + 1\right ) - \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 6 \, a b^{2} {\left (2 \, \cos \left (d x + c\right ) - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{4 \, d} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)*(a+b*sin(d*x+c))^3,x, algorithm="maxima" )
Output:
-1/4*(12*(d*x + c + 1/tan(d*x + c))*a^2*b - (2*d*x + 2*c + sin(2*d*x + 2*c ))*b^3 - a^3*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) + log(cos(d*x + c) + 1) - log(cos(d*x + c) - 1)) - 6*a*b^2*(2*cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)))/d
Leaf count of result is larger than twice the leaf count of optimal. 272 vs. \(2 (126) = 252\).
Time = 0.16 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.97 \[ \int \cot ^2(c+d x) \csc (c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, {\left (6 \, a^{2} b - b^{3}\right )} {\left (d x + c\right )} - 4 \, {\left (a^{3} - 6 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {2 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 12 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 8 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 24 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 24 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 8 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}^{2}}}{8 \, d} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)*(a+b*sin(d*x+c))^3,x, algorithm="giac")
Output:
1/8*(a^3*tan(1/2*d*x + 1/2*c)^2 + 12*a^2*b*tan(1/2*d*x + 1/2*c) - 4*(6*a^2 *b - b^3)*(d*x + c) - 4*(a^3 - 6*a*b^2)*log(abs(tan(1/2*d*x + 1/2*c))) + ( 2*a^3*tan(1/2*d*x + 1/2*c)^6 - 12*a*b^2*tan(1/2*d*x + 1/2*c)^6 - 12*a^2*b* tan(1/2*d*x + 1/2*c)^5 - 8*b^3*tan(1/2*d*x + 1/2*c)^5 + 3*a^3*tan(1/2*d*x + 1/2*c)^4 + 24*a*b^2*tan(1/2*d*x + 1/2*c)^4 - 24*a^2*b*tan(1/2*d*x + 1/2* c)^3 + 8*b^3*tan(1/2*d*x + 1/2*c)^3 + 36*a*b^2*tan(1/2*d*x + 1/2*c)^2 - 12 *a^2*b*tan(1/2*d*x + 1/2*c) - a^3)/(tan(1/2*d*x + 1/2*c)^3 + tan(1/2*d*x + 1/2*c))^2)/d
Time = 33.98 (sec) , antiderivative size = 585, normalized size of antiderivative = 4.24 \[ \int \cot ^2(c+d x) \csc (c+d x) (a+b \sin (c+d x))^3 \, dx =\text {Too large to display} \] Input:
int((cot(c + d*x)^2*(a + b*sin(c + d*x))^3)/sin(c + d*x),x)
Output:
(a^3*tan(c/2 + (d*x)/2)^2)/(8*d) + (log(tan(c/2 + (d*x)/2))*(3*a*b^2 - a^3 /2))/d - (tan(c/2 + (d*x)/2)^5*(6*a^2*b + 4*b^3) - tan(c/2 + (d*x)/2)^4*(2 4*a*b^2 - a^3/2) - tan(c/2 + (d*x)/2)^2*(24*a*b^2 - a^3) + tan(c/2 + (d*x) /2)^3*(12*a^2*b - 4*b^3) + a^3/2 + 6*a^2*b*tan(c/2 + (d*x)/2))/(d*(4*tan(c /2 + (d*x)/2)^2 + 8*tan(c/2 + (d*x)/2)^4 + 4*tan(c/2 + (d*x)/2)^6)) + (3*a ^2*b*tan(c/2 + (d*x)/2))/(2*d) + (b*atan(((b*(6*a^2 - b^2)*(tan(c/2 + (d*x )/2)*(6*a*b^2 - a^3) - 6*a^2*b + b^3 - b*tan(c/2 + (d*x)/2)*(6*a^2 - b^2)* 3i))/2 + (b*(6*a^2 - b^2)*(tan(c/2 + (d*x)/2)*(6*a*b^2 - a^3) - 6*a^2*b + b^3 + b*tan(c/2 + (d*x)/2)*(6*a^2 - b^2)*3i))/2)/(2*tan(c/2 + (d*x)/2)*(b^ 6 - 12*a^2*b^4 + 36*a^4*b^2) + 6*a*b^5 + 6*a^5*b - 37*a^3*b^3 - (b*(6*a^2 - b^2)*(tan(c/2 + (d*x)/2)*(6*a*b^2 - a^3) - 6*a^2*b + b^3 - b*tan(c/2 + ( d*x)/2)*(6*a^2 - b^2)*3i)*1i)/2 + (b*(6*a^2 - b^2)*(tan(c/2 + (d*x)/2)*(6* a*b^2 - a^3) - 6*a^2*b + b^3 + b*tan(c/2 + (d*x)/2)*(6*a^2 - b^2)*3i)*1i)/ 2))*(6*a^2 - b^2))/d
Time = 0.18 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.35 \[ \int \cot ^2(c+d x) \csc (c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} b^{3}+12 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a \,b^{2}-12 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{2} b -2 \cos \left (d x +c \right ) a^{3}-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} a^{3}+12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} a \,b^{2}+\sin \left (d x +c \right )^{2} a^{3}-12 \sin \left (d x +c \right )^{2} a^{2} b d x -12 \sin \left (d x +c \right )^{2} a \,b^{2}+2 \sin \left (d x +c \right )^{2} b^{3} d x}{4 \sin \left (d x +c \right )^{2} d} \] Input:
int(cot(d*x+c)^2*csc(d*x+c)*(a+b*sin(d*x+c))^3,x)
Output:
(2*cos(c + d*x)*sin(c + d*x)**3*b**3 + 12*cos(c + d*x)*sin(c + d*x)**2*a*b **2 - 12*cos(c + d*x)*sin(c + d*x)*a**2*b - 2*cos(c + d*x)*a**3 - 2*log(ta n((c + d*x)/2))*sin(c + d*x)**2*a**3 + 12*log(tan((c + d*x)/2))*sin(c + d* x)**2*a*b**2 + sin(c + d*x)**2*a**3 - 12*sin(c + d*x)**2*a**2*b*d*x - 12*s in(c + d*x)**2*a*b**2 + 2*sin(c + d*x)**2*b**3*d*x)/(4*sin(c + d*x)**2*d)