3.1.17 \(\int \frac {\sec ^{-1}(a x^n)}{x} \, dx\) [17]

Optimal. Leaf size=69 \[ \frac {i \sec ^{-1}\left (a x^n\right )^2}{2 n}-\frac {\sec ^{-1}\left (a x^n\right ) \log \left (1+e^{2 i \sec ^{-1}\left (a x^n\right )}\right )}{n}+\frac {i \text {PolyLog}\left (2,-e^{2 i \sec ^{-1}\left (a x^n\right )}\right )}{2 n} \]

[Out]

1/2*I*arcsec(a*x^n)^2/n-arcsec(a*x^n)*ln(1+(1/a/(x^n)+I*(1-1/a^2/(x^n)^2)^(1/2))^2)/n+1/2*I*polylog(2,-(1/a/(x
^n)+I*(1-1/a^2/(x^n)^2)^(1/2))^2)/n

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {5326, 4722, 3800, 2221, 2317, 2438} \begin {gather*} \frac {i \text {Li}_2\left (-e^{2 i \sec ^{-1}\left (a x^n\right )}\right )}{2 n}+\frac {i \sec ^{-1}\left (a x^n\right )^2}{2 n}-\frac {\sec ^{-1}\left (a x^n\right ) \log \left (1+e^{2 i \sec ^{-1}\left (a x^n\right )}\right )}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[ArcSec[a*x^n]/x,x]

[Out]

((I/2)*ArcSec[a*x^n]^2)/n - (ArcSec[a*x^n]*Log[1 + E^((2*I)*ArcSec[a*x^n])])/n + ((I/2)*PolyLog[2, -E^((2*I)*A
rcSec[a*x^n])])/n

Rule 2221

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
 - Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

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 3800

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

Rule 4722

Int[((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)/(x_), x_Symbol] :> -Subst[Int[(a + b*x)^n*Tan[x], x], x, ArcCos[c
*x]] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0]

Rule 5326

Int[((a_.) + ArcSec[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> -Subst[Int[(a + b*ArcCos[x/c])/x, x], x, 1/x] /; Fre
eQ[{a, b, c}, x]

Rubi steps

\begin {align*} \int \frac {\sec ^{-1}\left (a x^n\right )}{x} \, dx &=\frac {\text {Subst}\left (\int \frac {\sec ^{-1}(a x)}{x} \, dx,x,x^n\right )}{n}\\ &=-\frac {\text {Subst}\left (\int \frac {\cos ^{-1}\left (\frac {x}{a}\right )}{x} \, dx,x,x^{-n}\right )}{n}\\ &=\frac {\text {Subst}\left (\int x \tan (x) \, dx,x,\cos ^{-1}\left (\frac {x^{-n}}{a}\right )\right )}{n}\\ &=\frac {i \cos ^{-1}\left (\frac {x^{-n}}{a}\right )^2}{2 n}-\frac {(2 i) \text {Subst}\left (\int \frac {e^{2 i x} x}{1+e^{2 i x}} \, dx,x,\cos ^{-1}\left (\frac {x^{-n}}{a}\right )\right )}{n}\\ &=\frac {i \cos ^{-1}\left (\frac {x^{-n}}{a}\right )^2}{2 n}-\frac {\cos ^{-1}\left (\frac {x^{-n}}{a}\right ) \log \left (1+e^{2 i \cos ^{-1}\left (\frac {x^{-n}}{a}\right )}\right )}{n}+\frac {\text {Subst}\left (\int \log \left (1+e^{2 i x}\right ) \, dx,x,\cos ^{-1}\left (\frac {x^{-n}}{a}\right )\right )}{n}\\ &=\frac {i \cos ^{-1}\left (\frac {x^{-n}}{a}\right )^2}{2 n}-\frac {\cos ^{-1}\left (\frac {x^{-n}}{a}\right ) \log \left (1+e^{2 i \cos ^{-1}\left (\frac {x^{-n}}{a}\right )}\right )}{n}-\frac {i \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i \cos ^{-1}\left (\frac {x^{-n}}{a}\right )}\right )}{2 n}\\ &=\frac {i \cos ^{-1}\left (\frac {x^{-n}}{a}\right )^2}{2 n}-\frac {\cos ^{-1}\left (\frac {x^{-n}}{a}\right ) \log \left (1+e^{2 i \cos ^{-1}\left (\frac {x^{-n}}{a}\right )}\right )}{n}+\frac {i \text {Li}_2\left (-e^{2 i \cos ^{-1}\left (\frac {x^{-n}}{a}\right )}\right )}{2 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
time = 0.06, size = 60, normalized size = 0.87 \begin {gather*} \frac {x^{-n} \, _3F_2\left (\frac {1}{2},\frac {1}{2},\frac {1}{2};\frac {3}{2},\frac {3}{2};\frac {x^{-2 n}}{a^2}\right )}{a n}+\left (\sec ^{-1}\left (a x^n\right )+\text {ArcSin}\left (\frac {x^{-n}}{a}\right )\right ) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[ArcSec[a*x^n]/x,x]

[Out]

HypergeometricPFQ[{1/2, 1/2, 1/2}, {3/2, 3/2}, 1/(a^2*x^(2*n))]/(a*n*x^n) + (ArcSec[a*x^n] + ArcSin[1/(a*x^n)]
)*Log[x]

________________________________________________________________________________________

Maple [A]
time = 0.48, size = 93, normalized size = 1.35

method result size
derivativedivides \(\frac {\frac {i \mathrm {arcsec}\left (a \,x^{n}\right )^{2}}{2}-\mathrm {arcsec}\left (a \,x^{n}\right ) \ln \left (1+\left (\frac {x^{-n}}{a}+i \sqrt {1-\frac {x^{-2 n}}{a^{2}}}\right )^{2}\right )+\frac {i \polylog \left (2, -\left (\frac {x^{-n}}{a}+i \sqrt {1-\frac {x^{-2 n}}{a^{2}}}\right )^{2}\right )}{2}}{n}\) \(93\)
default \(\frac {\frac {i \mathrm {arcsec}\left (a \,x^{n}\right )^{2}}{2}-\mathrm {arcsec}\left (a \,x^{n}\right ) \ln \left (1+\left (\frac {x^{-n}}{a}+i \sqrt {1-\frac {x^{-2 n}}{a^{2}}}\right )^{2}\right )+\frac {i \polylog \left (2, -\left (\frac {x^{-n}}{a}+i \sqrt {1-\frac {x^{-2 n}}{a^{2}}}\right )^{2}\right )}{2}}{n}\) \(93\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arcsec(a*x^n)/x,x,method=_RETURNVERBOSE)

[Out]

1/n*(1/2*I*arcsec(a*x^n)^2-arcsec(a*x^n)*ln(1+(1/a/(x^n)+I*(1-1/a^2/(x^n)^2)^(1/2))^2)+1/2*I*polylog(2,-(1/a/(
x^n)+I*(1-1/a^2/(x^n)^2)^(1/2))^2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arcsec(a*x^n)/x,x, algorithm="maxima")

[Out]

-a^2*n*integrate(sqrt(a*x^n + 1)*sqrt(a*x^n - 1)*log(x)/(a^4*x*x^(2*n) - a^2*x), x) + arctan(sqrt(a*x^n + 1)*s
qrt(a*x^n - 1))*log(x)

________________________________________________________________________________________

Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arcsec(a*x^n)/x,x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (co
nstant residues)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {asec}{\left (a x^{n} \right )}}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(asec(a*x**n)/x,x)

[Out]

Integral(asec(a*x**n)/x, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arcsec(a*x^n)/x,x, algorithm="giac")

[Out]

integrate(arcsec(a*x^n)/x, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\mathrm {acos}\left (\frac {1}{a\,x^n}\right )}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(acos(1/(a*x^n))/x,x)

[Out]

int(acos(1/(a*x^n))/x, x)

________________________________________________________________________________________