3.9.31 \(\int \frac {\sqrt {-1+4 x^2}}{x+\sqrt {-1+4 x^2}} \, dx\) [831]

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

[Out]

4/3*x-1/9*arctanh(x*3^(1/2))*3^(1/2)+1/9*arctanh(3^(1/2)*(4*x^2-1)^(1/2))*3^(1/2)-1/3*(4*x^2-1)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {6874, 455, 52, 65, 213, 396} \begin {gather*} -\frac {1}{3} \sqrt {4 x^2-1}+\frac {\tanh ^{-1}\left (\sqrt {3} \sqrt {4 x^2-1}\right )}{3 \sqrt {3}}+\frac {4 x}{3}-\frac {\tanh ^{-1}\left (\sqrt {3} x\right )}{3 \sqrt {3}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 213

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])

Rule 396

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

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 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 50, normalized size = 0.77 \begin {gather*} \frac {1}{9} \left (12 x-3 \sqrt {-1+4 x^2}+2 \sqrt {3} \tanh ^{-1}\left (\frac {-2 x+\sqrt {-1+4 x^2}}{\sqrt {3}}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(12*x - 3*Sqrt[-1 + 4*x^2] + 2*Sqrt[3]*ArcTanh[(-2*x + Sqrt[-1 + 4*x^2])/Sqrt[3]])/9

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(261\) vs. \(2(45)=90\).
time = 0.51, size = 262, normalized size = 4.03

method result size
trager \(\frac {4 x}{3}-\frac {\sqrt {4 x^{2}-1}}{3}-\frac {\RootOf \left (\textit {\_Z}^{2}-3\right ) \ln \left (\frac {\RootOf \left (\textit {\_Z}^{2}-3\right )-3 \sqrt {4 x^{2}-1}}{\RootOf \left (\textit {\_Z}^{2}-3\right ) x -1}\right )}{9}\) \(56\)
default \(\frac {4 x}{3}-\frac {\arctanh \left (x \sqrt {3}\right ) \sqrt {3}}{9}-\frac {\sqrt {36 \left (x +\frac {\sqrt {3}}{3}\right )^{2}-24 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )+3}}{18}+\frac {\sqrt {3}\, \ln \left (\sqrt {4}\, x +\sqrt {4 \left (x +\frac {\sqrt {3}}{3}\right )^{2}-\frac {8 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )}{3}+\frac {1}{3}}\right ) \sqrt {4}}{18}+\frac {\sqrt {3}\, \arctanh \left (\frac {3 \left (\frac {2}{3}-\frac {8 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )}{3}\right ) \sqrt {3}}{2 \sqrt {36 \left (x +\frac {\sqrt {3}}{3}\right )^{2}-24 \sqrt {3}\, \left (x +\frac {\sqrt {3}}{3}\right )+3}}\right )}{18}-\frac {\sqrt {36 \left (x -\frac {\sqrt {3}}{3}\right )^{2}+24 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )+3}}{18}-\frac {\sqrt {3}\, \ln \left (\sqrt {4}\, x +\sqrt {4 \left (x -\frac {\sqrt {3}}{3}\right )^{2}+\frac {8 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )}{3}+\frac {1}{3}}\right ) \sqrt {4}}{18}+\frac {\sqrt {3}\, \arctanh \left (\frac {3 \left (\frac {2}{3}+\frac {8 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )}{3}\right ) \sqrt {3}}{2 \sqrt {36 \left (x -\frac {\sqrt {3}}{3}\right )^{2}+24 \sqrt {3}\, \left (x -\frac {\sqrt {3}}{3}\right )+3}}\right )}{18}\) \(262\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4/3*x-1/9*arctanh(x*3^(1/2))*3^(1/2)-1/18*(36*(x+1/3*3^(1/2))^2-24*3^(1/2)*(x+1/3*3^(1/2))+3)^(1/2)+1/18*3^(1/
2)*ln(4^(1/2)*x+(4*(x+1/3*3^(1/2))^2-8/3*3^(1/2)*(x+1/3*3^(1/2))+1/3)^(1/2))*4^(1/2)+1/18*3^(1/2)*arctanh(3/2*
(2/3-8/3*3^(1/2)*(x+1/3*3^(1/2)))*3^(1/2)/(36*(x+1/3*3^(1/2))^2-24*3^(1/2)*(x+1/3*3^(1/2))+3)^(1/2))-1/18*(36*
(x-1/3*3^(1/2))^2+24*3^(1/2)*(x-1/3*3^(1/2))+3)^(1/2)-1/18*3^(1/2)*ln(4^(1/2)*x+(4*(x-1/3*3^(1/2))^2+8/3*3^(1/
2)*(x-1/3*3^(1/2))+1/3)^(1/2))*4^(1/2)+1/18*3^(1/2)*arctanh(3/2*(2/3+8/3*3^(1/2)*(x-1/3*3^(1/2)))*3^(1/2)/(36*
(x-1/3*3^(1/2))^2+24*3^(1/2)*(x-1/3*3^(1/2))+3)^(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((4*x^2-1)^(1/2)/(x+(4*x^2-1)^(1/2)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 80, normalized size = 1.23 \begin {gather*} \frac {1}{18} \, \sqrt {3} \log \left (\frac {6 \, x^{2} + \sqrt {3} \sqrt {4 \, x^{2} - 1} - 1}{3 \, x^{2} - 1}\right ) + \frac {1}{18} \, \sqrt {3} \log \left (\frac {3 \, x^{2} - 2 \, \sqrt {3} x + 1}{3 \, x^{2} - 1}\right ) + \frac {4}{3} \, x - \frac {1}{3} \, \sqrt {4 \, x^{2} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/18*sqrt(3)*log((6*x^2 + sqrt(3)*sqrt(4*x^2 - 1) - 1)/(3*x^2 - 1)) + 1/18*sqrt(3)*log((3*x^2 - 2*sqrt(3)*x +
1)/(3*x^2 - 1)) + 4/3*x - 1/3*sqrt(4*x^2 - 1)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 133 vs. \(2 (45) = 90\).
time = 2.67, size = 133, normalized size = 2.05 \begin {gather*} \frac {1}{18} \, \sqrt {3} \log \left (\frac {{\left | 6 \, x - 2 \, \sqrt {3} \right |}}{{\left | 6 \, x + 2 \, \sqrt {3} \right |}}\right ) - \frac {1}{18} \, \sqrt {3} \log \left (-\frac {{\left | -12 \, x - 4 \, \sqrt {3} + 6 \, \sqrt {4 \, x^{2} - 1} + \frac {6}{2 \, x - \sqrt {4 \, x^{2} - 1}} \right |}}{2 \, {\left (6 \, x - 2 \, \sqrt {3} - 3 \, \sqrt {4 \, x^{2} - 1} - \frac {3}{2 \, x - \sqrt {4 \, x^{2} - 1}}\right )}}\right ) + \frac {4}{3} \, x - \frac {1}{3} \, \sqrt {4 \, x^{2} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/18*sqrt(3)*log(abs(6*x - 2*sqrt(3))/abs(6*x + 2*sqrt(3))) - 1/18*sqrt(3)*log(-1/2*abs(-12*x - 4*sqrt(3) + 6*
sqrt(4*x^2 - 1) + 6/(2*x - sqrt(4*x^2 - 1)))/(6*x - 2*sqrt(3) - 3*sqrt(4*x^2 - 1) - 3/(2*x - sqrt(4*x^2 - 1)))
) + 4/3*x - 1/3*sqrt(4*x^2 - 1)

________________________________________________________________________________________

Mupad [B]
time = 3.44, size = 60, normalized size = 0.92 \begin {gather*} \frac {4\,x}{3}+\frac {\sqrt {3}\,\ln \left (x-\frac {\sqrt {3}}{3}\right )}{18}-\frac {\sqrt {3}\,\ln \left (x+\frac {\sqrt {3}}{3}\right )}{18}+\frac {\sqrt {3}\,\mathrm {atanh}\left (\sqrt {3}\,\sqrt {4\,x^2-1}\right )}{9}-\frac {\sqrt {4\,x^2-1}}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(4*x)/3 + (3^(1/2)*log(x - 3^(1/2)/3))/18 - (3^(1/2)*log(x + 3^(1/2)/3))/18 + (3^(1/2)*atanh(3^(1/2)*(4*x^2 -
1)^(1/2)))/9 - (4*x^2 - 1)^(1/2)/3

________________________________________________________________________________________