Integrand size = 27, antiderivative size = 53 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\text {arctanh}(\cos (c+d x))}{2 a d}+\frac {\cot (c+d x)}{a d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a d} \] Output:
-1/2*arctanh(cos(d*x+c))/a/d+cot(d*x+c)/a/d-1/2*cot(d*x+c)*csc(d*x+c)/a/d
Time = 0.95 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.77 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\left (\csc \left (\frac {1}{2} (c+d x)\right )+\sec \left (\frac {1}{2} (c+d x)\right )\right )^2 \left (-\cos (c+d x)+\left (-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sin ^2(c+d x)+\sin (2 (c+d x))\right )}{8 a d (1+\sin (c+d x))} \] Input:
Integrate[(Cot[c + d*x]^2*Csc[c + d*x])/(a + a*Sin[c + d*x]),x]
Output:
((Csc[(c + d*x)/2] + Sec[(c + d*x)/2])^2*(-Cos[c + d*x] + (-Log[Cos[(c + d *x)/2]] + Log[Sin[(c + d*x)/2]])*Sin[c + d*x]^2 + Sin[2*(c + d*x)]))/(8*a* d*(1 + Sin[c + d*x]))
Time = 0.43 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.98, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {3042, 3318, 3042, 4254, 24, 4255, 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 \frac {\cot ^2(c+d x) \csc (c+d x)}{a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2}{\sin (c+d x)^3 (a \sin (c+d x)+a)}dx\) |
\(\Big \downarrow \) 3318 |
\(\displaystyle \frac {\int \csc ^3(c+d x)dx}{a}-\frac {\int \csc ^2(c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \csc (c+d x)^3dx}{a}-\frac {\int \csc (c+d x)^2dx}{a}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\int 1d\cot (c+d x)}{a d}+\frac {\int \csc (c+d x)^3dx}{a}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\int \csc (c+d x)^3dx}{a}+\frac {\cot (c+d x)}{a d}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}}{a}+\frac {\cot (c+d x)}{a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}}{a}+\frac {\cot (c+d x)}{a d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}}{a}+\frac {\cot (c+d x)}{a d}\) |
Input:
Int[(Cot[c + d*x]^2*Csc[c + d*x])/(a + a*Sin[c + d*x]),x]
Output:
Cot[c + d*x]/(a*d) + (-1/2*ArcTanh[Cos[c + d*x]]/d - (Cot[c + d*x]*Csc[c + d*x])/(2*d))/a
Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^( n_.))/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g^2/a Int [(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Simp[g^2/(b*d) Int [(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0]
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_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.34 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.36
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{4 d a}\) | \(72\) |
default | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{4 d a}\) | \(72\) |
risch | \(\frac {{\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}+2 i {\mathrm e}^{2 i \left (d x +c \right )}-2 i}{a d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d a}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d a}\) | \(95\) |
Input:
int(cot(d*x+c)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/4/d/a*(1/2*tan(1/2*d*x+1/2*c)^2-2*tan(1/2*d*x+1/2*c)-1/2/tan(1/2*d*x+1/2 *c)^2+2*ln(tan(1/2*d*x+1/2*c))+2/tan(1/2*d*x+1/2*c))
Time = 0.09 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.66 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {{\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 4 \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right )}{4 \, {\left (a d \cos \left (d x + c\right )^{2} - a d\right )}} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="fricas")
Output:
-1/4*((cos(d*x + c)^2 - 1)*log(1/2*cos(d*x + c) + 1/2) - (cos(d*x + c)^2 - 1)*log(-1/2*cos(d*x + c) + 1/2) + 4*cos(d*x + c)*sin(d*x + c) - 2*cos(d*x + c))/(a*d*cos(d*x + c)^2 - a*d)
\[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {\cot ^{2}{\left (c + d x \right )} \csc {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \] Input:
integrate(cot(d*x+c)**2*csc(d*x+c)/(a+a*sin(d*x+c)),x)
Output:
Integral(cot(c + d*x)**2*csc(c + d*x)/(sin(c + d*x) + 1), x)/a
Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (49) = 98\).
Time = 0.03 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.17 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{a} - \frac {4 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {{\left (\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{2}}{a \sin \left (d x + c\right )^{2}}}{8 \, d} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="maxima")
Output:
-1/8*((4*sin(d*x + c)/(cos(d*x + c) + 1) - sin(d*x + c)^2/(cos(d*x + c) + 1)^2)/a - 4*log(sin(d*x + c)/(cos(d*x + c) + 1))/a - (4*sin(d*x + c)/(cos( d*x + c) + 1) - 1)*(cos(d*x + c) + 1)^2/(a*sin(d*x + c)^2))/d
Time = 0.15 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.77 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\frac {4 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} + \frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}} - \frac {6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="giac")
Output:
1/8*(4*log(abs(tan(1/2*d*x + 1/2*c)))/a + (a*tan(1/2*d*x + 1/2*c)^2 - 4*a* tan(1/2*d*x + 1/2*c))/a^2 - (6*tan(1/2*d*x + 1/2*c)^2 - 4*tan(1/2*d*x + 1/ 2*c) + 1)/(a*tan(1/2*d*x + 1/2*c)^2))/d
Time = 17.63 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.64 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,a\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {1}{2}\right )}{4\,a\,d} \] Input:
int(cot(c + d*x)^2/(sin(c + d*x)*(a + a*sin(c + d*x))),x)
Output:
tan(c/2 + (d*x)/2)^2/(8*a*d) + log(tan(c/2 + (d*x)/2))/(2*a*d) - tan(c/2 + (d*x)/2)/(2*a*d) + (cot(c/2 + (d*x)/2)^2*(2*tan(c/2 + (d*x)/2) - 1/2))/(4 *a*d)
Time = 0.15 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.09 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {2 \cos \left (d x +c \right ) \sin \left (d x +c \right )-\cos \left (d x +c \right )+\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2}}{2 \sin \left (d x +c \right )^{2} a d} \] Input:
int(cot(d*x+c)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x)
Output:
(2*cos(c + d*x)*sin(c + d*x) - cos(c + d*x) + log(tan((c + d*x)/2))*sin(c + d*x)**2)/(2*sin(c + d*x)**2*a*d)