3.19.70 \(\int \frac {20-40 x+20 x^2+(20-20 x^2) \log (4 x)+(-40-x) \log ^2(4 x)}{x^2 \log ^2(4 x)} \, dx\) [1870]

Optimal. Leaf size=28 \[ \log \left (\frac {3}{x}\right )-\frac {20 \left (-2+\frac {(1-x)^2}{\log (4 x)}\right )}{x} \]

[Out]

ln(3/x)-20*((1-x)^2/ln(4*x)-2)/x

________________________________________________________________________________________

Rubi [A]
time = 0.25, antiderivative size = 38, normalized size of antiderivative = 1.36, number of steps used = 18, number of rules used = 10, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {6874, 45, 2395, 2334, 2335, 2343, 2346, 2209, 2339, 30} \begin {gather*} \frac {40}{x}-\frac {20 x}{\log (4 x)}-\log (x)+\frac {40}{\log (4 x)}-\frac {20}{x \log (4 x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

40/x - Log[x] + 40/Log[4*x] - 20/(x*Log[4*x]) - (20*x)/Log[4*x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

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 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2334

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

Rule 2335

Int[Log[(c_.)*(x_)]^(-1), x_Symbol] :> Simp[LogIntegral[c*x]/c, x] /; FreeQ[c, x]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2343

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log
[c*x^n])^(p + 1)/(b*d*n*(p + 1))), x] - Dist[(m + 1)/(b*n*(p + 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] && LtQ[p, -1]

Rule 2346

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))^(p_)*(x_)^(m_.), x_Symbol] :> Dist[1/c^(m + 1), Subst[Int[E^((m + 1)*x)*(a
 + b*x)^p, x], x, Log[c*x]], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[m]

Rule 2395

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 6874

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {-40-x}{x^2}+\frac {20 (-1+x)^2}{x^2 \log ^2(4 x)}-\frac {20 \left (-1+x^2\right )}{x^2 \log (4 x)}\right ) \, dx\\ &=20 \int \frac {(-1+x)^2}{x^2 \log ^2(4 x)} \, dx-20 \int \frac {-1+x^2}{x^2 \log (4 x)} \, dx+\int \frac {-40-x}{x^2} \, dx\\ &=20 \int \left (\frac {1}{\log ^2(4 x)}+\frac {1}{x^2 \log ^2(4 x)}-\frac {2}{x \log ^2(4 x)}\right ) \, dx-20 \int \left (\frac {1}{\log (4 x)}-\frac {1}{x^2 \log (4 x)}\right ) \, dx+\int \left (-\frac {40}{x^2}-\frac {1}{x}\right ) \, dx\\ &=\frac {40}{x}-\log (x)+20 \int \frac {1}{\log ^2(4 x)} \, dx+20 \int \frac {1}{x^2 \log ^2(4 x)} \, dx-20 \int \frac {1}{\log (4 x)} \, dx+20 \int \frac {1}{x^2 \log (4 x)} \, dx-40 \int \frac {1}{x \log ^2(4 x)} \, dx\\ &=\frac {40}{x}-\log (x)-\frac {20}{x \log (4 x)}-\frac {20 x}{\log (4 x)}-5 \text {li}(4 x)+20 \int \frac {1}{\log (4 x)} \, dx-20 \int \frac {1}{x^2 \log (4 x)} \, dx-40 \text {Subst}\left (\int \frac {1}{x^2} \, dx,x,\log (4 x)\right )+80 \text {Subst}\left (\int \frac {e^{-x}}{x} \, dx,x,\log (4 x)\right )\\ &=\frac {40}{x}+80 \text {Ei}(-\log (4 x))-\log (x)+\frac {40}{\log (4 x)}-\frac {20}{x \log (4 x)}-\frac {20 x}{\log (4 x)}-80 \text {Subst}\left (\int \frac {e^{-x}}{x} \, dx,x,\log (4 x)\right )\\ &=\frac {40}{x}-\log (x)+\frac {40}{\log (4 x)}-\frac {20}{x \log (4 x)}-\frac {20 x}{\log (4 x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 38, normalized size = 1.36 \begin {gather*} \frac {40}{x}-\log (x)+\frac {40}{\log (4 x)}-\frac {20}{x \log (4 x)}-\frac {20 x}{\log (4 x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

40/x - Log[x] + 40/Log[4*x] - 20/(x*Log[4*x]) - (20*x)/Log[4*x]

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 41, normalized size = 1.46

method result size
risch \(-\frac {x \ln \left (x \right )-40}{x}-\frac {20 \left (x^{2}-2 x +1\right )}{x \ln \left (4 x \right )}\) \(32\)
norman \(\frac {-20-x \ln \left (4 x \right )^{2}+40 x -20 x^{2}+40 \ln \left (4 x \right )}{x \ln \left (4 x \right )}\) \(36\)
derivativedivides \(-\ln \left (4 x \right )+\frac {40}{x}-\frac {20 x}{\ln \left (4 x \right )}+\frac {40}{\ln \left (4 x \right )}-\frac {20}{x \ln \left (4 x \right )}\) \(41\)
default \(-\ln \left (4 x \right )+\frac {40}{x}-\frac {20 x}{\ln \left (4 x \right )}+\frac {40}{\ln \left (4 x \right )}-\frac {20}{x \ln \left (4 x \right )}\) \(41\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(4*x)+40/x-20*x/ln(4*x)+40/ln(4*x)-20/x/ln(4*x)

________________________________________________________________________________________

Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.30, size = 52, normalized size = 1.86 \begin {gather*} \frac {40}{x} + \frac {40}{\log \left (4 \, x\right )} + 80 \, {\rm Ei}\left (-\log \left (4 \, x\right )\right ) - 5 \, {\rm Ei}\left (\log \left (4 \, x\right )\right ) + 5 \, \Gamma \left (-1, -\log \left (4 \, x\right )\right ) - 80 \, \Gamma \left (-1, \log \left (4 \, x\right )\right ) - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

40/x + 40/log(4*x) + 80*Ei(-log(4*x)) - 5*Ei(log(4*x)) + 5*gamma(-1, -log(4*x)) - 80*gamma(-1, log(4*x)) - log
(x)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 35, normalized size = 1.25 \begin {gather*} -\frac {x \log \left (4 \, x\right )^{2} + 20 \, x^{2} - 40 \, x - 40 \, \log \left (4 \, x\right ) + 20}{x \log \left (4 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x*log(4*x)^2 + 20*x^2 - 40*x - 40*log(4*x) + 20)/(x*log(4*x))

________________________________________________________________________________________

Sympy [A]
time = 0.06, size = 22, normalized size = 0.79 \begin {gather*} - \log {\left (x \right )} + \frac {- 20 x^{2} + 40 x - 20}{x \log {\left (4 x \right )}} + \frac {40}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(x) + (-20*x**2 + 40*x - 20)/(x*log(4*x)) + 40/x

________________________________________________________________________________________

Giac [A]
time = 0.38, size = 29, normalized size = 1.04 \begin {gather*} \frac {40}{x} - \frac {20 \, {\left (x^{2} - 2 \, x + 1\right )}}{x \log \left (4 \, x\right )} - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 1.21, size = 31, normalized size = 1.11 \begin {gather*} \frac {40}{x}-\ln \left (x\right )-\frac {20\,x^2-40\,x+20}{x\,\ln \left (4\,x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

40/x - log(x) - (20*x^2 - 40*x + 20)/(x*log(4*x))

________________________________________________________________________________________