Integrand size = 27, antiderivative size = 52 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \text {arctanh}(\cos (c+d x))}{2 d}-\frac {a \cot ^3(c+d x)}{3 d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d} \] Output:
1/2*a*arctanh(cos(d*x+c))/d-1/3*a*cot(d*x+c)^3/d-1/2*a*cot(d*x+c)*csc(d*x+ c)/d
Time = 0.01 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.83 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \cot ^3(c+d x)}{3 d}-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d} \] Input:
Integrate[Cot[c + d*x]^2*Csc[c + d*x]^2*(a + a*Sin[c + d*x]),x]
Output:
-1/3*(a*Cot[c + d*x]^3)/d - (a*Csc[(c + d*x)/2]^2)/(8*d) + (a*Log[Cos[(c + d*x)/2]])/(2*d) - (a*Log[Sin[(c + d*x)/2]])/(2*d) + (a*Sec[(c + d*x)/2]^2 )/(8*d)
Time = 0.44 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.02, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {3042, 3317, 3042, 3087, 15, 3091, 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 ^2(c+d x) (a \sin (c+d x)+a) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2 (a \sin (c+d x)+a)}{\sin (c+d x)^4}dx\) |
\(\Big \downarrow \) 3317 |
\(\displaystyle a \int \cot ^2(c+d x) \csc ^2(c+d x)dx+a \int \cot ^2(c+d x) \csc (c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right ) \tan \left (c+d x-\frac {\pi }{2}\right )^2dx+a \int \sec \left (c+d x-\frac {\pi }{2}\right )^2 \tan \left (c+d x-\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 3087 |
\(\displaystyle \frac {a \int \cot ^2(c+d x)d(-\cot (c+d x))}{d}+a \int \sec \left (c+d x-\frac {\pi }{2}\right ) \tan \left (c+d x-\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 15 |
\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right ) \tan \left (c+d x-\frac {\pi }{2}\right )^2dx-\frac {a \cot ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 3091 |
\(\displaystyle a \left (-\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {a \cot ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \left (-\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {a \cot ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle a \left (\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {a \cot ^3(c+d x)}{3 d}\) |
Input:
Int[Cot[c + d*x]^2*Csc[c + d*x]^2*(a + a*Sin[c + d*x]),x]
Output:
-1/3*(a*Cot[c + d*x]^3)/d + a*(ArcTanh[Cos[c + d*x]]/(2*d) - (Cot[c + d*x] *Csc[c + d*x])/(2*d))
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S ymbol] :> Simp[1/f Subst[Int[(b*x)^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] && !(IntegerQ[(n - 1) /2] && LtQ[0, n, m - 1])
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1)) Int[(a*Sec[e + f*x])^m*( b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & & NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a Int[(g*Co s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d Int[(g*Cos[e + f*x])^ p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.20 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.38
method | result | size |
derivativedivides | \(\frac {a \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 )-\frac {a \cos \left (d x +c \right )^{3}}{3 \sin \left (d x +c \right )^{3}}}{d}\) | \(72\) |
default | \(\frac {a \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 )-\frac {a \cos \left (d x +c \right )^{3}}{3 \sin \left (d x +c \right )^{3}}}{d}\) | \(72\) |
risch | \(\frac {a \left (6 i {\mathrm e}^{4 i \left (d x +c \right )}+3 \,{\mathrm e}^{5 i \left (d x +c \right )}+2 i-3 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}\) | \(94\) |
Input:
int(cot(d*x+c)^2*csc(d*x+c)^2*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(a*(-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)))-1/3*a/sin(d*x+c)^3*cos(d*x+c)^3)
Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (46) = 92\).
Time = 0.08 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.29 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {4 \, a \cos \left (d x + c\right )^{3} + 6 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 3 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right )}{12 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="fricas" )
Output:
1/12*(4*a*cos(d*x + c)^3 + 6*a*cos(d*x + c)*sin(d*x + c) + 3*(a*cos(d*x + c)^2 - a)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 3*(a*cos(d*x + c)^2 - a)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c))/((d*cos(d*x + c)^2 - d)*sin (d*x + c))
\[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=a \left (\int \cot ^{2}{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}\, dx + \int \sin {\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(cot(d*x+c)**2*csc(d*x+c)**2*(a+a*sin(d*x+c)),x)
Output:
a*(Integral(cot(c + d*x)**2*csc(c + d*x)**2, x) + Integral(sin(c + d*x)*co t(c + d*x)**2*csc(c + d*x)**2, x))
Time = 0.03 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.17 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {4 \, a \cot \left (d x + c\right )^{3} - 3 \, a {\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 )}}{12 \, d} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="maxima" )
Output:
-1/12*(4*a*cot(d*x + c)^3 - 3*a*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) + 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. 115 vs. \(2 (46) = 92\).
Time = 0.17 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.21 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {22 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{24 \, d} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="giac")
Output:
1/24*(a*tan(1/2*d*x + 1/2*c)^3 + 3*a*tan(1/2*d*x + 1/2*c)^2 - 12*a*log(abs (tan(1/2*d*x + 1/2*c))) - 3*a*tan(1/2*d*x + 1/2*c) + (22*a*tan(1/2*d*x + 1 /2*c)^3 + 3*a*tan(1/2*d*x + 1/2*c)^2 - 3*a*tan(1/2*d*x + 1/2*c) - a)/tan(1 /2*d*x + 1/2*c)^3)/d
Time = 18.07 (sec) , antiderivative size = 111, normalized size of antiderivative = 2.13 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a}{3}\right )}{8\,d} \] Input:
int((cot(c + d*x)^2*(a + a*sin(c + d*x)))/sin(c + d*x)^2,x)
Output:
(a*tan(c/2 + (d*x)/2)^2)/(8*d) - (a*tan(c/2 + (d*x)/2))/(8*d) + (a*tan(c/2 + (d*x)/2)^3)/(24*d) - (a*log(tan(c/2 + (d*x)/2)))/(2*d) - (cot(c/2 + (d* x)/2)^3*(a/3 + a*tan(c/2 + (d*x)/2) - a*tan(c/2 + (d*x)/2)^2))/(8*d)
Time = 0.16 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.40 \[ \int \cot ^2(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \left (2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-3 \cos \left (d x +c \right ) \sin \left (d x +c \right )-2 \cos \left (d x +c \right )-3 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{3}\right )}{6 \sin \left (d x +c \right )^{3} d} \] Input:
int(cot(d*x+c)^2*csc(d*x+c)^2*(a+a*sin(d*x+c)),x)
Output:
(a*(2*cos(c + d*x)*sin(c + d*x)**2 - 3*cos(c + d*x)*sin(c + d*x) - 2*cos(c + d*x) - 3*log(tan((c + d*x)/2))*sin(c + d*x)**3))/(6*sin(c + d*x)**3*d)