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]
________________________________________________________________________________________
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]
[Out]
Rule 2221
Rule 2317
Rule 2438
Rule 3800
Rule 4722
Rule 5326
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________