Optimal. Leaf size=288 \[ -\frac{2 i a^2 \text{PolyLog}\left (2,-i e^{i \sec ^{-1}(a+b x)}\right )}{b^3}+\frac{2 i a^2 \text{PolyLog}\left (2,i e^{i \sec ^{-1}(a+b x)}\right )}{b^3}-\frac{i \text{PolyLog}\left (2,-i e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{i \text{PolyLog}\left (2,i e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{a^3 \sec ^{-1}(a+b x)^2}{3 b^3}+\frac{4 i a^2 \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{b^3}-\frac{2 a \log (a+b x)}{b^3}+\frac{2 a (a+b x) \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{b^3}-\frac{(a+b x)^2 \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{3 b^3}+\frac{2 i \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{1}{3} x^3 \sec ^{-1}(a+b x)^2+\frac{x}{3 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.23176, antiderivative size = 288, normalized size of antiderivative = 1., number of steps used = 17, number of rules used = 9, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.75, Rules used = {5258, 4426, 4190, 4181, 2279, 2391, 4184, 3475, 4185} \[ -\frac{2 i a^2 \text{PolyLog}\left (2,-i e^{i \sec ^{-1}(a+b x)}\right )}{b^3}+\frac{2 i a^2 \text{PolyLog}\left (2,i e^{i \sec ^{-1}(a+b x)}\right )}{b^3}-\frac{i \text{PolyLog}\left (2,-i e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{i \text{PolyLog}\left (2,i e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{a^3 \sec ^{-1}(a+b x)^2}{3 b^3}+\frac{4 i a^2 \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{b^3}-\frac{2 a \log (a+b x)}{b^3}+\frac{2 a (a+b x) \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{b^3}-\frac{(a+b x)^2 \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{3 b^3}+\frac{2 i \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{1}{3} x^3 \sec ^{-1}(a+b x)^2+\frac{x}{3 b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5258
Rule 4426
Rule 4190
Rule 4181
Rule 2279
Rule 2391
Rule 4184
Rule 3475
Rule 4185
Rubi steps
\begin{align*} \int x^2 \sec ^{-1}(a+b x)^2 \, dx &=\frac{\operatorname{Subst}\left (\int x^2 \sec (x) (-a+\sec (x))^2 \tan (x) \, dx,x,\sec ^{-1}(a+b x)\right )}{b^3}\\ &=\frac{1}{3} x^3 \sec ^{-1}(a+b x)^2-\frac{2 \operatorname{Subst}\left (\int x (-a+\sec (x))^3 \, dx,x,\sec ^{-1}(a+b x)\right )}{3 b^3}\\ &=\frac{1}{3} x^3 \sec ^{-1}(a+b x)^2-\frac{2 \operatorname{Subst}\left (\int \left (-a^3 x+3 a^2 x \sec (x)-3 a x \sec ^2(x)+x \sec ^3(x)\right ) \, dx,x,\sec ^{-1}(a+b x)\right )}{3 b^3}\\ &=\frac{a^3 \sec ^{-1}(a+b x)^2}{3 b^3}+\frac{1}{3} x^3 \sec ^{-1}(a+b x)^2-\frac{2 \operatorname{Subst}\left (\int x \sec ^3(x) \, dx,x,\sec ^{-1}(a+b x)\right )}{3 b^3}+\frac{(2 a) \operatorname{Subst}\left (\int x \sec ^2(x) \, dx,x,\sec ^{-1}(a+b x)\right )}{b^3}-\frac{\left (2 a^2\right ) \operatorname{Subst}\left (\int x \sec (x) \, dx,x,\sec ^{-1}(a+b x)\right )}{b^3}\\ &=\frac{x}{3 b^2}+\frac{2 a (a+b x) \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{b^3}-\frac{(a+b x)^2 \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{3 b^3}+\frac{a^3 \sec ^{-1}(a+b x)^2}{3 b^3}+\frac{1}{3} x^3 \sec ^{-1}(a+b x)^2+\frac{4 i a^2 \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{b^3}-\frac{\operatorname{Subst}\left (\int x \sec (x) \, dx,x,\sec ^{-1}(a+b x)\right )}{3 b^3}-\frac{(2 a) \operatorname{Subst}\left (\int \tan (x) \, dx,x,\sec ^{-1}(a+b x)\right )}{b^3}+\frac{\left (2 a^2\right ) \operatorname{Subst}\left (\int \log \left (1-i e^{i x}\right ) \, dx,x,\sec ^{-1}(a+b x)\right )}{b^3}-\frac{\left (2 a^2\right ) \operatorname{Subst}\left (\int \log \left (1+i e^{i x}\right ) \, dx,x,\sec ^{-1}(a+b x)\right )}{b^3}\\ &=\frac{x}{3 b^2}+\frac{2 a (a+b x) \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{b^3}-\frac{(a+b x)^2 \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{3 b^3}+\frac{a^3 \sec ^{-1}(a+b x)^2}{3 b^3}+\frac{1}{3} x^3 \sec ^{-1}(a+b x)^2+\frac{2 i \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{4 i a^2 \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{b^3}-\frac{2 a \log (a+b x)}{b^3}+\frac{\operatorname{Subst}\left (\int \log \left (1-i e^{i x}\right ) \, dx,x,\sec ^{-1}(a+b x)\right )}{3 b^3}-\frac{\operatorname{Subst}\left (\int \log \left (1+i e^{i x}\right ) \, dx,x,\sec ^{-1}(a+b x)\right )}{3 b^3}-\frac{\left (2 i a^2\right ) \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,e^{i \sec ^{-1}(a+b x)}\right )}{b^3}+\frac{\left (2 i a^2\right ) \operatorname{Subst}\left (\int \frac{\log (1+i x)}{x} \, dx,x,e^{i \sec ^{-1}(a+b x)}\right )}{b^3}\\ &=\frac{x}{3 b^2}+\frac{2 a (a+b x) \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{b^3}-\frac{(a+b x)^2 \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{3 b^3}+\frac{a^3 \sec ^{-1}(a+b x)^2}{3 b^3}+\frac{1}{3} x^3 \sec ^{-1}(a+b x)^2+\frac{2 i \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{4 i a^2 \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{b^3}-\frac{2 a \log (a+b x)}{b^3}-\frac{2 i a^2 \text{Li}_2\left (-i e^{i \sec ^{-1}(a+b x)}\right )}{b^3}+\frac{2 i a^2 \text{Li}_2\left (i e^{i \sec ^{-1}(a+b x)}\right )}{b^3}-\frac{i \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{i \operatorname{Subst}\left (\int \frac{\log (1+i x)}{x} \, dx,x,e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}\\ &=\frac{x}{3 b^2}+\frac{2 a (a+b x) \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{b^3}-\frac{(a+b x)^2 \sqrt{1-\frac{1}{(a+b x)^2}} \sec ^{-1}(a+b x)}{3 b^3}+\frac{a^3 \sec ^{-1}(a+b x)^2}{3 b^3}+\frac{1}{3} x^3 \sec ^{-1}(a+b x)^2+\frac{2 i \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{4 i a^2 \sec ^{-1}(a+b x) \tan ^{-1}\left (e^{i \sec ^{-1}(a+b x)}\right )}{b^3}-\frac{2 a \log (a+b x)}{b^3}-\frac{i \text{Li}_2\left (-i e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}-\frac{2 i a^2 \text{Li}_2\left (-i e^{i \sec ^{-1}(a+b x)}\right )}{b^3}+\frac{i \text{Li}_2\left (i e^{i \sec ^{-1}(a+b x)}\right )}{3 b^3}+\frac{2 i a^2 \text{Li}_2\left (i e^{i \sec ^{-1}(a+b x)}\right )}{b^3}\\ \end{align*}
Mathematica [A] time = 6.6253, size = 473, normalized size = 1.64 \[ \frac{2 \left (-6 a^2-1\right ) \left (2 i \left (\text{PolyLog}\left (2,-i e^{-i \sec ^{-1}(a+b x)}\right )-\text{PolyLog}\left (2,i e^{-i \sec ^{-1}(a+b x)}\right )\right )+\left (\pi -2 \sec ^{-1}(a+b x)\right ) \left (\log \left (1-i e^{-i \sec ^{-1}(a+b x)}\right )-\log \left (1+i e^{-i \sec ^{-1}(a+b x)}\right )\right )-\pi \log \left (\cot \left (\frac{1}{4} \left (2 \sec ^{-1}(a+b x)+\pi \right )\right )\right )\right )+2 \left (6 a^2+1\right ) \sec ^{-1}(a+b x)^2+\frac{2 \left (\left (6 a^2+1\right ) \sec ^{-1}(a+b x)^2+12 a \sec ^{-1}(a+b x)+2\right ) \sin \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )}{\cos \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )-\sin \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )}-\frac{2 \left (\left (6 a^2+1\right ) \sec ^{-1}(a+b x)^2-12 a \sec ^{-1}(a+b x)+2\right ) \sin \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )}{\cos \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )+\sin \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )}+24 a \log \left (\frac{1}{a+b x}\right )+\frac{\left ((6 a-1) \sec ^{-1}(a+b x)+2\right ) \sec ^{-1}(a+b x)}{\sqrt{1-\frac{1}{(a+b x)^2}}-1}+\frac{2 \sec ^{-1}(a+b x)^2 \sin \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )}{\left (\cos \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )-\sin \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )\right )^3}-\frac{2 \sec ^{-1}(a+b x)^2 \sin \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )}{\left (\cos \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )+\sin \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )\right )^3}+\frac{\left ((1-6 a) \sec ^{-1}(a+b x)+2\right ) \sec ^{-1}(a+b x)}{\left (\cos \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )+\sin \left (\frac{1}{2} \sec ^{-1}(a+b x)\right )\right )^2}+4}{12 b^3} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.572, size = 540, normalized size = 1.9 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{1}{3} \, x^{3} \arctan \left (\sqrt{b x + a + 1} \sqrt{b x + a - 1}\right )^{2} - \frac{1}{12} \, x^{3} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )^{2} - \int \frac{2 \, \sqrt{b x + a + 1} \sqrt{b x + a - 1} b x^{3} \arctan \left (\sqrt{b x + a + 1} \sqrt{b x + a - 1}\right ) + 3 \,{\left (b^{3} x^{5} + 3 \, a b^{2} x^{4} +{\left (3 \, a^{2} - 1\right )} b x^{3} +{\left (a^{3} - a\right )} x^{2}\right )} \log \left (b x + a\right )^{2} -{\left (b^{3} x^{5} + 2 \, a b^{2} x^{4} +{\left (a^{2} - 1\right )} b x^{3} + 3 \,{\left (b^{3} x^{5} + 3 \, a b^{2} x^{4} +{\left (3 \, a^{2} - 1\right )} b x^{3} +{\left (a^{3} - a\right )} x^{2}\right )} \log \left (b x + a\right )\right )} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}{3 \,{\left (b^{3} x^{3} + 3 \, a b^{2} x^{2} + a^{3} +{\left (3 \, a^{2} - 1\right )} b x - a\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (x^{2} \operatorname{arcsec}\left (b x + a\right )^{2}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \operatorname{asec}^{2}{\left (a + b x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \operatorname{arcsec}\left (b x + a\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]