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

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

________________________________________________________________________________________

Rubi [A]  time = 0.35, antiderivative size = 133, normalized size of antiderivative = 1.09, number of steps used = 9, number of rules used = 9, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.474, Rules used = {1593, 6719, 1614, 21, 105, 54, 215, 93, 204} \[ \frac {4 (2-x) (x+1)}{3 \sqrt {-(2-x) (x+1)^3}}-\frac {\sqrt {2} \sqrt {x-2} (x+1)^{3/2} \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {x+1}}{\sqrt {x-2}}\right )}{\sqrt {-(2-x) (x+1)^3}}+\frac {2 \sqrt {x-2} (x+1)^{3/2} \sinh ^{-1}\left (\frac {\sqrt {x-2}}{\sqrt {3}}\right )}{\sqrt {-(2-x) (x+1)^3}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 54

Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Dist[2/Sqrt[b], Subst[Int[1/Sqrt[b*c -
 a*d + d*x^2], x], x, Sqrt[a + b*x]], x] /; FreeQ[{a, b, c, d}, x] && GtQ[b*c - a*d, 0] && GtQ[b, 0]

Rule 93

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 105

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> Dist[b/f, Int[(a
+ b*x)^(m - 1)*(c + d*x)^n, x], x] - Dist[(b*e - a*f)/f, Int[((a + b*x)^(m - 1)*(c + d*x)^n)/(e + f*x), x], x]
 /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[Simplify[m + n + 1], 0] && (GtQ[m, 0] || ( !RationalQ[m] && (Su
mSimplerQ[m, -1] ||  !SumSimplerQ[n, -1])))

Rule 204

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

Rule 215

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

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1614

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> With[{
Qx = PolynomialQuotient[Px, a + b*x, x], R = PolynomialRemainder[Px, a + b*x, x]}, Simp[(b*R*(a + b*x)^(m + 1)
*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/((m + 1)*(b*c - a*d)*(b*e - a*f)), x] + Dist[1/((m + 1)*(b*c - a*d)*(b*e
 - a*f)), Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*ExpandToSum[(m + 1)*(b*c - a*d)*(b*e - a*f)*Qx + a*d*f
*R*(m + 1) - b*R*(d*e*(m + n + 2) + c*f*(m + p + 2)) - b*d*f*R*(m + n + p + 3)*x, x], x], x]] /; FreeQ[{a, b,
c, d, e, f, n, p}, x] && PolyQ[Px, x] && LtQ[m, -1] && IntegersQ[2*m, 2*n, 2*p]

Rule 6719

Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a*v^m*w^n)^FracPart[p])/(v^(m*F
racPart[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 {\frac {1}{x}+x}{\sqrt {(-2+x) (1+x)^3}} \, dx &=\int \frac {1+x^2}{x \sqrt {(-2+x) (1+x)^3}} \, dx\\ &=\frac {\left (\sqrt {-2+x} (1+x)^{3/2}\right ) \int \frac {1+x^2}{\sqrt {-2+x} x (1+x)^{3/2}} \, dx}{\sqrt {(-2+x) (1+x)^3}}\\ &=\frac {4 (2-x) (1+x)}{3 \sqrt {-(2-x) (1+x)^3}}-\frac {\left (2 \sqrt {-2+x} (1+x)^{3/2}\right ) \int \frac {-\frac {3}{2}-\frac {3 x}{2}}{\sqrt {-2+x} x \sqrt {1+x}} \, dx}{3 \sqrt {(-2+x) (1+x)^3}}\\ &=\frac {4 (2-x) (1+x)}{3 \sqrt {-(2-x) (1+x)^3}}+\frac {\left (\sqrt {-2+x} (1+x)^{3/2}\right ) \int \frac {\sqrt {1+x}}{\sqrt {-2+x} x} \, dx}{\sqrt {(-2+x) (1+x)^3}}\\ &=\frac {4 (2-x) (1+x)}{3 \sqrt {-(2-x) (1+x)^3}}+\frac {\left (\sqrt {-2+x} (1+x)^{3/2}\right ) \int \frac {1}{\sqrt {-2+x} \sqrt {1+x}} \, dx}{\sqrt {(-2+x) (1+x)^3}}+\frac {\left (\sqrt {-2+x} (1+x)^{3/2}\right ) \int \frac {1}{\sqrt {-2+x} x \sqrt {1+x}} \, dx}{\sqrt {(-2+x) (1+x)^3}}\\ &=\frac {4 (2-x) (1+x)}{3 \sqrt {-(2-x) (1+x)^3}}+\frac {\left (2 \sqrt {-2+x} (1+x)^{3/2}\right ) \operatorname {Subst}\left (\int \frac {1}{-1-2 x^2} \, dx,x,\frac {\sqrt {1+x}}{\sqrt {-2+x}}\right )}{\sqrt {(-2+x) (1+x)^3}}+\frac {\left (2 \sqrt {-2+x} (1+x)^{3/2}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {3+x^2}} \, dx,x,\sqrt {-2+x}\right )}{\sqrt {(-2+x) (1+x)^3}}\\ &=\frac {4 (2-x) (1+x)}{3 \sqrt {-(2-x) (1+x)^3}}+\frac {2 \sqrt {-2+x} (1+x)^{3/2} \sinh ^{-1}\left (\frac {\sqrt {-2+x}}{\sqrt {3}}\right )}{\sqrt {-(2-x) (1+x)^3}}-\frac {\sqrt {2} \sqrt {-2+x} (1+x)^{3/2} \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {1+x}}{\sqrt {-2+x}}\right )}{\sqrt {-(2-x) (1+x)^3}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.15, size = 114, normalized size = 0.93 \[ -\frac {(x+1) \left (-4 (2-x)^{3/2}-6 (x-2) \sqrt {x+1} \sin ^{-1}\left (\frac {\sqrt {2-x}}{\sqrt {3}}\right )-3 \sqrt {2} \sqrt {-(x-2)^2} \sqrt {x+1} \tan ^{-1}\left (\frac {\sqrt {\frac {x-2}{x+1}}}{\sqrt {2}}\right )\right )}{3 \sqrt {2-x} \sqrt {(x-2) (x+1)^3}} \]

Warning: Unable to verify antiderivative.

[In]

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

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.37, size = 97, normalized size = 0.80 \[ -\frac {4 \sqrt {x^4+x^3-3 x^2-5 x-2}}{3 (x+1)^2}+\sqrt {2} \tan ^{-1}\left (\frac {\sqrt {x^4+x^3-3 x^2-5 x-2}}{\sqrt {2} (x+1)^2}\right )+2 \tanh ^{-1}\left (\frac {\sqrt {x^4+x^3-3 x^2-5 x-2}}{(x+1)^2}\right ) \]

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(x^(-1) + x)/Sqrt[(-2 + x)*(1 + x)^3],x]

[Out]

(-4*Sqrt[-2 - 5*x - 3*x^2 + x^3 + x^4])/(3*(1 + x)^2) + Sqrt[2]*ArcTan[Sqrt[-2 - 5*x - 3*x^2 + x^3 + x^4]/(Sqr
t[2]*(1 + x)^2)] + 2*ArcTanh[Sqrt[-2 - 5*x - 3*x^2 + x^3 + x^4]/(1 + x)^2]

________________________________________________________________________________________

fricas [A]  time = 0.79, size = 142, normalized size = 1.16 \[ \frac {3 \, \sqrt {2} {\left (x^{2} + 2 \, x + 1\right )} \arctan \left (-\frac {\sqrt {2} {\left (x^{2} + x\right )} - \sqrt {2} \sqrt {x^{4} + x^{3} - 3 \, x^{2} - 5 \, x - 2}}{2 \, {\left (x + 1\right )}}\right ) - 4 \, x^{2} - 3 \, {\left (x^{2} + 2 \, x + 1\right )} \log \left (-\frac {2 \, x^{2} + x - 2 \, \sqrt {x^{4} + x^{3} - 3 \, x^{2} - 5 \, x - 2} - 1}{x + 1}\right ) - 8 \, x - 4 \, \sqrt {x^{4} + x^{3} - 3 \, x^{2} - 5 \, x - 2} - 4}{3 \, {\left (x^{2} + 2 \, x + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.83, size = 177, normalized size = 1.45 \[ -\frac {\sqrt {2} \arcsin \left (\frac {4}{3 \, x} + \frac {1}{3}\right )}{2 \, \mathrm {sgn}\left (\frac {1}{x^{2}} + \frac {1}{x^{3}}\right )} + \frac {\log \left ({\left | 2 \, \sqrt {2} + \frac {2 \, \sqrt {2} \sqrt {-\frac {1}{x} - \frac {2}{x^{2}} + 1} - 3}{\frac {4}{x} + 1} + 3 \right |}\right )}{\mathrm {sgn}\left (\frac {1}{x^{2}} + \frac {1}{x^{3}}\right )} - \frac {\log \left ({\left | -2 \, \sqrt {2} + \frac {2 \, \sqrt {2} \sqrt {-\frac {1}{x} - \frac {2}{x^{2}} + 1} - 3}{\frac {4}{x} + 1} + 3 \right |}\right )}{\mathrm {sgn}\left (\frac {1}{x^{2}} + \frac {1}{x^{3}}\right )} + \frac {8 \, \sqrt {2}}{3 \, {\left (\frac {2 \, \sqrt {2} \sqrt {-\frac {1}{x} - \frac {2}{x^{2}} + 1} - 3}{\frac {4}{x} + 1} - 1\right )} \mathrm {sgn}\left (\frac {1}{x^{2}} + \frac {1}{x^{3}}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*sqrt(2)*arcsin(4/3/x + 1/3)/sgn(1/x^2 + 1/x^3) + log(abs(2*sqrt(2) + (2*sqrt(2)*sqrt(-1/x - 2/x^2 + 1) -
3)/(4/x + 1) + 3))/sgn(1/x^2 + 1/x^3) - log(abs(-2*sqrt(2) + (2*sqrt(2)*sqrt(-1/x - 2/x^2 + 1) - 3)/(4/x + 1)
+ 3))/sgn(1/x^2 + 1/x^3) + 8/3*sqrt(2)/(((2*sqrt(2)*sqrt(-1/x - 2/x^2 + 1) - 3)/(4/x + 1) - 1)*sgn(1/x^2 + 1/x
^3))

________________________________________________________________________________________

maple [A]  time = 0.24, size = 86, normalized size = 0.70




method result size



risch \(-\frac {4 \left (-2+x \right ) \left (1+x \right )}{3 \sqrt {\left (-2+x \right ) \left (1+x \right )^{3}}}+\frac {\left (\ln \left (-\frac {1}{2}+x +\sqrt {x^{2}-x -2}\right )+\frac {\sqrt {2}\, \arctan \left (\frac {\left (-4-x \right ) \sqrt {2}}{4 \sqrt {x^{2}-x -2}}\right )}{2}\right ) \left (1+x \right ) \sqrt {\left (1+x \right ) \left (-2+x \right )}}{\sqrt {\left (-2+x \right ) \left (1+x \right )^{3}}}\) \(86\)
default \(\frac {\left (-3 \sqrt {2}\, \arctan \left (\frac {\left (4+x \right ) \sqrt {2}}{4 \sqrt {x^{2}-x -2}}\right ) x +6 \ln \left (-\frac {1}{2}+x +\sqrt {x^{2}-x -2}\right ) x -3 \sqrt {2}\, \arctan \left (\frac {\left (4+x \right ) \sqrt {2}}{4 \sqrt {x^{2}-x -2}}\right )+6 \ln \left (-\frac {1}{2}+x +\sqrt {x^{2}-x -2}\right )-8 \sqrt {x^{2}-x -2}\right ) \sqrt {\left (1+x \right ) \left (-2+x \right )}}{6 \sqrt {\left (-2+x \right ) \left (1+x \right )^{3}}}\) \(118\)
trager \(-\frac {4 \sqrt {x^{4}+x^{3}-3 x^{2}-5 x -2}}{3 \left (1+x \right )^{2}}+\ln \left (\frac {2 x^{2}+2 \sqrt {x^{4}+x^{3}-3 x^{2}-5 x -2}+x -1}{1+x}\right )+\frac {\RootOf \left (\textit {\_Z}^{2}+2\right ) \ln \left (\frac {\RootOf \left (\textit {\_Z}^{2}+2\right ) x^{2}+5 \RootOf \left (\textit {\_Z}^{2}+2\right ) x +4 \sqrt {x^{4}+x^{3}-3 x^{2}-5 x -2}+4 \RootOf \left (\textit {\_Z}^{2}+2\right )}{x \left (1+x \right )}\right )}{2}\) \(128\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x + \frac {1}{x}}{\sqrt {{\left (x + 1\right )}^{3} {\left (x - 2\right )}}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {x+\frac {1}{x}}{\sqrt {{\left (x+1\right )}^3\,\left (x-2\right )}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x^{2} + 1}{x \sqrt {\left (x - 2\right ) \left (x + 1\right )^{3}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________