\(\int \cot ^3(c+d x) (a+b \sin (c+d x))^3 \, dx\) [163]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 116 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {3 a^2 b \csc (c+d x)}{d}-\frac {a^3 \csc ^2(c+d x)}{2 d}-\frac {a \left (a^2-3 b^2\right ) \log (\sin (c+d x))}{d}-\frac {b \left (3 a^2-b^2\right ) \sin (c+d x)}{d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}-\frac {b^3 \sin ^3(c+d x)}{3 d} \] Output:

-3*a^2*b*csc(d*x+c)/d-1/2*a^3*csc(d*x+c)^2/d-a*(a^2-3*b^2)*ln(sin(d*x+c))/ 
d-b*(3*a^2-b^2)*sin(d*x+c)/d-3/2*a*b^2*sin(d*x+c)^2/d-1/3*b^3*sin(d*x+c)^3 
/d
 

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.12 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {3 a^2 b \csc (c+d x)}{d}-\frac {a^3 \csc ^2(c+d x)}{2 d}-\frac {a^3 \log (\sin (c+d x))}{d}+\frac {3 a b^2 \log (\sin (c+d x))}{d}-\frac {3 a^2 b \sin (c+d x)}{d}+\frac {b^3 \sin (c+d x)}{d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}-\frac {b^3 \sin ^3(c+d x)}{3 d} \] Input:

Integrate[Cot[c + d*x]^3*(a + b*Sin[c + d*x])^3,x]
 

Output:

(-3*a^2*b*Csc[c + d*x])/d - (a^3*Csc[c + d*x]^2)/(2*d) - (a^3*Log[Sin[c + 
d*x]])/d + (3*a*b^2*Log[Sin[c + d*x]])/d - (3*a^2*b*Sin[c + d*x])/d + (b^3 
*Sin[c + d*x])/d - (3*a*b^2*Sin[c + d*x]^2)/(2*d) - (b^3*Sin[c + d*x]^3)/( 
3*d)
 

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.90, 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))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a+b \sin (c+d x))^3}{\tan (c+d x)^3}dx\)

\(\Big \downarrow \) 3200

\(\displaystyle \frac {\int \frac {\csc ^3(c+d x) (a+b \sin (c+d x))^3 \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^3 \csc ^3(c+d x)}{b}+3 a^2 \csc ^2(c+d x)+\frac {\left (3 a b^2-a^3\right ) \csc (c+d x)}{b}-b^2 \sin ^2(c+d x)-3 a^2 \left (1-\frac {b^2}{3 a^2}\right )-3 a b \sin (c+d x)\right )d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {1}{2} a^3 \csc ^2(c+d x)-b \left (3 a^2-b^2\right ) \sin (c+d x)-a \left (a^2-3 b^2\right ) \log (b \sin (c+d x))-3 a^2 b \csc (c+d x)-\frac {3}{2} a b^2 \sin ^2(c+d x)-\frac {1}{3} b^3 \sin ^3(c+d x)}{d}\)

Input:

Int[Cot[c + d*x]^3*(a + b*Sin[c + d*x])^3,x]
 

Output:

(-3*a^2*b*Csc[c + d*x] - (a^3*Csc[c + d*x]^2)/2 - a*(a^2 - 3*b^2)*Log[b*Si 
n[c + d*x]] - b*(3*a^2 - b^2)*Sin[c + d*x] - (3*a*b^2*Sin[c + d*x]^2)/2 - 
(b^3*Sin[c + d*x]^3)/3)/d
 

Defintions of rubi rules used

rule 522
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]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3200
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]
 
Maple [A] (verified)

Time = 2.00 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.02

method result size
derivativedivides \(\frac {a^{3} \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+3 a^{2} 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 )+3 a \,b^{2} \left (\frac {\cos \left (d x +c \right )^{2}}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )+\frac {b^{3} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}}{d}\) \(118\)
default \(\frac {a^{3} \left (-\frac {\cot \left (d x +c \right )^{2}}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+3 a^{2} 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 )+3 a \,b^{2} \left (\frac {\cos \left (d x +c \right )^{2}}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )+\frac {b^{3} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}}{d}\) \(118\)
risch \(-\frac {i b^{3} {\mathrm e}^{3 i \left (d x +c \right )}}{24 d}+\frac {3 i b \,{\mathrm e}^{i \left (d x +c \right )} a^{2}}{2 d}+\frac {i b^{3} {\mathrm e}^{-3 i \left (d x +c \right )}}{24 d}+\frac {3 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}-\frac {2 i a^{2} \left (i a \,{\mathrm e}^{2 i \left (d x +c \right )}+3 b \,{\mathrm e}^{3 i \left (d x +c \right )}-3 \,{\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 {3 i b^{3} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}-3 i a \,b^{2} x +\frac {2 i a^{3} c}{d}+\frac {3 a \,b^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {3 i b \,{\mathrm e}^{-i \left (d x +c \right )} a^{2}}{2 d}-\frac {6 i a \,b^{2} c}{d}+i a^{3} x -\frac {3 i b^{3} {\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}+\frac {3 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{2}}{d}\) \(285\)

Input:

int(cot(d*x+c)^3*(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)
 

Output:

1/d*(a^3*(-1/2*cot(d*x+c)^2-ln(sin(d*x+c)))+3*a^2*b*(-1/sin(d*x+c)*cos(d*x 
+c)^4-(2+cos(d*x+c)^2)*sin(d*x+c))+3*a*b^2*(1/2*cos(d*x+c)^2+ln(sin(d*x+c) 
))+1/3*b^3*(2+cos(d*x+c)^2)*sin(d*x+c))
 

Fricas [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.32 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {18 \, a b^{2} \cos \left (d x + c\right )^{4} - 27 \, a b^{2} \cos \left (d x + c\right )^{2} + 6 \, a^{3} + 9 \, a b^{2} + 12 \, {\left (a^{3} - 3 \, a b^{2} - {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + 4 \, {\left (b^{3} \cos \left (d x + c\right )^{4} + 18 \, a^{2} b - 2 \, b^{3} - {\left (9 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{12 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \] Input:

integrate(cot(d*x+c)^3*(a+b*sin(d*x+c))^3,x, algorithm="fricas")
 

Output:

1/12*(18*a*b^2*cos(d*x + c)^4 - 27*a*b^2*cos(d*x + c)^2 + 6*a^3 + 9*a*b^2 
+ 12*(a^3 - 3*a*b^2 - (a^3 - 3*a*b^2)*cos(d*x + c)^2)*log(1/2*sin(d*x + c) 
) + 4*(b^3*cos(d*x + c)^4 + 18*a^2*b - 2*b^3 - (9*a^2*b - b^3)*cos(d*x + c 
)^2)*sin(d*x + c))/(d*cos(d*x + c)^2 - d)
 

Sympy [F]

\[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^3 \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right )^{3} \cot ^{3}{\left (c + d x \right )}\, dx \] Input:

integrate(cot(d*x+c)**3*(a+b*sin(d*x+c))**3,x)
 

Output:

Integral((a + b*sin(c + d*x))**3*cot(c + d*x)**3, x)
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.84 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {2 \, b^{3} \sin \left (d x + c\right )^{3} + 9 \, a b^{2} \sin \left (d x + c\right )^{2} + 6 \, {\left (a^{3} - 3 \, a b^{2}\right )} \log \left (\sin \left (d x + c\right )\right ) + 6 \, {\left (3 \, a^{2} b - b^{3}\right )} \sin \left (d x + c\right ) + \frac {3 \, {\left (6 \, a^{2} b \sin \left (d x + c\right ) + a^{3}\right )}}{\sin \left (d x + c\right )^{2}}}{6 \, d} \] Input:

integrate(cot(d*x+c)^3*(a+b*sin(d*x+c))^3,x, algorithm="maxima")
 

Output:

-1/6*(2*b^3*sin(d*x + c)^3 + 9*a*b^2*sin(d*x + c)^2 + 6*(a^3 - 3*a*b^2)*lo 
g(sin(d*x + c)) + 6*(3*a^2*b - b^3)*sin(d*x + c) + 3*(6*a^2*b*sin(d*x + c) 
 + a^3)/sin(d*x + c)^2)/d
 

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.88 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {2 \, b^{3} \sin \left (d x + c\right )^{3} + 9 \, a b^{2} \sin \left (d x + c\right )^{2} + 18 \, a^{2} b \sin \left (d x + c\right ) - 6 \, b^{3} \sin \left (d x + c\right ) + 6 \, {\left (a^{3} - 3 \, a b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + \frac {3 \, {\left (6 \, a^{2} b \sin \left (d x + c\right ) + a^{3}\right )}}{\sin \left (d x + c\right )^{2}}}{6 \, d} \] Input:

integrate(cot(d*x+c)^3*(a+b*sin(d*x+c))^3,x, algorithm="giac")
 

Output:

-1/6*(2*b^3*sin(d*x + c)^3 + 9*a*b^2*sin(d*x + c)^2 + 18*a^2*b*sin(d*x + c 
) - 6*b^3*sin(d*x + c) + 6*(a^3 - 3*a*b^2)*log(abs(sin(d*x + c))) + 3*(6*a 
^2*b*sin(d*x + c) + a^3)/sin(d*x + c)^2)/d
 

Mupad [B] (verification not implemented)

Time = 17.84 (sec) , antiderivative size = 312, normalized size of antiderivative = 2.69 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (3\,a\,b^2-a^3\right )}{d}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (3\,a\,b^2-a^3\right )}{d}-\frac {\frac {3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {3\,a^3}{2}+24\,a\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {a^3}{2}+24\,a\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (30\,a^2\,b-8\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (42\,a^2\,b-8\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (66\,a^2\,b-\frac {16\,b^3}{3}\right )+\frac {a^3}{2}+6\,a^2\,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 )}^8+12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+12\,{\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^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {3\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \] Input:

int(cot(c + d*x)^3*(a + b*sin(c + d*x))^3,x)
 

Output:

(log(tan(c/2 + (d*x)/2))*(3*a*b^2 - a^3))/d - (log(tan(c/2 + (d*x)/2)^2 + 
1)*(3*a*b^2 - a^3))/d - ((3*a^3*tan(c/2 + (d*x)/2)^2)/2 + tan(c/2 + (d*x)/ 
2)^4*(24*a*b^2 + (3*a^3)/2) + tan(c/2 + (d*x)/2)^6*(24*a*b^2 + a^3/2) + ta 
n(c/2 + (d*x)/2)^7*(30*a^2*b - 8*b^3) + tan(c/2 + (d*x)/2)^3*(42*a^2*b - 8 
*b^3) + tan(c/2 + (d*x)/2)^5*(66*a^2*b - (16*b^3)/3) + a^3/2 + 6*a^2*b*tan 
(c/2 + (d*x)/2))/(d*(4*tan(c/2 + (d*x)/2)^2 + 12*tan(c/2 + (d*x)/2)^4 + 12 
*tan(c/2 + (d*x)/2)^6 + 4*tan(c/2 + (d*x)/2)^8)) - (a^3*tan(c/2 + (d*x)/2) 
^2)/(8*d) - (3*a^2*b*tan(c/2 + (d*x)/2))/(2*d)
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.72 \[ \int \cot ^3(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {24 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{2} a^{3}-72 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{2} a \,b^{2}-24 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} a^{3}+72 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} a \,b^{2}-8 \sin \left (d x +c \right )^{5} b^{3}-36 \sin \left (d x +c \right )^{4} a \,b^{2}-72 \sin \left (d x +c \right )^{3} a^{2} b +24 \sin \left (d x +c \right )^{3} b^{3}+15 \sin \left (d x +c \right )^{2} a^{3}-72 \sin \left (d x +c \right ) a^{2} b -12 a^{3}}{24 \sin \left (d x +c \right )^{2} d} \] Input:

int(cot(d*x+c)^3*(a+b*sin(d*x+c))^3,x)
 

Output:

(24*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**2*a**3 - 72*log(tan((c + d* 
x)/2)**2 + 1)*sin(c + d*x)**2*a*b**2 - 24*log(tan((c + d*x)/2))*sin(c + d* 
x)**2*a**3 + 72*log(tan((c + d*x)/2))*sin(c + d*x)**2*a*b**2 - 8*sin(c + d 
*x)**5*b**3 - 36*sin(c + d*x)**4*a*b**2 - 72*sin(c + d*x)**3*a**2*b + 24*s 
in(c + d*x)**3*b**3 + 15*sin(c + d*x)**2*a**3 - 72*sin(c + d*x)*a**2*b - 1 
2*a**3)/(24*sin(c + d*x)**2*d)