Integrand size = 19, antiderivative size = 122 \[ \int \frac {\frac {1}{x}+x}{\sqrt {(-2+x) (1+x)^3}} \, dx=-\frac {4 (-2+x) (1+x)}{3 \sqrt {(-2+x) (1+x)^3}}+\frac {2 \sqrt {-2+x} (1+x)^{3/2} \text {arcsinh}\left (\frac {\sqrt {-2+x}}{\sqrt {3}}\right )}{\sqrt {(-2+x) (1+x)^3}}-\frac {\sqrt {2} \sqrt {-2+x} (1+x)^{3/2} \arctan \left (\frac {\sqrt {2} \sqrt {1+x}}{\sqrt {-2+x}}\right )}{\sqrt {(-2+x) (1+x)^3}} \]
-4/3*(-2+x)*(1+x)/((-2+x)*(1+x)^3)^(1/2)+2*(1+x)^(3/2)*arcsinh(1/3*(-2+x)^ (1/2)*3^(1/2))*(-2+x)^(1/2)/((-2+x)*(1+x)^3)^(1/2)-(1+x)^(3/2)*arctan(2^(1 /2)*(1+x)^(1/2)/(-2+x)^(1/2))*2^(1/2)*(-2+x)^(1/2)/((-2+x)*(1+x)^3)^(1/2)
Time = 0.12 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.79 \[ \int \frac {\frac {1}{x}+x}{\sqrt {(-2+x) (1+x)^3}} \, dx=-\frac {(1+x) \left (-8+4 x-3 \sqrt {2} \sqrt {-2+x} \sqrt {1+x} \arctan \left (\frac {\sqrt {\frac {-2+x}{1+x}}}{\sqrt {2}}\right )-6 \sqrt {-2+x} \sqrt {1+x} \text {arctanh}\left (\sqrt {\frac {-2+x}{1+x}}\right )\right )}{3 \sqrt {(-2+x) (1+x)^3}} \]
-1/3*((1 + x)*(-8 + 4*x - 3*Sqrt[2]*Sqrt[-2 + x]*Sqrt[1 + x]*ArcTan[Sqrt[( -2 + x)/(1 + x)]/Sqrt[2]] - 6*Sqrt[-2 + x]*Sqrt[1 + x]*ArcTanh[Sqrt[(-2 + x)/(1 + x)]]))/Sqrt[(-2 + x)*(1 + x)^3]
Time = 0.49 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.77, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.474, Rules used = {2027, 7270, 2117, 27, 140, 64, 104, 217, 222}
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 {x+\frac {1}{x}}{\sqrt {(x-2) (x+1)^3}} \, dx\) |
\(\Big \downarrow \) 2027 |
\(\displaystyle \int \frac {x^2+1}{x \sqrt {(x-2) (x+1)^3}}dx\) |
\(\Big \downarrow \) 7270 |
\(\displaystyle \frac {\sqrt {x-2} (x+1)^{3/2} \int \frac {x^2+1}{\sqrt {x-2} x (x+1)^{3/2}}dx}{\sqrt {-\left ((2-x) (x+1)^3\right )}}\) |
\(\Big \downarrow \) 2117 |
\(\displaystyle \frac {\sqrt {x-2} (x+1)^{3/2} \left (-\frac {2}{3} \int -\frac {3 \sqrt {x+1}}{2 \sqrt {x-2} x}dx-\frac {4 \sqrt {x-2}}{3 \sqrt {x+1}}\right )}{\sqrt {-\left ((2-x) (x+1)^3\right )}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\sqrt {x-2} (x+1)^{3/2} \left (\int \frac {\sqrt {x+1}}{\sqrt {x-2} x}dx-\frac {4 \sqrt {x-2}}{3 \sqrt {x+1}}\right )}{\sqrt {-\left ((2-x) (x+1)^3\right )}}\) |
\(\Big \downarrow \) 140 |
\(\displaystyle \frac {\sqrt {x-2} (x+1)^{3/2} \left (\int \frac {1}{\sqrt {x-2} \sqrt {x+1}}dx+\int \frac {1}{\sqrt {x-2} x \sqrt {x+1}}dx-\frac {4 \sqrt {x-2}}{3 \sqrt {x+1}}\right )}{\sqrt {-\left ((2-x) (x+1)^3\right )}}\) |
\(\Big \downarrow \) 64 |
\(\displaystyle \frac {\sqrt {x-2} (x+1)^{3/2} \left (2 \int \frac {1}{\sqrt {x+1}}d\sqrt {x-2}+\int \frac {1}{\sqrt {x-2} x \sqrt {x+1}}dx-\frac {4 \sqrt {x-2}}{3 \sqrt {x+1}}\right )}{\sqrt {-\left ((2-x) (x+1)^3\right )}}\) |
\(\Big \downarrow \) 104 |
\(\displaystyle \frac {\sqrt {x-2} (x+1)^{3/2} \left (2 \int \frac {1}{\sqrt {x+1}}d\sqrt {x-2}+2 \int \frac {1}{-\frac {2 (x+1)}{x-2}-1}d\frac {\sqrt {x+1}}{\sqrt {x-2}}-\frac {4 \sqrt {x-2}}{3 \sqrt {x+1}}\right )}{\sqrt {-\left ((2-x) (x+1)^3\right )}}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {\sqrt {x-2} (x+1)^{3/2} \left (2 \int \frac {1}{\sqrt {x+1}}d\sqrt {x-2}-\sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {x+1}}{\sqrt {x-2}}\right )-\frac {4 \sqrt {x-2}}{3 \sqrt {x+1}}\right )}{\sqrt {-\left ((2-x) (x+1)^3\right )}}\) |
\(\Big \downarrow \) 222 |
\(\displaystyle \frac {\sqrt {x-2} (x+1)^{3/2} \left (2 \text {arcsinh}\left (\frac {\sqrt {x-2}}{\sqrt {3}}\right )-\sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {x+1}}{\sqrt {x-2}}\right )-\frac {4 \sqrt {x-2}}{3 \sqrt {x+1}}\right )}{\sqrt {-\left ((2-x) (x+1)^3\right )}}\) |
(Sqrt[-2 + x]*(1 + x)^(3/2)*((-4*Sqrt[-2 + x])/(3*Sqrt[1 + x]) + 2*ArcSinh [Sqrt[-2 + x]/Sqrt[3]] - Sqrt[2]*ArcTan[(Sqrt[2]*Sqrt[1 + x])/Sqrt[-2 + x] ]))/Sqrt[-((2 - x)*(1 + x)^3)]
3.3.27.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp [2/b Subst[Int[1/Sqrt[c - a*(d/b) + d*(x^2/b)], x], x, Sqrt[a + b*x]], x] /; FreeQ[{a, b, c, d}, x] && GtQ[c - a*(d/b), 0] && ( !GtQ[a - c*(b/d), 0] || PosQ[b])
Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x _)), x_] :> With[{q = Denominator[m]}, Simp[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] && L tQ[-1, m, 0] && SimplerQ[a + b*x, c + d*x]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Simp[b*d^(m + n)*f^p Int[(a + b*x)^(m - 1)/(c + d*x)^m, x] , x] + Int[(a + b*x)^(m - 1)*((e + f*x)^p/(c + d*x)^m)*ExpandToSum[(a + b*x )*(c + d*x)^(-p - 1) - (b*d^(-p - 1)*f^p)/(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && EqQ[m + n + p + 1, 0] && ILtQ[p, 0] && (GtQ[m, 0] || SumSimplerQ[m, -1] || !(GtQ[n, 0] || SumSimplerQ[n, -1]))
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
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]
Int[(Fx_.)*((a_.)*(x_)^(r_.) + (b_.)*(x_)^(s_.))^(p_.), x_Symbol] :> Int[x^ (p*r)*(a + b*x^(s - r))^p*Fx, x] /; FreeQ[{a, b, r, s}, x] && IntegerQ[p] & & PosQ[s - r] && !(EqQ[p, 1] && EqQ[u, 1])
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] + Si mp[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]
Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Simp[a^IntPart[p ]*((a*v^m*w^n)^FracPart[p]/(v^(m*FracPart[p])*w^(n*FracPart[p]))) Int[u*v ^(m*p)*w^(n*p), x], x] /; FreeQ[{a, m, n, p}, x] && !IntegerQ[p] && !Free Q[v, x] && !FreeQ[w, x]
Time = 0.76 (sec) , antiderivative size = 86, normalized size of antiderivative = 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 (x -\frac {1}{2}+\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 +3 \sqrt {2}\, \arctan \left (\frac {\left (4+x \right ) \sqrt {2}}{4 \sqrt {x^{2}-x -2}}\right )-6 \ln \left (x -\frac {1}{2}+\sqrt {x^{2}-x -2}\right ) x -6 \ln \left (x -\frac {1}{2}+\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}}-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) \ln \left (-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x^{2}+5 \operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x +4 \operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right )-4 \sqrt {x^{4}+x^{3}-3 x^{2}-5 x -2}}{x \left (1+x \right )}\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 )\) | \(133\) |
-4/3*(-2+x)*(1+x)/((-2+x)*(1+x)^3)^(1/2)+(ln(x-1/2+(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)
Time = 0.25 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.16 \[ \int \frac {\frac {1}{x}+x}{\sqrt {(-2+x) (1+x)^3}} \, dx=\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 )}} \]
1/3*(3*sqrt(2)*(x^2 + 2*x + 1)*arctan(-1/2*(sqrt(2)*(x^2 + x) - sqrt(2)*sq rt(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)
\[ \int \frac {\frac {1}{x}+x}{\sqrt {(-2+x) (1+x)^3}} \, dx=\int \frac {x^{2} + 1}{x \sqrt {\left (x - 2\right ) \left (x + 1\right )^{3}}}\, dx \]
\[ \int \frac {\frac {1}{x}+x}{\sqrt {(-2+x) (1+x)^3}} \, dx=\int { \frac {x + \frac {1}{x}}{\sqrt {{\left (x + 1\right )}^{3} {\left (x - 2\right )}}} \,d x } \]
Time = 0.34 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.68 \[ \int \frac {\frac {1}{x}+x}{\sqrt {(-2+x) (1+x)^3}} \, dx=\frac {\sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (x - \sqrt {x^{2} - x - 2}\right )}\right )}{\mathrm {sgn}\left (x + 1\right )} - \frac {\log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} - x - 2} + 1 \right |}\right )}{\mathrm {sgn}\left (x + 1\right )} - \frac {4}{{\left (x - \sqrt {x^{2} - x - 2} + 1\right )} \mathrm {sgn}\left (x + 1\right )} \]
sqrt(2)*arctan(-1/2*sqrt(2)*(x - sqrt(x^2 - x - 2)))/sgn(x + 1) - log(abs( -2*x + 2*sqrt(x^2 - x - 2) + 1))/sgn(x + 1) - 4/((x - sqrt(x^2 - x - 2) + 1)*sgn(x + 1))
Timed out. \[ \int \frac {\frac {1}{x}+x}{\sqrt {(-2+x) (1+x)^3}} \, dx=\int \frac {x+\frac {1}{x}}{\sqrt {{\left (x+1\right )}^3\,\left (x-2\right )}} \,d x \]
\[ \int \frac {\frac {1}{x}+x}{\sqrt {(-2+x) (1+x)^3}} \, dx=\int \frac {x}{\sqrt {x^{2}-x -2}\, {| x +1|}}d x +\int \frac {1}{\sqrt {x^{2}-x -2}\, {| x +1|} x}d x \]