Integrand size = 25, antiderivative size = 71 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=a^2 x-\frac {a^2 \text {arctanh}(\cos (c+d x))}{d}+\frac {a^2 \cos (c+d x)}{d}-\frac {a^2 \cos ^3(c+d x)}{3 d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{d} \] Output:
a^2*x-a^2*arctanh(cos(d*x+c))/d+a^2*cos(d*x+c)/d-1/3*a^2*cos(d*x+c)^3/d+a^ 2*cos(d*x+c)*sin(d*x+c)/d
Time = 5.47 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 \left (9 \cos (c+d x)-\cos (3 (c+d x))+6 \left (2 \left (c+d x-\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))\right )\right )}{12 d} \] Input:
Integrate[Cos[c + d*x]*Cot[c + d*x]*(a + a*Sin[c + d*x])^2,x]
Output:
(a^2*(9*Cos[c + d*x] - Cos[3*(c + d*x)] + 6*(2*(c + d*x - Log[Cos[(c + d*x )/2]] + Log[Sin[(c + d*x)/2]]) + Sin[2*(c + d*x)])))/(12*d)
Time = 0.33 (sec) , antiderivative size = 71, 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.120, 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 \cos (c+d x) \cot (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)}dx\) |
\(\Big \downarrow \) 3352 |
\(\displaystyle \int \left (2 a^2 \cos ^2(c+d x)+a^2 \sin (c+d x) \cos ^2(c+d x)+a^2 \cos (c+d x) \cot (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a^2 \text {arctanh}(\cos (c+d x))}{d}-\frac {a^2 \cos ^3(c+d x)}{3 d}+\frac {a^2 \cos (c+d x)}{d}+\frac {a^2 \sin (c+d x) \cos (c+d x)}{d}+a^2 x\) |
Input:
Int[Cos[c + d*x]*Cot[c + d*x]*(a + a*Sin[c + d*x])^2,x]
Output:
a^2*x - (a^2*ArcTanh[Cos[c + d*x]])/d + (a^2*Cos[c + d*x])/d - (a^2*Cos[c + d*x]^3)/(3*d) + (a^2*Cos[c + d*x]*Sin[c + d*x])/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.60 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.03
method | result | size |
derivativedivides | \(\frac {-\frac {a^{2} \cos \left (d x +c \right )^{3}}{3}+2 a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{2} \left (\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) | \(73\) |
default | \(\frac {-\frac {a^{2} \cos \left (d x +c \right )^{3}}{3}+2 a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{2} \left (\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) | \(73\) |
risch | \(a^{2} x +\frac {3 a^{2} {\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {3 a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {a^{2} \cos \left (3 d x +3 c \right )}{12 d}+\frac {a^{2} \sin \left (2 d x +2 c \right )}{2 d}\) | \(114\) |
Input:
int(cos(d*x+c)*cot(d*x+c)*(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(-1/3*a^2*cos(d*x+c)^3+2*a^2*(1/2*sin(d*x+c)*cos(d*x+c)+1/2*d*x+1/2*c) +a^2*(cos(d*x+c)+ln(csc(d*x+c)-cot(d*x+c))))
Time = 0.10 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.21 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {2 \, a^{2} \cos \left (d x + c\right )^{3} - 6 \, a^{2} d x - 6 \, a^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 6 \, a^{2} \cos \left (d x + c\right ) + 3 \, a^{2} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, a^{2} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{6 \, d} \] Input:
integrate(cos(d*x+c)*cot(d*x+c)*(a+a*sin(d*x+c))^2,x, algorithm="fricas")
Output:
-1/6*(2*a^2*cos(d*x + c)^3 - 6*a^2*d*x - 6*a^2*cos(d*x + c)*sin(d*x + c) - 6*a^2*cos(d*x + c) + 3*a^2*log(1/2*cos(d*x + c) + 1/2) - 3*a^2*log(-1/2*c os(d*x + c) + 1/2))/d
\[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=a^{2} \left (\int \cos {\left (c + d x \right )} \cot {\left (c + d x \right )}\, dx + \int 2 \sin {\left (c + d x \right )} \cos {\left (c + d x \right )} \cot {\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \cos {\left (c + d x \right )} \cot {\left (c + d x \right )}\, dx\right ) \] Input:
integrate(cos(d*x+c)*cot(d*x+c)*(a+a*sin(d*x+c))**2,x)
Output:
a**2*(Integral(cos(c + d*x)*cot(c + d*x), x) + Integral(2*sin(c + d*x)*cos (c + d*x)*cot(c + d*x), x) + Integral(sin(c + d*x)**2*cos(c + d*x)*cot(c + d*x), x))
Time = 0.03 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.06 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {2 \, a^{2} \cos \left (d x + c\right )^{3} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} - 3 \, a^{2} {\left (2 \, \cos \left (d x + c\right ) - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{6 \, d} \] Input:
integrate(cos(d*x+c)*cot(d*x+c)*(a+a*sin(d*x+c))^2,x, algorithm="maxima")
Output:
-1/6*(2*a^2*cos(d*x + c)^3 - 3*(2*d*x + 2*c + sin(2*d*x + 2*c))*a^2 - 3*a^ 2*(2*cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)))/d
Time = 0.16 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.42 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {3 \, {\left (d x + c\right )} a^{2} + 3 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {2 \, {\left (3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, 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 ) - 2 \, a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{3 \, d} \] Input:
integrate(cos(d*x+c)*cot(d*x+c)*(a+a*sin(d*x+c))^2,x, algorithm="giac")
Output:
1/3*(3*(d*x + c)*a^2 + 3*a^2*log(abs(tan(1/2*d*x + 1/2*c))) - 2*(3*a^2*tan (1/2*d*x + 1/2*c)^5 - 6*a^2*tan(1/2*d*x + 1/2*c)^2 - 3*a^2*tan(1/2*d*x + 1 /2*c) - 2*a^2)/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d
Time = 17.93 (sec) , antiderivative size = 188, normalized size of antiderivative = 2.65 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {4\,a^2}{3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {2\,a^2\,\mathrm {atan}\left (\frac {4\,a^4}{4\,a^4-4\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {4\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^4-4\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \] Input:
int(cos(c + d*x)*cot(c + d*x)*(a + a*sin(c + d*x))^2,x)
Output:
(a^2*log(tan(c/2 + (d*x)/2)))/d + (4*a^2*tan(c/2 + (d*x)/2)^2 - 2*a^2*tan( c/2 + (d*x)/2)^5 + (4*a^2)/3 + 2*a^2*tan(c/2 + (d*x)/2))/(d*(3*tan(c/2 + ( d*x)/2)^2 + 3*tan(c/2 + (d*x)/2)^4 + tan(c/2 + (d*x)/2)^6 + 1)) + (2*a^2*a tan((4*a^4)/(4*a^4 - 4*a^4*tan(c/2 + (d*x)/2)) + (4*a^4*tan(c/2 + (d*x)/2) )/(4*a^4 - 4*a^4*tan(c/2 + (d*x)/2))))/d
Time = 0.17 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.93 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^{2} \left (\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 )+3 c +3 d x -2\right )}{3 d} \] Input:
int(cos(d*x+c)*cot(d*x+c)*(a+a*sin(d*x+c))^2,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)) + 3*c + 3*d*x - 2))/(3*d)