3.2.51 \(\int \frac {\sqrt {x+x^2}}{x} \, dx\) [151]

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

[Out]

arctanh(x/(x^2+x)^(1/2))+(x^2+x)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {678, 634, 212} \begin {gather*} \sqrt {x^2+x}+\tanh ^{-1}\left (\frac {x}{\sqrt {x^2+x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[x + x^2]/x,x]

[Out]

Sqrt[x + x^2] + ArcTanh[x/Sqrt[x + x^2]]

Rule 212

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] && (GtQ[a, 0] || LtQ[b, 0])

Rule 634

Int[1/Sqrt[(b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(1 - c*x^2), x], x, x/Sqrt[b*x + c*x^2
]], x] /; FreeQ[{b, c}, x]

Rule 678

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^(m + 1)*((
a + b*x + c*x^2)^p/(e*(m + 2*p + 1))), x] - Dist[p*((2*c*d - b*e)/(e^2*(m + 2*p + 1))), Int[(d + e*x)^(m + 1)*
(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - b*d*e + a
*e^2, 0] && GtQ[p, 0] && (LeQ[-2, m, 0] || EqQ[m + p + 1, 0]) && NeQ[m + 2*p + 1, 0] && IntegerQ[2*p]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 37, normalized size = 1.68 \begin {gather*} \sqrt {x (1+x)} \left (1+\frac {\tanh ^{-1}\left (\sqrt {\frac {x}{1+x}}\right )}{\sqrt {x} \sqrt {1+x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[x + x^2]/x,x]

[Out]

Sqrt[x*(1 + x)]*(1 + ArcTanh[Sqrt[x/(1 + x)]]/(Sqrt[x]*Sqrt[1 + x]))

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 22, normalized size = 1.00

method result size
default \(\sqrt {x^{2}+x}+\frac {\ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )}{2}\) \(22\)
trager \(\sqrt {x^{2}+x}-\frac {\ln \left (2 \sqrt {x^{2}+x}-1-2 x \right )}{2}\) \(26\)
risch \(\frac {x \left (1+x \right )}{\sqrt {x \left (1+x \right )}}+\frac {\ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )}{2}\) \(27\)
meijerg \(-\frac {-2 \sqrt {\pi }\, \sqrt {x}\, \sqrt {1+x}-2 \sqrt {\pi }\, \arcsinh \left (\sqrt {x}\right )}{2 \sqrt {\pi }}\) \(29\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2+x)^(1/2)+1/2*ln(x+1/2+(x^2+x)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 1.44, size = 25, normalized size = 1.14 \begin {gather*} \sqrt {x^{2} + x} + \frac {1}{2} \, \log \left (2 \, x + 2 \, \sqrt {x^{2} + x} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+x)^(1/2)/x,x, algorithm="maxima")

[Out]

sqrt(x^2 + x) + 1/2*log(2*x + 2*sqrt(x^2 + x) + 1)

________________________________________________________________________________________

Fricas [A]
time = 0.57, size = 25, normalized size = 1.14 \begin {gather*} \sqrt {x^{2} + x} - \frac {1}{2} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} + x} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 26, normalized size = 1.18 \begin {gather*} \sqrt {x^{2} + x} - \frac {1}{2} \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} + x} - 1 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sqrt(x^2 + x) - 1/2*log(abs(-2*x + 2*sqrt(x^2 + x) - 1))

________________________________________________________________________________________

Mupad [B]
time = 0.08, size = 21, normalized size = 0.95 \begin {gather*} \frac {\ln \left (x+\sqrt {x\,\left (x+1\right )}+\frac {1}{2}\right )}{2}+\sqrt {x^2+x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________