\(\int (2 \cot (2 x)-3 \sin (3 x)) \, dx\) [819]

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

Optimal result

Integrand size = 13, antiderivative size = 10 \[ \int (2 \cot (2 x)-3 \sin (3 x)) \, dx=\cos (3 x)+\log (\sin (2 x)) \]

[Out]

cos(3*x)+ln(sin(2*x))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3556, 2718} \[ \int (2 \cot (2 x)-3 \sin (3 x)) \, dx=\cos (3 x)+\log (\sin (2 x)) \]

[In]

Int[2*Cot[2*x] - 3*Sin[3*x],x]

[Out]

Cos[3*x] + Log[Sin[2*x]]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = 2 \int \cot (2 x) \, dx-3 \int \sin (3 x) \, dx \\ & = \cos (3 x)+\log (\sin (2 x)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.50 \[ \int (2 \cot (2 x)-3 \sin (3 x)) \, dx=\cos (3 x)+\log (\cos (2 x))+\log (\tan (2 x)) \]

[In]

Integrate[2*Cot[2*x] - 3*Sin[3*x],x]

[Out]

Cos[3*x] + Log[Cos[2*x]] + Log[Tan[2*x]]

Maple [A] (verified)

Time = 0.63 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.70

method result size
default \(-\frac {\ln \left (1+\cot \left (2 x \right )^{2}\right )}{2}+\cos \left (3 x \right )\) \(17\)
parts \(-\frac {\ln \left (1+\cot \left (2 x \right )^{2}\right )}{2}+\cos \left (3 x \right )\) \(17\)
risch \(-2 i x +\ln \left ({\mathrm e}^{4 i x}-1\right )+\cos \left (3 x \right )\) \(18\)
parallelrisch \(\ln \left (\tan \left (2 x \right )\right )+\ln \left (\frac {1}{\sqrt {\sec \left (2 x \right )^{2}}}\right )+1+\cos \left (3 x \right )\) \(21\)
norman \(\frac {2}{1+\tan \left (\frac {3 x}{2}\right )^{2}}-\frac {\ln \left (1+\tan \left (2 x \right )^{2}\right )}{2}+\ln \left (\tan \left (2 x \right )\right )\) \(30\)

[In]

int(2*cot(2*x)-3*sin(3*x),x,method=_RETURNVERBOSE)

[Out]

-1/2*ln(1+cot(2*x)^2)+cos(3*x)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.80 \[ \int (2 \cot (2 x)-3 \sin (3 x)) \, dx=4 \, \cos \left (x\right )^{3} - 3 \, \cos \left (x\right ) + \log \left (-\frac {1}{2} \, \cos \left (x\right ) \sin \left (x\right )\right ) \]

[In]

integrate(2*cot(2*x)-3*sin(3*x),x, algorithm="fricas")

[Out]

4*cos(x)^3 - 3*cos(x) + log(-1/2*cos(x)*sin(x))

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int (2 \cot (2 x)-3 \sin (3 x)) \, dx=\log {\left (\sin {\left (2 x \right )} \right )} + \cos {\left (3 x \right )} \]

[In]

integrate(2*cot(2*x)-3*sin(3*x),x)

[Out]

log(sin(2*x)) + cos(3*x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int (2 \cot (2 x)-3 \sin (3 x)) \, dx=\cos \left (3 \, x\right ) + \log \left (\sin \left (2 \, x\right )\right ) \]

[In]

integrate(2*cot(2*x)-3*sin(3*x),x, algorithm="maxima")

[Out]

cos(3*x) + log(sin(2*x))

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.10 \[ \int (2 \cot (2 x)-3 \sin (3 x)) \, dx=\cos \left (3 \, x\right ) + \log \left ({\left | \sin \left (2 \, x\right ) \right |}\right ) \]

[In]

integrate(2*cot(2*x)-3*sin(3*x),x, algorithm="giac")

[Out]

cos(3*x) + log(abs(sin(2*x)))

Mupad [B] (verification not implemented)

Time = 27.43 (sec) , antiderivative size = 24, normalized size of antiderivative = 2.40 \[ \int (2 \cot (2 x)-3 \sin (3 x)) \, dx=\cos \left (3\,x\right )+\ln \left (\cos \left (\frac {x}{2}\right )\,\left (\sin \left (\frac {x}{2}\right )-2\,{\sin \left (\frac {x}{2}\right )}^3\right )\right ) \]

[In]

int(2*cot(2*x) - 3*sin(3*x),x)

[Out]

cos(3*x) + log(cos(x/2)*(sin(x/2) - 2*sin(x/2)^3))