3.9.71 \(\int \frac {x^2+(4-4 x) \log (2) \log (x)-2 \log (2) \log ^2(x)}{x^2} \, dx\)

Optimal. Leaf size=24 \[ x+\frac {\log (2)}{2}-\frac {(-2+2 x) \log (2) \log ^2(x)}{x} \]

________________________________________________________________________________________

Rubi [B]  time = 0.07, antiderivative size = 55, normalized size of antiderivative = 2.29, number of steps used = 8, number of rules used = 6, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {14, 43, 2334, 2301, 2305, 2304} \begin {gather*} x+\frac {\log (4) \log ^2(x)}{x}+2 \log (2) \log ^2(x)-4 \log (2) \left (\frac {1}{x}+\log (x)\right ) \log (x)+\frac {2 \log (4) \log (x)}{x}+\frac {2 \log (4)}{x}-\frac {4 \log (2)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2304

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

Rule 2305

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

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (1-\frac {4 (-1+x) \log (2) \log (x)}{x^2}-\frac {\log (4) \log ^2(x)}{x^2}\right ) \, dx\\ &=x-(4 \log (2)) \int \frac {(-1+x) \log (x)}{x^2} \, dx-\log (4) \int \frac {\log ^2(x)}{x^2} \, dx\\ &=x+\frac {\log (4) \log ^2(x)}{x}-4 \log (2) \log (x) \left (\frac {1}{x}+\log (x)\right )+(4 \log (2)) \int \frac {1+x \log (x)}{x^2} \, dx-(2 \log (4)) \int \frac {\log (x)}{x^2} \, dx\\ &=x+\frac {2 \log (4)}{x}+\frac {2 \log (4) \log (x)}{x}+\frac {\log (4) \log ^2(x)}{x}-4 \log (2) \log (x) \left (\frac {1}{x}+\log (x)\right )+(4 \log (2)) \int \left (\frac {1}{x^2}+\frac {\log (x)}{x}\right ) \, dx\\ &=x-\frac {4 \log (2)}{x}+\frac {2 \log (4)}{x}+\frac {2 \log (4) \log (x)}{x}+\frac {\log (4) \log ^2(x)}{x}-4 \log (2) \log (x) \left (\frac {1}{x}+\log (x)\right )+(4 \log (2)) \int \frac {\log (x)}{x} \, dx\\ &=x-\frac {4 \log (2)}{x}+\frac {2 \log (4)}{x}+\frac {2 \log (4) \log (x)}{x}+2 \log (2) \log ^2(x)+\frac {\log (4) \log ^2(x)}{x}-4 \log (2) \log (x) \left (\frac {1}{x}+\log (x)\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B]  time = 0.01, size = 52, normalized size = 2.17 \begin {gather*} x-\frac {4 \log (2)}{x}+\frac {2 \log (4)}{x}-\frac {4 \log (2) \log (x)}{x}+\frac {2 \log (4) \log (x)}{x}-2 \log (2) \log ^2(x)+\frac {\log (4) \log ^2(x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.84, size = 22, normalized size = 0.92 \begin {gather*} -\frac {2 \, {\left (x - 1\right )} \log \relax (2) \log \relax (x)^{2} - x^{2}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.39, size = 19, normalized size = 0.79 \begin {gather*} 2 \, {\left (\frac {\log \relax (2)}{x} - \log \relax (2)\right )} \log \relax (x)^{2} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 17, normalized size = 0.71




method result size



risch \(-\frac {2 \left (x -1\right ) \ln \relax (2) \ln \relax (x )^{2}}{x}+x\) \(17\)
norman \(\frac {x^{2}+2 \ln \relax (2) \ln \relax (x )^{2}-2 x \ln \relax (2) \ln \relax (x )^{2}}{x}\) \(26\)
default \(-2 \ln \relax (2) \left (-\frac {\ln \relax (x )^{2}}{x}-\frac {2 \ln \relax (x )}{x}-\frac {2}{x}\right )-2 \ln \relax (2) \ln \relax (x )^{2}+4 \ln \relax (2) \left (-\frac {\ln \relax (x )}{x}-\frac {1}{x}\right )+x\) \(54\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.39, size = 41, normalized size = 1.71 \begin {gather*} -2 \, \log \relax (2) \log \relax (x)^{2} - 4 \, {\left (\frac {\log \relax (x)}{x} + \frac {1}{x}\right )} \log \relax (2) + x + \frac {2 \, {\left (\log \relax (x)^{2} + 2 \, \log \relax (x) + 2\right )} \log \relax (2)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.64, size = 21, normalized size = 0.88 \begin {gather*} x-2\,\ln \relax (2)\,{\ln \relax (x)}^2+\frac {2\,\ln \relax (2)\,{\ln \relax (x)}^2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 19, normalized size = 0.79 \begin {gather*} x + \frac {\left (- 2 x \log {\relax (2 )} + 2 \log {\relax (2 )}\right ) \log {\relax (x )}^{2}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________