### 3.106 $$\int \frac{\log (-1+4 x+4 \sqrt{(-1+x) x})}{x^2} \, dx$$

Optimal. Leaf size=76 $\frac{4 \sqrt{x^2-x}}{x}-\frac{\log \left (4 \sqrt{x^2-x}+4 x-1\right )}{x}+4 \tanh ^{-1}\left (\frac{1-10 x}{6 \sqrt{x^2-x}}\right )+4 \log (x)-4 \log (8 x+1)$

[Out]

(4*Sqrt[-x + x^2])/x + 4*ArcTanh[(1 - 10*x)/(6*Sqrt[-x + x^2])] + 4*Log[x] - 4*Log[1 + 8*x] - Log[-1 + 4*x + 4
*Sqrt[-x + x^2]]/x

________________________________________________________________________________________

Rubi [A]  time = 0.262083, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 19, number of rules used = 11, integrand size = 21, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.524, Rules used = {2537, 2535, 6742, 640, 620, 206, 662, 664, 734, 843, 724} $\frac{4 \sqrt{x^2-x}}{x}-\frac{\log \left (4 \sqrt{x^2-x}+4 x-1\right )}{x}+4 \tanh ^{-1}\left (\frac{1-10 x}{6 \sqrt{x^2-x}}\right )+4 \log (x)-4 \log (8 x+1)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(4*Sqrt[-x + x^2])/x + 4*ArcTanh[(1 - 10*x)/(6*Sqrt[-x + x^2])] + 4*Log[x] - 4*Log[1 + 8*x] - Log[-1 + 4*x + 4
*Sqrt[-x + x^2]]/x

Rule 2537

Int[Log[(d_.) + (f_.)*Sqrt[u_] + (e_.)*(x_)]*(v_.), x_Symbol] :> Int[v*Log[d + e*x + f*Sqrt[ExpandToSum[u, x]]
], x] /; FreeQ[{d, e, f}, x] && QuadraticQ[u, x] &&  !QuadraticMatchQ[u, x] && (EqQ[v, 1] || MatchQ[v, ((g_.)*
x)^(m_.) /; FreeQ[{g, m}, x]])

Rule 2535

Int[Log[(d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]]*((g_.)*(x_))^(m_.), x_Symbol] :> S
imp[((g*x)^(m + 1)*Log[d + e*x + f*Sqrt[a + b*x + c*x^2]])/(g*(m + 1)), x] + Dist[(f^2*(b^2 - 4*a*c))/(2*g*(m
+ 1)), Int[(g*x)^(m + 1)/((2*d*e - b*f^2)*(a + b*x + c*x^2) - f*(b*d - 2*a*e + (2*c*d - b*e)*x)*Sqrt[a + b*x +
c*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[e^2 - c*f^2, 0] && NeQ[m, -1] && IntegerQ[2*m]

Rule 6742

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

Rule 640

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

Rule 620

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 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
/; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 662

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 + p + 1)), x] - Dist[(c*p)/(e^2*(m + p + 1)), Int[(d + e*x)^(m + 2)*(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] && (LtQ[m, -2] || EqQ[m + 2*p + 1, 0]) && NeQ[m + p + 1, 0] && IntegerQ[2*p]

Rule 664

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]

Rule 734

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/(e*(m + 2*p + 1)), Int[(d + e*x)^m*Simp[b*d - 2*a*e + (2*c*
d - b*e)*x, x]*(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ
[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && GtQ[p, 0] && NeQ[m + 2*p + 1, 0] && ( !RationalQ[m] || Lt
Q[m, 1]) &&  !ILtQ[m + 2*p, 0] && IntQuadraticQ[a, b, c, d, e, m, p, x]

Rule 843

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dis
t[g/e, Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + b*x + c*x^
2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]
&&  !IGtQ[m, 0]

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{\log \left (-1+4 x+4 \sqrt{(-1+x) x}\right )}{x^2} \, dx &=\int \frac{\log \left (-1+4 x+4 \sqrt{-x+x^2}\right )}{x^2} \, dx\\ &=-\frac{\log \left (-1+4 x+4 \sqrt{-x+x^2}\right )}{x}-8 \int \frac{1}{x \left (-4 (1+2 x) \sqrt{-x+x^2}+8 \left (-x+x^2\right )\right )} \, dx\\ &=-\frac{\log \left (-1+4 x+4 \sqrt{-x+x^2}\right )}{x}-8 \int \left (-\frac{1}{2 x}+\frac{4}{1+8 x}-\frac{x}{12 \sqrt{-x+x^2}}+\frac{\sqrt{-x+x^2}}{4 x^2}-\frac{5 \sqrt{-x+x^2}}{4 x}+\frac{32 \sqrt{-x+x^2}}{3 (1+8 x)}\right ) \, dx\\ &=4 \log (x)-4 \log (1+8 x)-\frac{\log \left (-1+4 x+4 \sqrt{-x+x^2}\right )}{x}+\frac{2}{3} \int \frac{x}{\sqrt{-x+x^2}} \, dx-2 \int \frac{\sqrt{-x+x^2}}{x^2} \, dx+10 \int \frac{\sqrt{-x+x^2}}{x} \, dx-\frac{256}{3} \int \frac{\sqrt{-x+x^2}}{1+8 x} \, dx\\ &=\frac{4 \sqrt{-x+x^2}}{x}+4 \log (x)-4 \log (1+8 x)-\frac{\log \left (-1+4 x+4 \sqrt{-x+x^2}\right )}{x}+\frac{1}{3} \int \frac{1}{\sqrt{-x+x^2}} \, dx-2 \int \frac{1}{\sqrt{-x+x^2}} \, dx-5 \int \frac{1}{\sqrt{-x+x^2}} \, dx+\frac{16}{3} \int \frac{-1+10 x}{(1+8 x) \sqrt{-x+x^2}} \, dx\\ &=\frac{4 \sqrt{-x+x^2}}{x}+4 \log (x)-4 \log (1+8 x)-\frac{\log \left (-1+4 x+4 \sqrt{-x+x^2}\right )}{x}+\frac{2}{3} \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\frac{x}{\sqrt{-x+x^2}}\right )-4 \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\frac{x}{\sqrt{-x+x^2}}\right )+\frac{20}{3} \int \frac{1}{\sqrt{-x+x^2}} \, dx-10 \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\frac{x}{\sqrt{-x+x^2}}\right )-12 \int \frac{1}{(1+8 x) \sqrt{-x+x^2}} \, dx\\ &=\frac{4 \sqrt{-x+x^2}}{x}-\frac{40}{3} \tanh ^{-1}\left (\frac{x}{\sqrt{-x+x^2}}\right )+4 \log (x)-4 \log (1+8 x)-\frac{\log \left (-1+4 x+4 \sqrt{-x+x^2}\right )}{x}+\frac{40}{3} \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\frac{x}{\sqrt{-x+x^2}}\right )+24 \operatorname{Subst}\left (\int \frac{1}{36-x^2} \, dx,x,\frac{1-10 x}{\sqrt{-x+x^2}}\right )\\ &=\frac{4 \sqrt{-x+x^2}}{x}+4 \tanh ^{-1}\left (\frac{1-10 x}{6 \sqrt{-x+x^2}}\right )+4 \log (x)-4 \log (1+8 x)-\frac{\log \left (-1+4 x+4 \sqrt{-x+x^2}\right )}{x}\\ \end{align*}

Mathematica [A]  time = 0.214096, size = 68, normalized size = 0.89 $\frac{4 \sqrt{(x-1) x}}{x}+4 \log (x)-8 \log (8 x+1)-\frac{\log \left (4 x+4 \sqrt{(x-1) x}-1\right )}{x}+4 \log \left (-10 x+6 \sqrt{(x-1) x}+1\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(4*Sqrt[(-1 + x)*x])/x + 4*Log[x] - 8*Log[1 + 8*x] - Log[-1 + 4*x + 4*Sqrt[(-1 + x)*x]]/x + 4*Log[1 - 10*x + 6
*Sqrt[(-1 + x)*x]]

________________________________________________________________________________________

Maple [F]  time = 0.008, size = 0, normalized size = 0. \begin{align*} \int{\frac{1}{{x}^{2}}\ln \left ( -1+4\,x+4\,\sqrt{ \left ( -1+x \right ) x} \right ) }\, dx \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.48659, size = 296, normalized size = 3.89 \begin{align*} -\frac{7 \, x \log \left (8 \, x + 1\right ) + 2 \,{\left (x + 1\right )} \log \left (4 \, x + 4 \, \sqrt{x^{2} - x} - 1\right ) - 8 \, x \log \left (x\right ) + x \log \left (-2 \, x + 2 \, \sqrt{x^{2} - x} + 1\right ) + 7 \, x \log \left (-2 \, x + 2 \, \sqrt{x^{2} - x} - 1\right ) - 7 \, x \log \left (-4 \, x + 4 \, \sqrt{x^{2} - x} + 1\right ) - 8 \, x - 8 \, \sqrt{x^{2} - x}}{2 \, x} \end{align*}

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

[In]

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

[Out]

-1/2*(7*x*log(8*x + 1) + 2*(x + 1)*log(4*x + 4*sqrt(x^2 - x) - 1) - 8*x*log(x) + x*log(-2*x + 2*sqrt(x^2 - x)
+ 1) + 7*x*log(-2*x + 2*sqrt(x^2 - x) - 1) - 7*x*log(-4*x + 4*sqrt(x^2 - x) + 1) - 8*x - 8*sqrt(x^2 - 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+4*x+4*((-1+x)*x)**(1/2))/x**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.34975, size = 124, normalized size = 1.63 \begin{align*} -\frac{\log \left (4 \, x + 4 \, \sqrt{{\left (x - 1\right )} x} - 1\right )}{x} + \frac{4}{x - \sqrt{x^{2} - x}} - 4 \, \log \left ({\left | 8 \, x + 1 \right |}\right ) + 4 \, \log \left ({\left | x \right |}\right ) - 4 \, \log \left ({\left | -2 \, x + 2 \, \sqrt{x^{2} - x} - 1 \right |}\right ) + 4 \, \log \left ({\left | -4 \, x + 4 \, \sqrt{x^{2} - x} + 1 \right |}\right ) \end{align*}

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

[In]

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

[Out]

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