Integrand size = 29, antiderivative size = 116 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {9 a^2 x}{8}-\frac {2 a^2 \text {arctanh}(\cos (c+d x))}{d}+\frac {2 a^2 \cos (c+d x)}{d}+\frac {2 a^2 \cos ^3(c+d x)}{3 d}-\frac {a^2 \cot (c+d x)}{d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{8 d}-\frac {a^2 \cos (c+d x) \sin ^3(c+d x)}{4 d} \] Output:
-9/8*a^2*x-2*a^2*arctanh(cos(d*x+c))/d+2*a^2*cos(d*x+c)/d+2/3*a^2*cos(d*x+ c)^3/d-a^2*cot(d*x+c)/d+1/8*a^2*cos(d*x+c)*sin(d*x+c)/d-1/4*a^2*cos(d*x+c) *sin(d*x+c)^3/d
Time = 0.63 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.72 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 \left (240 \cos (c+d x)+16 \cos (3 (c+d x))-3 \left (36 c+36 d x+32 \cot (c+d x)+64 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-64 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-\sin (4 (c+d x))\right )\right )}{96 d} \] Input:
Integrate[Cos[c + d*x]^2*Cot[c + d*x]^2*(a + a*Sin[c + d*x])^2,x]
Output:
(a^2*(240*Cos[c + d*x] + 16*Cos[3*(c + d*x)] - 3*(36*c + 36*d*x + 32*Cot[c + d*x] + 64*Log[Cos[(c + d*x)/2]] - 64*Log[Sin[(c + d*x)/2]] - Sin[4*(c + d*x)])))/(96*d)
Time = 0.46 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.03, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {3042, 3351, 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 \cos ^2(c+d x) \cot ^2(c+d x) (a \sin (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^4 (a \sin (c+d x)+a)^2}{\sin (c+d x)^2}dx\) |
\(\Big \downarrow \) 3351 |
\(\displaystyle \frac {\int \left (\sin ^4(c+d x) a^6+2 \sin ^3(c+d x) a^6+\csc ^2(c+d x) a^6-\sin ^2(c+d x) a^6+2 \csc (c+d x) a^6-4 \sin (c+d x) a^6-a^6\right )dx}{a^4}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {2 a^6 \text {arctanh}(\cos (c+d x))}{d}+\frac {2 a^6 \cos ^3(c+d x)}{3 d}+\frac {2 a^6 \cos (c+d x)}{d}-\frac {a^6 \cot (c+d x)}{d}-\frac {a^6 \sin ^3(c+d x) \cos (c+d x)}{4 d}+\frac {a^6 \sin (c+d x) \cos (c+d x)}{8 d}-\frac {9 a^6 x}{8}}{a^4}\) |
Input:
Int[Cos[c + d*x]^2*Cot[c + d*x]^2*(a + a*Sin[c + d*x])^2,x]
Output:
((-9*a^6*x)/8 - (2*a^6*ArcTanh[Cos[c + d*x]])/d + (2*a^6*Cos[c + d*x])/d + (2*a^6*Cos[c + d*x]^3)/(3*d) - (a^6*Cot[c + d*x])/d + (a^6*Cos[c + d*x]*S in[c + d*x])/(8*d) - (a^6*Cos[c + d*x]*Sin[c + d*x]^3)/(4*d))/a^4
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[1/a^p Int[Expan dTrig[(d*sin[e + f*x])^n*(a - b*sin[e + f*x])^(p/2)*(a + b*sin[e + f*x])^(m + p/2), x], x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && In tegersQ[m, n, p/2] && ((GtQ[m, 0] && GtQ[p, 0] && LtQ[-m - p, n, -1]) || (G tQ[m, 2] && LtQ[p, 0] && GtQ[m + p/2, 0]))
Time = 2.34 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.17
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+2 a^{2} \left (\frac {\cos \left (d x +c \right )^{3}}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {\cos \left (d x +c \right )^{5}}{\sin \left (d x +c \right )}-\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )}{d}\) | \(136\) |
default | \(\frac {a^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+2 a^{2} \left (\frac {\cos \left (d x +c \right )^{3}}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {\cos \left (d x +c \right )^{5}}{\sin \left (d x +c \right )}-\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )}{d}\) | \(136\) |
risch | \(-\frac {9 a^{2} x}{8}+\frac {5 a^{2} {\mathrm e}^{i \left (d x +c \right )}}{4 d}+\frac {5 a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{4 d}-\frac {2 i a^{2}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}+\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {a^{2} \sin \left (4 d x +4 c \right )}{32 d}+\frac {a^{2} \cos \left (3 d x +3 c \right )}{6 d}\) | \(138\) |
Input:
int(cos(d*x+c)^2*cot(d*x+c)^2*(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c)+2*a^ 2*(1/3*cos(d*x+c)^3+cos(d*x+c)+ln(csc(d*x+c)-cot(d*x+c)))+a^2*(-1/sin(d*x+ c)*cos(d*x+c)^5-(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)-3/2*d*x-3/2*c))
Time = 0.12 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.16 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {6 \, a^{2} \cos \left (d x + c\right )^{5} - 9 \, a^{2} \cos \left (d x + c\right )^{3} + 24 \, a^{2} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 24 \, a^{2} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 27 \, a^{2} \cos \left (d x + c\right ) - {\left (16 \, a^{2} \cos \left (d x + c\right )^{3} - 27 \, a^{2} d x + 48 \, a^{2} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d \sin \left (d x + c\right )} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^2*(a+a*sin(d*x+c))^2,x, algorithm="frica s")
Output:
-1/24*(6*a^2*cos(d*x + c)^5 - 9*a^2*cos(d*x + c)^3 + 24*a^2*log(1/2*cos(d* x + c) + 1/2)*sin(d*x + c) - 24*a^2*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 27*a^2*cos(d*x + c) - (16*a^2*cos(d*x + c)^3 - 27*a^2*d*x + 48*a^2*c os(d*x + c))*sin(d*x + c))/(d*sin(d*x + c))
\[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^2 \, dx=a^{2} \left (\int \cos ^{2}{\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )}\, dx + \int 2 \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(cos(d*x+c)**2*cot(d*x+c)**2*(a+a*sin(d*x+c))**2,x)
Output:
a**2*(Integral(cos(c + d*x)**2*cot(c + d*x)**2, x) + Integral(2*sin(c + d* x)*cos(c + d*x)**2*cot(c + d*x)**2, x) + Integral(sin(c + d*x)**2*cos(c + d*x)**2*cot(c + d*x)**2, x))
Time = 0.11 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.10 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {32 \, {\left (2 \, \cos \left (d x + c\right )^{3} + 6 \, \cos \left (d x + c\right ) - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} a^{2} + 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} - 48 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} + 2}{\tan \left (d x + c\right )^{3} + \tan \left (d x + c\right )}\right )} a^{2}}{96 \, d} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^2*(a+a*sin(d*x+c))^2,x, algorithm="maxim a")
Output:
1/96*(32*(2*cos(d*x + c)^3 + 6*cos(d*x + c) - 3*log(cos(d*x + c) + 1) + 3* log(cos(d*x + c) - 1))*a^2 + 3*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2 *d*x + 2*c))*a^2 - 48*(3*d*x + 3*c + (3*tan(d*x + c)^2 + 2)/(tan(d*x + c)^ 3 + tan(d*x + c)))*a^2)/d
Time = 0.17 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.81 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {27 \, {\left (d x + c\right )} a^{2} - 48 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {12 \, {\left (4 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \frac {2 \, {\left (3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 96 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 21 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 192 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 21 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 160 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 64 \, a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^2*(a+a*sin(d*x+c))^2,x, algorithm="giac" )
Output:
-1/24*(27*(d*x + c)*a^2 - 48*a^2*log(abs(tan(1/2*d*x + 1/2*c))) - 12*a^2*t an(1/2*d*x + 1/2*c) + 12*(4*a^2*tan(1/2*d*x + 1/2*c) + a^2)/tan(1/2*d*x + 1/2*c) + 2*(3*a^2*tan(1/2*d*x + 1/2*c)^7 - 96*a^2*tan(1/2*d*x + 1/2*c)^6 - 21*a^2*tan(1/2*d*x + 1/2*c)^5 - 192*a^2*tan(1/2*d*x + 1/2*c)^4 + 21*a^2*t an(1/2*d*x + 1/2*c)^3 - 160*a^2*tan(1/2*d*x + 1/2*c)^2 - 3*a^2*tan(1/2*d*x + 1/2*c) - 64*a^2)/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d
Time = 17.71 (sec) , antiderivative size = 310, normalized size of antiderivative = 2.67 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {2\,a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {9\,a^2\,\mathrm {atan}\left (\frac {81\,a^4}{16\,\left (9\,a^4+\frac {81\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}-\frac {9\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{9\,a^4+\frac {81\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}}\right )}{4\,d}-\frac {\frac {3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{2}-16\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{2}-32\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {19\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}-\frac {80\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\frac {7\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}-\frac {32\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+a^2}{d\,\left (2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}+\frac {a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \] Input:
int(cos(c + d*x)^2*cot(c + d*x)^2*(a + a*sin(c + d*x))^2,x)
Output:
(2*a^2*log(tan(c/2 + (d*x)/2)))/d + (9*a^2*atan((81*a^4)/(16*(9*a^4 + (81* a^4*tan(c/2 + (d*x)/2))/16)) - (9*a^4*tan(c/2 + (d*x)/2))/(9*a^4 + (81*a^4 *tan(c/2 + (d*x)/2))/16)))/(4*d) - ((7*a^2*tan(c/2 + (d*x)/2)^2)/2 - (80*a ^2*tan(c/2 + (d*x)/2)^3)/3 + (19*a^2*tan(c/2 + (d*x)/2)^4)/2 - 32*a^2*tan( c/2 + (d*x)/2)^5 + (a^2*tan(c/2 + (d*x)/2)^6)/2 - 16*a^2*tan(c/2 + (d*x)/2 )^7 + (3*a^2*tan(c/2 + (d*x)/2)^8)/2 + a^2 - (32*a^2*tan(c/2 + (d*x)/2))/3 )/(d*(2*tan(c/2 + (d*x)/2) + 8*tan(c/2 + (d*x)/2)^3 + 12*tan(c/2 + (d*x)/2 )^5 + 8*tan(c/2 + (d*x)/2)^7 + 2*tan(c/2 + (d*x)/2)^9)) + (a^2*tan(c/2 + ( d*x)/2))/(2*d)
Time = 0.17 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.06 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^{2} \left (-6 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}-16 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+3 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+64 \cos \left (d x +c \right ) \sin \left (d x +c \right )-24 \cos \left (d x +c \right )+48 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )-27 \sin \left (d x +c \right ) d x -64 \sin \left (d x +c \right )\right )}{24 \sin \left (d x +c \right ) d} \] Input:
int(cos(d*x+c)^2*cot(d*x+c)^2*(a+a*sin(d*x+c))^2,x)
Output:
(a**2*( - 6*cos(c + d*x)*sin(c + d*x)**4 - 16*cos(c + d*x)*sin(c + d*x)**3 + 3*cos(c + d*x)*sin(c + d*x)**2 + 64*cos(c + d*x)*sin(c + d*x) - 24*cos( c + d*x) + 48*log(tan((c + d*x)/2))*sin(c + d*x) - 27*sin(c + d*x)*d*x - 6 4*sin(c + d*x)))/(24*sin(c + d*x)*d)