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

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

Optimal result

Integrand size = 15, antiderivative size = 107 \[ \int \frac {\sqrt {-1+x^2} \sec ^{-1}(x)}{x^2} \, dx=-\frac {1}{\sqrt {x^2}}-\frac {\sqrt {-1+x^2} \sec ^{-1}(x)}{x}-\frac {2 i \sqrt {x^2} \sec ^{-1}(x) \arctan \left (e^{i \sec ^{-1}(x)}\right )}{x}+\frac {i \sqrt {x^2} \operatorname {PolyLog}\left (2,-i e^{i \sec ^{-1}(x)}\right )}{x}-\frac {i \sqrt {x^2} \operatorname {PolyLog}\left (2,i e^{i \sec ^{-1}(x)}\right )}{x} \]

[Out]

-(x^2)^(1/2)/x^2-2*I*arcsec(x)*arctan(1/x+I*(1-1/x^2)^(1/2))*(x^2)^(1/2)/x+I*polylog(2,-I*(1/x+I*(1-1/x^2)^(1/
2)))*(x^2)^(1/2)/x-I*polylog(2,I*(1/x+I*(1-1/x^2)^(1/2)))*(x^2)^(1/2)/x-arcsec(x)*(x^2-1)^(1/2)/x

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.08, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.467, Rules used = {5350, 4784, 4804, 4266, 2317, 2438, 8} \[ \int \frac {\sqrt {-1+x^2} \sec ^{-1}(x)}{x^2} \, dx=-\frac {2 i \sqrt {x^2} \sec ^{-1}(x) \arctan \left (e^{i \sec ^{-1}(x)}\right )}{x}+\frac {i \sqrt {x^2} \operatorname {PolyLog}\left (2,-i e^{i \sec ^{-1}(x)}\right )}{x}-\frac {i \sqrt {x^2} \operatorname {PolyLog}\left (2,i e^{i \sec ^{-1}(x)}\right )}{x}-\frac {1}{\sqrt {x^2}}-\frac {\sqrt {1-\frac {1}{x^2}} \sqrt {x^2} \sec ^{-1}(x)}{x} \]

[In]

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

[Out]

-(1/Sqrt[x^2]) - (Sqrt[1 - x^(-2)]*Sqrt[x^2]*ArcSec[x])/x - ((2*I)*Sqrt[x^2]*ArcSec[x]*ArcTan[E^(I*ArcSec[x])]
)/x + (I*Sqrt[x^2]*PolyLog[2, (-I)*E^(I*ArcSec[x])])/x - (I*Sqrt[x^2]*PolyLog[2, I*E^(I*ArcSec[x])])/x

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4266

Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[-2*(c + d*x)^m*(ArcTanh[E
^(I*k*Pi)*E^(I*(e + f*x))]/f), x] + (-Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))],
 x], x] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e,
f}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 4784

Int[((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)*((f_.)*(x_))^(m_)*Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] :> Simp[(f
*x)^(m + 1)*Sqrt[d + e*x^2]*((a + b*ArcCos[c*x])^n/(f*(m + 2))), x] + (Dist[(1/(m + 2))*Simp[Sqrt[d + e*x^2]/S
qrt[1 - c^2*x^2]], Int[(f*x)^m*((a + b*ArcCos[c*x])^n/Sqrt[1 - c^2*x^2]), x], x] + Dist[b*c*(n/(f*(m + 2)))*Si
mp[Sqrt[d + e*x^2]/Sqrt[1 - c^2*x^2]], Int[(f*x)^(m + 1)*(a + b*ArcCos[c*x])^(n - 1), x], x]) /; FreeQ[{a, b,
c, d, e, f, m}, x] && EqQ[c^2*d + e, 0] && GtQ[n, 0] && (IGtQ[m, -2] || EqQ[n, 1])

Rule 4804

Int[(((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)*(x_)^(m_))/Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] :> Dist[(-(c^(m
+ 1))^(-1))*Simp[Sqrt[1 - c^2*x^2]/Sqrt[d + e*x^2]], Subst[Int[(a + b*x)^n*Cos[x]^m, x], x, ArcCos[c*x]], x] /
; FreeQ[{a, b, c, d, e}, x] && EqQ[c^2*d + e, 0] && IGtQ[n, 0] && IntegerQ[m]

Rule 5350

Int[((a_.) + ArcSec[(c_.)*(x_)]*(b_.))^(n_.)*(x_)^(m_.)*((d_.) + (e_.)*(x_)^2)^(p_), x_Symbol] :> Dist[-Sqrt[x
^2]/x, Subst[Int[(e + d*x^2)^p*((a + b*ArcCos[x/c])^n/x^(m + 2*(p + 1))), x], x, 1/x], x] /; FreeQ[{a, b, c, d
, e, n}, x] && IGtQ[n, 0] && EqQ[c^2*d + e, 0] && IntegerQ[m] && IntegerQ[p + 1/2] && GtQ[e, 0] && LtQ[d, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {\sqrt {x^2} \text {Subst}\left (\int \frac {\sqrt {1-x^2} \arccos (x)}{x} \, dx,x,\frac {1}{x}\right )}{x} \\ & = -\frac {\sqrt {1-\frac {1}{x^2}} \sqrt {x^2} \sec ^{-1}(x)}{x}-\frac {\sqrt {x^2} \text {Subst}\left (\int 1 \, dx,x,\frac {1}{x}\right )}{x}-\frac {\sqrt {x^2} \text {Subst}\left (\int \frac {\arccos (x)}{x \sqrt {1-x^2}} \, dx,x,\frac {1}{x}\right )}{x} \\ & = -\frac {1}{\sqrt {x^2}}-\frac {\sqrt {1-\frac {1}{x^2}} \sqrt {x^2} \sec ^{-1}(x)}{x}+\frac {\sqrt {x^2} \text {Subst}\left (\int x \sec (x) \, dx,x,\sec ^{-1}(x)\right )}{x} \\ & = -\frac {1}{\sqrt {x^2}}-\frac {\sqrt {1-\frac {1}{x^2}} \sqrt {x^2} \sec ^{-1}(x)}{x}-\frac {2 i \sqrt {x^2} \sec ^{-1}(x) \arctan \left (e^{i \sec ^{-1}(x)}\right )}{x}-\frac {\sqrt {x^2} \text {Subst}\left (\int \log \left (1-i e^{i x}\right ) \, dx,x,\sec ^{-1}(x)\right )}{x}+\frac {\sqrt {x^2} \text {Subst}\left (\int \log \left (1+i e^{i x}\right ) \, dx,x,\sec ^{-1}(x)\right )}{x} \\ & = -\frac {1}{\sqrt {x^2}}-\frac {\sqrt {1-\frac {1}{x^2}} \sqrt {x^2} \sec ^{-1}(x)}{x}-\frac {2 i \sqrt {x^2} \sec ^{-1}(x) \arctan \left (e^{i \sec ^{-1}(x)}\right )}{x}+\frac {\left (i \sqrt {x^2}\right ) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i \sec ^{-1}(x)}\right )}{x}-\frac {\left (i \sqrt {x^2}\right ) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i \sec ^{-1}(x)}\right )}{x} \\ & = -\frac {1}{\sqrt {x^2}}-\frac {\sqrt {1-\frac {1}{x^2}} \sqrt {x^2} \sec ^{-1}(x)}{x}-\frac {2 i \sqrt {x^2} \sec ^{-1}(x) \arctan \left (e^{i \sec ^{-1}(x)}\right )}{x}+\frac {i \sqrt {x^2} \operatorname {PolyLog}\left (2,-i e^{i \sec ^{-1}(x)}\right )}{x}-\frac {i \sqrt {x^2} \operatorname {PolyLog}\left (2,i e^{i \sec ^{-1}(x)}\right )}{x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.08 \[ \int \frac {\sqrt {-1+x^2} \sec ^{-1}(x)}{x^2} \, dx=-\frac {\sqrt {1-\frac {1}{x^2}} \left (1+\sqrt {1-\frac {1}{x^2}} x \sec ^{-1}(x)-x \sec ^{-1}(x) \log \left (1-i e^{i \sec ^{-1}(x)}\right )+x \sec ^{-1}(x) \log \left (1+i e^{i \sec ^{-1}(x)}\right )-i x \operatorname {PolyLog}\left (2,-i e^{i \sec ^{-1}(x)}\right )+i x \operatorname {PolyLog}\left (2,i e^{i \sec ^{-1}(x)}\right )\right )}{\sqrt {-1+x^2}} \]

[In]

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

[Out]

-((Sqrt[1 - x^(-2)]*(1 + Sqrt[1 - x^(-2)]*x*ArcSec[x] - x*ArcSec[x]*Log[1 - I*E^(I*ArcSec[x])] + x*ArcSec[x]*L
og[1 + I*E^(I*ArcSec[x])] - I*x*PolyLog[2, (-I)*E^(I*ArcSec[x])] + I*x*PolyLog[2, I*E^(I*ArcSec[x])]))/Sqrt[-1
 + x^2])

Maple [C] (warning: unable to verify)

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

Time = 0.66 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.81

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

[In]

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

[Out]

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

Fricas [F]

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

[In]

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

[Out]

integral(sqrt(x^2 - 1)*arcsec(x)/x^2, x)

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

integrate(sqrt(x^2 - 1)*arcsec(x)/x^2, x)

Giac [F]

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

[In]

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

[Out]

integrate(sqrt(x^2 - 1)*arcsec(x)/x^2, x)

Mupad [F(-1)]

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

[In]

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

[Out]

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