Integrand size = 29, antiderivative size = 82 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {5 a^2 \text {arctanh}(\cos (c+d x))}{8 d}-\frac {2 a^2 \cot ^3(c+d x)}{3 d}-\frac {3 a^2 \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{4 d} \] Output:
5/8*a^2*arctanh(cos(d*x+c))/d-2/3*a^2*cot(d*x+c)^3/d-3/8*a^2*cot(d*x+c)*cs c(d*x+c)/d-1/4*a^2*cot(d*x+c)*csc(d*x+c)^3/d
Leaf count is larger than twice the leaf count of optimal. \(209\) vs. \(2(82)=164\).
Time = 0.24 (sec) , antiderivative size = 209, normalized size of antiderivative = 2.55 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=a^2 \left (\frac {\cot \left (\frac {1}{2} (c+d x)\right )}{3 d}-\frac {3 \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {\cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{12 d}-\frac {\csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {5 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {5 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {3 \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {\sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {\tan \left (\frac {1}{2} (c+d x)\right )}{3 d}+\frac {\sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{12 d}\right ) \] Input:
Integrate[Cot[c + d*x]^2*Csc[c + d*x]^3*(a + a*Sin[c + d*x])^2,x]
Output:
a^2*(Cot[(c + d*x)/2]/(3*d) - (3*Csc[(c + d*x)/2]^2)/(32*d) - (Cot[(c + d* x)/2]*Csc[(c + d*x)/2]^2)/(12*d) - Csc[(c + d*x)/2]^4/(64*d) + (5*Log[Cos[ (c + d*x)/2]])/(8*d) - (5*Log[Sin[(c + d*x)/2]])/(8*d) + (3*Sec[(c + d*x)/ 2]^2)/(32*d) + Sec[(c + d*x)/2]^4/(64*d) - Tan[(c + d*x)/2]/(3*d) + (Sec[( c + d*x)/2]^2*Tan[(c + d*x)/2])/(12*d))
Time = 0.40 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {3042, 3352, 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 \cot ^2(c+d x) \csc ^3(c+d x) (a \sin (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2 (a \sin (c+d x)+a)^2}{\sin (c+d x)^5}dx\) |
\(\Big \downarrow \) 3352 |
\(\displaystyle \int \left (a^2 \cot ^2(c+d x) \csc ^3(c+d x)+2 a^2 \cot ^2(c+d x) \csc ^2(c+d x)+a^2 \cot ^2(c+d x) \csc (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {5 a^2 \text {arctanh}(\cos (c+d x))}{8 d}-\frac {2 a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {3 a^2 \cot (c+d x) \csc (c+d x)}{8 d}\) |
Input:
Int[Cot[c + d*x]^2*Csc[c + d*x]^3*(a + a*Sin[c + d*x])^2,x]
Output:
(5*a^2*ArcTanh[Cos[c + d*x]])/(8*d) - (2*a^2*Cot[c + d*x]^3)/(3*d) - (3*a^ 2*Cot[c + d*x]*Csc[c + d*x])/(8*d) - (a^2*Cot[c + d*x]*Csc[c + d*x]^3)/(4* d)
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig [(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x] /; F reeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
Time = 0.29 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.74
method | result | size |
derivativedivides | \(\frac {a^{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 )-\frac {2 a^{2} \cos \left (d x +c \right )^{3}}{3 \sin \left (d x +c \right )^{3}}+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 )}{d}\) | \(143\) |
default | \(\frac {a^{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 )-\frac {2 a^{2} \cos \left (d x +c \right )^{3}}{3 \sin \left (d x +c \right )^{3}}+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 )}{d}\) | \(143\) |
risch | \(\frac {a^{2} \left (9 \,{\mathrm e}^{7 i \left (d x +c \right )}-33 \,{\mathrm e}^{5 i \left (d x +c \right )}+48 i {\mathrm e}^{6 i \left (d x +c \right )}-33 \,{\mathrm e}^{3 i \left (d x +c \right )}-48 i {\mathrm e}^{4 i \left (d x +c \right )}+9 \,{\mathrm e}^{i \left (d x +c \right )}+16 i {\mathrm e}^{2 i \left (d x +c \right )}-16 i\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}+\frac {5 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}-\frac {5 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}\) | \(146\) |
Input:
int(cot(d*x+c)^2*csc(d*x+c)^3*(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^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)- cot(d*x+c)))-2/3*a^2/sin(d*x+c)^3*cos(d*x+c)^3+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)-co t(d*x+c))))
Leaf count of result is larger than twice the leaf count of optimal. 155 vs. \(2 (74) = 148\).
Time = 0.09 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.89 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {32 \, a^{2} \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - 18 \, a^{2} \cos \left (d x + c\right )^{3} + 30 \, a^{2} \cos \left (d x + c\right ) - 15 \, {\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 15 \, {\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{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+a*sin(d*x+c))^2,x, algorithm="frica s")
Output:
-1/48*(32*a^2*cos(d*x + c)^3*sin(d*x + c) - 18*a^2*cos(d*x + c)^3 + 30*a^2 *cos(d*x + c) - 15*(a^2*cos(d*x + c)^4 - 2*a^2*cos(d*x + c)^2 + a^2)*log(1 /2*cos(d*x + c) + 1/2) + 15*(a^2*cos(d*x + c)^4 - 2*a^2*cos(d*x + c)^2 + a ^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+a \sin (c+d x))^2 \, dx=a^{2} \left (\int \cot ^{2}{\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx + \int 2 \sin {\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(cot(d*x+c)**2*csc(d*x+c)**3*(a+a*sin(d*x+c))**2,x)
Output:
a**2*(Integral(cot(c + d*x)**2*csc(c + d*x)**3, x) + Integral(2*sin(c + d* x)*cot(c + d*x)**2*csc(c + d*x)**3, x) + Integral(sin(c + d*x)**2*cot(c + d*x)**2*csc(c + d*x)**3, x))
Time = 0.04 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.59 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+a \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 \, a^{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^{2}}{\tan \left (d x + c\right )^{3}}}{48 \, d} \] Input:
integrate(cot(d*x+c)^2*csc(d*x+c)^3*(a+a*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*a^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^2/tan(d*x + c)^3)/d
Leaf count of result is larger than twice the leaf count of optimal. 164 vs. \(2 (74) = 148\).
Time = 0.17 (sec) , antiderivative size = 164, normalized size of antiderivative = 2.00 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+a \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^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 120 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 48 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {250 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 48 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 16 \, a^{2} \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+a*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^2*tan(1/2*d*x + 1/2*c)^3 + 24*a ^2*tan(1/2*d*x + 1/2*c)^2 - 120*a^2*log(abs(tan(1/2*d*x + 1/2*c))) - 48*a^ 2*tan(1/2*d*x + 1/2*c) + (250*a^2*tan(1/2*d*x + 1/2*c)^4 + 48*a^2*tan(1/2* d*x + 1/2*c)^3 - 24*a^2*tan(1/2*d*x + 1/2*c)^2 - 16*a^2*tan(1/2*d*x + 1/2* c) - 3*a^2)/tan(1/2*d*x + 1/2*c)^4)/d
Time = 17.71 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.96 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12\,d}+\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}-\frac {5\,a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (-4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {4\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {a^2}{4}\right )}{16\,d}-\frac {a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,d} \] Input:
int((cot(c + d*x)^2*(a + a*sin(c + d*x))^2)/sin(c + d*x)^3,x)
Output:
(a^2*tan(c/2 + (d*x)/2)^2)/(8*d) + (a^2*tan(c/2 + (d*x)/2)^3)/(12*d) + (a^ 2*tan(c/2 + (d*x)/2)^4)/(64*d) - (5*a^2*log(tan(c/2 + (d*x)/2)))/(8*d) - ( cot(c/2 + (d*x)/2)^4*(2*a^2*tan(c/2 + (d*x)/2)^2 - 4*a^2*tan(c/2 + (d*x)/2 )^3 + a^2/4 + (4*a^2*tan(c/2 + (d*x)/2))/3))/(16*d) - (a^2*tan(c/2 + (d*x) /2))/(4*d)
Time = 0.16 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.11 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^{2} \left (16 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}-9 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-16 \cos \left (d x +c \right ) \sin \left (d x +c \right )-6 \cos \left (d x +c \right )-15 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4}\right )}{24 \sin \left (d x +c \right )^{4} d} \] Input:
int(cot(d*x+c)^2*csc(d*x+c)^3*(a+a*sin(d*x+c))^2,x)
Output:
(a**2*(16*cos(c + d*x)*sin(c + d*x)**3 - 9*cos(c + d*x)*sin(c + d*x)**2 - 16*cos(c + d*x)*sin(c + d*x) - 6*cos(c + d*x) - 15*log(tan((c + d*x)/2))*s in(c + d*x)**4))/(24*sin(c + d*x)**4*d)