Integrand size = 19, antiderivative size = 65 \[ \int \frac {x}{x-\sqrt {1-x^2}} \, dx=\frac {x}{2}+\frac {\sqrt {1-x^2}}{2}-\frac {\text {arctanh}\left (\sqrt {2} x\right )}{2 \sqrt {2}}-\frac {\text {arctanh}\left (\sqrt {2} \sqrt {1-x^2}\right )}{2 \sqrt {2}} \] Output:
1/2*x+1/2*(-x^2+1)^(1/2)-1/4*arctanh(x*2^(1/2))*2^(1/2)-1/4*arctanh(2^(1/2 )*(-x^2+1)^(1/2))*2^(1/2)
Time = 0.20 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.75 \[ \int \frac {x}{x-\sqrt {1-x^2}} \, dx=\frac {1}{2} \left (x+\sqrt {1-x^2}+\sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} x}{-1-x+\sqrt {1-x^2}}\right )\right ) \] Input:
Integrate[x/(x - Sqrt[1 - x^2]),x]
Output:
(x + Sqrt[1 - x^2] + Sqrt[2]*ArcTanh[(Sqrt[2]*x)/(-1 - x + Sqrt[1 - x^2])] )/2
Time = 0.36 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.98, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {2532, 262, 219, 353, 60, 73, 220}
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}{x-\sqrt {1-x^2}} \, dx\) |
\(\Big \downarrow \) 2532 |
\(\displaystyle -\int \frac {x^2}{1-2 x^2}dx-\int \frac {x \sqrt {1-x^2}}{1-2 x^2}dx\) |
\(\Big \downarrow \) 262 |
\(\displaystyle -\frac {1}{2} \int \frac {1}{1-2 x^2}dx-\int \frac {x \sqrt {1-x^2}}{1-2 x^2}dx+\frac {x}{2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\int \frac {x \sqrt {1-x^2}}{1-2 x^2}dx-\frac {\text {arctanh}\left (\sqrt {2} x\right )}{2 \sqrt {2}}+\frac {x}{2}\) |
\(\Big \downarrow \) 353 |
\(\displaystyle -\frac {1}{2} \int \frac {\sqrt {1-x^2}}{1-2 x^2}dx^2-\frac {\text {arctanh}\left (\sqrt {2} x\right )}{2 \sqrt {2}}+\frac {x}{2}\) |
\(\Big \downarrow \) 60 |
\(\displaystyle \frac {1}{2} \left (\sqrt {1-x^2}-\frac {1}{2} \int \frac {1}{\left (1-2 x^2\right ) \sqrt {1-x^2}}dx^2\right )-\frac {\text {arctanh}\left (\sqrt {2} x\right )}{2 \sqrt {2}}+\frac {x}{2}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle \frac {1}{2} \left (\int \frac {1}{2 x^4-1}d\sqrt {1-x^2}+\sqrt {1-x^2}\right )-\frac {\text {arctanh}\left (\sqrt {2} x\right )}{2 \sqrt {2}}+\frac {x}{2}\) |
\(\Big \downarrow \) 220 |
\(\displaystyle \frac {1}{2} \left (\sqrt {1-x^2}-\frac {\text {arctanh}\left (\sqrt {2} \sqrt {1-x^2}\right )}{\sqrt {2}}\right )-\frac {\text {arctanh}\left (\sqrt {2} x\right )}{2 \sqrt {2}}+\frac {x}{2}\) |
Input:
Int[x/(x - Sqrt[1 - x^2]),x]
Output:
x/2 - ArcTanh[Sqrt[2]*x]/(2*Sqrt[2]) + (Sqrt[1 - x^2] - ArcTanh[Sqrt[2]*Sq rt[1 - x^2]]/Sqrt[2])/2
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ (a + b*x)^(m + 1)*((c + d*x)^n/(b*(m + n + 1))), x] + Simp[n*((b*c - a*d)/( b*(m + n + 1))) Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x] && GtQ[n, 0] && NeQ[m + n + 1, 0] && !(IGtQ[m, 0] && ( !Integer Q[n] || (GtQ[m, 0] && LtQ[m - n, 0]))) && !ILtQ[m + n + 2, 0] && IntLinear Q[a, b, c, d, m, n, x]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[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] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
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[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[(x_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] :> Simp[1/2 Subst[Int[(a + b*x)^p*(c + d*x)^q, x], x, x^2], x] /; FreeQ[ {a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0]
Int[(x_)^(m_.)/((d_.)*(x_)^(n_.) + (c_.)*Sqrt[(a_.) + (b_.)*(x_)^(p_.)]), x _Symbol] :> Simp[-d Int[x^(m + n)/(a*c^2 + (b*c^2 - d^2)*x^(2*n)), x], x] + Simp[c Int[(x^m*Sqrt[a + b*x^(2*n)])/(a*c^2 + (b*c^2 - d^2)*x^(2*n)), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[p, 2*n] && NeQ[b*c^2 - d^2, 0 ]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.13 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.91
method | result | size |
trager | \(\frac {x}{2}+\frac {\sqrt {-x^{2}+1}}{2}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) \ln \left (-\frac {-\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right )+2 \sqrt {-x^{2}+1}}{\operatorname {RootOf}\left (\textit {\_Z}^{2}-2\right ) x +1}\right )}{4}\) | \(59\) |
default | \(\frac {x}{2}-\frac {\operatorname {arctanh}\left (\sqrt {2}\, x \right ) \sqrt {2}}{4}+\frac {\sqrt {-4 \left (x -\frac {\sqrt {2}}{2}\right )^{2}-4 \left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}{8}-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (-\left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+1\right ) \sqrt {2}}{\sqrt {-4 \left (x -\frac {\sqrt {2}}{2}\right )^{2}-4 \left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}\right )}{8}+\frac {\sqrt {-4 \left (x +\frac {\sqrt {2}}{2}\right )^{2}+4 \left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}{8}-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (\left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+1\right ) \sqrt {2}}{\sqrt {-4 \left (x +\frac {\sqrt {2}}{2}\right )^{2}+4 \left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}\right )}{8}\) | \(175\) |
Input:
int(x/(x-(-x^2+1)^(1/2)),x,method=_RETURNVERBOSE)
Output:
1/2*x+1/2*(-x^2+1)^(1/2)+1/4*RootOf(_Z^2-2)*ln(-(-RootOf(_Z^2-2)+2*(-x^2+1 )^(1/2))/(RootOf(_Z^2-2)*x+1))
Leaf count of result is larger than twice the leaf count of optimal. 97 vs. \(2 (45) = 90\).
Time = 0.07 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.49 \[ \int \frac {x}{x-\sqrt {1-x^2}} \, dx=\frac {1}{8} \, \sqrt {2} \log \left (\frac {6 \, x^{2} - 2 \, \sqrt {2} {\left (2 \, x^{2} - 3\right )} + 2 \, \sqrt {-x^{2} + 1} {\left (3 \, \sqrt {2} - 4\right )} - 9}{2 \, x^{2} - 1}\right ) + \frac {1}{8} \, \sqrt {2} \log \left (\frac {2 \, x^{2} - 2 \, \sqrt {2} x + 1}{2 \, x^{2} - 1}\right ) + \frac {1}{2} \, x + \frac {1}{2} \, \sqrt {-x^{2} + 1} \] Input:
integrate(x/(x-(-x^2+1)^(1/2)),x, algorithm="fricas")
Output:
1/8*sqrt(2)*log((6*x^2 - 2*sqrt(2)*(2*x^2 - 3) + 2*sqrt(-x^2 + 1)*(3*sqrt( 2) - 4) - 9)/(2*x^2 - 1)) + 1/8*sqrt(2)*log((2*x^2 - 2*sqrt(2)*x + 1)/(2*x ^2 - 1)) + 1/2*x + 1/2*sqrt(-x^2 + 1)
\[ \int \frac {x}{x-\sqrt {1-x^2}} \, dx=\int \frac {x}{x - \sqrt {1 - x^{2}}}\, dx \] Input:
integrate(x/(x-(-x**2+1)**(1/2)),x)
Output:
Integral(x/(x - sqrt(1 - x**2)), x)
\[ \int \frac {x}{x-\sqrt {1-x^2}} \, dx=\int { \frac {x}{x - \sqrt {-x^{2} + 1}} \,d x } \] Input:
integrate(x/(x-(-x^2+1)^(1/2)),x, algorithm="maxima")
Output:
integrate(x/(x - sqrt(-x^2 + 1)), x)
Leaf count of result is larger than twice the leaf count of optimal. 105 vs. \(2 (45) = 90\).
Time = 0.14 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.62 \[ \int \frac {x}{x-\sqrt {1-x^2}} \, dx=\frac {1}{8} \, \sqrt {2} \log \left (\frac {{\left | 4 \, x - 2 \, \sqrt {2} \right |}}{{\left | 4 \, x + 2 \, \sqrt {2} \right |}}\right ) - \frac {1}{8} \, \sqrt {2} \log \left (\frac {{\left | -4 \, \sqrt {2} + \frac {2 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 6 \right |}}{{\left | 4 \, \sqrt {2} + \frac {2 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 6 \right |}}\right ) + \frac {1}{2} \, x + \frac {1}{2} \, \sqrt {-x^{2} + 1} \] Input:
integrate(x/(x-(-x^2+1)^(1/2)),x, algorithm="giac")
Output:
1/8*sqrt(2)*log(abs(4*x - 2*sqrt(2))/abs(4*x + 2*sqrt(2))) - 1/8*sqrt(2)*l og(abs(-4*sqrt(2) + 2*(sqrt(-x^2 + 1) - 1)^2/x^2 - 6)/abs(4*sqrt(2) + 2*(s qrt(-x^2 + 1) - 1)^2/x^2 - 6)) + 1/2*x + 1/2*sqrt(-x^2 + 1)
Time = 0.16 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.95 \[ \int \frac {x}{x-\sqrt {1-x^2}} \, dx=\frac {x}{2}-\frac {\sqrt {2}\,\ln \left (\frac {\sqrt {2}\,\left (\frac {\sqrt {2}\,x}{2}-1\right )\,1{}\mathrm {i}-\sqrt {1-x^2}\,1{}\mathrm {i}}{x-\frac {\sqrt {2}}{2}}\right )}{8}-\frac {\sqrt {2}\,\ln \left (\frac {\sqrt {2}\,\left (\frac {\sqrt {2}\,x}{2}+1\right )\,1{}\mathrm {i}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+\frac {\sqrt {2}}{2}}\right )}{8}+\frac {\sqrt {2}\,\ln \left (x-\frac {\sqrt {2}}{2}\right )}{8}-\frac {\sqrt {2}\,\ln \left (x+\frac {\sqrt {2}}{2}\right )}{8}+\frac {\sqrt {1-x^2}}{2} \] Input:
int(x/(x - (1 - x^2)^(1/2)),x)
Output:
x/2 - (2^(1/2)*log((2^(1/2)*((2^(1/2)*x)/2 - 1)*1i - (1 - x^2)^(1/2)*1i)/( x - 2^(1/2)/2)))/8 - (2^(1/2)*log((2^(1/2)*((2^(1/2)*x)/2 + 1)*1i + (1 - x ^2)^(1/2)*1i)/(x + 2^(1/2)/2)))/8 + (2^(1/2)*log(x - 2^(1/2)/2))/8 - (2^(1 /2)*log(x + 2^(1/2)/2))/8 + (1 - x^2)^(1/2)/2
Time = 0.19 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.69 \[ \int \frac {x}{x-\sqrt {1-x^2}} \, dx=\frac {\sqrt {-x^{2}+1}}{2}+\frac {\sqrt {2}\, \mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (x \right )}{2}\right )+1\right )}{4}-\frac {\sqrt {2}\, \mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (x \right )}{2}\right )+1\right )}{4}+\frac {x}{2}-\frac {1}{2} \] Input:
int(x/(x-(-x^2+1)^(1/2)),x)
Output:
(2*sqrt( - x**2 + 1) + sqrt(2)*log( - sqrt(2) + tan(asin(x)/2) + 1) - sqrt (2)*log(sqrt(2) + tan(asin(x)/2) + 1) + 2*x - 2)/4