\(\int (-1-\csc ^2(x))^{3/2} \, dx\) [25]

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {3042, 4616, 318, 27, 398, 224, 216, 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 (-\csc ^2(x)-1\right )^{3/2} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4616

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

\(\Big \downarrow \) 318

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 398

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

\(\Big \downarrow \) 224

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

\(\Big \downarrow \) 216

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

\(\Big \downarrow \) 291

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

\(\Big \downarrow \) 219

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

Input:

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

Output:

-2*ArcTan[Cot[x]/Sqrt[-2 - Cot[x]^2]] - ArcTanh[Cot[x]/Sqrt[-2 - Cot[x]^2] 
] + (Cot[x]*Sqrt[-2 - Cot[x]^2])/2
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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

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 4616
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = 
FreeFactors[Tan[e + f*x], x]}, Simp[ff/f   Subst[Int[(a + b + b*ff^2*x^2)^p 
/(1 + ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] 
&& NeQ[a + b, 0] && NeQ[p, -1]
 
Maple [B] (verified)

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

Time = 0.24 (sec) , antiderivative size = 150, normalized size of antiderivative = 2.73

method result size
default \(-\frac {\sin \left (x \right ) \left (\left (2 \cos \left (x \right )-2\right ) \arctan \left (\frac {\cos \left (x \right )-2}{\left (\cos \left (x \right )+1\right ) \sqrt {\frac {\cos \left (x \right )^{2}-2}{\left (\cos \left (x \right )+1\right )^{2}}}}\right )+\left (-2 \cos \left (x \right )+2\right ) \operatorname {arctanh}\left (\frac {\cos \left (x \right )}{\left (\cos \left (x \right )+1\right ) \sqrt {\frac {\cos \left (x \right )^{2}-2}{\left (\cos \left (x \right )+1\right )^{2}}}}\right )+\left (2 \cos \left (x \right )-2\right ) \arcsin \left (\frac {\sqrt {2}\, \left (\cos \left (x \right )+2\right )}{2 \cos \left (x \right )+2}\right )-\sqrt {\frac {\cos \left (x \right )^{2}-2}{\left (\cos \left (x \right )+1\right )^{2}}}\, \cos \left (x \right )\right ) \left (\cot \left (x \right )^{2}-2 \csc \left (x \right )^{2}\right )^{\frac {3}{2}}}{2 \left (\cos \left (x \right )^{2}-2\right ) \sqrt {\frac {\cos \left (x \right )^{2}-2}{\left (\cos \left (x \right )+1\right )^{2}}}}\) \(150\)

Input:

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

Output:

-1/2*sin(x)*((2*cos(x)-2)*arctan((cos(x)-2)/(cos(x)+1)/((cos(x)^2-2)/(cos( 
x)+1)^2)^(1/2))+(-2*cos(x)+2)*arctanh(cos(x)/(cos(x)+1)/((cos(x)^2-2)/(cos 
(x)+1)^2)^(1/2))+(2*cos(x)-2)*arcsin(1/2*2^(1/2)*(cos(x)+2)/(cos(x)+1))-(( 
cos(x)^2-2)/(cos(x)+1)^2)^(1/2)*cos(x))*(cot(x)^2-2*csc(x)^2)^(3/2)/(cos(x 
)^2-2)/((cos(x)^2-2)/(cos(x)+1)^2)^(1/2)
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.08 (sec) , antiderivative size = 217, normalized size of antiderivative = 3.95 \[ \int \left (-1-\csc ^2(x)\right )^{3/2} \, dx=\frac {{\left (e^{\left (4 i \, x\right )} - 2 \, e^{\left (2 i \, x\right )} + 1\right )} \log \left (-2 \, \sqrt {e^{\left (4 i \, x\right )} - 6 \, e^{\left (2 i \, x\right )} + 1} {\left (e^{\left (2 i \, x\right )} - 1\right )} + 2 \, e^{\left (4 i \, x\right )} - 8 \, e^{\left (2 i \, x\right )} - 2\right ) - 4 \, {\left (-i \, e^{\left (4 i \, x\right )} + 2 i \, e^{\left (2 i \, x\right )} - i\right )} \log \left (\sqrt {e^{\left (4 i \, x\right )} - 6 \, e^{\left (2 i \, x\right )} + 1} - e^{\left (2 i \, x\right )} + 2 i + 1\right ) - {\left (e^{\left (4 i \, x\right )} - 2 \, e^{\left (2 i \, x\right )} + 1\right )} \log \left (\sqrt {e^{\left (4 i \, x\right )} - 6 \, e^{\left (2 i \, x\right )} + 1} - e^{\left (2 i \, x\right )} + 1\right ) - 4 \, {\left (i \, e^{\left (4 i \, x\right )} - 2 i \, e^{\left (2 i \, x\right )} + i\right )} \log \left (\sqrt {e^{\left (4 i \, x\right )} - 6 \, e^{\left (2 i \, x\right )} + 1} - e^{\left (2 i \, x\right )} - 2 i + 1\right ) - \sqrt {e^{\left (4 i \, x\right )} - 6 \, e^{\left (2 i \, x\right )} + 1} {\left (e^{\left (2 i \, x\right )} + 1\right )} - e^{\left (4 i \, x\right )} + 2 \, e^{\left (2 i \, x\right )} - 1}{2 \, {\left (e^{\left (4 i \, x\right )} - 2 \, e^{\left (2 i \, x\right )} + 1\right )}} \] Input:

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

Output:

1/2*((e^(4*I*x) - 2*e^(2*I*x) + 1)*log(-2*sqrt(e^(4*I*x) - 6*e^(2*I*x) + 1 
)*(e^(2*I*x) - 1) + 2*e^(4*I*x) - 8*e^(2*I*x) - 2) - 4*(-I*e^(4*I*x) + 2*I 
*e^(2*I*x) - I)*log(sqrt(e^(4*I*x) - 6*e^(2*I*x) + 1) - e^(2*I*x) + 2*I + 
1) - (e^(4*I*x) - 2*e^(2*I*x) + 1)*log(sqrt(e^(4*I*x) - 6*e^(2*I*x) + 1) - 
 e^(2*I*x) + 1) - 4*(I*e^(4*I*x) - 2*I*e^(2*I*x) + I)*log(sqrt(e^(4*I*x) - 
 6*e^(2*I*x) + 1) - e^(2*I*x) - 2*I + 1) - sqrt(e^(4*I*x) - 6*e^(2*I*x) + 
1)*(e^(2*I*x) + 1) - e^(4*I*x) + 2*e^(2*I*x) - 1)/(e^(4*I*x) - 2*e^(2*I*x) 
 + 1)
 

Sympy [F]

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

integrate((-1-csc(x)**2)**(3/2),x)
 

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F(-2)]

Exception generated. \[ \int \left (-1-\csc ^2(x)\right )^{3/2} \, dx=\text {Exception raised: NotImplementedError} \] Input:

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

Output:

Exception raised: NotImplementedError >> unable to parse Giac output: Recu 
rsive assumption sageVARx>=(-2*pi/2) ignoredRecursive assumption sageVARx< 
=(2*pi/2) ignoredi*2*(-1/16*sqrt(tan(1/2*sageVARx)^4+6*tan(1/2*sageVARx)^2 
+1)*sign(sin(sageVA
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

 - i*(int(sqrt(csc(x)**2 + 1),x) + int(sqrt(csc(x)**2 + 1)*csc(x)**2,x))