\(\int \cot ^2(\frac {3 x}{4}) \, dx\) [37]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [B] (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 = 8, antiderivative size = 14 \[ \int \cot ^2\left (\frac {3 x}{4}\right ) \, dx=-x-\frac {4}{3} \cot \left (\frac {3 x}{4}\right ) \]

[Out]

-x-4/3*cot(3/4*x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3554, 8} \[ \int \cot ^2\left (\frac {3 x}{4}\right ) \, dx=-x-\frac {4}{3} \cot \left (\frac {3 x}{4}\right ) \]

[In]

Int[Cot[(3*x)/4]^2,x]

[Out]

-x - (4*Cot[(3*x)/4])/3

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps \begin{align*} \text {integral}& = -\frac {4}{3} \cot \left (\frac {3 x}{4}\right )-\int 1 \, dx \\ & = -x-\frac {4}{3} \cot \left (\frac {3 x}{4}\right ) \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.02 (sec) , antiderivative size = 28, normalized size of antiderivative = 2.00 \[ \int \cot ^2\left (\frac {3 x}{4}\right ) \, dx=-\frac {4}{3} \cot \left (\frac {3 x}{4}\right ) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-\tan ^2\left (\frac {3 x}{4}\right )\right ) \]

[In]

Integrate[Cot[(3*x)/4]^2,x]

[Out]

(-4*Cot[(3*x)/4]*Hypergeometric2F1[-1/2, 1, 1/2, -Tan[(3*x)/4]^2])/3

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.21

method result size
norman \(\frac {-\frac {4}{3}-x \tan \left (\frac {3 x}{4}\right )}{\tan \left (\frac {3 x}{4}\right )}\) \(17\)
risch \(-x -\frac {8 i}{3 \left ({\mathrm e}^{\frac {3 i x}{2}}-1\right )}\) \(17\)
derivativedivides \(-\frac {4 \cot \left (\frac {3 x}{4}\right )}{3}+\frac {2 \pi }{3}-\frac {4 \,\operatorname {arccot}\left (\cot \left (\frac {3 x}{4}\right )\right )}{3}\) \(18\)
default \(-\frac {4 \cot \left (\frac {3 x}{4}\right )}{3}+\frac {2 \pi }{3}-\frac {4 \,\operatorname {arccot}\left (\cot \left (\frac {3 x}{4}\right )\right )}{3}\) \(18\)
parallelrisch \(\frac {-3 x \tan \left (\frac {3 x}{4}\right )-4}{3 \tan \left (\frac {3 x}{4}\right )}\) \(18\)

[In]

int(cot(3/4*x)^2,x,method=_RETURNVERBOSE)

[Out]

(-4/3-x*tan(3/4*x))/tan(3/4*x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 23 vs. \(2 (10) = 20\).

Time = 0.24 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.64 \[ \int \cot ^2\left (\frac {3 x}{4}\right ) \, dx=-\frac {3 \, x \sin \left (\frac {3}{2} \, x\right ) + 4 \, \cos \left (\frac {3}{2} \, x\right ) + 4}{3 \, \sin \left (\frac {3}{2} \, x\right )} \]

[In]

integrate(cot(3/4*x)^2,x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.36 \[ \int \cot ^2\left (\frac {3 x}{4}\right ) \, dx=- x - \frac {4 \cos {\left (\frac {3 x}{4} \right )}}{3 \sin {\left (\frac {3 x}{4} \right )}} \]

[In]

integrate(cot(3/4*x)**2,x)

[Out]

-x - 4*cos(3*x/4)/(3*sin(3*x/4))

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.86 \[ \int \cot ^2\left (\frac {3 x}{4}\right ) \, dx=-x - \frac {4}{3 \, \tan \left (\frac {3}{4} \, x\right )} \]

[In]

integrate(cot(3/4*x)^2,x, algorithm="maxima")

[Out]

-x - 4/3/tan(3/4*x)

Giac [A] (verification not implemented)

none

Time = 0.43 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.29 \[ \int \cot ^2\left (\frac {3 x}{4}\right ) \, dx=-x - \frac {2}{3 \, \tan \left (\frac {3}{8} \, x\right )} + \frac {2}{3} \, \tan \left (\frac {3}{8} \, x\right ) \]

[In]

integrate(cot(3/4*x)^2,x, algorithm="giac")

[Out]

-x - 2/3/tan(3/8*x) + 2/3*tan(3/8*x)

Mupad [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.71 \[ \int \cot ^2\left (\frac {3 x}{4}\right ) \, dx=-x-\frac {4\,\mathrm {cot}\left (\frac {3\,x}{4}\right )}{3} \]

[In]

int(cot((3*x)/4)^2,x)

[Out]

- x - (4*cot((3*x)/4))/3