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

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

[Out]

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

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(52\) vs. \(2(24)=48\).
time = 0.05, antiderivative size = 52, normalized size of antiderivative = 2.17, 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, 45, 2372, 2338, 2342, 2341} \begin {gather*} x+\frac {\log (4) \log ^2(x)}{x}-2 \log (2) \log ^2(x)+\frac {2 \log (4) \log (x)}{x}-\frac {4 \log (2) \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 - (4*Log[2]*Log[x])/x + (2*Log[4]*Log[x])/x - 2*Log[2]*Log[x]^2 + (Log[4]*Log[
x]^2)/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 45

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 2338

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 2341

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 2342

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 2372

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]}, Dist[a + b*Log[c*x^n], u, 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] Leaf count is larger than twice the leaf count of optimal. \(52\) vs. \(2(24)=48\).
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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(53\) vs. \(2(22)=44\).
time = 0.07, size = 54, normalized size = 2.25

method result size
risch \(-\frac {2 \left (x -1\right ) \ln \left (2\right ) \ln \left (x \right )^{2}}{x}+x\) \(17\)
norman \(\frac {x^{2}+2 \ln \left (2\right ) \ln \left (x \right )^{2}-2 x \ln \left (2\right ) \ln \left (x \right )^{2}}{x}\) \(26\)
default \(-2 \ln \left (2\right ) \left (-\frac {\ln \left (x \right )^{2}}{x}-\frac {2 \ln \left (x \right )}{x}-\frac {2}{x}\right )-2 \ln \left (2\right ) \ln \left (x \right )^{2}+4 \ln \left (2\right ) \left (-\frac {\ln \left (x \right )}{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*ln(2)*(-ln(x)^2/x-2*ln(x)/x-2/x)-2*ln(2)*ln(x)^2+4*ln(2)*(-ln(x)/x-1/x)+x

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 41 vs. \(2 (20) = 40\).
time = 0.28, size = 41, normalized size = 1.71 \begin {gather*} -2 \, \log \left (2\right ) \log \left (x\right )^{2} - 4 \, {\left (\frac {\log \left (x\right )}{x} + \frac {1}{x}\right )} \log \left (2\right ) + x + \frac {2 \, {\left (\log \left (x\right )^{2} + 2 \, \log \left (x\right ) + 2\right )} \log \left (2\right )}{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

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 22, normalized size = 0.92 \begin {gather*} -\frac {2 \, {\left (x - 1\right )} \log \left (2\right ) \log \left (x\right )^{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

________________________________________________________________________________________

Sympy [A]
time = 0.07, size = 19, normalized size = 0.79 \begin {gather*} x + \frac {\left (- 2 x \log {\left (2 \right )} + 2 \log {\left (2 \right )}\right ) \log {\left (x \right )}^{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

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 19, normalized size = 0.79 \begin {gather*} 2 \, {\left (\frac {\log \left (2\right )}{x} - \log \left (2\right )\right )} \log \left (x\right )^{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

________________________________________________________________________________________

Mupad [B]
time = 0.64, size = 21, normalized size = 0.88 \begin {gather*} x-2\,\ln \left (2\right )\,{\ln \left (x\right )}^2+\frac {2\,\ln \left (2\right )\,{\ln \left (x\right )}^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

________________________________________________________________________________________