3.62 \(\int \frac{\cot ^2(\sqrt{x})}{\sqrt{x}} \, dx\)

Optimal. Leaf size=16 \[ -2 \sqrt{x}-2 \cot \left (\sqrt{x}\right ) \]

[Out]

-2*Sqrt[x] - 2*Cot[Sqrt[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0184914, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3748, 3473, 8} \[ -2 \sqrt{x}-2 \cot \left (\sqrt{x}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Cot[Sqrt[x]]^2/Sqrt[x],x]

[Out]

-2*Sqrt[x] - 2*Cot[Sqrt[x]]

Rule 3748

Int[((a_.) + Cot[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Cot[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

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 \frac{\cot ^2\left (\sqrt{x}\right )}{\sqrt{x}} \, dx &=2 \operatorname{Subst}\left (\int \cot ^2(x) \, dx,x,\sqrt{x}\right )\\ &=-2 \cot \left (\sqrt{x}\right )-2 \operatorname{Subst}\left (\int 1 \, dx,x,\sqrt{x}\right )\\ &=-2 \sqrt{x}-2 \cot \left (\sqrt{x}\right )\\ \end{align*}

Mathematica [C]  time = 0.0443974, size = 26, normalized size = 1.62 \[ -2 \cot \left (\sqrt{x}\right ) \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},-\tan ^2\left (\sqrt{x}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[Sqrt[x]]^2/Sqrt[x],x]

[Out]

-2*Cot[Sqrt[x]]*Hypergeometric2F1[-1/2, 1, 1/2, -Tan[Sqrt[x]]^2]

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 14, normalized size = 0.9 \begin{align*} -2\,\cot \left ( \sqrt{x} \right ) +\pi -2\,\sqrt{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x^(1/2))^2/x^(1/2),x)

[Out]

-2*cot(x^(1/2))+Pi-2*x^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.49848, size = 19, normalized size = 1.19 \begin{align*} -2 \, \sqrt{x} - \frac{2}{\tan \left (\sqrt{x}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x^(1/2))^2/x^(1/2),x, algorithm="maxima")

[Out]

-2*sqrt(x) - 2/tan(sqrt(x))

________________________________________________________________________________________

Fricas [B]  time = 2.38831, size = 88, normalized size = 5.5 \begin{align*} -\frac{2 \,{\left (\sqrt{x} \sin \left (2 \, \sqrt{x}\right ) + \cos \left (2 \, \sqrt{x}\right ) + 1\right )}}{\sin \left (2 \, \sqrt{x}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x^(1/2))^2/x^(1/2),x, algorithm="fricas")

[Out]

-2*(sqrt(x)*sin(2*sqrt(x)) + cos(2*sqrt(x)) + 1)/sin(2*sqrt(x))

________________________________________________________________________________________

Sympy [A]  time = 0.709173, size = 15, normalized size = 0.94 \begin{align*} - 2 \sqrt{x} - 2 \cot{\left (\sqrt{x} \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x**(1/2))**2/x**(1/2),x)

[Out]

-2*sqrt(x) - 2*cot(sqrt(x))

________________________________________________________________________________________

Giac [A]  time = 1.12142, size = 30, normalized size = 1.88 \begin{align*} -2 \, \sqrt{x} - \frac{1}{\tan \left (\frac{1}{2} \, \sqrt{x}\right )} + \tan \left (\frac{1}{2} \, \sqrt{x}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x^(1/2))^2/x^(1/2),x, algorithm="giac")

[Out]

-2*sqrt(x) - 1/tan(1/2*sqrt(x)) + tan(1/2*sqrt(x))