\(\int \csc ^{-1}(x) \, dx\) [84]

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

Optimal result

Integrand size = 2, antiderivative size = 17 \[ \int \csc ^{-1}(x) \, dx=x \csc ^{-1}(x)+\text {arctanh}\left (\sqrt {1-\frac {1}{x^2}}\right ) \]

[Out]

x*arccsc(x)+arctanh((1-1/x^2)^(1/2))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 2.000, Rules used = {5323, 272, 65, 212} \[ \int \csc ^{-1}(x) \, dx=\text {arctanh}\left (\sqrt {1-\frac {1}{x^2}}\right )+x \csc ^{-1}(x) \]

[In]

Int[ArcCsc[x],x]

[Out]

x*ArcCsc[x] + ArcTanh[Sqrt[1 - x^(-2)]]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 212

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] && (GtQ[a, 0] || LtQ[b, 0])

Rule 272

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

Rule 5323

Int[ArcCsc[(c_.)*(x_)], x_Symbol] :> Simp[x*ArcCsc[c*x], x] + Dist[1/c, Int[1/(x*Sqrt[1 - 1/(c^2*x^2)]), x], x
] /; FreeQ[c, x]

Rubi steps \begin{align*} \text {integral}& = x \csc ^{-1}(x)+\int \frac {1}{\sqrt {1-\frac {1}{x^2}} x} \, dx \\ & = x \csc ^{-1}(x)-\frac {1}{2} \text {Subst}\left (\int \frac {1}{\sqrt {1-x} x} \, dx,x,\frac {1}{x^2}\right ) \\ & = x \csc ^{-1}(x)+\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {1-\frac {1}{x^2}}\right ) \\ & = x \csc ^{-1}(x)+\text {arctanh}\left (\sqrt {1-\frac {1}{x^2}}\right ) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(64\) vs. \(2(17)=34\).

Time = 0.02 (sec) , antiderivative size = 64, normalized size of antiderivative = 3.76 \[ \int \csc ^{-1}(x) \, dx=x \csc ^{-1}(x)+\frac {\sqrt {-1+x^2} \left (-\log \left (1-\frac {x}{\sqrt {-1+x^2}}\right )+\log \left (1+\frac {x}{\sqrt {-1+x^2}}\right )\right )}{2 \sqrt {1-\frac {1}{x^2}} x} \]

[In]

Integrate[ArcCsc[x],x]

[Out]

x*ArcCsc[x] + (Sqrt[-1 + x^2]*(-Log[1 - x/Sqrt[-1 + x^2]] + Log[1 + x/Sqrt[-1 + x^2]]))/(2*Sqrt[1 - x^(-2)]*x)

Maple [A] (verified)

Time = 0.01 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.18

method result size
lookup \(x \,\operatorname {arccsc}\left (x \right )+\ln \left (x +x \sqrt {1-\frac {1}{x^{2}}}\right )\) \(20\)
default \(x \,\operatorname {arccsc}\left (x \right )+\ln \left (x +x \sqrt {1-\frac {1}{x^{2}}}\right )\) \(20\)
parts \(x \,\operatorname {arccsc}\left (x \right )+\frac {\sqrt {x^{2}-1}\, \ln \left (x +\sqrt {x^{2}-1}\right )}{\sqrt {\frac {x^{2}-1}{x^{2}}}\, x}\) \(38\)

[In]

int(arccsc(x),x,method=_RETURNVERBOSE)

[Out]

x*arccsc(x)+ln(x+x*(1-1/x^2)^(1/2))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (15) = 30\).

Time = 0.25 (sec) , antiderivative size = 35, normalized size of antiderivative = 2.06 \[ \int \csc ^{-1}(x) \, dx={\left (x - 2\right )} \operatorname {arccsc}\left (x\right ) - 4 \, \arctan \left (-x + \sqrt {x^{2} - 1}\right ) - \log \left (-x + \sqrt {x^{2} - 1}\right ) \]

[In]

integrate(arccsc(x),x, algorithm="fricas")

[Out]

(x - 2)*arccsc(x) - 4*arctan(-x + sqrt(x^2 - 1)) - log(-x + sqrt(x^2 - 1))

Sympy [A] (verification not implemented)

Time = 1.18 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00 \[ \int \csc ^{-1}(x) \, dx=x \operatorname {acsc}{\left (x \right )} + \begin {cases} \operatorname {acosh}{\left (x \right )} & \text {for}\: \left |{x^{2}}\right | > 1 \\- i \operatorname {asin}{\left (x \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(acsc(x),x)

[Out]

x*acsc(x) + Piecewise((acosh(x), Abs(x**2) > 1), (-I*asin(x), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (15) = 30\).

Time = 0.17 (sec) , antiderivative size = 35, normalized size of antiderivative = 2.06 \[ \int \csc ^{-1}(x) \, dx=x \operatorname {arccsc}\left (x\right ) + \frac {1}{2} \, \log \left (\sqrt {-\frac {1}{x^{2}} + 1} + 1\right ) - \frac {1}{2} \, \log \left (-\sqrt {-\frac {1}{x^{2}} + 1} + 1\right ) \]

[In]

integrate(arccsc(x),x, algorithm="maxima")

[Out]

x*arccsc(x) + 1/2*log(sqrt(-1/x^2 + 1) + 1) - 1/2*log(-sqrt(-1/x^2 + 1) + 1)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (15) = 30\).

Time = 0.28 (sec) , antiderivative size = 37, normalized size of antiderivative = 2.18 \[ \int \csc ^{-1}(x) \, dx=x \arcsin \left (\frac {1}{x}\right ) + \frac {1}{2} \, \log \left (\sqrt {-\frac {1}{x^{2}} + 1} + 1\right ) - \frac {1}{2} \, \log \left (-\sqrt {-\frac {1}{x^{2}} + 1} + 1\right ) \]

[In]

integrate(arccsc(x),x, algorithm="giac")

[Out]

x*arcsin(1/x) + 1/2*log(sqrt(-1/x^2 + 1) + 1) - 1/2*log(-sqrt(-1/x^2 + 1) + 1)

Mupad [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.18 \[ \int \csc ^{-1}(x) \, dx=x\,\mathrm {asin}\left (\frac {1}{x}\right )+\ln \left (x+\sqrt {x^2-1}\right )\,\mathrm {sign}\left (x\right ) \]

[In]

int(asin(1/x),x)

[Out]

x*asin(1/x) + log(x + (x^2 - 1)^(1/2))*sign(x)