\(\int (-1+\cot ^2(x))^{3/2} \, dx\) [41]

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

Optimal result

Integrand size = 10, antiderivative size = 61 \[ \int \left (-1+\cot ^2(x)\right )^{3/2} \, dx=\frac {5}{2} \text {arctanh}\left (\frac {\cot (x)}{\sqrt {-1+\cot ^2(x)}}\right )-2 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} \cot (x)}{\sqrt {-1+\cot ^2(x)}}\right )-\frac {1}{2} \cot (x) \sqrt {-1+\cot ^2(x)} \] Output:

5/2*arctanh(cot(x)/(-1+cot(x)^2)^(1/2))-2*2^(1/2)*arctanh(2^(1/2)*cot(x)/( 
-1+cot(x)^2)^(1/2))-1/2*cot(x)*(-1+cot(x)^2)^(1/2)
 

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.98 \[ \int \left (-1+\cot ^2(x)\right )^{3/2} \, dx=\frac {1}{2} \left (-1+\cot ^2(x)\right )^{3/2} \sec ^2(2 x) \left (\arctan \left (\frac {\cos (x)}{\sqrt {-\cos (2 x)}}\right ) \sqrt {-\cos (2 x)} \sin ^3(x)+4 \text {arctanh}\left (\frac {\cos (x)}{\sqrt {\cos (2 x)}}\right ) \sqrt {\cos (2 x)} \sin ^3(x)-4 \sqrt {2} \sqrt {\cos (2 x)} \log \left (\sqrt {2} \cos (x)+\sqrt {\cos (2 x)}\right ) \sin ^3(x)-\frac {1}{4} \sin (4 x)\right ) \] Input:

Integrate[(-1 + Cot[x]^2)^(3/2),x]
 

Output:

((-1 + Cot[x]^2)^(3/2)*Sec[2*x]^2*(ArcTan[Cos[x]/Sqrt[-Cos[2*x]]]*Sqrt[-Co 
s[2*x]]*Sin[x]^3 + 4*ArcTanh[Cos[x]/Sqrt[Cos[2*x]]]*Sqrt[Cos[2*x]]*Sin[x]^ 
3 - 4*Sqrt[2]*Sqrt[Cos[2*x]]*Log[Sqrt[2]*Cos[x] + Sqrt[Cos[2*x]]]*Sin[x]^3 
 - Sin[4*x]/4))/2
 

Rubi [A] (verified)

Time = 0.24 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.05, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.800, Rules used = {3042, 4144, 318, 398, 224, 219, 291, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \left (\cot ^2(x)-1\right )^{3/2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \left (\tan \left (x+\frac {\pi }{2}\right )^2-1\right )^{3/2}dx\)

\(\Big \downarrow \) 4144

\(\displaystyle -\int \frac {\left (\cot ^2(x)-1\right )^{3/2}}{\cot ^2(x)+1}d\cot (x)\)

\(\Big \downarrow \) 318

\(\displaystyle -\frac {1}{2} \int \frac {3-5 \cot ^2(x)}{\sqrt {\cot ^2(x)-1} \left (\cot ^2(x)+1\right )}d\cot (x)-\frac {1}{2} \sqrt {\cot ^2(x)-1} \cot (x)\)

\(\Big \downarrow \) 398

\(\displaystyle \frac {1}{2} \left (5 \int \frac {1}{\sqrt {\cot ^2(x)-1}}d\cot (x)-8 \int \frac {1}{\sqrt {\cot ^2(x)-1} \left (\cot ^2(x)+1\right )}d\cot (x)\right )-\frac {1}{2} \cot (x) \sqrt {\cot ^2(x)-1}\)

\(\Big \downarrow \) 224

\(\displaystyle \frac {1}{2} \left (5 \int \frac {1}{1-\frac {\cot ^2(x)}{\cot ^2(x)-1}}d\frac {\cot (x)}{\sqrt {\cot ^2(x)-1}}-8 \int \frac {1}{\sqrt {\cot ^2(x)-1} \left (\cot ^2(x)+1\right )}d\cot (x)\right )-\frac {1}{2} \cot (x) \sqrt {\cot ^2(x)-1}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {1}{2} \left (5 \text {arctanh}\left (\frac {\cot (x)}{\sqrt {\cot ^2(x)-1}}\right )-8 \int \frac {1}{\sqrt {\cot ^2(x)-1} \left (\cot ^2(x)+1\right )}d\cot (x)\right )-\frac {1}{2} \cot (x) \sqrt {\cot ^2(x)-1}\)

\(\Big \downarrow \) 291

\(\displaystyle \frac {1}{2} \left (5 \text {arctanh}\left (\frac {\cot (x)}{\sqrt {\cot ^2(x)-1}}\right )-8 \int \frac {1}{1-\frac {2 \cot ^2(x)}{\cot ^2(x)-1}}d\frac {\cot (x)}{\sqrt {\cot ^2(x)-1}}\right )-\frac {1}{2} \cot (x) \sqrt {\cot ^2(x)-1}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {1}{2} \left (5 \text {arctanh}\left (\frac {\cot (x)}{\sqrt {\cot ^2(x)-1}}\right )-4 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} \cot (x)}{\sqrt {\cot ^2(x)-1}}\right )\right )-\frac {1}{2} \cot (x) \sqrt {\cot ^2(x)-1}\)

Input:

Int[(-1 + Cot[x]^2)^(3/2),x]
 

Output:

(5*ArcTanh[Cot[x]/Sqrt[-1 + Cot[x]^2]] - 4*Sqrt[2]*ArcTanh[(Sqrt[2]*Cot[x] 
)/Sqrt[-1 + Cot[x]^2]])/2 - (Cot[x]*Sqrt[-1 + Cot[x]^2])/2
 

Defintions of rubi rules used

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

rule 291
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst 
[Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, 
d}, x] && NeQ[b*c - a*d, 0]
 

rule 318
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[d*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q - 1)/(b*(2*(p + q) + 1))), x] + S 
imp[1/(b*(2*(p + q) + 1))   Int[(a + b*x^2)^p*(c + d*x^2)^(q - 2)*Simp[c*(b 
*c*(2*(p + q) + 1) - a*d) + d*(b*c*(2*(p + 2*q - 1) + 1) - a*d*(2*(q - 1) + 
 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c - a*d, 0] && G 
tQ[q, 1] && NeQ[2*(p + q) + 1, 0] &&  !IGtQ[p, 1] && IntBinomialQ[a, b, c, 
d, 2, p, q, x]
 

rule 398
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]) 
, x_Symbol] :> Simp[f/b   Int[1/Sqrt[c + d*x^2], x], x] + Simp[(b*e - a*f)/ 
b   Int[1/((a + b*x^2)*Sqrt[c + d*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f} 
, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4144
Int[((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> 
With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[c*(ff/f)   Subst[Int[(a + b* 
(ff*x)^n)^p/(c^2 + ff^2*x^2), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, 
 b, c, e, f, n, p}, x] && (IntegersQ[n, p] || IGtQ[p, 0] || EqQ[n^2, 4] || 
EqQ[n^2, 16])
 
Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.79

method result size
derivativedivides \(-\frac {\cot \left (x \right ) \sqrt {-1+\cot \left (x \right )^{2}}}{2}+\frac {5 \ln \left (\cot \left (x \right )+\sqrt {-1+\cot \left (x \right )^{2}}\right )}{2}-2 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \cot \left (x \right )}{\sqrt {-1+\cot \left (x \right )^{2}}}\right )\) \(48\)
default \(-\frac {\cot \left (x \right ) \sqrt {-1+\cot \left (x \right )^{2}}}{2}+\frac {5 \ln \left (\cot \left (x \right )+\sqrt {-1+\cot \left (x \right )^{2}}\right )}{2}-2 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \cot \left (x \right )}{\sqrt {-1+\cot \left (x \right )^{2}}}\right )\) \(48\)

Input:

int((-1+cot(x)^2)^(3/2),x,method=_RETURNVERBOSE)
 

Output:

-1/2*cot(x)*(-1+cot(x)^2)^(1/2)+5/2*ln(cot(x)+(-1+cot(x)^2)^(1/2))-2*2^(1/ 
2)*arctanh(2^(1/2)*cot(x)/(-1+cot(x)^2)^(1/2))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 170 vs. \(2 (47) = 94\).

Time = 0.08 (sec) , antiderivative size = 170, normalized size of antiderivative = 2.79 \[ \int \left (-1+\cot ^2(x)\right )^{3/2} \, dx=\frac {4 \, \sqrt {2} \log \left (2 \, \sqrt {-\frac {\cos \left (2 \, x\right )}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right ) - 2 \, \cos \left (2 \, x\right ) - 1\right ) \sin \left (2 \, x\right ) - 2 \, \sqrt {2} \sqrt {-\frac {\cos \left (2 \, x\right )}{\cos \left (2 \, x\right ) - 1}} {\left (\cos \left (2 \, x\right ) + 1\right )} + 5 \, \log \left (\frac {\sqrt {2} \sqrt {-\frac {\cos \left (2 \, x\right )}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right ) + \cos \left (2 \, x\right ) + 1}{\cos \left (2 \, x\right ) + 1}\right ) \sin \left (2 \, x\right ) - 5 \, \log \left (\frac {\sqrt {2} \sqrt {-\frac {\cos \left (2 \, x\right )}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right ) - \cos \left (2 \, x\right ) - 1}{\cos \left (2 \, x\right ) + 1}\right ) \sin \left (2 \, x\right )}{4 \, \sin \left (2 \, x\right )} \] Input:

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

Output:

1/4*(4*sqrt(2)*log(2*sqrt(-cos(2*x)/(cos(2*x) - 1))*sin(2*x) - 2*cos(2*x) 
- 1)*sin(2*x) - 2*sqrt(2)*sqrt(-cos(2*x)/(cos(2*x) - 1))*(cos(2*x) + 1) + 
5*log((sqrt(2)*sqrt(-cos(2*x)/(cos(2*x) - 1))*sin(2*x) + cos(2*x) + 1)/(co 
s(2*x) + 1))*sin(2*x) - 5*log((sqrt(2)*sqrt(-cos(2*x)/(cos(2*x) - 1))*sin( 
2*x) - cos(2*x) - 1)/(cos(2*x) + 1))*sin(2*x))/sin(2*x)
 

Sympy [F]

\[ \int \left (-1+\cot ^2(x)\right )^{3/2} \, dx=\int \left (\cot ^{2}{\left (x \right )} - 1\right )^{\frac {3}{2}}\, dx \] Input:

integrate((-1+cot(x)**2)**(3/2),x)
 

Output:

Integral((cot(x)**2 - 1)**(3/2), x)
 

Maxima [F]

\[ \int \left (-1+\cot ^2(x)\right )^{3/2} \, dx=\int { {\left (\cot \left (x\right )^{2} - 1\right )}^{\frac {3}{2}} \,d x } \] Input:

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

Output:

integrate((cot(x)^2 - 1)^(3/2), x)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 179 vs. \(2 (47) = 94\).

Time = 0.38 (sec) , antiderivative size = 179, normalized size of antiderivative = 2.93 \[ \int \left (-1+\cot ^2(x)\right )^{3/2} \, dx=\frac {1}{4} \, {\left (4 \, \sqrt {2} \log \left ({\left (\sqrt {2} \cos \left (x\right ) - \sqrt {2 \, \cos \left (x\right )^{2} - 1}\right )}^{2}\right ) - \frac {4 \, \sqrt {2} {\left (3 \, {\left (\sqrt {2} \cos \left (x\right ) - \sqrt {2 \, \cos \left (x\right )^{2} - 1}\right )}^{2} - 1\right )}}{{\left (\sqrt {2} \cos \left (x\right ) - \sqrt {2 \, \cos \left (x\right )^{2} - 1}\right )}^{4} - 6 \, {\left (\sqrt {2} \cos \left (x\right ) - \sqrt {2 \, \cos \left (x\right )^{2} - 1}\right )}^{2} + 1} + 5 \, \log \left (\frac {{\left | 2 \, {\left (\sqrt {2} \cos \left (x\right ) - \sqrt {2 \, \cos \left (x\right )^{2} - 1}\right )}^{2} - 4 \, \sqrt {2} - 6 \right |}}{{\left | 2 \, {\left (\sqrt {2} \cos \left (x\right ) - \sqrt {2 \, \cos \left (x\right )^{2} - 1}\right )}^{2} + 4 \, \sqrt {2} - 6 \right |}}\right )\right )} \mathrm {sgn}\left (\sin \left (x\right )\right ) \] Input:

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

Output:

1/4*(4*sqrt(2)*log((sqrt(2)*cos(x) - sqrt(2*cos(x)^2 - 1))^2) - 4*sqrt(2)* 
(3*(sqrt(2)*cos(x) - sqrt(2*cos(x)^2 - 1))^2 - 1)/((sqrt(2)*cos(x) - sqrt( 
2*cos(x)^2 - 1))^4 - 6*(sqrt(2)*cos(x) - sqrt(2*cos(x)^2 - 1))^2 + 1) + 5* 
log(abs(2*(sqrt(2)*cos(x) - sqrt(2*cos(x)^2 - 1))^2 - 4*sqrt(2) - 6)/abs(2 
*(sqrt(2)*cos(x) - sqrt(2*cos(x)^2 - 1))^2 + 4*sqrt(2) - 6)))*sgn(sin(x))
 

Mupad [F(-1)]

Timed out. \[ \int \left (-1+\cot ^2(x)\right )^{3/2} \, dx=\int {\left ({\mathrm {cot}\left (x\right )}^2-1\right )}^{3/2} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int \left (-1+\cot ^2(x)\right )^{3/2} \, dx=-\left (\int \sqrt {\cot \left (x \right )^{2}-1}d x \right )+\int \sqrt {\cot \left (x \right )^{2}-1}\, \cot \left (x \right )^{2}d x \] Input:

int((-1+cot(x)^2)^(3/2),x)
 

Output:

 - int(sqrt(cot(x)**2 - 1),x) + int(sqrt(cot(x)**2 - 1)*cot(x)**2,x)