3.899 \(\int \cot (3 x) (-1+\csc ^2(3 x))^3 (1-\sin ^2(3 x))^2 \, dx\)

Optimal. Leaf size=60 \[ -\frac {1}{12} \sin ^4(3 x)+\frac {5}{6} \sin ^2(3 x)-\frac {1}{18} \csc ^6(3 x)+\frac {5}{12} \csc ^4(3 x)-\frac {5}{3} \csc ^2(3 x)-\frac {10}{3} \log (\sin (3 x)) \]

[Out]

-5/3*csc(3*x)^2+5/12*csc(3*x)^4-1/18*csc(3*x)^6-10/3*ln(sin(3*x))+5/6*sin(3*x)^2-1/12*sin(3*x)^4

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {3175, 4360, 266, 43} \[ -\frac {1}{12} \sin ^4(3 x)+\frac {5}{6} \sin ^2(3 x)-\frac {1}{18} \csc ^6(3 x)+\frac {5}{12} \csc ^4(3 x)-\frac {5}{3} \csc ^2(3 x)-\frac {10}{3} \log (\sin (3 x)) \]

Antiderivative was successfully verified.

[In]

Int[Cot[3*x]*(-1 + Csc[3*x]^2)^3*(1 - Sin[3*x]^2)^2,x]

[Out]

(-5*Csc[3*x]^2)/3 + (5*Csc[3*x]^4)/12 - Csc[3*x]^6/18 - (10*Log[Sin[3*x]])/3 + (5*Sin[3*x]^2)/6 - Sin[3*x]^4/1
2

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 4360

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Sin[c*(a + b*x)], x]}, Dist[1/(b
*c), Subst[Int[SubstFor[1/x, Sin[c*(a + b*x)]/d, u, x], x], x, Sin[c*(a + b*x)]/d], x] /; FunctionOfQ[Sin[c*(a
 + b*x)]/d, u, x]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Cot] || EqQ[F, cot])

Rubi steps

\begin {align*} \int \cot (3 x) \left (-1+\csc ^2(3 x)\right )^3 \left (1-\sin ^2(3 x)\right )^2 \, dx &=\int \cos ^4(3 x) \cot (3 x) \left (-1+\csc ^2(3 x)\right )^3 \, dx\\ &=\frac {1}{3} \operatorname {Subst}\left (\int \frac {\left (1-x^2\right )^5}{x^7} \, dx,x,\sin (3 x)\right )\\ &=\frac {1}{6} \operatorname {Subst}\left (\int \frac {(1-x)^5}{x^4} \, dx,x,\sin ^2(3 x)\right )\\ &=\frac {1}{6} \operatorname {Subst}\left (\int \left (5+\frac {1}{x^4}-\frac {5}{x^3}+\frac {10}{x^2}-\frac {10}{x}-x\right ) \, dx,x,\sin ^2(3 x)\right )\\ &=-\frac {5}{3} \csc ^2(3 x)+\frac {5}{12} \csc ^4(3 x)-\frac {1}{18} \csc ^6(3 x)-\frac {10}{3} \log (\sin (3 x))+\frac {5}{6} \sin ^2(3 x)-\frac {1}{12} \sin ^4(3 x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 52, normalized size = 0.87 \[ \frac {1}{36} \left (-3 \sin ^4(3 x)+30 \sin ^2(3 x)-2 \csc ^6(3 x)+15 \csc ^4(3 x)-60 \csc ^2(3 x)-120 \log (\sin (3 x))\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[3*x]*(-1 + Csc[3*x]^2)^3*(1 - Sin[3*x]^2)^2,x]

[Out]

(-60*Csc[3*x]^2 + 15*Csc[3*x]^4 - 2*Csc[3*x]^6 - 120*Log[Sin[3*x]] + 30*Sin[3*x]^2 - 3*Sin[3*x]^4)/36

________________________________________________________________________________________

fricas [B]  time = 0.84, size = 103, normalized size = 1.72 \[ -\frac {24 \, \cos \left (3 \, x\right )^{10} + 120 \, \cos \left (3 \, x\right )^{8} - 609 \, \cos \left (3 \, x\right )^{6} + 387 \, \cos \left (3 \, x\right )^{4} + 333 \, \cos \left (3 \, x\right )^{2} + 960 \, {\left (\cos \left (3 \, x\right )^{6} - 3 \, \cos \left (3 \, x\right )^{4} + 3 \, \cos \left (3 \, x\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \sin \left (3 \, x\right )\right ) - 271}{288 \, {\left (\cos \left (3 \, x\right )^{6} - 3 \, \cos \left (3 \, x\right )^{4} + 3 \, \cos \left (3 \, x\right )^{2} - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(3*x)*(-1+csc(3*x)^2)^3*(1-sin(3*x)^2)^2,x, algorithm="fricas")

[Out]

-1/288*(24*cos(3*x)^10 + 120*cos(3*x)^8 - 609*cos(3*x)^6 + 387*cos(3*x)^4 + 333*cos(3*x)^2 + 960*(cos(3*x)^6 -
 3*cos(3*x)^4 + 3*cos(3*x)^2 - 1)*log(1/2*sin(3*x)) - 271)/(cos(3*x)^6 - 3*cos(3*x)^4 + 3*cos(3*x)^2 - 1)

________________________________________________________________________________________

giac [A]  time = 0.25, size = 60, normalized size = 1.00 \[ -\frac {1}{12} \, \sin \left (3 \, x\right )^{4} + \frac {5}{6} \, \sin \left (3 \, x\right )^{2} + \frac {110 \, \sin \left (3 \, x\right )^{6} - 60 \, \sin \left (3 \, x\right )^{4} + 15 \, \sin \left (3 \, x\right )^{2} - 2}{36 \, \sin \left (3 \, x\right )^{6}} - \frac {5}{3} \, \log \left (\sin \left (3 \, x\right )^{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(3*x)*(-1+csc(3*x)^2)^3*(1-sin(3*x)^2)^2,x, algorithm="giac")

[Out]

-1/12*sin(3*x)^4 + 5/6*sin(3*x)^2 + 1/36*(110*sin(3*x)^6 - 60*sin(3*x)^4 + 15*sin(3*x)^2 - 2)/sin(3*x)^6 - 5/3
*log(sin(3*x)^2)

________________________________________________________________________________________

maple [A]  time = 0.16, size = 49, normalized size = 0.82 \[ -\frac {\left (\sin ^{4}\left (3 x \right )\right )}{12}-\frac {5 \left (\cos ^{2}\left (3 x \right )\right )}{6}-\frac {10 \ln \left (\sin \left (3 x \right )\right )}{3}-\frac {5}{3 \sin \left (3 x \right )^{2}}+\frac {5}{12 \sin \left (3 x \right )^{4}}-\frac {1}{18 \sin \left (3 x \right )^{6}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(3*x)*(-1+csc(3*x)^2)^3*(1-sin(3*x)^2)^2,x)

[Out]

-1/12*sin(3*x)^4-5/6*cos(3*x)^2-10/3*ln(sin(3*x))-5/3/sin(3*x)^2+5/12/sin(3*x)^4-1/18/sin(3*x)^6

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 52, normalized size = 0.87 \[ -\frac {1}{12} \, \sin \left (3 \, x\right )^{4} + \frac {5}{6} \, \sin \left (3 \, x\right )^{2} - \frac {60 \, \sin \left (3 \, x\right )^{4} - 15 \, \sin \left (3 \, x\right )^{2} + 2}{36 \, \sin \left (3 \, x\right )^{6}} - \frac {5}{3} \, \log \left (\sin \left (3 \, x\right )^{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(3*x)*(-1+csc(3*x)^2)^3*(1-sin(3*x)^2)^2,x, algorithm="maxima")

[Out]

-1/12*sin(3*x)^4 + 5/6*sin(3*x)^2 - 1/36*(60*sin(3*x)^4 - 15*sin(3*x)^2 + 2)/sin(3*x)^6 - 5/3*log(sin(3*x)^2)

________________________________________________________________________________________

mupad [B]  time = 4.67, size = 84, normalized size = 1.40 \[ \frac {\ln \left ({\left ({\mathrm {tan}\left (3\,x\right )}^2+1\right )}^5\right )}{3}-\frac {10\,\ln \left (\mathrm {tan}\left (3\,x\right )\right )}{3}-\frac {5\,{\mathrm {tan}\left (3\,x\right )}^8+\frac {15\,{\mathrm {tan}\left (3\,x\right )}^6}{2}+\frac {5\,{\mathrm {tan}\left (3\,x\right )}^4}{3}-\frac {5\,{\mathrm {tan}\left (3\,x\right )}^2}{12}+\frac {1}{6}}{3\,\left ({\mathrm {tan}\left (3\,x\right )}^{10}+2\,{\mathrm {tan}\left (3\,x\right )}^8+{\mathrm {tan}\left (3\,x\right )}^6\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(3*x)*(1/sin(3*x)^2 - 1)^3*(sin(3*x)^2 - 1)^2,x)

[Out]

log((tan(3*x)^2 + 1)^5)/3 - (10*log(tan(3*x)))/3 - ((5*tan(3*x)^4)/3 - (5*tan(3*x)^2)/12 + (15*tan(3*x)^6)/2 +
 5*tan(3*x)^8 + 1/6)/(3*(tan(3*x)^6 + 2*tan(3*x)^8 + tan(3*x)^10))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(3*x)*(-1+csc(3*x)**2)**3*(1-sin(3*x)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________