3.10.69 \(\int \frac {x}{x-\sqrt {1+2 x^2}} \, dx\) [969]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {2132, 327, 209, 455, 52, 65} \begin {gather*} \text {ArcTan}\left (\sqrt {2 x^2+1}\right )+\text {ArcTan}(x)-\sqrt {2 x^2+1}-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x - Sqrt[1 + 2*x^2] + ArcTan[x] + ArcTan[Sqrt[1 + 2*x^2]]

Rule 52

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] + Dist[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] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

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 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 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 455

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

Rule 2132

Int[(x_)^(m_.)/((d_.)*(x_)^(n_.) + (c_.)*Sqrt[(a_.) + (b_.)*(x_)^(p_.)]), x_Symbol] :> Dist[-d, Int[x^(m + n)/
(a*c^2 + (b*c^2 - d^2)*x^(2*n)), x], x] + Dist[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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.14, size = 50, normalized size = 1.61 \begin {gather*} -x-\sqrt {1+2 x^2}+2 \tan ^{-1}\left (\left (2+\sqrt {2}\right ) x-\left (1+\sqrt {2}\right ) \sqrt {1+2 x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x - Sqrt[1 + 2*x^2] + 2*ArcTan[(2 + Sqrt[2])*x - (1 + Sqrt[2])*Sqrt[1 + 2*x^2]]

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 28, normalized size = 0.90

method result size
default \(-x +\arctan \left (x \right )+\arctan \left (\sqrt {2 x^{2}+1}\right )-\sqrt {2 x^{2}+1}\) \(28\)
trager \(-x -\sqrt {2 x^{2}+1}+\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (\frac {\sqrt {2 x^{2}+1}+\RootOf \left (\textit {\_Z}^{2}+1\right )}{x \RootOf \left (\textit {\_Z}^{2}+1\right )+1}\right )\) \(53\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 41, normalized size = 1.32 \begin {gather*} -x - \sqrt {2 \, x^{2} + 1} + \arctan \left (x\right ) - \arctan \left (-\frac {x^{2} - \sqrt {2 \, x^{2} + 1} + 1}{x^{2}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (27) = 54\).
time = 3.70, size = 63, normalized size = 2.03 \begin {gather*} -\frac {1}{2} \, \pi - x - \sqrt {2 \, x^{2} + 1} + \arctan \left (x\right ) + \arctan \left (-\frac {{\left (\sqrt {2} x - \sqrt {2 \, x^{2} + 1}\right )}^{2} + 1}{2 \, {\left (\sqrt {2} x - \sqrt {2 \, x^{2} + 1}\right )}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*pi - x - sqrt(2*x^2 + 1) + arctan(x) + arctan(-1/2*((sqrt(2)*x - sqrt(2*x^2 + 1))^2 + 1)/(sqrt(2)*x - sqr
t(2*x^2 + 1)))

________________________________________________________________________________________

Mupad [B]
time = 0.19, size = 64, normalized size = 2.06 \begin {gather*} -x-\sqrt {2}\,\sqrt {x^2+\frac {1}{2}}-\ln \left (x-\mathrm {i}\right )\,1{}\mathrm {i}+\frac {\ln \left (x-\frac {\sqrt {2}\,\sqrt {x^2+\frac {1}{2}}}{2}+\frac {1}{2}{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}+\frac {\ln \left (x+\frac {\sqrt {2}\,\sqrt {x^2+\frac {1}{2}}}{2}-\frac {1}{2}{}\mathrm {i}\right )\,1{}\mathrm {i}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log(x - (2^(1/2)*(x^2 + 1/2)^(1/2))/2 + 1i/2)*1i)/2 - log(x - 1i)*1i - x + (log(x + (2^(1/2)*(x^2 + 1/2)^(1/2
))/2 - 1i/2)*1i)/2 - 2^(1/2)*(x^2 + 1/2)^(1/2)

________________________________________________________________________________________