3.9.94 \(\int \frac {\sqrt {\frac {-2 x^2+x^4}{(-1+x^2)^2}}}{2+x^2} \, dx\) [894]

Optimal. Leaf size=123 \[ -\frac {2 \left (1-x^2\right ) \sqrt {-\frac {2 x^2-x^4}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\frac {1}{2} \sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}}+\frac {\left (1-x^2\right ) \sqrt {-\frac {2 x^2-x^4}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}} \]

[Out]

-2/3*(-x^2+1)*arctan(1/2*(x^2-2)^(1/2))*((x^4-2*x^2)/(-x^2+1)^2)^(1/2)/x/(x^2-2)^(1/2)+1/3*(-x^2+1)*arctan((x^
2-2)^(1/2))*((x^4-2*x^2)/(-x^2+1)^2)^(1/2)/x/(x^2-2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {6851, 2081, 585, 85, 65, 209} \begin {gather*} \frac {\left (1-x^2\right ) \sqrt {-\frac {2 x^2-x^4}{\left (1-x^2\right )^2}} \text {ArcTan}\left (\sqrt {x^2-2}\right )}{3 x \sqrt {x^2-2}}-\frac {2 \left (1-x^2\right ) \sqrt {-\frac {2 x^2-x^4}{\left (1-x^2\right )^2}} \text {ArcTan}\left (\frac {\sqrt {x^2-2}}{2}\right )}{3 x \sqrt {x^2-2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[(-2*x^2 + x^4)/(-1 + x^2)^2]/(2 + x^2),x]

[Out]

(-2*(1 - x^2)*Sqrt[-((2*x^2 - x^4)/(1 - x^2)^2)]*ArcTan[Sqrt[-2 + x^2]/2])/(3*x*Sqrt[-2 + x^2]) + ((1 - x^2)*S
qrt[-((2*x^2 - x^4)/(1 - x^2)^2)]*ArcTan[Sqrt[-2 + x^2]])/(3*x*Sqrt[-2 + x^2])

Rule 65

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 85

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

Rule 209

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

Rule 585

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_))^(r_.), x
_Symbol] :> Dist[1/n, Subst[Int[(a + b*x)^p*(c + d*x)^q*(e + f*x)^r, x], x, x^n], x] /; FreeQ[{a, b, c, d, e,
f, m, n, p, q, r}, x] && EqQ[m - n + 1, 0]

Rule 2081

Int[(u_.)*(P_)^(p_.), x_Symbol] :> With[{m = MinimumMonomialExponent[P, x]}, Dist[P^FracPart[p]/(x^(m*FracPart
[p])*Distrib[1/x^m, P]^FracPart[p]), Int[u*x^(m*p)*Distrib[1/x^m, P]^p, x], x]] /; FreeQ[p, x] &&  !IntegerQ[p
] && SumQ[P] && EveryQ[BinomialQ[#1, x] & , P] &&  !PolyQ[P, x, 2]

Rule 6851

Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a*v^m*w^n)^FracPart[p]/(v^(m*Fr
acPart[p])*w^(n*FracPart[p]))), Int[u*v^(m*p)*w^(n*p), x], x] /; FreeQ[{a, m, n, p}, x] &&  !IntegerQ[p] &&  !
FreeQ[v, x] &&  !FreeQ[w, x]

Rubi steps

\begin {align*} \int \frac {\sqrt {\frac {-2 x^2+x^4}{\left (-1+x^2\right )^2}}}{2+x^2} \, dx &=\frac {\left (\left (-1+x^2\right ) \sqrt {\frac {-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \int \frac {\sqrt {-2 x^2+x^4}}{\left (-1+x^2\right ) \left (2+x^2\right )} \, dx}{\sqrt {-2 x^2+x^4}}\\ &=\frac {\left (\left (-1+x^2\right ) \sqrt {\frac {-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \int \frac {x \sqrt {-2+x^2}}{\left (-1+x^2\right ) \left (2+x^2\right )} \, dx}{x \sqrt {-2+x^2}}\\ &=\frac {\left (\left (-1+x^2\right ) \sqrt {\frac {-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \text {Subst}\left (\int \frac {\sqrt {-2+x}}{(-1+x) (2+x)} \, dx,x,x^2\right )}{2 x \sqrt {-2+x^2}}\\ &=-\frac {\left (\left (-1+x^2\right ) \sqrt {\frac {-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-2+x} (-1+x)} \, dx,x,x^2\right )}{6 x \sqrt {-2+x^2}}+\frac {\left (2 \left (-1+x^2\right ) \sqrt {\frac {-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-2+x} (2+x)} \, dx,x,x^2\right )}{3 x \sqrt {-2+x^2}}\\ &=-\frac {\left (\left (-1+x^2\right ) \sqrt {\frac {-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}}+\frac {\left (4 \left (-1+x^2\right ) \sqrt {\frac {-2 x^2+x^4}{\left (-1+x^2\right )^2}}\right ) \text {Subst}\left (\int \frac {1}{4+x^2} \, dx,x,\sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}}\\ &=-\frac {2 \left (1-x^2\right ) \sqrt {-\frac {2 x^2-x^4}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\frac {1}{2} \sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}}+\frac {\left (1-x^2\right ) \sqrt {-\frac {2 x^2-x^4}{\left (1-x^2\right )^2}} \tan ^{-1}\left (\sqrt {-2+x^2}\right )}{3 x \sqrt {-2+x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 70, normalized size = 0.57 \begin {gather*} \frac {\sqrt {\frac {x^2 \left (-2+x^2\right )}{\left (-1+x^2\right )^2}} \left (-1+x^2\right ) \left (2 \tan ^{-1}\left (\frac {1}{2} \sqrt {-2+x^2}\right )-\tan ^{-1}\left (\sqrt {-2+x^2}\right )\right )}{3 x \sqrt {-2+x^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[(-2*x^2 + x^4)/(-1 + x^2)^2]/(2 + x^2),x]

[Out]

(Sqrt[(x^2*(-2 + x^2))/(-1 + x^2)^2]*(-1 + x^2)*(2*ArcTan[Sqrt[-2 + x^2]/2] - ArcTan[Sqrt[-2 + x^2]]))/(3*x*Sq
rt[-2 + x^2])

________________________________________________________________________________________

Maple [A]
time = 0.23, size = 75, normalized size = 0.61

method result size
default \(-\frac {\sqrt {\frac {x^{2} \left (x^{2}-2\right )}{\left (x^{2}-1\right )^{2}}}\, \left (x^{2}-1\right ) \left (\arctan \left (\frac {x -2}{\sqrt {x^{2}-2}}\right )-\arctan \left (\frac {x +2}{\sqrt {x^{2}-2}}\right )-4 \arctan \left (\frac {\sqrt {x^{2}-2}}{2}\right )\right )}{6 x \sqrt {x^{2}-2}}\) \(75\)
trager \(\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) x^{7}-6 \sqrt {-\frac {-x^{4}+2 x^{2}}{x^{4}-2 x^{2}+1}}\, x^{6}-15 \RootOf \left (\textit {\_Z}^{2}+1\right ) x^{5}+22 x^{4} \sqrt {-\frac {-x^{4}+2 x^{2}}{x^{4}-2 x^{2}+1}}+24 \RootOf \left (\textit {\_Z}^{2}+1\right ) x^{3}-24 x^{2} \sqrt {-\frac {-x^{4}+2 x^{2}}{x^{4}-2 x^{2}+1}}-12 x \RootOf \left (\textit {\_Z}^{2}+1\right )+8 \sqrt {-\frac {-x^{4}+2 x^{2}}{x^{4}-2 x^{2}+1}}}{x \left (1+x \right ) \left (-1+x \right ) \left (x^{2}+2\right )^{2}}\right )}{6}\) \(199\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^4-2*x^2)/(x^2-1)^2)^(1/2)/(x^2+2),x,method=_RETURNVERBOSE)

[Out]

-1/6*(x^2*(x^2-2)/(x^2-1)^2)^(1/2)*(x^2-1)*(arctan((x-2)/(x^2-2)^(1/2))-arctan((x+2)/(x^2-2)^(1/2))-4*arctan(1
/2*(x^2-2)^(1/2)))/x/(x^2-2)^(1/2)

________________________________________________________________________________________

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^4-2*x^2)/(x^2-1)^2)^(1/2)/(x^2+2),x, algorithm="maxima")

[Out]

integrate(sqrt((x^4 - 2*x^2)/(x^2 - 1)^2)/(x^2 + 2), x)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 74, normalized size = 0.60 \begin {gather*} -\frac {1}{3} \, \arctan \left (\frac {{\left (x^{2} - 1\right )} \sqrt {\frac {x^{4} - 2 \, x^{2}}{x^{4} - 2 \, x^{2} + 1}}}{x}\right ) + \frac {2}{3} \, \arctan \left (\frac {{\left (x^{2} - 1\right )} \sqrt {\frac {x^{4} - 2 \, x^{2}}{x^{4} - 2 \, x^{2} + 1}}}{2 \, x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*arctan((x^2 - 1)*sqrt((x^4 - 2*x^2)/(x^4 - 2*x^2 + 1))/x) + 2/3*arctan(1/2*(x^2 - 1)*sqrt((x^4 - 2*x^2)/(
x^4 - 2*x^2 + 1))/x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {\frac {x^{2} \left (x^{2} - 2\right )}{x^{4} - 2 x^{2} + 1}}}{x^{2} + 2}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**4-2*x**2)/(x**2-1)**2)**(1/2)/(x**2+2),x)

[Out]

Integral(sqrt(x**2*(x**2 - 2)/(x**4 - 2*x**2 + 1))/(x**2 + 2), x)

________________________________________________________________________________________

Giac [A]
time = 3.27, size = 39, normalized size = 0.32 \begin {gather*} \frac {2}{3} \, \arctan \left (\frac {1}{2} \, \sqrt {x^{2} - 2}\right ) \mathrm {sgn}\left (x^{3} - x\right ) - \frac {1}{3} \, \arctan \left (\sqrt {x^{2} - 2}\right ) \mathrm {sgn}\left (x^{3} - x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/3*arctan(1/2*sqrt(x^2 - 2))*sgn(x^3 - x) - 1/3*arctan(sqrt(x^2 - 2))*sgn(x^3 - x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-(2*x^2 - x^4)/(x^2 - 1)^2)^(1/2)/(x^2 + 2),x)

[Out]

int((-(2*x^2 - x^4)/(x^2 - 1)^2)^(1/2)/(x^2 + 2), x)

________________________________________________________________________________________