\(\int \frac {\sec ^{-1}(x)}{x^2 \sqrt {-1+x^2}} \, dx\) [690]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 15, antiderivative size = 23 \[ \int \frac {\sec ^{-1}(x)}{x^2 \sqrt {-1+x^2}} \, dx=\frac {1}{\sqrt {x^2}}+\frac {\sqrt {-1+x^2} \sec ^{-1}(x)}{x} \]

[Out]

1/(x^2)^(1/2)+arcsec(x)*(x^2-1)^(1/2)/x

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {270, 5346, 30} \[ \int \frac {\sec ^{-1}(x)}{x^2 \sqrt {-1+x^2}} \, dx=\frac {1}{\sqrt {x^2}}+\frac {\sqrt {x^2-1} \sec ^{-1}(x)}{x} \]

[In]

Int[ArcSec[x]/(x^2*Sqrt[-1 + x^2]),x]

[Out]

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 270

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

Rule 5346

Int[((a_.) + ArcSec[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_)^2)^(p_.), x_Symbol] :> With[{u =
 IntHide[(f*x)^m*(d + e*x^2)^p, x]}, Dist[a + b*ArcSec[c*x], u, x] - Dist[b*c*(x/Sqrt[c^2*x^2]), Int[SimplifyI
ntegrand[u/(x*Sqrt[c^2*x^2 - 1]), x], x], x]] /; FreeQ[{a, b, c, d, e, f, m, p}, x] && ((IGtQ[p, 0] &&  !(ILtQ
[(m - 1)/2, 0] && GtQ[m + 2*p + 3, 0])) || (IGtQ[(m + 1)/2, 0] &&  !(ILtQ[p, 0] && GtQ[m + 2*p + 3, 0])) || (I
LtQ[(m + 2*p + 1)/2, 0] &&  !ILtQ[(m - 1)/2, 0]))

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

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.52 \[ \int \frac {\sec ^{-1}(x)}{x^2 \sqrt {-1+x^2}} \, dx=\frac {\sqrt {1-\frac {1}{x^2}} x+\left (-1+x^2\right ) \sec ^{-1}(x)}{x \sqrt {-1+x^2}} \]

[In]

Integrate[ArcSec[x]/(x^2*Sqrt[-1 + x^2]),x]

[Out]

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

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.35 (sec) , antiderivative size = 56, normalized size of antiderivative = 2.43

method result size
default \(\frac {\operatorname {csgn}\left (x \sqrt {1-\frac {1}{x^{2}}}\right ) \sqrt {\frac {x^{2}-1}{x^{2}}}\, \left (\operatorname {arcsec}\left (x \right ) x^{2}-\operatorname {arcsec}\left (x \right )+\sqrt {\frac {x^{2}-1}{x^{2}}}\, x \right )}{x^{2}-1}\) \(56\)

[In]

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

[Out]

csgn(x*(1-1/x^2)^(1/2))*((x^2-1)/x^2)^(1/2)/(x^2-1)*(arcsec(x)*x^2-arcsec(x)+((x^2-1)/x^2)^(1/2)*x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.70 \[ \int \frac {\sec ^{-1}(x)}{x^2 \sqrt {-1+x^2}} \, dx=\frac {\sqrt {x^{2} - 1} \operatorname {arcsec}\left (x\right ) + 1}{x} \]

[In]

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

[Out]

(sqrt(x^2 - 1)*arcsec(x) + 1)/x

Sympy [F]

\[ \int \frac {\sec ^{-1}(x)}{x^2 \sqrt {-1+x^2}} \, dx=\int \frac {\operatorname {asec}{\left (x \right )}}{x^{2} \sqrt {\left (x - 1\right ) \left (x + 1\right )}}\, dx \]

[In]

integrate(asec(x)/x**2/(x**2-1)**(1/2),x)

[Out]

Integral(asec(x)/(x**2*sqrt((x - 1)*(x + 1))), x)

Maxima [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.74 \[ \int \frac {\sec ^{-1}(x)}{x^2 \sqrt {-1+x^2}} \, dx=\frac {\sqrt {x^{2} - 1} \operatorname {arcsec}\left (x\right )}{x} + \frac {1}{x} \]

[In]

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

[Out]

sqrt(x^2 - 1)*arcsec(x)/x + 1/x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 50 vs. \(2 (19) = 38\).

Time = 0.32 (sec) , antiderivative size = 50, normalized size of antiderivative = 2.17 \[ \int \frac {\sec ^{-1}(x)}{x^2 \sqrt {-1+x^2}} \, dx=\frac {2 \, \arccos \left (\frac {1}{x}\right )}{{\left (x - \sqrt {x^{2} - 1}\right )}^{2} + 1} - \frac {2 \, \arctan \left (-x + \sqrt {x^{2} - 1}\right )}{\mathrm {sgn}\left (x\right )} + \frac {1}{x \mathrm {sgn}\left (x\right )} \]

[In]

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

[Out]

2*arccos(1/x)/((x - sqrt(x^2 - 1))^2 + 1) - 2*arctan(-x + sqrt(x^2 - 1))/sgn(x) + 1/(x*sgn(x))

Mupad [F(-1)]

Timed out. \[ \int \frac {\sec ^{-1}(x)}{x^2 \sqrt {-1+x^2}} \, dx=\int \frac {\mathrm {acos}\left (\frac {1}{x}\right )}{x^2\,\sqrt {x^2-1}} \,d x \]

[In]

int(acos(1/x)/(x^2*(x^2 - 1)^(1/2)),x)

[Out]

int(acos(1/x)/(x^2*(x^2 - 1)^(1/2)), x)