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

Optimal. Leaf size=122 $2 \text{PolyLog}\left (2,1-\frac{2 \sqrt{x}}{1+\sqrt{5}}\right )-2 \text{PolyLog}\left (2,\frac{2 \sqrt{x}}{1-\sqrt{5}}\right )-2 \log \left (\frac{1}{2} \left (1+\sqrt{5}\right )\right ) \log \left (-2 \sqrt{x}+\sqrt{5}+1\right )-2 \log \left (1-\frac{2 \sqrt{x}}{1-\sqrt{5}}\right ) \log \left (\sqrt{x}\right )+2 \log \left (-x+\sqrt{x}+1\right ) \log \left (\sqrt{x}\right )$

[Out]

-2*Log[(1 + Sqrt[5])/2]*Log[1 + Sqrt[5] - 2*Sqrt[x]] - 2*Log[1 - (2*Sqrt[x])/(1 - Sqrt[5])]*Log[Sqrt[x]] + 2*L
og[1 + Sqrt[x] - x]*Log[Sqrt[x]] + 2*PolyLog[2, 1 - (2*Sqrt[x])/(1 + Sqrt[5])] - 2*PolyLog[2, (2*Sqrt[x])/(1 -
Sqrt[5])]

________________________________________________________________________________________

Rubi [A]  time = 0.14536, antiderivative size = 122, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 15, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.467, Rules used = {2530, 2524, 2357, 2317, 2391, 2316, 2315} $2 \text{PolyLog}\left (2,1-\frac{2 \sqrt{x}}{1+\sqrt{5}}\right )-2 \text{PolyLog}\left (2,\frac{2 \sqrt{x}}{1-\sqrt{5}}\right )-2 \log \left (\frac{1}{2} \left (1+\sqrt{5}\right )\right ) \log \left (-2 \sqrt{x}+\sqrt{5}+1\right )-2 \log \left (1-\frac{2 \sqrt{x}}{1-\sqrt{5}}\right ) \log \left (\sqrt{x}\right )+2 \log \left (-x+\sqrt{x}+1\right ) \log \left (\sqrt{x}\right )$

Antiderivative was successfully veriﬁed.

[In]

Int[Log[1 + Sqrt[x] - x]/x,x]

[Out]

-2*Log[(1 + Sqrt[5])/2]*Log[1 + Sqrt[5] - 2*Sqrt[x]] - 2*Log[1 - (2*Sqrt[x])/(1 - Sqrt[5])]*Log[Sqrt[x]] + 2*L
og[1 + Sqrt[x] - x]*Log[Sqrt[x]] + 2*PolyLog[2, 1 - (2*Sqrt[x])/(1 + Sqrt[5])] - 2*PolyLog[2, (2*Sqrt[x])/(1 -
Sqrt[5])]

Rule 2530

Int[((a_.) + Log[u_]*(b_.))*(RFx_), x_Symbol] :> With[{lst = SubstForFractionalPowerOfLinear[RFx*(a + b*Log[u]
), x]}, Dist[lst[[2]]*lst[[4]], Subst[Int[lst[[1]], x], x, lst[[3]]^(1/lst[[2]])], x] /;  !FalseQ[lst]] /; Fre
eQ[{a, b}, x] && RationalFunctionQ[RFx, x]

Rule 2524

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

Rule 2357

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 2317

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

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
e, n}, x] && EqQ[c*d, 1]

Rule 2316

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[((a + b*Log[-((c*d)/e)])*Log[d + e*
x])/e, x] + Dist[b, Int[Log[-((e*x)/d)]/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[-((c*d)/e), 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rubi steps

\begin{align*} \int \frac{\log \left (1+\sqrt{x}-x\right )}{x} \, dx &=2 \operatorname{Subst}\left (\int \frac{\log \left (1+x-x^2\right )}{x} \, dx,x,\sqrt{x}\right )\\ &=2 \log \left (1+\sqrt{x}-x\right ) \log \left (\sqrt{x}\right )-2 \operatorname{Subst}\left (\int \frac{(1-2 x) \log (x)}{1+x-x^2} \, dx,x,\sqrt{x}\right )\\ &=2 \log \left (1+\sqrt{x}-x\right ) \log \left (\sqrt{x}\right )-2 \operatorname{Subst}\left (\int \left (-\frac{2 \log (x)}{1-\sqrt{5}-2 x}-\frac{2 \log (x)}{1+\sqrt{5}-2 x}\right ) \, dx,x,\sqrt{x}\right )\\ &=2 \log \left (1+\sqrt{x}-x\right ) \log \left (\sqrt{x}\right )+4 \operatorname{Subst}\left (\int \frac{\log (x)}{1-\sqrt{5}-2 x} \, dx,x,\sqrt{x}\right )+4 \operatorname{Subst}\left (\int \frac{\log (x)}{1+\sqrt{5}-2 x} \, dx,x,\sqrt{x}\right )\\ &=-2 \log \left (\frac{1}{2} \left (1+\sqrt{5}\right )\right ) \log \left (1+\sqrt{5}-2 \sqrt{x}\right )-2 \log \left (1-\frac{2 \sqrt{x}}{1-\sqrt{5}}\right ) \log \left (\sqrt{x}\right )+2 \log \left (1+\sqrt{x}-x\right ) \log \left (\sqrt{x}\right )+2 \operatorname{Subst}\left (\int \frac{\log \left (1-\frac{2 x}{1-\sqrt{5}}\right )}{x} \, dx,x,\sqrt{x}\right )+4 \operatorname{Subst}\left (\int \frac{\log \left (\frac{2 x}{1+\sqrt{5}}\right )}{1+\sqrt{5}-2 x} \, dx,x,\sqrt{x}\right )\\ &=-2 \log \left (\frac{1}{2} \left (1+\sqrt{5}\right )\right ) \log \left (1+\sqrt{5}-2 \sqrt{x}\right )-2 \log \left (1-\frac{2 \sqrt{x}}{1-\sqrt{5}}\right ) \log \left (\sqrt{x}\right )+2 \log \left (1+\sqrt{x}-x\right ) \log \left (\sqrt{x}\right )+2 \text{Li}_2\left (1-\frac{2 \sqrt{x}}{1+\sqrt{5}}\right )-2 \text{Li}_2\left (\frac{2 \sqrt{x}}{1-\sqrt{5}}\right )\\ \end{align*}

Mathematica [A]  time = 0.075291, size = 121, normalized size = 0.99 $2 \text{PolyLog}\left (2,\frac{-2 \sqrt{x}+\sqrt{5}+1}{1+\sqrt{5}}\right )-2 \text{PolyLog}\left (2,-\frac{2 \sqrt{x}}{\sqrt{5}-1}\right )-2 \log \left (\frac{1}{2} \left (1+\sqrt{5}\right )\right ) \log \left (-2 \sqrt{x}+\sqrt{5}+1\right )+\left (\log \left (\sqrt{5}-1\right )-\log \left (2 \sqrt{x}+\sqrt{5}-1\right )\right ) \log (x)+\log \left (-x+\sqrt{x}+1\right ) \log (x)$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Log[1 + Sqrt[x] - x]/x,x]

[Out]

-2*Log[(1 + Sqrt[5])/2]*Log[1 + Sqrt[5] - 2*Sqrt[x]] + (Log[-1 + Sqrt[5]] - Log[-1 + Sqrt[5] + 2*Sqrt[x]])*Log
[x] + Log[1 + Sqrt[x] - x]*Log[x] + 2*PolyLog[2, (1 + Sqrt[5] - 2*Sqrt[x])/(1 + Sqrt[5])] - 2*PolyLog[2, (-2*S
qrt[x])/(-1 + Sqrt[5])]

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 102, normalized size = 0.8 \begin{align*} \ln \left ( x \right ) \ln \left ( 1-x+\sqrt{x} \right ) -\ln \left ( x \right ) \ln \left ({\frac{1}{\sqrt{5}+1} \left ( 1+\sqrt{5}-2\,\sqrt{x} \right ) } \right ) -\ln \left ( x \right ) \ln \left ({\frac{1}{\sqrt{5}-1} \left ( -1+\sqrt{5}+2\,\sqrt{x} \right ) } \right ) -2\,{\it dilog} \left ({\frac{1+\sqrt{5}-2\,\sqrt{x}}{\sqrt{5}+1}} \right ) -2\,{\it dilog} \left ({\frac{-1+\sqrt{5}+2\,\sqrt{x}}{\sqrt{5}-1}} \right ) \end{align*}

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

[In]

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

[Out]

ln(x)*ln(1-x+x^(1/2))-ln(x)*ln((1+5^(1/2)-2*x^(1/2))/(5^(1/2)+1))-ln(x)*ln((-1+5^(1/2)+2*x^(1/2))/(5^(1/2)-1))
-2*dilog((1+5^(1/2)-2*x^(1/2))/(5^(1/2)+1))-2*dilog((-1+5^(1/2)+2*x^(1/2))/(5^(1/2)-1))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left (-x + \sqrt{x} + 1\right )}{x}\,{d x} \end{align*}

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

[In]

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

[Out]

integrate(log(-x + sqrt(x) + 1)/x, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\log \left (-x + \sqrt{x} + 1\right )}{x}, x\right ) \end{align*}

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

[In]

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

[Out]

integral(log(-x + sqrt(x) + 1)/x, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left (-x + \sqrt{x} + 1\right )}{x}\,{d x} \end{align*}

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

[In]

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

[Out]

integrate(log(-x + sqrt(x) + 1)/x, x)