3.812 \(\int \frac {-1+x^2}{\sqrt {a+b (-1+\frac {1}{x^2})} x^3} \, dx\)

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

[Out]

arctanh((a-b*(1-1/x^2))^(1/2)/(a-b)^(1/2))/(a-b)^(1/2)+(a-b*(1-1/x^2))^(1/2)/b

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {1978, 514, 446, 80, 63, 208} \[ \frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{b}+\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{\sqrt {a-b}}\right )}{\sqrt {a-b}} \]

Antiderivative was successfully verified.

[In]

Int[(-1 + x^2)/(Sqrt[a + b*(-1 + x^(-2))]*x^3),x]

[Out]

Sqrt[a - b*(1 - x^(-2))]/b + ArcTanh[Sqrt[a - b*(1 - x^(-2))]/Sqrt[a - b]]/Sqrt[a - b]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 80

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

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 514

Int[(x_)^(m_.)*((c_) + (d_.)*(x_)^(mn_.))^(q_.)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[x^(m - n*q)*
(a + b*x^n)^p*(d + c*x^n)^q, x] /; FreeQ[{a, b, c, d, m, n, p}, x] && EqQ[mn, -n] && IntegerQ[q] && (PosQ[n] |
|  !IntegerQ[p])

Rule 1978

Int[(Pq_)*(u_)^(p_.)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[(c*x)^m*Pq*ExpandToSum[u, x]^p, x] /; FreeQ[{c, m, p
}, x] && PolyQ[Pq, x] && BinomialQ[u, x] &&  !BinomialMatchQ[u, x]

Rubi steps

\begin {align*} \int \frac {-1+x^2}{\sqrt {a+b \left (-1+\frac {1}{x^2}\right )} x^3} \, dx &=\int \frac {-1+x^2}{\sqrt {a-b+\frac {b}{x^2}} x^3} \, dx\\ &=\int \frac {1-\frac {1}{x^2}}{\sqrt {a-b+\frac {b}{x^2}} x} \, dx\\ &=-\left (\frac {1}{2} \operatorname {Subst}\left (\int \frac {1-x}{x \sqrt {a-b+b x}} \, dx,x,\frac {1}{x^2}\right )\right )\\ &=\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{b}-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a-b+b x}} \, dx,x,\frac {1}{x^2}\right )\\ &=\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{b}-\frac {\operatorname {Subst}\left (\int \frac {1}{-\frac {a-b}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b \left (-1+\frac {1}{x^2}\right )}\right )}{b}\\ &=\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{b}+\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b \left (1-\frac {1}{x^2}\right )}}{\sqrt {a-b}}\right )}{\sqrt {a-b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 100, normalized size = 1.72 \[ \frac {\sqrt {a-b} \left (a x^2-b x^2+b\right )+b x \sqrt {a x^2-b x^2+b} \tanh ^{-1}\left (\frac {x \sqrt {a-b}}{\sqrt {x^2 (a-b)+b}}\right )}{b x^2 \sqrt {a-b} \sqrt {a+b \left (\frac {1}{x^2}-1\right )}} \]

Antiderivative was successfully verified.

[In]

Integrate[(-1 + x^2)/(Sqrt[a + b*(-1 + x^(-2))]*x^3),x]

[Out]

(Sqrt[a - b]*(b + a*x^2 - b*x^2) + b*x*Sqrt[b + a*x^2 - b*x^2]*ArcTanh[(Sqrt[a - b]*x)/Sqrt[b + (a - b)*x^2]])
/(Sqrt[a - b]*b*Sqrt[a + b*(-1 + x^(-2))]*x^2)

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 180, normalized size = 3.10 \[ \left [\frac {\sqrt {a - b} b \log \left (-2 \, {\left (a - b\right )} x^{2} - 2 \, \sqrt {a - b} x^{2} \sqrt {\frac {{\left (a - b\right )} x^{2} + b}{x^{2}}} - b\right ) + 2 \, {\left (a - b\right )} \sqrt {\frac {{\left (a - b\right )} x^{2} + b}{x^{2}}}}{2 \, {\left (a b - b^{2}\right )}}, \frac {\sqrt {-a + b} b \arctan \left (-\frac {\sqrt {-a + b} x^{2} \sqrt {\frac {{\left (a - b\right )} x^{2} + b}{x^{2}}}}{{\left (a - b\right )} x^{2} + b}\right ) + {\left (a - b\right )} \sqrt {\frac {{\left (a - b\right )} x^{2} + b}{x^{2}}}}{a b - b^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[1/2*(sqrt(a - b)*b*log(-2*(a - b)*x^2 - 2*sqrt(a - b)*x^2*sqrt(((a - b)*x^2 + b)/x^2) - b) + 2*(a - b)*sqrt((
(a - b)*x^2 + b)/x^2))/(a*b - b^2), (sqrt(-a + b)*b*arctan(-sqrt(-a + b)*x^2*sqrt(((a - b)*x^2 + b)/x^2)/((a -
 b)*x^2 + b)) + (a - b)*sqrt(((a - b)*x^2 + b)/x^2))/(a*b - b^2)]

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:Warn
ing, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):Check [ab
s(t_nostep)]Warning, choosing root of [1,0,%%%{-2,[1,2,0]%%%}+%%%{-2,[1,0,0]%%%}+%%%{2,[0,2,1]%%%}+%%%{-2,[0,1
,1]%%%}+%%%{2,[0,0,1]%%%},0,%%%{1,[2,4,0]%%%}+%%%{-2,[2,2,0]%%%}+%%%{1,[2,0,0]%%%}+%%%{-2,[1,4,1]%%%}+%%%{2,[1
,3,1]%%%}+%%%{4,[1,2,1]%%%}+%%%{-2,[1,1,1]%%%}+%%%{-2,[1,0,1]%%%}+%%%{1,[0,4,2]%%%}+%%%{-2,[0,3,2]%%%}+%%%{-1,
[0,2,2]%%%}+%%%{2,[0,1,2]%%%}+%%%{1,[0,0,2]%%%}] at parameters values [86,-97,-82]Sign error (%%%{b,0%%%}+%%%{
-2*sqrt(a-b)*sqrt(b),1/2%%%}+%%%{2*(a-b),1%%%}+%%%{-(a*sqrt(a-b)*sqrt(b)-b*sqrt(a-b)*sqrt(b))/b,3/2%%%}+%%%{-(
-a^2*sqrt(a-b)*sqrt(b)+2*a*b*sqrt(a-b)*sqrt(b)-b^2*sqrt(a-b)*sqrt(b))/(4*b^2),5/2%%%}+%%%{undef,7/2%%%})Limit:
 Max order reached or unable to make series expansion Error: Bad Argument Value

________________________________________________________________________________________

maple [B]  time = 0.02, size = 102, normalized size = 1.76 \[ \frac {\sqrt {a \,x^{2}-b \,x^{2}+b}\, \left (b x \ln \left (\sqrt {a -b}\, x +\sqrt {a \,x^{2}-b \,x^{2}+b}\right )+\sqrt {a \,x^{2}-b \,x^{2}+b}\, \sqrt {a -b}\right )}{\sqrt {\frac {a \,x^{2}-b \,x^{2}+b}{x^{2}}}\, \sqrt {a -b}\, b \,x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a-4*b>0)', see `assume?` for
 more details)Is 4*a-4*b positive or negative?

________________________________________________________________________________________

mupad [B]  time = 4.04, size = 62, normalized size = 1.07 \[ \frac {\sqrt {a+b\,\left (\frac {1}{x^2}-1\right )}}{b}+\frac {\ln \left (x^2\,\left (2\,a-2\,b+2\,\sqrt {a-b}\,\sqrt {a+b\,\left (\frac {1}{x^2}-1\right )}+\frac {b}{x^2}\right )\right )}{2\,\sqrt {a-b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(a + b*(1/x^2 - 1))^(1/2)/b + log(x^2*(2*a - 2*b + 2*(a - b)^(1/2)*(a + b*(1/x^2 - 1))^(1/2) + b/x^2))/(2*(a -
 b)^(1/2))

________________________________________________________________________________________

sympy [A]  time = 7.03, size = 70, normalized size = 1.21 \[ - \frac {\begin {cases} - \frac {1}{\sqrt {a} x^{2}} & \text {for}\: b = 0 \\- \frac {2 \sqrt {a - b + \frac {b}{x^{2}}}}{b} & \text {otherwise} \end {cases}}{2} - \frac {\operatorname {atan}{\left (\frac {1}{\sqrt {- \frac {1}{a - b}} \sqrt {a - b + \frac {b}{x^{2}}}} \right )}}{\sqrt {- \frac {1}{a - b}} \left (a - b\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2-1)/x**3/(a+b*(-1+1/x**2))**(1/2),x)

[Out]

-Piecewise((-1/(sqrt(a)*x**2), Eq(b, 0)), (-2*sqrt(a - b + b/x**2)/b, True))/2 - atan(1/(sqrt(-1/(a - b))*sqrt
(a - b + b/x**2)))/(sqrt(-1/(a - b))*(a - b))

________________________________________________________________________________________