Integrand size = 21, antiderivative size = 84 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {2 a b \csc (c+d x)}{d}-\frac {a^2 \csc ^2(c+d x)}{2 d}-\frac {\left (a^2-b^2\right ) \log (\sin (c+d x))}{d}-\frac {2 a b \sin (c+d x)}{d}-\frac {b^2 \sin ^2(c+d x)}{2 d} \] Output:
-2*a*b*csc(d*x+c)/d-1/2*a^2*csc(d*x+c)^2/d-(a^2-b^2)*ln(sin(d*x+c))/d-2*a* b*sin(d*x+c)/d-1/2*b^2*sin(d*x+c)^2/d
Time = 0.03 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.10 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {2 a b \csc (c+d x)}{d}-\frac {a^2 \csc ^2(c+d x)}{2 d}-\frac {a^2 \log (\sin (c+d x))}{d}+\frac {b^2 \log (\sin (c+d x))}{d}-\frac {2 a b \sin (c+d x)}{d}-\frac {b^2 \sin ^2(c+d x)}{2 d} \] Input:
Integrate[Cot[c + d*x]^3*(a + b*Sin[c + d*x])^2,x]
Output:
(-2*a*b*Csc[c + d*x])/d - (a^2*Csc[c + d*x]^2)/(2*d) - (a^2*Log[Sin[c + d* x]])/d + (b^2*Log[Sin[c + d*x]])/d - (2*a*b*Sin[c + d*x])/d - (b^2*Sin[c + d*x]^2)/(2*d)
Time = 0.27 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3200, 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 \cot ^3(c+d x) (a+b \sin (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \sin (c+d x))^2}{\tan (c+d x)^3}dx\) |
\(\Big \downarrow \) 3200 |
\(\displaystyle \frac {\int \frac {\csc ^3(c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )}{b^3}d(b \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 522 |
\(\displaystyle \frac {\int \left (\frac {a^2 \csc ^3(c+d x)}{b}+2 a \csc ^2(c+d x)+\frac {\left (b^2-a^2\right ) \csc (c+d x)}{b}-2 a-b \sin (c+d x)\right )d(b \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\left (a^2-b^2\right ) \log (b \sin (c+d x))-\frac {1}{2} a^2 \csc ^2(c+d x)-2 a b \sin (c+d x)-2 a b \csc (c+d x)-\frac {1}{2} b^2 \sin ^2(c+d x)}{d}\) |
Input:
Int[Cot[c + d*x]^3*(a + b*Sin[c + d*x])^2,x]
Output:
(-2*a*b*Csc[c + d*x] - (a^2*Csc[c + d*x]^2)/2 - (a^2 - b^2)*Log[b*Sin[c + d*x]] - 2*a*b*Sin[c + d*x] - (b^2*Sin[c + d*x]^2)/2)/d
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[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p _.), x_Symbol] :> Simp[1/f Subst[Int[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b ^2, 0] && IntegerQ[(p + 1)/2]
Time = 1.02 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.11
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+2 a b \left (-\frac {\cos \left (d x +c \right )^{4}}{\sin \left (d x +c \right )}-\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )\right )+b^{2} \left (\frac {\cos \left (d x +c \right )^{2}}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) | \(93\) |
default | \(\frac {a^{2} \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+2 a b \left (-\frac {\cos \left (d x +c \right )^{4}}{\sin \left (d x +c \right )}-\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )\right )+b^{2} \left (\frac {\cos \left (d x +c \right )^{2}}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) | \(93\) |
risch | \(i a^{2} x -i b^{2} x +\frac {b^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {i a b \,{\mathrm e}^{i \left (d x +c \right )}}{d}-\frac {i a b \,{\mathrm e}^{-i \left (d x +c \right )}}{d}+\frac {b^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+\frac {2 i a^{2} c}{d}-\frac {2 i b^{2} c}{d}-\frac {2 i a \left (i a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{3 i \left (d x +c \right )}-2 \,{\mathrm e}^{i \left (d x +c \right )} b \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{2}}{d}\) | \(201\) |
Input:
int(cot(d*x+c)^3*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(-1/2*cot(d*x+c)^2-ln(sin(d*x+c)))+2*a*b*(-1/sin(d*x+c)*cos(d*x+c )^4-(2+cos(d*x+c)^2)*sin(d*x+c))+b^2*(1/2*cos(d*x+c)^2+ln(sin(d*x+c))))
Time = 0.10 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.37 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {2 \, b^{2} \cos \left (d x + c\right )^{4} - 3 \, b^{2} \cos \left (d x + c\right )^{2} + 2 \, a^{2} + b^{2} - 4 \, {\left ({\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - a^{2} + b^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 8 \, {\left (a b \cos \left (d x + c\right )^{2} - 2 \, a b\right )} \sin \left (d x + c\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \] Input:
integrate(cot(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="fricas")
Output:
1/4*(2*b^2*cos(d*x + c)^4 - 3*b^2*cos(d*x + c)^2 + 2*a^2 + b^2 - 4*((a^2 - b^2)*cos(d*x + c)^2 - a^2 + b^2)*log(1/2*sin(d*x + c)) - 8*(a*b*cos(d*x + c)^2 - 2*a*b)*sin(d*x + c))/(d*cos(d*x + c)^2 - d)
\[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \cot ^{3}{\left (c + d x \right )}\, dx \] Input:
integrate(cot(d*x+c)**3*(a+b*sin(d*x+c))**2,x)
Output:
Integral((a + b*sin(c + d*x))**2*cot(c + d*x)**3, x)
Time = 0.03 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.82 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {b^{2} \sin \left (d x + c\right )^{2} + 4 \, a b \sin \left (d x + c\right ) + 2 \, {\left (a^{2} - b^{2}\right )} \log \left (\sin \left (d x + c\right )\right ) + \frac {4 \, a b \sin \left (d x + c\right ) + a^{2}}{\sin \left (d x + c\right )^{2}}}{2 \, d} \] Input:
integrate(cot(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="maxima")
Output:
-1/2*(b^2*sin(d*x + c)^2 + 4*a*b*sin(d*x + c) + 2*(a^2 - b^2)*log(sin(d*x + c)) + (4*a*b*sin(d*x + c) + a^2)/sin(d*x + c)^2)/d
Time = 0.13 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.83 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {b^{2} \sin \left (d x + c\right )^{2} + 4 \, a b \sin \left (d x + c\right ) + 2 \, {\left (a^{2} - b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + \frac {4 \, a b \sin \left (d x + c\right ) + a^{2}}{\sin \left (d x + c\right )^{2}}}{2 \, d} \] Input:
integrate(cot(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="giac")
Output:
-1/2*(b^2*sin(d*x + c)^2 + 4*a*b*sin(d*x + c) + 2*(a^2 - b^2)*log(abs(sin( d*x + c))) + (4*a*b*sin(d*x + c) + a^2)/sin(d*x + c)^2)/d
Time = 17.25 (sec) , antiderivative size = 221, normalized size of antiderivative = 2.63 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (a^2-b^2\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {a^2}{2}+8\,b^2\right )+a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {a^2}{2}+24\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+20\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+4\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a^2-b^2\right )}{d}-\frac {a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d} \] Input:
int(cot(c + d*x)^3*(a + b*sin(c + d*x))^2,x)
Output:
(log(tan(c/2 + (d*x)/2)^2 + 1)*(a^2 - b^2))/d - (tan(c/2 + (d*x)/2)^4*(a^2 /2 + 8*b^2) + a^2*tan(c/2 + (d*x)/2)^2 + a^2/2 + 24*a*b*tan(c/2 + (d*x)/2) ^3 + 20*a*b*tan(c/2 + (d*x)/2)^5 + 4*a*b*tan(c/2 + (d*x)/2))/(d*(4*tan(c/2 + (d*x)/2)^2 + 8*tan(c/2 + (d*x)/2)^4 + 4*tan(c/2 + (d*x)/2)^6)) - (a^2*t an(c/2 + (d*x)/2)^2)/(8*d) - (log(tan(c/2 + (d*x)/2))*(a^2 - b^2))/d - (a* b*tan(c/2 + (d*x)/2))/d
Time = 0.16 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.98 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{2} a^{2}-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{2} b^{2}-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} a^{2}+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} b^{2}-\sin \left (d x +c \right )^{4} b^{2}-4 \sin \left (d x +c \right )^{3} a b +\sin \left (d x +c \right )^{2} a^{2}-4 \sin \left (d x +c \right ) a b -a^{2}}{2 \sin \left (d x +c \right )^{2} d} \] Input:
int(cot(d*x+c)^3*(a+b*sin(d*x+c))^2,x)
Output:
(2*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**2*a**2 - 2*log(tan((c + d*x) /2)**2 + 1)*sin(c + d*x)**2*b**2 - 2*log(tan((c + d*x)/2))*sin(c + d*x)**2 *a**2 + 2*log(tan((c + d*x)/2))*sin(c + d*x)**2*b**2 - sin(c + d*x)**4*b** 2 - 4*sin(c + d*x)**3*a*b + sin(c + d*x)**2*a**2 - 4*sin(c + d*x)*a*b - a* *2)/(2*sin(c + d*x)**2*d)