Integrand size = 20, antiderivative size = 65 \[ \int \frac {\sqrt {-1-x+x^2}}{1-x} \, dx=-\sqrt {-1-x+x^2}-\arctan \left (\frac {3-x}{2 \sqrt {-1-x+x^2}}\right )+\frac {1}{2} \text {arctanh}\left (\frac {1-2 x}{2 \sqrt {-1-x+x^2}}\right ) \] Output:
-(x^2-x-1)^(1/2)-arctan(1/2*(3-x)/(x^2-x-1)^(1/2))+1/2*arctanh(1/2*(1-2*x) /(x^2-x-1)^(1/2))
Time = 0.10 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.91 \[ \int \frac {\sqrt {-1-x+x^2}}{1-x} \, dx=-\sqrt {-1-x+x^2}+2 \arctan \left (1-x+\sqrt {-1-x+x^2}\right )+\frac {1}{2} \log \left (1-2 x+2 \sqrt {-1-x+x^2}\right ) \] Input:
Integrate[Sqrt[-1 - x + x^2]/(1 - x),x]
Output:
-Sqrt[-1 - x + x^2] + 2*ArcTan[1 - x + Sqrt[-1 - x + x^2]] + Log[1 - 2*x + 2*Sqrt[-1 - x + x^2]]/2
Time = 0.24 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.02, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {1162, 25, 1269, 1092, 219, 1154, 217}
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 {\sqrt {x^2-x-1}}{1-x} \, dx\) |
\(\Big \downarrow \) 1162 |
\(\displaystyle \frac {1}{2} \int -\frac {3-x}{(1-x) \sqrt {x^2-x-1}}dx-\sqrt {x^2-x-1}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {1}{2} \int \frac {3-x}{(1-x) \sqrt {x^2-x-1}}dx-\sqrt {x^2-x-1}\) |
\(\Big \downarrow \) 1269 |
\(\displaystyle \frac {1}{2} \left (-\int \frac {1}{\sqrt {x^2-x-1}}dx-2 \int \frac {1}{(1-x) \sqrt {x^2-x-1}}dx\right )-\sqrt {x^2-x-1}\) |
\(\Big \downarrow \) 1092 |
\(\displaystyle \frac {1}{2} \left (-2 \int \frac {1}{(1-x) \sqrt {x^2-x-1}}dx-2 \int \frac {1}{4-\frac {(1-2 x)^2}{x^2-x-1}}d\left (-\frac {1-2 x}{\sqrt {x^2-x-1}}\right )\right )-\sqrt {x^2-x-1}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {1}{2} \left (\text {arctanh}\left (\frac {1-2 x}{2 \sqrt {x^2-x-1}}\right )-2 \int \frac {1}{(1-x) \sqrt {x^2-x-1}}dx\right )-\sqrt {x^2-x-1}\) |
\(\Big \downarrow \) 1154 |
\(\displaystyle \frac {1}{2} \left (4 \int \frac {1}{-\frac {(3-x)^2}{x^2-x-1}-4}d\frac {3-x}{\sqrt {x^2-x-1}}+\text {arctanh}\left (\frac {1-2 x}{2 \sqrt {x^2-x-1}}\right )\right )-\sqrt {x^2-x-1}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {1}{2} \left (\text {arctanh}\left (\frac {1-2 x}{2 \sqrt {x^2-x-1}}\right )-2 \arctan \left (\frac {3-x}{2 \sqrt {x^2-x-1}}\right )\right )-\sqrt {x^2-x-1}\) |
Input:
Int[Sqrt[-1 - x + x^2]/(1 - x),x]
Output:
-Sqrt[-1 - x + x^2] + (-2*ArcTan[(3 - x)/(2*Sqrt[-1 - x + x^2])] + ArcTanh [(1 - 2*x)/(2*Sqrt[-1 - x + x^2])])/2
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[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2 Subst[I nt[1/(4*c - x^2), x], x, (b + 2*c*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a , b, c}, x]
Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Sym bol] :> Simp[-2 Subst[Int[1/(4*c*d^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, ( 2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c , d, e}, x]
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S ymbol] :> Simp[(d + e*x)^(m + 1)*((a + b*x + c*x^2)^p/(e*(m + 2*p + 1))), x ] - Simp[p/(e*(m + 2*p + 1)) Int[(d + e*x)^m*Simp[b*d - 2*a*e + (2*c*d - b*e)*x, x]*(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c, d, e, m}, x ] && GtQ[p, 0] && NeQ[m + 2*p + 1, 0] && ( !RationalQ[m] || LtQ[m, 1]) && !ILtQ[m + 2*p, 0] && IntQuadraticQ[a, b, c, d, e, m, p, x]
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c _.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g/e Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Simp[(e*f - d*g)/e Int[(d + e*x)^m*(a + b*x + c*x^2)^ p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && !IGtQ[m, 0]
Time = 0.86 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.71
method | result | size |
default | \(-\sqrt {\left (x -1\right )^{2}+x -2}-\frac {\ln \left (-\frac {1}{2}+x +\sqrt {\left (x -1\right )^{2}+x -2}\right )}{2}+\arctan \left (\frac {-3+x}{2 \sqrt {\left (x -1\right )^{2}+x -2}}\right )\) | \(46\) |
risch | \(-\sqrt {x^{2}-x -1}-\frac {\ln \left (x -\frac {1}{2}+\sqrt {x^{2}-x -1}\right )}{2}+\arctan \left (\frac {-3+x}{2 \sqrt {\left (x -1\right )^{2}+x -2}}\right )\) | \(46\) |
trager | \(-\sqrt {x^{2}-x -1}-\frac {\ln \left (2 \sqrt {x^{2}-x -1}-1+2 x \right )}{2}+\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x -3 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right )-2 \sqrt {x^{2}-x -1}}{x -1}\right )\) | \(77\) |
Input:
int((x^2-x-1)^(1/2)/(1-x),x,method=_RETURNVERBOSE)
Output:
-((x-1)^2+x-2)^(1/2)-1/2*ln(-1/2+x+((x-1)^2+x-2)^(1/2))+arctan(1/2*(-3+x)/ ((x-1)^2+x-2)^(1/2))
Time = 0.09 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.78 \[ \int \frac {\sqrt {-1-x+x^2}}{1-x} \, dx=-\sqrt {x^{2} - x - 1} + 2 \, \arctan \left (-x + \sqrt {x^{2} - x - 1} + 1\right ) + \frac {1}{2} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} - x - 1} + 1\right ) \] Input:
integrate((x^2-x-1)^(1/2)/(1-x),x, algorithm="fricas")
Output:
-sqrt(x^2 - x - 1) + 2*arctan(-x + sqrt(x^2 - x - 1) + 1) + 1/2*log(-2*x + 2*sqrt(x^2 - x - 1) + 1)
\[ \int \frac {\sqrt {-1-x+x^2}}{1-x} \, dx=- \int \frac {\sqrt {x^{2} - x - 1}}{x - 1}\, dx \] Input:
integrate((x**2-x-1)**(1/2)/(1-x),x)
Output:
-Integral(sqrt(x**2 - x - 1)/(x - 1), x)
Time = 0.11 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.89 \[ \int \frac {\sqrt {-1-x+x^2}}{1-x} \, dx=-\sqrt {x^{2} - x - 1} + \arcsin \left (\frac {\sqrt {5} x}{5 \, {\left | x - 1 \right |}} - \frac {3 \, \sqrt {5}}{5 \, {\left | x - 1 \right |}}\right ) - \frac {1}{2} \, \log \left (2 \, x + 2 \, \sqrt {x^{2} - x - 1} - 1\right ) \] Input:
integrate((x^2-x-1)^(1/2)/(1-x),x, algorithm="maxima")
Output:
-sqrt(x^2 - x - 1) + arcsin(1/5*sqrt(5)*x/abs(x - 1) - 3/5*sqrt(5)/abs(x - 1)) - 1/2*log(2*x + 2*sqrt(x^2 - x - 1) - 1)
Time = 0.19 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.80 \[ \int \frac {\sqrt {-1-x+x^2}}{1-x} \, dx=-\sqrt {x^{2} - x - 1} + 2 \, \arctan \left (-x + \sqrt {x^{2} - x - 1} + 1\right ) + \frac {1}{2} \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} - x - 1} + 1 \right |}\right ) \] Input:
integrate((x^2-x-1)^(1/2)/(1-x),x, algorithm="giac")
Output:
-sqrt(x^2 - x - 1) + 2*arctan(-x + sqrt(x^2 - x - 1) + 1) + 1/2*log(abs(-2 *x + 2*sqrt(x^2 - x - 1) + 1))
Timed out. \[ \int \frac {\sqrt {-1-x+x^2}}{1-x} \, dx=-\int \frac {\sqrt {x^2-x-1}}{x-1} \,d x \] Input:
int(-(x^2 - x - 1)^(1/2)/(x - 1),x)
Output:
-int((x^2 - x - 1)^(1/2)/(x - 1), x)
Time = 0.58 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.78 \[ \int \frac {\sqrt {-1-x+x^2}}{1-x} \, dx=2 \mathit {atan} \left (\sqrt {x^{2}-x -1}+x -1\right )-\sqrt {x^{2}-x -1}-\frac {\mathrm {log}\left (\frac {2 \sqrt {x^{2}-x -1}+2 x -1}{\sqrt {5}}\right )}{2} \] Input:
int((x^2-x-1)^(1/2)/(1-x),x)
Output:
(4*atan(sqrt(x**2 - x - 1) + x - 1) - 2*sqrt(x**2 - x - 1) - log((2*sqrt(x **2 - x - 1) + 2*x - 1)/sqrt(5)))/2