\(\int \cos ^4(x) \cot ^2(x) \, dx\) [831]

   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 = 9, antiderivative size = 32 \[ \int \cos ^4(x) \cot ^2(x) \, dx=-\frac {15 x}{8}-\frac {15 \cot (x)}{8}+\frac {5}{8} \cos ^2(x) \cot (x)+\frac {1}{4} \cos ^4(x) \cot (x) \]

[Out]

-15/8*x-15/8*cot(x)+5/8*cos(x)^2*cot(x)+1/4*cos(x)^4*cot(x)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {2671, 294, 327, 209} \[ \int \cos ^4(x) \cot ^2(x) \, dx=-\frac {15 x}{8}-\frac {15 \cot (x)}{8}+\frac {1}{4} \cos ^4(x) \cot (x)+\frac {5}{8} \cos ^2(x) \cot (x) \]

[In]

Int[Cos[x]^4*Cot[x]^2,x]

[Out]

(-15*x)/8 - (15*Cot[x])/8 + (5*Cos[x]^2*Cot[x])/8 + (Cos[x]^4*Cot[x])/4

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2671

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> With[{ff = FreeFactors[Ta
n[e + f*x], x]}, Dist[b*(ff/f), Subst[Int[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, b*(Tan[e + f*x]/ff
)], x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {x^6}{\left (1+x^2\right )^3} \, dx,x,\cot (x)\right ) \\ & = \frac {1}{4} \cos ^4(x) \cot (x)-\frac {5}{4} \text {Subst}\left (\int \frac {x^4}{\left (1+x^2\right )^2} \, dx,x,\cot (x)\right ) \\ & = \frac {5}{8} \cos ^2(x) \cot (x)+\frac {1}{4} \cos ^4(x) \cot (x)-\frac {15}{8} \text {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,\cot (x)\right ) \\ & = -\frac {15 \cot (x)}{8}+\frac {5}{8} \cos ^2(x) \cot (x)+\frac {1}{4} \cos ^4(x) \cot (x)+\frac {15}{8} \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (x)\right ) \\ & = -\frac {15 x}{8}-\frac {15 \cot (x)}{8}+\frac {5}{8} \cos ^2(x) \cot (x)+\frac {1}{4} \cos ^4(x) \cot (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.81 \[ \int \cos ^4(x) \cot ^2(x) \, dx=-\frac {15 x}{8}-\cot (x)-\frac {1}{2} \sin (2 x)-\frac {1}{32} \sin (4 x) \]

[In]

Integrate[Cos[x]^4*Cot[x]^2,x]

[Out]

(-15*x)/8 - Cot[x] - Sin[2*x]/2 - Sin[4*x]/32

Maple [A] (verified)

Time = 34.70 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.06

method result size
default \(-\frac {\cos \left (x \right )^{7}}{\sin \left (x \right )}-\left (\cos \left (x \right )^{5}+\frac {5 \cos \left (x \right )^{3}}{4}+\frac {15 \cos \left (x \right )}{8}\right ) \sin \left (x \right )-\frac {15 x}{8}\) \(34\)
risch \(-\frac {15 x}{8}+\frac {i {\mathrm e}^{2 i x}}{4}-\frac {i {\mathrm e}^{-2 i x}}{4}-\frac {2 i}{{\mathrm e}^{2 i x}-1}-\frac {\sin \left (4 x \right )}{32}\) \(39\)

[In]

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

[Out]

-1/sin(x)*cos(x)^7-(cos(x)^5+5/4*cos(x)^3+15/8*cos(x))*sin(x)-15/8*x

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.88 \[ \int \cos ^4(x) \cot ^2(x) \, dx=\frac {2 \, \cos \left (x\right )^{5} + 5 \, \cos \left (x\right )^{3} - 15 \, x \sin \left (x\right ) - 15 \, \cos \left (x\right )}{8 \, \sin \left (x\right )} \]

[In]

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

[Out]

1/8*(2*cos(x)^5 + 5*cos(x)^3 - 15*x*sin(x) - 15*cos(x))/sin(x)

Sympy [A] (verification not implemented)

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

[In]

integrate(cos(x)**4*cot(x)**2,x)

[Out]

-15*x/8 - 5*sin(x)*cos(x)**3/4 - 15*sin(x)*cos(x)/8 - cos(x)**5/sin(x)

Maxima [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.09 \[ \int \cos ^4(x) \cot ^2(x) \, dx=-\frac {15}{8} \, x - \frac {15 \, \tan \left (x\right )^{4} + 25 \, \tan \left (x\right )^{2} + 8}{8 \, {\left (\tan \left (x\right )^{5} + 2 \, \tan \left (x\right )^{3} + \tan \left (x\right )\right )}} \]

[In]

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

[Out]

-15/8*x - 1/8*(15*tan(x)^4 + 25*tan(x)^2 + 8)/(tan(x)^5 + 2*tan(x)^3 + tan(x))

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.97 \[ \int \cos ^4(x) \cot ^2(x) \, dx=-\frac {15}{8} \, x - \frac {7 \, \tan \left (x\right )^{3} + 9 \, \tan \left (x\right )}{8 \, {\left (\tan \left (x\right )^{2} + 1\right )}^{2}} - \frac {1}{\tan \left (x\right )} \]

[In]

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

[Out]

-15/8*x - 1/8*(7*tan(x)^3 + 9*tan(x))/(tan(x)^2 + 1)^2 - 1/tan(x)

Mupad [B] (verification not implemented)

Time = 27.70 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.81 \[ \int \cos ^4(x) \cot ^2(x) \, dx=\frac {\frac {{\cos \left (x\right )}^5}{4}+\frac {5\,{\cos \left (x\right )}^3}{8}-\frac {15\,\cos \left (x\right )}{8}}{\sin \left (x\right )}-\frac {15\,x}{8} \]

[In]

int(cos(x)^4*cot(x)^2,x)

[Out]

((5*cos(x)^3)/8 - (15*cos(x))/8 + cos(x)^5/4)/sin(x) - (15*x)/8