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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.137406, antiderivative size = 58, normalized size of antiderivative = 1., 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 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]

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 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 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 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 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]

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.0074315, 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)

________________________________________________________________________________________

Maple [B]  time = 0.008, size = 102, normalized size = 1.8 \begin{align*}{\frac{1}{b{x}^{2}}\sqrt{a{x}^{2}-b{x}^{2}+b} \left ( \ln \left ( \sqrt{-b+a}x+\sqrt{a{x}^{2}-b{x}^{2}+b} \right ) bx+\sqrt{a{x}^{2}-b{x}^{2}+b}\sqrt{-b+a} \right ){\frac{1}{\sqrt{{\frac{a{x}^{2}-b{x}^{2}+b}{{x}^{2}}}}}}{\frac{1}{\sqrt{-b+a}}}} \end{align*}

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)*(ln((-b+a)^(1/2)*x+(a*x^2-b*x^2+b)^(1/2))*b*x+(a*x^2-b*x^2+b)^(1/2)*(-b+a)^(1/2))/((a*x^
2-b*x^2+b)/x^2)^(1/2)/x^2/(-b+a)^(1/2)/b

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

________________________________________________________________________________________

Fricas [B]  time = 1.81721, size = 390, normalized size = 6.72 \begin{align*} \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 ] \end{align*}

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)]

________________________________________________________________________________________

Sympy [A]  time = 7.91614, size = 70, normalized size = 1.21 \begin{align*} - \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 )} \end{align*}

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))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2} - 1}{\sqrt{b{\left (\frac{1}{x^{2}} - 1\right )} + a} x^{3}}\,{d x} \end{align*}

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]

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