3.343 \(\int \cot ^4(\frac{\pi }{4}+\frac{x}{3}) \, dx\)

Optimal. Leaf size=32 \[ x-\cot ^3\left (\frac{x}{3}+\frac{\pi }{4}\right )+3 \cot \left (\frac{x}{3}+\frac{\pi }{4}\right ) \]

[Out]

x + 3*Cot[Pi/4 + x/3] - Cot[Pi/4 + x/3]^3

________________________________________________________________________________________

Rubi [A]  time = 0.0139363, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3473, 8} \[ x-\cot ^3\left (\frac{x}{3}+\frac{\pi }{4}\right )+3 \cot \left (\frac{x}{3}+\frac{\pi }{4}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Cot[Pi/4 + x/3]^4,x]

[Out]

x + 3*Cot[Pi/4 + x/3] - Cot[Pi/4 + x/3]^3

Rule 3473

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]

Rule 8

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

Rubi steps

\begin{align*} \int \cot ^4\left (\frac{\pi }{4}+\frac{x}{3}\right ) \, dx &=-\cot ^3\left (\frac{\pi }{4}+\frac{x}{3}\right )-\int \tan ^2\left (\frac{\pi }{4}-\frac{x}{3}\right ) \, dx\\ &=3 \cot \left (\frac{\pi }{4}+\frac{x}{3}\right )-\cot ^3\left (\frac{\pi }{4}+\frac{x}{3}\right )+\int 1 \, dx\\ &=x+3 \cot \left (\frac{\pi }{4}+\frac{x}{3}\right )-\cot ^3\left (\frac{\pi }{4}+\frac{x}{3}\right )\\ \end{align*}

Mathematica [C]  time = 0.0315336, size = 40, normalized size = 1.25 \[ -\cot ^3\left (\frac{x}{3}+\frac{\pi }{4}\right ) \, _2F_1\left (-\frac{3}{2},1;-\frac{1}{2};-\tan ^2\left (\frac{x}{3}+\frac{\pi }{4}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[Pi/4 + x/3]^4,x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 28, normalized size = 0.9 \begin{align*} - \left ( \cot \left ({\frac{\pi }{4}}+{\frac{x}{3}} \right ) \right ) ^{3}+3\,\cot \left ( \pi /4+x/3 \right ) -{\frac{3\,\pi }{4}}+x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(1/4*Pi+1/3*x)^4,x)

[Out]

-cot(1/4*Pi+1/3*x)^3+3*cot(1/4*Pi+1/3*x)-3/4*Pi+x

________________________________________________________________________________________

Maxima [A]  time = 1.42652, size = 41, normalized size = 1.28 \begin{align*} \frac{3}{4} \, \pi + x + \frac{3 \, \tan \left (\frac{1}{4} \, \pi + \frac{1}{3} \, x\right )^{2} - 1}{\tan \left (\frac{1}{4} \, \pi + \frac{1}{3} \, x\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(1/4*pi+1/3*x)^4,x, algorithm="maxima")

[Out]

3/4*pi + x + (3*tan(1/4*pi + 1/3*x)^2 - 1)/tan(1/4*pi + 1/3*x)^3

________________________________________________________________________________________

Fricas [B]  time = 1.68143, size = 207, normalized size = 6.47 \begin{align*} \frac{4 \, \cos \left (\frac{1}{2} \, \pi + \frac{2}{3} \, x\right )^{2} +{\left (x \cos \left (\frac{1}{2} \, \pi + \frac{2}{3} \, x\right ) - x\right )} \sin \left (\frac{1}{2} \, \pi + \frac{2}{3} \, x\right ) + 2 \, \cos \left (\frac{1}{2} \, \pi + \frac{2}{3} \, x\right ) - 2}{{\left (\cos \left (\frac{1}{2} \, \pi + \frac{2}{3} \, x\right ) - 1\right )} \sin \left (\frac{1}{2} \, \pi + \frac{2}{3} \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(1/4*pi+1/3*x)^4,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.194499, size = 20, normalized size = 0.62 \begin{align*} x - \cot ^{3}{\left (\frac{x}{3} + \frac{\pi }{4} \right )} + 3 \cot{\left (\frac{x}{3} + \frac{\pi }{4} \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(1/4*pi+1/3*x)**4,x)

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.09137, size = 72, normalized size = 2.25 \begin{align*} \frac{3}{4} \, \pi + \frac{1}{8} \, \tan \left (\frac{1}{8} \, \pi + \frac{1}{6} \, x\right )^{3} + x + \frac{15 \, \tan \left (\frac{1}{8} \, \pi + \frac{1}{6} \, x\right )^{2} - 1}{8 \, \tan \left (\frac{1}{8} \, \pi + \frac{1}{6} \, x\right )^{3}} - \frac{15}{8} \, \tan \left (\frac{1}{8} \, \pi + \frac{1}{6} \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(1/4*pi+1/3*x)^4,x, algorithm="giac")

[Out]

3/4*pi + 1/8*tan(1/8*pi + 1/6*x)^3 + x + 1/8*(15*tan(1/8*pi + 1/6*x)^2 - 1)/tan(1/8*pi + 1/6*x)^3 - 15/8*tan(1
/8*pi + 1/6*x)