Integrand size = 29, antiderivative size = 105 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d}-\frac {\left (2 a^2-b^2\right ) \log (\sin (c+d x))}{a^3 d}-\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^3 b^2 d}+\frac {\sin (c+d x)}{b d} \] Output:
b*csc(d*x+c)/a^2/d-1/2*csc(d*x+c)^2/a/d-(2*a^2-b^2)*ln(sin(d*x+c))/a^3/d-( a^2-b^2)^2*ln(a+b*sin(d*x+c))/a^3/b^2/d+sin(d*x+c)/b/d
Time = 0.41 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.92 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\frac {2 b \csc (c+d x)}{a^2}-\frac {\csc ^2(c+d x)}{a}+\frac {\frac {2 b^2 \left (-2 a^2+b^2\right ) \log (\sin (c+d x))-2 \left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^3}+2 b \sin (c+d x)}{b^2}}{2 d} \] Input:
Integrate[(Cos[c + d*x]^2*Cot[c + d*x]^3)/(a + b*Sin[c + d*x]),x]
Output:
((2*b*Csc[c + d*x])/a^2 - Csc[c + d*x]^2/a + ((2*b^2*(-2*a^2 + b^2)*Log[Si n[c + d*x]] - 2*(a^2 - b^2)^2*Log[a + b*Sin[c + d*x]])/a^3 + 2*b*Sin[c + d *x])/b^2)/(2*d)
Time = 0.38 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.97, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3316, 27, 522, 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 {\cos ^2(c+d x) \cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^5}{\sin (c+d x)^3 (a+b \sin (c+d x))}dx\) |
\(\Big \downarrow \) 3316 |
\(\displaystyle \frac {\int \frac {\csc ^3(c+d x) \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{a+b \sin (c+d x)}d(b \sin (c+d x))}{b^5 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {\csc ^3(c+d x) \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{b^3 (a+b \sin (c+d x))}d(b \sin (c+d x))}{b^2 d}\) |
\(\Big \downarrow \) 522 |
\(\displaystyle \frac {\int \left (\frac {b \csc ^3(c+d x)}{a}-\frac {b^2 \csc ^2(c+d x)}{a^2}+\frac {\left (b^4-2 a^2 b^2\right ) \csc (c+d x)}{a^3 b}-\frac {\left (a^2-b^2\right )^2}{a^3 (a+b \sin (c+d x))}+1\right )d(b \sin (c+d x))}{b^2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {b^3 \csc (c+d x)}{a^2}-\frac {b^2 \left (2 a^2-b^2\right ) \log (b \sin (c+d x))}{a^3}-\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^3}-\frac {b^2 \csc ^2(c+d x)}{2 a}+b \sin (c+d x)}{b^2 d}\) |
Input:
Int[(Cos[c + d*x]^2*Cot[c + d*x]^3)/(a + b*Sin[c + d*x]),x]
Output:
((b^3*Csc[c + d*x])/a^2 - (b^2*Csc[c + d*x]^2)/(2*a) - (b^2*(2*a^2 - b^2)* Log[b*Sin[c + d*x]])/a^3 - ((a^2 - b^2)^2*Log[a + b*Sin[c + d*x]])/a^3 + b *Sin[c + d*x])/(b^2*d)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. ), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* f) Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) /2] && NeQ[a^2 - b^2, 0]
Time = 2.31 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.94
method | result | size |
derivativedivides | \(\frac {\frac {\sin \left (d x +c \right )}{b}+\frac {\left (-a^{4}+2 a^{2} b^{2}-b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{3} b^{2}}-\frac {1}{2 a \sin \left (d x +c \right )^{2}}+\frac {\left (-2 a^{2}+b^{2}\right ) \ln \left (\sin \left (d x +c \right )\right )}{a^{3}}+\frac {b}{a^{2} \sin \left (d x +c \right )}}{d}\) | \(99\) |
default | \(\frac {\frac {\sin \left (d x +c \right )}{b}+\frac {\left (-a^{4}+2 a^{2} b^{2}-b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{3} b^{2}}-\frac {1}{2 a \sin \left (d x +c \right )^{2}}+\frac {\left (-2 a^{2}+b^{2}\right ) \ln \left (\sin \left (d x +c \right )\right )}{a^{3}}+\frac {b}{a^{2} \sin \left (d x +c \right )}}{d}\) | \(99\) |
risch | \(\frac {i x a}{b^{2}}-\frac {i {\mathrm e}^{i \left (d x +c \right )}}{2 b d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )}}{2 b d}+\frac {2 i a c}{b^{2} d}+\frac {2 i \left (-i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{3 i \left (d x +c \right )}-b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{b^{2} d}+\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a d}-\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a^{3} d}-\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d a}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{2}}{d \,a^{3}}\) | \(270\) |
Input:
int(cos(d*x+c)^2*cot(d*x+c)^3/(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(sin(d*x+c)/b+(-a^4+2*a^2*b^2-b^4)/a^3/b^2*ln(a+b*sin(d*x+c))-1/2/a/si n(d*x+c)^2+1/a^3*(-2*a^2+b^2)*ln(sin(d*x+c))+1/a^2*b/sin(d*x+c))
Time = 0.11 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.66 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {a^{2} b^{2} + 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4} - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) + 2 \, {\left (2 \, a^{2} b^{2} - b^{4} - {\left (2 \, a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right ) + 2 \, {\left (a^{3} b \cos \left (d x + c\right )^{2} - a^{3} b - a b^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{3} b^{2} d \cos \left (d x + c\right )^{2} - a^{3} b^{2} d\right )}} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="fricas" )
Output:
1/2*(a^2*b^2 + 2*(a^4 - 2*a^2*b^2 + b^4 - (a^4 - 2*a^2*b^2 + b^4)*cos(d*x + c)^2)*log(b*sin(d*x + c) + a) + 2*(2*a^2*b^2 - b^4 - (2*a^2*b^2 - b^4)*c os(d*x + c)^2)*log(-1/2*sin(d*x + c)) + 2*(a^3*b*cos(d*x + c)^2 - a^3*b - a*b^3)*sin(d*x + c))/(a^3*b^2*d*cos(d*x + c)^2 - a^3*b^2*d)
\[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\int \frac {\cos ^{2}{\left (c + d x \right )} \cot ^{3}{\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \] Input:
integrate(cos(d*x+c)**2*cot(d*x+c)**3/(a+b*sin(d*x+c)),x)
Output:
Integral(cos(c + d*x)**2*cot(c + d*x)**3/(a + b*sin(c + d*x)), x)
Time = 0.03 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.94 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\frac {2 \, \sin \left (d x + c\right )}{b} - \frac {2 \, {\left (2 \, a^{2} - b^{2}\right )} \log \left (\sin \left (d x + c\right )\right )}{a^{3}} - \frac {2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{3} b^{2}} + \frac {2 \, b \sin \left (d x + c\right ) - a}{a^{2} \sin \left (d x + c\right )^{2}}}{2 \, d} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="maxima" )
Output:
1/2*(2*sin(d*x + c)/b - 2*(2*a^2 - b^2)*log(sin(d*x + c))/a^3 - 2*(a^4 - 2 *a^2*b^2 + b^4)*log(b*sin(d*x + c) + a)/(a^3*b^2) + (2*b*sin(d*x + c) - a) /(a^2*sin(d*x + c)^2))/d
Time = 0.24 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.06 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\sin \left (d x + c\right )}{b d} - \frac {{\left (2 \, a^{2} - b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{3} d} - \frac {{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{3} b^{2} d} + \frac {2 \, a b \sin \left (d x + c\right ) - a^{2}}{2 \, a^{3} d \sin \left (d x + c\right )^{2}} \] Input:
integrate(cos(d*x+c)^2*cot(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="giac")
Output:
sin(d*x + c)/(b*d) - (2*a^2 - b^2)*log(abs(sin(d*x + c)))/(a^3*d) - (a^4 - 2*a^2*b^2 + b^4)*log(abs(b*sin(d*x + c) + a))/(a^3*b^2*d) + 1/2*(2*a*b*si n(d*x + c) - a^2)/(a^3*d*sin(d*x + c)^2)
Time = 20.22 (sec) , antiderivative size = 238, normalized size of antiderivative = 2.27 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d}-\frac {\frac {a}{2}-2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (4\,a^2+b^2\right )}{b}}{d\,\left (4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}+\frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{b^2\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (2\,a^2-b^2\right )}{a^3\,d}-\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,\left (a^4-2\,a^2\,b^2+b^4\right )}{a^3\,b^2\,d} \] Input:
int((cos(c + d*x)^2*cot(c + d*x)^3)/(a + b*sin(c + d*x)),x)
Output:
(b*tan(c/2 + (d*x)/2))/(2*a^2*d) - (a/2 - 2*b*tan(c/2 + (d*x)/2) + (a*tan( c/2 + (d*x)/2)^2)/2 - (2*tan(c/2 + (d*x)/2)^3*(4*a^2 + b^2))/b)/(d*(4*a^2* tan(c/2 + (d*x)/2)^2 + 4*a^2*tan(c/2 + (d*x)/2)^4)) - tan(c/2 + (d*x)/2)^2 /(8*a*d) + (a*log(tan(c/2 + (d*x)/2)^2 + 1))/(b^2*d) - (log(tan(c/2 + (d*x )/2))*(2*a^2 - b^2))/(a^3*d) - (log(a + 2*b*tan(c/2 + (d*x)/2) + a*tan(c/2 + (d*x)/2)^2)*(a^4 + b^4 - 2*a^2*b^2))/(a^3*b^2*d)
Time = 142.86 (sec) , antiderivative size = 272, normalized size of antiderivative = 2.59 \[ \int \frac {\cos ^2(c+d x) \cot ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{2} a^{4}-8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b +a \right ) \sin \left (d x +c \right )^{2} a^{4}+16 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b +a \right ) \sin \left (d x +c \right )^{2} a^{2} b^{2}-8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b +a \right ) \sin \left (d x +c \right )^{2} b^{4}-16 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} a^{2} b^{2}+8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} b^{4}+8 \sin \left (d x +c \right )^{3} a^{3} b +3 \sin \left (d x +c \right )^{2} a^{2} b^{2}+8 \sin \left (d x +c \right ) a \,b^{3}-4 a^{2} b^{2}}{8 \sin \left (d x +c \right )^{2} a^{3} b^{2} d} \] Input:
int(cos(d*x+c)^2*cot(d*x+c)^3/(a+b*sin(d*x+c)),x)
Output:
(8*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**2*a**4 - 8*log(tan((c + d*x) /2)**2*a + 2*tan((c + d*x)/2)*b + a)*sin(c + d*x)**2*a**4 + 16*log(tan((c + d*x)/2)**2*a + 2*tan((c + d*x)/2)*b + a)*sin(c + d*x)**2*a**2*b**2 - 8*l og(tan((c + d*x)/2)**2*a + 2*tan((c + d*x)/2)*b + a)*sin(c + d*x)**2*b**4 - 16*log(tan((c + d*x)/2))*sin(c + d*x)**2*a**2*b**2 + 8*log(tan((c + d*x) /2))*sin(c + d*x)**2*b**4 + 8*sin(c + d*x)**3*a**3*b + 3*sin(c + d*x)**2*a **2*b**2 + 8*sin(c + d*x)*a*b**3 - 4*a**2*b**2)/(8*sin(c + d*x)**2*a**3*b* *2*d)