### 3.296 $$\int \log (\sqrt{\frac{1+x}{x}}) \, dx$$

Optimal. Leaf size=21 $x \log \left (\sqrt{\frac{1}{x}+1}\right )+\frac{1}{2} \log (x+1)$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0078685, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 12, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.333, Rules used = {2453, 2448, 263, 31} $x \log \left (\sqrt{\frac{1}{x}+1}\right )+\frac{1}{2} \log (x+1)$

Antiderivative was successfully veriﬁed.

[In]

Int[Log[Sqrt[(1 + x)/x]],x]

[Out]

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

Rule 2453

Int[((a_.) + Log[(c_.)*(v_)^(p_.)]*(b_.))^(q_.), x_Symbol] :> Int[(a + b*Log[c*ExpandToSum[v, x]^p])^q, x] /;
FreeQ[{a, b, c, p, q}, x] && BinomialQ[v, x] &&  !BinomialMatchQ[v, x]

Rule 2448

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 263

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \log \left (\sqrt{\frac{1+x}{x}}\right ) \, dx &=\int \log \left (\sqrt{1+\frac{1}{x}}\right ) \, dx\\ &=x \log \left (\sqrt{1+\frac{1}{x}}\right )+\frac{1}{2} \int \frac{1}{\left (1+\frac{1}{x}\right ) x} \, dx\\ &=x \log \left (\sqrt{1+\frac{1}{x}}\right )+\frac{1}{2} \int \frac{1}{1+x} \, dx\\ &=x \log \left (\sqrt{1+\frac{1}{x}}\right )+\frac{1}{2} \log (1+x)\\ \end{align*}

Mathematica [A]  time = 0.0032725, size = 19, normalized size = 0.9 $\frac{1}{2} \left (\log (x)+(x+1) \log \left (\frac{x+1}{x}\right )\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Log[Sqrt[(1 + x)/x]],x]

[Out]

(Log[x] + (1 + x)*Log[(1 + x)/x])/2

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 22, normalized size = 1.1 \begin{align*} -{\frac{\ln \left ({x}^{-1} \right ) }{2}}+{\frac{\ln \left ( 1+{x}^{-1} \right ) \left ( 1+{x}^{-1} \right ) x}{2}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(1/2*ln((1+x)/x),x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.00957, size = 24, normalized size = 1.14 \begin{align*} \frac{1}{2} \, x \log \left (\frac{x + 1}{x}\right ) + \frac{1}{2} \, \log \left (x + 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.03842, size = 53, normalized size = 2.52 \begin{align*} \frac{1}{2} \, x \log \left (\frac{x + 1}{x}\right ) + \frac{1}{2} \, \log \left (x + 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.107513, size = 17, normalized size = 0.81 \begin{align*} \frac{x \log{\left (\frac{x + 1}{x} \right )}}{2} + \frac{\log{\left (2 x + 2 \right )}}{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.25201, size = 26, normalized size = 1.24 \begin{align*} \frac{1}{2} \, x \log \left (\frac{x + 1}{x}\right ) + \frac{1}{2} \, \log \left ({\left | x + 1 \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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