Integrand size = 21, antiderivative size = 82 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {3 \text {arctanh}(\cos (c+d x))}{a^3 d}-\frac {\cot (c+d x)}{a^3 d}+\frac {2 \cot (c+d x)}{3 a^3 d (1+\csc (c+d x))^2}-\frac {13 \cot (c+d x)}{3 a^3 d (1+\csc (c+d x))} \] Output:
3*arctanh(cos(d*x+c))/a^3/d-cot(d*x+c)/a^3/d+2/3*cot(d*x+c)/a^3/d/(1+csc(d *x+c))^2-13/3*cot(d*x+c)/a^3/d/(1+csc(d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(255\) vs. \(2(82)=164\).
Time = 1.59 (sec) , antiderivative size = 255, normalized size of antiderivative = 3.11 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3 \left (8 \sin \left (\frac {1}{2} (c+d x)\right )-4 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+44 \sin \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2-3 \cot \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3+18 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3-18 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3+3 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{6 d (a+a \sin (c+d x))^3} \] Input:
Integrate[Cot[c + d*x]^2/(a + a*Sin[c + d*x])^3,x]
Output:
((Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^3*(8*Sin[(c + d*x)/2] - 4*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]) + 44*Sin[(c + d*x)/2]*(Cos[(c + d*x)/2] + Sin [(c + d*x)/2])^2 - 3*Cot[(c + d*x)/2]*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2] )^3 + 18*Log[Cos[(c + d*x)/2]]*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^3 - 1 8*Log[Sin[(c + d*x)/2]]*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^3 + 3*(Cos[( c + d*x)/2] + Sin[(c + d*x)/2])^3*Tan[(c + d*x)/2]))/(6*d*(a + a*Sin[c + d *x])^3)
Time = 0.42 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.05, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3188, 2009}
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)}{(a \sin (c+d x)+a)^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\tan (c+d x)^2 (a \sin (c+d x)+a)^3}dx\) |
\(\Big \downarrow \) 3188 |
\(\displaystyle \frac {\int \left (\frac {\csc ^2(c+d x)}{a}-\frac {3 \csc (c+d x)}{a}+\frac {5}{a}-\frac {7}{a (\csc (c+d x)+1)}+\frac {2}{a (\csc (c+d x)+1)^2}\right )dx}{a^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {3 \text {arctanh}(\cos (c+d x))}{a d}-\frac {\cot (c+d x)}{a d}-\frac {13 \cot (c+d x)}{3 a d (\csc (c+d x)+1)}+\frac {2 \cot (c+d x)}{3 a d (\csc (c+d x)+1)^2}}{a^2}\) |
Input:
Int[Cot[c + d*x]^2/(a + a*Sin[c + d*x])^3,x]
Output:
((3*ArcTanh[Cos[c + d*x]])/(a*d) - Cot[c + d*x]/(a*d) + (2*Cot[c + d*x])/( 3*a*d*(1 + Csc[c + d*x])^2) - (13*Cot[c + d*x])/(3*a*d*(1 + Csc[c + d*x])) )/a^2
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^(p_ ), x_Symbol] :> Simp[a^p Int[ExpandIntegrand[Sin[e + f*x]^p*((a + b*Sin[e + f*x])^(m - p/2)/(a - b*Sin[e + f*x])^(p/2)), x], x], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0] && IntegersQ[m, p/2] && (LtQ[p, 0] || GtQ[m - p/2, 0])
Time = 2.36 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.09
method | result | size |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {16}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {8}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {20}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{3}}\) | \(89\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {16}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {8}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {20}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{3}}\) | \(89\) |
risch | \(-\frac {2 \left (-29 \,{\mathrm e}^{2 i \left (d x +c \right )}+27 i {\mathrm e}^{3 i \left (d x +c \right )}+14-33 i {\mathrm e}^{i \left (d x +c \right )}+9 \,{\mathrm e}^{4 i \left (d x +c \right )}\right )}{3 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{3} d \,a^{3}}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d \,a^{3}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \,a^{3}}\) | \(125\) |
Input:
int(cot(d*x+c)^2/(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
1/2/d/a^3*(tan(1/2*d*x+1/2*c)-16/3/(tan(1/2*d*x+1/2*c)+1)^3+8/(tan(1/2*d*x +1/2*c)+1)^2-20/(tan(1/2*d*x+1/2*c)+1)-1/tan(1/2*d*x+1/2*c)-6*ln(tan(1/2*d *x+1/2*c)))
Leaf count of result is larger than twice the leaf count of optimal. 279 vs. \(2 (78) = 156\).
Time = 0.08 (sec) , antiderivative size = 279, normalized size of antiderivative = 3.40 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=-\frac {28 \, \cos \left (d x + c\right )^{3} - 10 \, \cos \left (d x + c\right )^{2} - 9 \, {\left (\cos \left (d x + c\right )^{3} + 2 \, \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 2\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 9 \, {\left (\cos \left (d x + c\right )^{3} + 2 \, \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\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 (14 \, \cos \left (d x + c\right )^{2} + 19 \, \cos \left (d x + c\right ) + 2\right )} \sin \left (d x + c\right ) - 34 \, \cos \left (d x + c\right ) + 4}{6 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 2 \, a^{3} d \cos \left (d x + c\right )^{2} - a^{3} d \cos \left (d x + c\right ) - 2 \, a^{3} d + {\left (a^{3} d \cos \left (d x + c\right )^{2} - a^{3} d \cos \left (d x + c\right ) - 2 \, a^{3} d\right )} \sin \left (d x + c\right )\right )}} \] Input:
integrate(cot(d*x+c)^2/(a+a*sin(d*x+c))^3,x, algorithm="fricas")
Output:
-1/6*(28*cos(d*x + c)^3 - 10*cos(d*x + c)^2 - 9*(cos(d*x + c)^3 + 2*cos(d* x + c)^2 + (cos(d*x + c)^2 - cos(d*x + c) - 2)*sin(d*x + c) - cos(d*x + c) - 2)*log(1/2*cos(d*x + c) + 1/2) + 9*(cos(d*x + c)^3 + 2*cos(d*x + c)^2 + (cos(d*x + c)^2 - cos(d*x + c) - 2)*sin(d*x + c) - cos(d*x + c) - 2)*log( -1/2*cos(d*x + c) + 1/2) - 2*(14*cos(d*x + c)^2 + 19*cos(d*x + c) + 2)*sin (d*x + c) - 34*cos(d*x + c) + 4)/(a^3*d*cos(d*x + c)^3 + 2*a^3*d*cos(d*x + c)^2 - a^3*d*cos(d*x + c) - 2*a^3*d + (a^3*d*cos(d*x + c)^2 - a^3*d*cos(d *x + c) - 2*a^3*d)*sin(d*x + c))
\[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {\int \frac {\cot ^{2}{\left (c + d x \right )}}{\sin ^{3}{\left (c + d x \right )} + 3 \sin ^{2}{\left (c + d x \right )} + 3 \sin {\left (c + d x \right )} + 1}\, dx}{a^{3}} \] Input:
integrate(cot(d*x+c)**2/(a+a*sin(d*x+c))**3,x)
Output:
Integral(cot(c + d*x)**2/(sin(c + d*x)**3 + 3*sin(c + d*x)**2 + 3*sin(c + d*x) + 1), x)/a**3
Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (78) = 156\).
Time = 0.04 (sec) , antiderivative size = 202, normalized size of antiderivative = 2.46 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=-\frac {\frac {\frac {61 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {105 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {63 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + 3}{\frac {a^{3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a^{3} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {18 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} - \frac {3 \, \sin \left (d x + c\right )}{a^{3} {\left (\cos \left (d x + c\right ) + 1\right )}}}{6 \, d} \] Input:
integrate(cot(d*x+c)^2/(a+a*sin(d*x+c))^3,x, algorithm="maxima")
Output:
-1/6*((61*sin(d*x + c)/(cos(d*x + c) + 1) + 105*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 63*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 3)/(a^3*sin(d*x + c)/ (cos(d*x + c) + 1) + 3*a^3*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 3*a^3*sin (d*x + c)^3/(cos(d*x + c) + 1)^3 + a^3*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 ) + 18*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^3 - 3*sin(d*x + c)/(a^3*(cos (d*x + c) + 1)))/d
Time = 0.17 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.33 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=-\frac {\frac {18 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{3}} - \frac {3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} - \frac {3 \, {\left (6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}}{a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \frac {4 \, {\left (15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 13\right )}}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{3}}}{6 \, d} \] Input:
integrate(cot(d*x+c)^2/(a+a*sin(d*x+c))^3,x, algorithm="giac")
Output:
-1/6*(18*log(abs(tan(1/2*d*x + 1/2*c)))/a^3 - 3*tan(1/2*d*x + 1/2*c)/a^3 - 3*(6*tan(1/2*d*x + 1/2*c) - 1)/(a^3*tan(1/2*d*x + 1/2*c)) + 4*(15*tan(1/2 *d*x + 1/2*c)^2 + 24*tan(1/2*d*x + 1/2*c) + 13)/(a^3*(tan(1/2*d*x + 1/2*c) + 1)^3))/d
Time = 17.77 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.77 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^3\,d}-\frac {21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {61\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+1}{d\,\left (2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+6\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+6\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}-\frac {3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d} \] Input:
int(cot(c + d*x)^2/(a + a*sin(c + d*x))^3,x)
Output:
tan(c/2 + (d*x)/2)/(2*a^3*d) - ((61*tan(c/2 + (d*x)/2))/3 + 35*tan(c/2 + ( d*x)/2)^2 + 21*tan(c/2 + (d*x)/2)^3 + 1)/(d*(6*a^3*tan(c/2 + (d*x)/2)^2 + 6*a^3*tan(c/2 + (d*x)/2)^3 + 2*a^3*tan(c/2 + (d*x)/2)^4 + 2*a^3*tan(c/2 + (d*x)/2))) - (3*log(tan(c/2 + (d*x)/2)))/(a^3*d)
Time = 0.17 (sec) , antiderivative size = 200, normalized size of antiderivative = 2.44 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {-18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-54 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-54 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+27 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-48 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-43 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-3}{6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{3} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \] Input:
int(cot(d*x+c)^2/(a+a*sin(d*x+c))^3,x)
Output:
( - 18*log(tan((c + d*x)/2))*tan((c + d*x)/2)**4 - 54*log(tan((c + d*x)/2) )*tan((c + d*x)/2)**3 - 54*log(tan((c + d*x)/2))*tan((c + d*x)/2)**2 - 18* log(tan((c + d*x)/2))*tan((c + d*x)/2) + 3*tan((c + d*x)/2)**5 + 27*tan((c + d*x)/2)**4 - 48*tan((c + d*x)/2)**2 - 43*tan((c + d*x)/2) - 3)/(6*tan(( c + d*x)/2)*a**3*d*(tan((c + d*x)/2)**3 + 3*tan((c + d*x)/2)**2 + 3*tan((c + d*x)/2) + 1))