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

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

Optimal result

Integrand size = 12, antiderivative size = 244 \[ \int \frac {\sec ^{-1}(a+b x)^2}{x^2} \, dx=-\frac {b \sec ^{-1}(a+b x)^2}{a}-\frac {\sec ^{-1}(a+b x)^2}{x}-\frac {2 i b \sec ^{-1}(a+b x) \log \left (1-\frac {a e^{i \sec ^{-1}(a+b x)}}{1-\sqrt {1-a^2}}\right )}{a \sqrt {1-a^2}}+\frac {2 i b \sec ^{-1}(a+b x) \log \left (1-\frac {a e^{i \sec ^{-1}(a+b x)}}{1+\sqrt {1-a^2}}\right )}{a \sqrt {1-a^2}}-\frac {2 b \operatorname {PolyLog}\left (2,\frac {a e^{i \sec ^{-1}(a+b x)}}{1-\sqrt {1-a^2}}\right )}{a \sqrt {1-a^2}}+\frac {2 b \operatorname {PolyLog}\left (2,\frac {a e^{i \sec ^{-1}(a+b x)}}{1+\sqrt {1-a^2}}\right )}{a \sqrt {1-a^2}} \] Output:

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

Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(686\) vs. \(2(244)=488\).

Time = 1.46 (sec) , antiderivative size = 686, normalized size of antiderivative = 2.81 \[ \int \frac {\sec ^{-1}(a+b x)^2}{x^2} \, dx =\text {Too large to display} \] Input:

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

Output:

-((((a + b*x)*ArcSec[a + b*x]^2)/x + (2*b*(2*ArcSec[a + b*x]*ArcTanh[((-1 
+ a)*Cot[ArcSec[a + b*x]/2])/Sqrt[-1 + a^2]] - 2*ArcCos[a^(-1)]*ArcTanh[(( 
1 + a)*Tan[ArcSec[a + b*x]/2])/Sqrt[-1 + a^2]] + (ArcCos[a^(-1)] - (2*I)*A 
rcTanh[((-1 + a)*Cot[ArcSec[a + b*x]/2])/Sqrt[-1 + a^2]] + (2*I)*ArcTanh[( 
(1 + a)*Tan[ArcSec[a + b*x]/2])/Sqrt[-1 + a^2]])*Log[Sqrt[-1 + a^2]/(Sqrt[ 
2]*Sqrt[a]*E^((I/2)*ArcSec[a + b*x])*Sqrt[-((b*x)/(a + b*x))])] + (ArcCos[ 
a^(-1)] + (2*I)*(ArcTanh[((-1 + a)*Cot[ArcSec[a + b*x]/2])/Sqrt[-1 + a^2]] 
 - ArcTanh[((1 + a)*Tan[ArcSec[a + b*x]/2])/Sqrt[-1 + a^2]]))*Log[(Sqrt[-1 
 + a^2]*E^((I/2)*ArcSec[a + b*x]))/(Sqrt[2]*Sqrt[a]*Sqrt[-((b*x)/(a + b*x) 
)])] - (ArcCos[a^(-1)] - (2*I)*ArcTanh[((1 + a)*Tan[ArcSec[a + b*x]/2])/Sq 
rt[-1 + a^2]])*Log[((-1 + a)*(I + I*a + Sqrt[-1 + a^2])*(-I + Tan[ArcSec[a 
 + b*x]/2]))/(a*(-1 + a + Sqrt[-1 + a^2]*Tan[ArcSec[a + b*x]/2]))] - (ArcC 
os[a^(-1)] + (2*I)*ArcTanh[((1 + a)*Tan[ArcSec[a + b*x]/2])/Sqrt[-1 + a^2] 
])*Log[((-1 + a)*(-I - I*a + Sqrt[-1 + a^2])*(I + Tan[ArcSec[a + b*x]/2])) 
/(a*(-1 + a + Sqrt[-1 + a^2]*Tan[ArcSec[a + b*x]/2]))] + I*(-PolyLog[2, (( 
1 - I*Sqrt[-1 + a^2])*(1 - a + Sqrt[-1 + a^2]*Tan[ArcSec[a + b*x]/2]))/(a* 
(-1 + a + Sqrt[-1 + a^2]*Tan[ArcSec[a + b*x]/2]))] + PolyLog[2, ((1 + I*Sq 
rt[-1 + a^2])*(1 - a + Sqrt[-1 + a^2]*Tan[ArcSec[a + b*x]/2]))/(a*(-1 + a 
+ Sqrt[-1 + a^2]*Tan[ArcSec[a + b*x]/2]))])))/Sqrt[-1 + a^2])/a)
 

Rubi [A] (verified)

Time = 0.72 (sec) , antiderivative size = 248, normalized size of antiderivative = 1.02, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {5781, 4926, 3042, 4679, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sec ^{-1}(a+b x)^2}{x^2} \, dx\)

\(\Big \downarrow \) 5781

\(\displaystyle b \int \frac {(a+b x)^2 \sqrt {1-\frac {1}{(a+b x)^2}} \sec ^{-1}(a+b x)^2}{b^2 x^2}d\sec ^{-1}(a+b x)\)

\(\Big \downarrow \) 4926

\(\displaystyle b \left (-2 \int -\frac {\sec ^{-1}(a+b x)}{b x}d\sec ^{-1}(a+b x)-\frac {\sec ^{-1}(a+b x)^2}{b x}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle b \left (-2 \int \frac {\sec ^{-1}(a+b x)}{a-\csc \left (\sec ^{-1}(a+b x)+\frac {\pi }{2}\right )}d\sec ^{-1}(a+b x)-\frac {\sec ^{-1}(a+b x)^2}{b x}\right )\)

\(\Big \downarrow \) 4679

\(\displaystyle b \left (-2 \int \left (\frac {\sec ^{-1}(a+b x)}{a}+\frac {\sec ^{-1}(a+b x)}{a \left (\frac {a}{a+b x}-1\right )}\right )d\sec ^{-1}(a+b x)-\frac {\sec ^{-1}(a+b x)^2}{b x}\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle b \left (-\frac {\sec ^{-1}(a+b x)^2}{b x}-2 \left (\frac {\operatorname {PolyLog}\left (2,\frac {a e^{i \sec ^{-1}(a+b x)}}{1-\sqrt {1-a^2}}\right )}{a \sqrt {1-a^2}}-\frac {\operatorname {PolyLog}\left (2,\frac {a e^{i \sec ^{-1}(a+b x)}}{\sqrt {1-a^2}+1}\right )}{a \sqrt {1-a^2}}+\frac {i \sec ^{-1}(a+b x) \log \left (1-\frac {a e^{i \sec ^{-1}(a+b x)}}{1-\sqrt {1-a^2}}\right )}{a \sqrt {1-a^2}}-\frac {i \sec ^{-1}(a+b x) \log \left (1-\frac {a e^{i \sec ^{-1}(a+b x)}}{\sqrt {1-a^2}+1}\right )}{a \sqrt {1-a^2}}+\frac {\sec ^{-1}(a+b x)^2}{2 a}\right )\right )\)

Input:

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

Output:

b*(-(ArcSec[a + b*x]^2/(b*x)) - 2*(ArcSec[a + b*x]^2/(2*a) + (I*ArcSec[a + 
 b*x]*Log[1 - (a*E^(I*ArcSec[a + b*x]))/(1 - Sqrt[1 - a^2])])/(a*Sqrt[1 - 
a^2]) - (I*ArcSec[a + b*x]*Log[1 - (a*E^(I*ArcSec[a + b*x]))/(1 + Sqrt[1 - 
 a^2])])/(a*Sqrt[1 - a^2]) + PolyLog[2, (a*E^(I*ArcSec[a + b*x]))/(1 - Sqr 
t[1 - a^2])]/(a*Sqrt[1 - a^2]) - PolyLog[2, (a*E^(I*ArcSec[a + b*x]))/(1 + 
 Sqrt[1 - a^2])]/(a*Sqrt[1 - a^2])))
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4679
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, 1/(Sin[e + f*x]^n/(b + a*Si 
n[e + f*x])^n), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && ILtQ[n, 0] && IGt 
Q[m, 0]
 

rule 4926
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] - Simp[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] && IGtQ[m, 0] && NeQ[n, -1]
 

rule 5781
Int[((a_.) + ArcSec[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m 
_.), x_Symbol] :> Simp[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]
 
Maple [A] (verified)

Time = 0.77 (sec) , antiderivative size = 336, normalized size of antiderivative = 1.38

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral(arcsec(b*x + a)^2/x^2, x)
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

integrate(arcsec(b*x + a)^2/x^2, x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {\sec ^{-1}(a+b x)^2}{x^2} \, dx=\int \frac {\mathit {asec} \left (b x +a \right )^{2}}{x^{2}}d x \] Input:

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

Output:

int(asec(a + b*x)**2/x**2,x)