3.365 \(\int \left (\frac{1}{2}-3 \cot (x)\right ) (3-2 \cot (x))^3 \, dx\)

Optimal. Leaf size=33 \[ -\frac{285 x}{2}+(3-2 \cot (x))^3+5 (3-2 \cot (x))^2-42 \cot (x)+4 \log (\sin (x)) \]

[Out]

(-285*x)/2 + 5*(3 - 2*Cot[x])^2 + (3 - 2*Cot[x])^3 - 42*Cot[x] + 4*Log[Sin[x]]

_______________________________________________________________________________________

Rubi [A]  time = 0.0945191, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176 \[ -\frac{285 x}{2}+(3-2 \cot (x))^3+5 (3-2 \cot (x))^2-42 \cot (x)+4 \log (\sin (x)) \]

Antiderivative was successfully verified.

[In]  Int[(1/2 - 3*Cot[x])*(3 - 2*Cot[x])^3,x]

[Out]

(-285*x)/2 + 5*(3 - 2*Cot[x])^2 + (3 - 2*Cot[x])^3 - 42*Cot[x] + 4*Log[Sin[x]]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 8.21935, size = 34, normalized size = 1.03 \[ - \frac{285 x}{2} + \left (3 - \frac{2}{\tan{\left (x \right )}}\right )^{3} + 5 \left (3 - \frac{2}{\tan{\left (x \right )}}\right )^{2} + 4 \log{\left (\sin{\left (x \right )} \right )} - \frac{42}{\tan{\left (x \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((1/2-3*cot(x))*(3-2*cot(x))**3,x)

[Out]

-285*x/2 + (3 - 2/tan(x))**3 + 5*(3 - 2/tan(x))**2 + 4*log(sin(x)) - 42/tan(x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0417091, size = 29, normalized size = 0.88 \[ -\frac{285 x}{2}-148 \cot (x)+56 \csc ^2(x)+4 \log (\sin (x))-8 \cot (x) \csc ^2(x) \]

Antiderivative was successfully verified.

[In]  Integrate[(1/2 - 3*Cot[x])*(3 - 2*Cot[x])^3,x]

[Out]

(-285*x)/2 - 148*Cot[x] + 56*Csc[x]^2 - 8*Cot[x]*Csc[x]^2 + 4*Log[Sin[x]]

_______________________________________________________________________________________

Maple [A]  time = 0.005, size = 33, normalized size = 1. \[ -8\, \left ( \cot \left ( x \right ) \right ) ^{3}+56\, \left ( \cot \left ( x \right ) \right ) ^{2}-156\,\cot \left ( x \right ) -2\,\ln \left ( \left ( \cot \left ( x \right ) \right ) ^{2}+1 \right ) +{\frac{285\,\pi }{4}}-{\frac{285\,x}{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((1/2-3*cot(x))*(3-2*cot(x))^3,x)

[Out]

-8*cot(x)^3+56*cot(x)^2-156*cot(x)-2*ln(cot(x)^2+1)+285/4*Pi-285/2*x

_______________________________________________________________________________________

Maxima [A]  time = 1.51454, size = 49, normalized size = 1.48 \[ -\frac{285}{2} \, x - \frac{4 \,{\left (39 \, \tan \left (x\right )^{2} - 14 \, \tan \left (x\right ) + 2\right )}}{\tan \left (x\right )^{3}} - 2 \, \log \left (\tan \left (x\right )^{2} + 1\right ) + 4 \, \log \left (\tan \left (x\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/2*(6*cot(x) - 1)*(2*cot(x) - 3)^3,x, algorithm="maxima")

[Out]

-285/2*x - 4*(39*tan(x)^2 - 14*tan(x) + 2)/tan(x)^3 - 2*log(tan(x)^2 + 1) + 4*lo
g(tan(x))

_______________________________________________________________________________________

Fricas [A]  time = 0.227121, size = 96, normalized size = 2.91 \[ \frac{4 \,{\left (\cos \left (2 \, x\right ) - 1\right )} \log \left (-\frac{1}{2} \, \cos \left (2 \, x\right ) + \frac{1}{2}\right ) \sin \left (2 \, x\right ) - 296 \, \cos \left (2 \, x\right )^{2} -{\left (285 \, x \cos \left (2 \, x\right ) - 285 \, x + 224\right )} \sin \left (2 \, x\right ) + 32 \, \cos \left (2 \, x\right ) + 328}{2 \,{\left (\cos \left (2 \, x\right ) - 1\right )} \sin \left (2 \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/2*(6*cot(x) - 1)*(2*cot(x) - 3)^3,x, algorithm="fricas")

[Out]

1/2*(4*(cos(2*x) - 1)*log(-1/2*cos(2*x) + 1/2)*sin(2*x) - 296*cos(2*x)^2 - (285*
x*cos(2*x) - 285*x + 224)*sin(2*x) + 32*cos(2*x) + 328)/((cos(2*x) - 1)*sin(2*x)
)

_______________________________________________________________________________________

Sympy [A]  time = 0.980392, size = 39, normalized size = 1.18 \[ - \frac{285 x}{2} - 2 \log{\left (\tan ^{2}{\left (x \right )} + 1 \right )} + 4 \log{\left (\tan{\left (x \right )} \right )} - \frac{156}{\tan{\left (x \right )}} + \frac{56}{\tan ^{2}{\left (x \right )}} - \frac{8}{\tan ^{3}{\left (x \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((1/2-3*cot(x))*(3-2*cot(x))**3,x)

[Out]

-285*x/2 - 2*log(tan(x)**2 + 1) + 4*log(tan(x)) - 156/tan(x) + 56/tan(x)**2 - 8/
tan(x)**3

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.21699, size = 101, normalized size = 3.06 \[ \tan \left (\frac{1}{2} \, x\right )^{3} + 14 \, \tan \left (\frac{1}{2} \, x\right )^{2} - \frac{285}{2} \, x - \frac{22 \, \tan \left (\frac{1}{2} \, x\right )^{3} + 225 \, \tan \left (\frac{1}{2} \, x\right )^{2} - 42 \, \tan \left (\frac{1}{2} \, x\right ) + 3}{3 \, \tan \left (\frac{1}{2} \, x\right )^{3}} - 4 \,{\rm ln}\left (\tan \left (\frac{1}{2} \, x\right )^{2} + 1\right ) + 4 \,{\rm ln}\left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right ) + 75 \, \tan \left (\frac{1}{2} \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/2*(6*cot(x) - 1)*(2*cot(x) - 3)^3,x, algorithm="giac")

[Out]

tan(1/2*x)^3 + 14*tan(1/2*x)^2 - 285/2*x - 1/3*(22*tan(1/2*x)^3 + 225*tan(1/2*x)
^2 - 42*tan(1/2*x) + 3)/tan(1/2*x)^3 - 4*ln(tan(1/2*x)^2 + 1) + 4*ln(abs(tan(1/2
*x))) + 75*tan(1/2*x)