Integrand size = 29, antiderivative size = 123 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {\left (a^2+4 b^2\right ) \text {arctanh}(\cos (c+d x))}{8 d}+\frac {2 a b \cot (c+d x)}{3 d}+\frac {\left (a^2-2 b^2\right ) \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a b \cot (c+d x) \csc ^2(c+d x)}{6 d}-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d} \] Output:
1/8*(a^2+4*b^2)*arctanh(cos(d*x+c))/d+2/3*a*b*cot(d*x+c)/d+1/8*(a^2-2*b^2) *cot(d*x+c)*csc(d*x+c)/d-1/6*a*b*cot(d*x+c)*csc(d*x+c)^2/d-1/4*cot(d*x+c)* csc(d*x+c)^3*(a+b*sin(d*x+c))^2/d
Leaf count is larger than twice the leaf count of optimal. \(579\) vs. \(2(123)=246\).
Time = 7.25 (sec) , antiderivative size = 579, normalized size of antiderivative = 4.71 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {a b \cot \left (\frac {1}{2} (c+d x)\right ) (b+a \csc (c+d x))^2 \sin ^2(c+d x)}{3 d (a+b \sin (c+d x))^2}+\frac {\left (a^2-4 b^2\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right ) (b+a \csc (c+d x))^2 \sin ^2(c+d x)}{32 d (a+b \sin (c+d x))^2}-\frac {a b \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right ) (b+a \csc (c+d x))^2 \sin ^2(c+d x)}{12 d (a+b \sin (c+d x))^2}-\frac {a^2 \csc ^4\left (\frac {1}{2} (c+d x)\right ) (b+a \csc (c+d x))^2 \sin ^2(c+d x)}{64 d (a+b \sin (c+d x))^2}+\frac {\left (a^2+4 b^2\right ) (b+a \csc (c+d x))^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin ^2(c+d x)}{8 d (a+b \sin (c+d x))^2}+\frac {\left (-a^2-4 b^2\right ) (b+a \csc (c+d x))^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin ^2(c+d x)}{8 d (a+b \sin (c+d x))^2}+\frac {\left (-a^2+4 b^2\right ) (b+a \csc (c+d x))^2 \sec ^2\left (\frac {1}{2} (c+d x)\right ) \sin ^2(c+d x)}{32 d (a+b \sin (c+d x))^2}+\frac {a^2 (b+a \csc (c+d x))^2 \sec ^4\left (\frac {1}{2} (c+d x)\right ) \sin ^2(c+d x)}{64 d (a+b \sin (c+d x))^2}-\frac {a b (b+a \csc (c+d x))^2 \sin ^2(c+d x) \tan \left (\frac {1}{2} (c+d x)\right )}{3 d (a+b \sin (c+d x))^2}+\frac {a b (b+a \csc (c+d x))^2 \sec ^2\left (\frac {1}{2} (c+d x)\right ) \sin ^2(c+d x) \tan \left (\frac {1}{2} (c+d x)\right )}{12 d (a+b \sin (c+d x))^2} \] Input:
Integrate[Cot[c + d*x]^2*Csc[c + d*x]^3*(a + b*Sin[c + d*x])^2,x]
Output:
(a*b*Cot[(c + d*x)/2]*(b + a*Csc[c + d*x])^2*Sin[c + d*x]^2)/(3*d*(a + b*S in[c + d*x])^2) + ((a^2 - 4*b^2)*Csc[(c + d*x)/2]^2*(b + a*Csc[c + d*x])^2 *Sin[c + d*x]^2)/(32*d*(a + b*Sin[c + d*x])^2) - (a*b*Cot[(c + d*x)/2]*Csc [(c + d*x)/2]^2*(b + a*Csc[c + d*x])^2*Sin[c + d*x]^2)/(12*d*(a + b*Sin[c + d*x])^2) - (a^2*Csc[(c + d*x)/2]^4*(b + a*Csc[c + d*x])^2*Sin[c + d*x]^2 )/(64*d*(a + b*Sin[c + d*x])^2) + ((a^2 + 4*b^2)*(b + a*Csc[c + d*x])^2*Lo g[Cos[(c + d*x)/2]]*Sin[c + d*x]^2)/(8*d*(a + b*Sin[c + d*x])^2) + ((-a^2 - 4*b^2)*(b + a*Csc[c + d*x])^2*Log[Sin[(c + d*x)/2]]*Sin[c + d*x]^2)/(8*d *(a + b*Sin[c + d*x])^2) + ((-a^2 + 4*b^2)*(b + a*Csc[c + d*x])^2*Sec[(c + d*x)/2]^2*Sin[c + d*x]^2)/(32*d*(a + b*Sin[c + d*x])^2) + (a^2*(b + a*Csc [c + d*x])^2*Sec[(c + d*x)/2]^4*Sin[c + d*x]^2)/(64*d*(a + b*Sin[c + d*x]) ^2) - (a*b*(b + a*Csc[c + d*x])^2*Sin[c + d*x]^2*Tan[(c + d*x)/2])/(3*d*(a + b*Sin[c + d*x])^2) + (a*b*(b + a*Csc[c + d*x])^2*Sec[(c + d*x)/2]^2*Sin [c + d*x]^2*Tan[(c + d*x)/2])/(12*d*(a + b*Sin[c + d*x])^2)
Time = 1.01 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.09, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.483, Rules used = {3042, 3368, 3042, 3527, 3042, 3510, 3042, 3500, 3042, 3227, 3042, 4254, 24, 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 ^3(c+d x) (a+b \sin (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2 (a+b \sin (c+d x))^2}{\sin (c+d x)^5}dx\) |
\(\Big \downarrow \) 3368 |
\(\displaystyle \int \left (1-\sin ^2(c+d x)\right ) \csc ^5(c+d x) (a+b \sin (c+d x))^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (1-\sin (c+d x)^2\right ) (a+b \sin (c+d x))^2}{\sin (c+d x)^5}dx\) |
\(\Big \downarrow \) 3527 |
\(\displaystyle \frac {1}{4} \int \csc ^4(c+d x) (a+b \sin (c+d x)) \left (-3 b \sin ^2(c+d x)-a \sin (c+d x)+2 b\right )dx-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \frac {(a+b \sin (c+d x)) \left (-3 b \sin (c+d x)^2-a \sin (c+d x)+2 b\right )}{\sin (c+d x)^4}dx-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3510 |
\(\displaystyle \frac {1}{4} \left (-\frac {1}{3} \int \csc ^3(c+d x) \left (9 b^2 \sin ^2(c+d x)+8 a b \sin (c+d x)+3 \left (a^2-2 b^2\right )\right )dx-\frac {2 a b \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (-\frac {1}{3} \int \frac {9 b^2 \sin (c+d x)^2+8 a b \sin (c+d x)+3 \left (a^2-2 b^2\right )}{\sin (c+d x)^3}dx-\frac {2 a b \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3500 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {3 \left (a^2-2 b^2\right ) \cot (c+d x) \csc (c+d x)}{2 d}-\frac {1}{2} \int \csc ^2(c+d x) \left (16 a b+3 \left (a^2+4 b^2\right ) \sin (c+d x)\right )dx\right )-\frac {2 a b \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {3 \left (a^2-2 b^2\right ) \cot (c+d x) \csc (c+d x)}{2 d}-\frac {1}{2} \int \frac {16 a b+3 \left (a^2+4 b^2\right ) \sin (c+d x)}{\sin (c+d x)^2}dx\right )-\frac {2 a b \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (-3 \left (a^2+4 b^2\right ) \int \csc (c+d x)dx-16 a b \int \csc ^2(c+d x)dx\right )+\frac {3 \left (a^2-2 b^2\right ) \cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {2 a b \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (-3 \left (a^2+4 b^2\right ) \int \csc (c+d x)dx-16 a b \int \csc (c+d x)^2dx\right )+\frac {3 \left (a^2-2 b^2\right ) \cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {2 a b \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (\frac {16 a b \int 1d\cot (c+d x)}{d}-3 \left (a^2+4 b^2\right ) \int \csc (c+d x)dx\right )+\frac {3 \left (a^2-2 b^2\right ) \cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {2 a b \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (\frac {16 a b \cot (c+d x)}{d}-3 \left (a^2+4 b^2\right ) \int \csc (c+d x)dx\right )+\frac {3 \left (a^2-2 b^2\right ) \cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {2 a b \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (\frac {3 \left (a^2+4 b^2\right ) \text {arctanh}(\cos (c+d x))}{d}+\frac {16 a b \cot (c+d x)}{d}\right )+\frac {3 \left (a^2-2 b^2\right ) \cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {2 a b \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{4 d}\) |
Input:
Int[Cot[c + d*x]^2*Csc[c + d*x]^3*(a + b*Sin[c + d*x])^2,x]
Output:
((-2*a*b*Cot[c + d*x]*Csc[c + d*x]^2)/(3*d) + (((3*(a^2 + 4*b^2)*ArcTanh[C os[c + d*x]])/d + (16*a*b*Cot[c + d*x])/d)/2 + (3*(a^2 - 2*b^2)*Cot[c + d* x]*Csc[c + d*x])/(2*d))/3)/4 - (Cot[c + d*x]*Csc[c + d*x]^3*(a + b*Sin[c + d*x])^2)/(4*d)
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
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[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)* (a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x ])^(m + 1)*Simp[b*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A *b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
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[(-(b*c - a*d))*(A*b^2 - a*b*B + a^2*C)*Cos[ e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - S imp[1/(b^2*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*( m + 1)*((b*B - a*C)*(b*c - a*d) - A*b*(a*c - b*d)) + (b*B*(a^2*d + b^2*d*(m + 1) - a*b*c*(m + 2)) + (b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1)) ))*Sin[e + f*x] - b*C*d*(m + 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; F reeQ[{a, b, c, d, e, f, A, B, C}, 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_.) + (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_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.37 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.15
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\cos \left (d x +c \right )^{3}}{4 \sin \left (d x +c \right )^{4}}-\frac {\cos \left (d x +c \right )^{3}}{8 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{8}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )-\frac {2 a b \cos \left (d x +c \right )^{3}}{3 \sin \left (d x +c \right )^{3}}+b^{2} \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 )}{d}\) | \(142\) |
default | \(\frac {a^{2} \left (-\frac {\cos \left (d x +c \right )^{3}}{4 \sin \left (d x +c \right )^{4}}-\frac {\cos \left (d x +c \right )^{3}}{8 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{8}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )-\frac {2 a b \cos \left (d x +c \right )^{3}}{3 \sin \left (d x +c \right )^{3}}+b^{2} \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 )}{d}\) | \(142\) |
risch | \(-\frac {-48 i a b \,{\mathrm e}^{6 i \left (d x +c \right )}+3 a^{2} {\mathrm e}^{7 i \left (d x +c \right )}-12 b^{2} {\mathrm e}^{7 i \left (d x +c \right )}+48 i a b \,{\mathrm e}^{4 i \left (d x +c \right )}+21 a^{2} {\mathrm e}^{5 i \left (d x +c \right )}+12 b^{2} {\mathrm e}^{5 i \left (d x +c \right )}-16 i a b \,{\mathrm e}^{2 i \left (d x +c \right )}+21 a^{2} {\mathrm e}^{3 i \left (d x +c \right )}+12 b^{2} {\mathrm e}^{3 i \left (d x +c \right )}+16 i a b +3 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 {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b^{2}}{2 d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b^{2}}{2 d}\) | \(260\) |
Input:
int(cot(d*x+c)^2*csc(d*x+c)^3*(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)^3-1/8/sin(d*x+c)^2*cos(d*x+c)^3-1/8 *cos(d*x+c)-1/8*ln(csc(d*x+c)-cot(d*x+c)))-2/3*a*b/sin(d*x+c)^3*cos(d*x+c) ^3+b^2*(-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)-co t(d*x+c))))
Time = 0.09 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.63 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {32 \, a b \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) + 6 \, {\left (a^{2} - 4 \, b^{2}\right )} \cos \left (d x + c\right )^{3} + 6 \, {\left (a^{2} + 4 \, b^{2}\right )} \cos \left (d x + c\right ) - 3 \, {\left ({\left (a^{2} + 4 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (a^{2} + 4 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 4 \, b^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 3 \, {\left ({\left (a^{2} + 4 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (a^{2} + 4 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 4 \, b^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{48 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="frica s")
Output:
-1/48*(32*a*b*cos(d*x + c)^3*sin(d*x + c) + 6*(a^2 - 4*b^2)*cos(d*x + c)^3 + 6*(a^2 + 4*b^2)*cos(d*x + c) - 3*((a^2 + 4*b^2)*cos(d*x + c)^4 - 2*(a^2 + 4*b^2)*cos(d*x + c)^2 + a^2 + 4*b^2)*log(1/2*cos(d*x + c) + 1/2) + 3*(( a^2 + 4*b^2)*cos(d*x + c)^4 - 2*(a^2 + 4*b^2)*cos(d*x + c)^2 + a^2 + 4*b^2 )*log(-1/2*cos(d*x + c) + 1/2))/(d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + d )
\[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \cot ^{2}{\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx \] Input:
integrate(cot(d*x+c)**2*csc(d*x+c)**3*(a+b*sin(d*x+c))**2,x)
Output:
Integral((a + b*sin(c + d*x))**2*cot(c + d*x)**2*csc(c + d*x)**3, x)
Time = 0.06 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.05 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {3 \, a^{2} {\left (\frac {2 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \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 )} - 12 \, b^{2} {\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 )} + \frac {32 \, a b}{\tan \left (d x + c\right )^{3}}}{48 \, d} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="maxim a")
Output:
-1/48*(3*a^2*(2*(cos(d*x + c)^3 + cos(d*x + c))/(cos(d*x + c)^4 - 2*cos(d* x + c)^2 + 1) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) - 12*b^2*(2 *cos(d*x + c)/(cos(d*x + c)^2 - 1) + log(cos(d*x + c) + 1) - log(cos(d*x + c) - 1)) + 32*a*b/tan(d*x + c)^3)/d
Time = 0.16 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.48 \[ \int \cot ^2(c+d x) \csc ^3(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} + 24 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 48 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, {\left (a^{2} + 4 \, b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {50 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 200 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 48 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 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(cot(d*x+c)^2*csc(d*x+c)^3*(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 + 24*b ^2*tan(1/2*d*x + 1/2*c)^2 - 48*a*b*tan(1/2*d*x + 1/2*c) - 24*(a^2 + 4*b^2) *log(abs(tan(1/2*d*x + 1/2*c))) + (50*a^2*tan(1/2*d*x + 1/2*c)^4 + 200*b^2 *tan(1/2*d*x + 1/2*c)^4 + 48*a*b*tan(1/2*d*x + 1/2*c)^3 - 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 = 33.90 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.34 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (\frac {a^2}{8}+\frac {b^2}{2}\right )}{d}+\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {a^2}{4}-4\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {4\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+2\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{16\,d}+\frac {a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12\,d}-\frac {a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,d} \] Input:
int((cot(c + d*x)^2*(a + b*sin(c + d*x))^2)/sin(c + d*x)^3,x)
Output:
(a^2*tan(c/2 + (d*x)/2)^4)/(64*d) - (log(tan(c/2 + (d*x)/2))*(a^2/8 + b^2/ 2))/d + (b^2*tan(c/2 + (d*x)/2)^2)/(8*d) - (cot(c/2 + (d*x)/2)^4*(2*b^2*ta n(c/2 + (d*x)/2)^2 + a^2/4 - 4*a*b*tan(c/2 + (d*x)/2)^3 + (4*a*b*tan(c/2 + (d*x)/2))/3))/(16*d) + (a*b*tan(c/2 + (d*x)/2)^3)/(12*d) - (a*b*tan(c/2 + (d*x)/2))/(4*d)
Time = 0.18 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.16 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {16 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a b +3 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{2}-12 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b^{2}-16 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a b -6 \cos \left (d x +c \right ) a^{2}-3 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4} a^{2}-12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4} b^{2}}{24 \sin \left (d x +c \right )^{4} d} \] Input:
int(cot(d*x+c)^2*csc(d*x+c)^3*(a+b*sin(d*x+c))^2,x)
Output:
(16*cos(c + d*x)*sin(c + d*x)**3*a*b + 3*cos(c + d*x)*sin(c + d*x)**2*a**2 - 12*cos(c + d*x)*sin(c + d*x)**2*b**2 - 16*cos(c + d*x)*sin(c + d*x)*a*b - 6*cos(c + d*x)*a**2 - 3*log(tan((c + d*x)/2))*sin(c + d*x)**4*a**2 - 12 *log(tan((c + d*x)/2))*sin(c + d*x)**4*b**2)/(24*sin(c + d*x)**4*d)