3.1.20 \(\int x^2 \sec ^{-1}(a+b x) \, dx\) [20]

Optimal. Leaf size=116 \[ \frac {5 a (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^3}-\frac {x (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^2}+\frac {a^3 \sec ^{-1}(a+b x)}{3 b^3}+\frac {1}{3} x^3 \sec ^{-1}(a+b x)-\frac {\left (1+6 a^2\right ) \tanh ^{-1}\left (\sqrt {1-\frac {1}{(a+b x)^2}}\right )}{6 b^3} \]

[Out]

1/3*a^3*arcsec(b*x+a)/b^3+1/3*x^3*arcsec(b*x+a)-1/6*(6*a^2+1)*arctanh((1-1/(b*x+a)^2)^(1/2))/b^3+5/6*a*(b*x+a)
*(1-1/(b*x+a)^2)^(1/2)/b^3-1/6*x*(b*x+a)*(1-1/(b*x+a)^2)^(1/2)/b^2

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 116, 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 = {5366, 4511, 3867, 3855, 3852, 8} \begin {gather*} \frac {a^3 \sec ^{-1}(a+b x)}{3 b^3}-\frac {\left (6 a^2+1\right ) \tanh ^{-1}\left (\sqrt {1-\frac {1}{(a+b x)^2}}\right )}{6 b^3}+\frac {5 a (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^3}-\frac {x (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^2}+\frac {1}{3} x^3 \sec ^{-1}(a+b x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*ArcSec[a + b*x],x]

[Out]

(5*a*(a + b*x)*Sqrt[1 - (a + b*x)^(-2)])/(6*b^3) - (x*(a + b*x)*Sqrt[1 - (a + b*x)^(-2)])/(6*b^2) + (a^3*ArcSe
c[a + b*x])/(3*b^3) + (x^3*ArcSec[a + b*x])/3 - ((1 + 6*a^2)*ArcTanh[Sqrt[1 - (a + b*x)^(-2)]])/(6*b^3)

Rule 8

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

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3867

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Simp[(-b^2)*Cot[c + d*x]*((a + b*Csc[c + d*x])^(
n - 2)/(d*(n - 1))), x] + Dist[1/(n - 1), Int[(a + b*Csc[c + d*x])^(n - 3)*Simp[a^3*(n - 1) + (b*(b^2*(n - 2)
+ 3*a^2*(n - 1)))*Csc[c + d*x] + (a*b^2*(3*n - 4))*Csc[c + d*x]^2, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ
[a^2 - b^2, 0] && GtQ[n, 2] && IntegerQ[2*n]

Rule 4511

Int[((e_.) + (f_.)*(x_))^(m_.)*Sec[(c_.) + (d_.)*(x_)]*((a_) + (b_.)*Sec[(c_.) + (d_.)*(x_)])^(n_.)*Tan[(c_.)
+ (d_.)*(x_)], x_Symbol] :> Simp[(e + f*x)^m*((a + b*Sec[c + d*x])^(n + 1)/(b*d*(n + 1))), x] - Dist[f*(m/(b*d
*(n + 1))), Int[(e + f*x)^(m - 1)*(a + b*Sec[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && I
GtQ[m, 0] && NeQ[n, -1]

Rule 5366

Int[((a_.) + ArcSec[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[1/d^(m + 1),
 Subst[Int[(a + b*x)^p*Sec[x]*Tan[x]*(d*e - c*f + f*Sec[x])^m, x], x, ArcSec[c + d*x]], x] /; FreeQ[{a, b, c,
d, e, f}, x] && IGtQ[p, 0] && IntegerQ[m]

Rubi steps

\begin {align*} \int x^2 \sec ^{-1}(a+b x) \, dx &=\frac {\text {Subst}\left (\int x \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)-\frac {\text {Subst}\left (\int (-a+\sec (x))^3 \, dx,x,\sec ^{-1}(a+b x)\right )}{3 b^3}\\ &=-\frac {x (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^2}+\frac {1}{3} x^3 \sec ^{-1}(a+b x)-\frac {\text {Subst}\left (\int \left (-2 a^3+\left (1+6 a^2\right ) \sec (x)-5 a \sec ^2(x)\right ) \, dx,x,\sec ^{-1}(a+b x)\right )}{6 b^3}\\ &=-\frac {x (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^2}+\frac {a^3 \sec ^{-1}(a+b x)}{3 b^3}+\frac {1}{3} x^3 \sec ^{-1}(a+b x)+\frac {(5 a) \text {Subst}\left (\int \sec ^2(x) \, dx,x,\sec ^{-1}(a+b x)\right )}{6 b^3}-\frac {\left (1+6 a^2\right ) \text {Subst}\left (\int \sec (x) \, dx,x,\sec ^{-1}(a+b x)\right )}{6 b^3}\\ &=-\frac {x (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^2}+\frac {a^3 \sec ^{-1}(a+b x)}{3 b^3}+\frac {1}{3} x^3 \sec ^{-1}(a+b x)-\frac {\left (1+6 a^2\right ) \tanh ^{-1}\left (\sqrt {1-\frac {1}{(a+b x)^2}}\right )}{6 b^3}-\frac {(5 a) \text {Subst}\left (\int 1 \, dx,x,-(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}\right )}{6 b^3}\\ &=\frac {5 a (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^3}-\frac {x (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^2}+\frac {a^3 \sec ^{-1}(a+b x)}{3 b^3}+\frac {1}{3} x^3 \sec ^{-1}(a+b x)-\frac {\left (1+6 a^2\right ) \tanh ^{-1}\left (\sqrt {1-\frac {1}{(a+b x)^2}}\right )}{6 b^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 131, normalized size = 1.13 \begin {gather*} \frac {\left (5 a^2+4 a b x-b^2 x^2\right ) \sqrt {\frac {-1+a^2+2 a b x+b^2 x^2}{(a+b x)^2}}+2 b^3 x^3 \sec ^{-1}(a+b x)-2 a^3 \text {ArcSin}\left (\frac {1}{a+b x}\right )-\left (1+6 a^2\right ) \log \left ((a+b x) \left (1+\sqrt {\frac {-1+a^2+2 a b x+b^2 x^2}{(a+b x)^2}}\right )\right )}{6 b^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*ArcSec[a + b*x],x]

[Out]

((5*a^2 + 4*a*b*x - b^2*x^2)*Sqrt[(-1 + a^2 + 2*a*b*x + b^2*x^2)/(a + b*x)^2] + 2*b^3*x^3*ArcSec[a + b*x] - 2*
a^3*ArcSin[(a + b*x)^(-1)] - (1 + 6*a^2)*Log[(a + b*x)*(1 + Sqrt[(-1 + a^2 + 2*a*b*x + b^2*x^2)/(a + b*x)^2])]
)/(6*b^3)

________________________________________________________________________________________

Maple [A]
time = 0.15, size = 190, normalized size = 1.64

method result size
derivativedivides \(\frac {-\frac {\mathrm {arcsec}\left (b x +a \right ) a^{3}}{3}+\mathrm {arcsec}\left (b x +a \right ) a^{2} \left (b x +a \right )-\mathrm {arcsec}\left (b x +a \right ) a \left (b x +a \right )^{2}+\frac {\mathrm {arcsec}\left (b x +a \right ) \left (b x +a \right )^{3}}{3}-\frac {\sqrt {\left (b x +a \right )^{2}-1}\, \left (2 a^{3} \arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right )+6 a^{2} \ln \left (b x +a +\sqrt {\left (b x +a \right )^{2}-1}\right )-6 a \sqrt {\left (b x +a \right )^{2}-1}+\left (b x +a \right ) \sqrt {\left (b x +a \right )^{2}-1}+\ln \left (b x +a +\sqrt {\left (b x +a \right )^{2}-1}\right )\right )}{6 \sqrt {\frac {\left (b x +a \right )^{2}-1}{\left (b x +a \right )^{2}}}\, \left (b x +a \right )}}{b^{3}}\) \(190\)
default \(\frac {-\frac {\mathrm {arcsec}\left (b x +a \right ) a^{3}}{3}+\mathrm {arcsec}\left (b x +a \right ) a^{2} \left (b x +a \right )-\mathrm {arcsec}\left (b x +a \right ) a \left (b x +a \right )^{2}+\frac {\mathrm {arcsec}\left (b x +a \right ) \left (b x +a \right )^{3}}{3}-\frac {\sqrt {\left (b x +a \right )^{2}-1}\, \left (2 a^{3} \arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right )+6 a^{2} \ln \left (b x +a +\sqrt {\left (b x +a \right )^{2}-1}\right )-6 a \sqrt {\left (b x +a \right )^{2}-1}+\left (b x +a \right ) \sqrt {\left (b x +a \right )^{2}-1}+\ln \left (b x +a +\sqrt {\left (b x +a \right )^{2}-1}\right )\right )}{6 \sqrt {\frac {\left (b x +a \right )^{2}-1}{\left (b x +a \right )^{2}}}\, \left (b x +a \right )}}{b^{3}}\) \(190\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*arcsec(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/b^3*(-1/3*arcsec(b*x+a)*a^3+arcsec(b*x+a)*a^2*(b*x+a)-arcsec(b*x+a)*a*(b*x+a)^2+1/3*arcsec(b*x+a)*(b*x+a)^3-
1/6*((b*x+a)^2-1)^(1/2)*(2*a^3*arctan(1/((b*x+a)^2-1)^(1/2))+6*a^2*ln(b*x+a+((b*x+a)^2-1)^(1/2))-6*a*((b*x+a)^
2-1)^(1/2)+(b*x+a)*((b*x+a)^2-1)^(1/2)+ln(b*x+a+((b*x+a)^2-1)^(1/2)))/(((b*x+a)^2-1)/(b*x+a)^2)^(1/2)/(b*x+a))

________________________________________________________________________________________

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(x^2*arcsec(b*x+a),x, algorithm="maxima")

[Out]

1/3*x^3*arctan(sqrt(b*x + a + 1)*sqrt(b*x + a - 1)) - integrate(1/3*(b^2*x^4 + a*b*x^3)*e^(1/2*log(b*x + a + 1
) + 1/2*log(b*x + a - 1))/(b^2*x^2 + 2*a*b*x + a^2 + (b^2*x^2 + 2*a*b*x + a^2 - 1)*e^(log(b*x + a + 1) + log(b
*x + a - 1)) - 1), x)

________________________________________________________________________________________

Fricas [A]
time = 3.18, size = 117, normalized size = 1.01 \begin {gather*} \frac {2 \, b^{3} x^{3} \operatorname {arcsec}\left (b x + a\right ) + 4 \, a^{3} \arctan \left (-b x - a + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right ) + {\left (6 \, a^{2} + 1\right )} \log \left (-b x - a + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right ) - \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1} {\left (b x - 5 \, a\right )}}{6 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*arcsec(b*x+a),x, algorithm="fricas")

[Out]

1/6*(2*b^3*x^3*arcsec(b*x + a) + 4*a^3*arctan(-b*x - a + sqrt(b^2*x^2 + 2*a*b*x + a^2 - 1)) + (6*a^2 + 1)*log(
-b*x - a + sqrt(b^2*x^2 + 2*a*b*x + a^2 - 1)) - sqrt(b^2*x^2 + 2*a*b*x + a^2 - 1)*(b*x - 5*a))/b^3

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*asec(b*x+a),x)

[Out]

Integral(x**2*asec(a + b*x), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 204 vs. \(2 (100) = 200\).
time = 0.45, size = 204, normalized size = 1.76 \begin {gather*} -\frac {1}{24} \, b {\left (\frac {8 \, {\left (b x + a\right )}^{3} {\left (\frac {3 \, a}{b x + a} - \frac {3 \, a^{2}}{{\left (b x + a\right )}^{2}} - 1\right )} \arccos \left (-\frac {1}{{\left (b x + a\right )} {\left (\frac {a}{b x + a} - 1\right )} - a}\right )}{b^{4}} - \frac {{\left (b x + a\right )}^{2} {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )}^{2} + 12 \, {\left (b x + a\right )} a {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )} + 4 \, {\left (6 \, a^{2} + 1\right )} \log \left (-{\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )} {\left | b x + a \right |}\right ) - \frac {12 \, {\left (b x + a\right )} a {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )} + 1}{{\left (b x + a\right )}^{2} {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )}^{2}}}{b^{4}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*arcsec(b*x+a),x, algorithm="giac")

[Out]

-1/24*b*(8*(b*x + a)^3*(3*a/(b*x + a) - 3*a^2/(b*x + a)^2 - 1)*arccos(-1/((b*x + a)*(a/(b*x + a) - 1) - a))/b^
4 - ((b*x + a)^2*(sqrt(-1/(b*x + a)^2 + 1) - 1)^2 + 12*(b*x + a)*a*(sqrt(-1/(b*x + a)^2 + 1) - 1) + 4*(6*a^2 +
 1)*log(-(sqrt(-1/(b*x + a)^2 + 1) - 1)*abs(b*x + a)) - (12*(b*x + a)*a*(sqrt(-1/(b*x + a)^2 + 1) - 1) + 1)/((
b*x + a)^2*(sqrt(-1/(b*x + a)^2 + 1) - 1)^2))/b^4)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*acos(1/(a + b*x)),x)

[Out]

int(x^2*acos(1/(a + b*x)), x)

________________________________________________________________________________________