3.13.53 \(\int \frac {4-x^2+2 x^3+\log ^2(x)+\log (x) (4-2 \log (-\frac {x}{-1+\log (5)}))-4 \log (-\frac {x}{-1+\log (5)})+\log ^2(-\frac {x}{-1+\log (5)})}{x^2} \, dx\)

Optimal. Leaf size=32 \[ x \left (x-\frac {\left (2+x+\log (x)-\log \left (\frac {x^2}{x-x \log (5)}\right )\right )^2}{x^2}\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.19, antiderivative size = 75, normalized size of antiderivative = 2.34, number of steps used = 13, number of rules used = 4, integrand size = 61, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.066, Rules used = {14, 2304, 2305, 2366} \begin {gather*} x^2-x-\frac {10}{x}-\frac {\log ^2(x)}{x}-\frac {\log ^2\left (\frac {x}{1-\log (5)}\right )}{x}-\frac {6 \log (x)}{x}+\frac {2 (\log (x)+3)}{x}+\frac {2 (\log (x)+2) \log \left (\frac {x}{1-\log (5)}\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-10/x - x + x^2 - (6*Log[x])/x - Log[x]^2/x + (2*(3 + Log[x]))/x + (2*(2 + Log[x])*Log[x/(1 - Log[5])])/x - Lo
g[x/(1 - Log[5])]^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 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 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 59, normalized size = 1.84 \begin {gather*} -\frac {4+x^2-x^3+\log ^2(x)-2 \log (x) \left (-2+\log \left (-\frac {x}{-1+\log (5)}\right )\right )-4 \log \left (-\frac {x}{-1+\log (5)}\right )+\log ^2\left (-\frac {x}{-1+\log (5)}\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(4 - x^2 + 2*x^3 + Log[x]^2 + Log[x]*(4 - 2*Log[-(x/(-1 + Log[5]))]) - 4*Log[-(x/(-1 + Log[5]))] + L
og[-(x/(-1 + Log[5]))]^2)/x^2,x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.84, size = 33, normalized size = 1.03 \begin {gather*} \frac {x^{3} + \pi ^{2} - x^{2} - \log \left (\log \relax (5) - 1\right )^{2} - 4 \, \log \left (\log \relax (5) - 1\right ) - 4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [C]  time = 0.38, size = 44, normalized size = 1.38 \begin {gather*} x^{2} - x - \frac {-4 i \, \pi - \pi ^{2} - 2 i \, \pi \log \left (\log \relax (5) - 1\right ) + \log \left (\log \relax (5) - 1\right )^{2} + 4 \, \log \left (\log \relax (5) - 1\right ) + 4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.07, size = 123, normalized size = 3.84




method result size



default \(-\frac {\ln \left (-x \right )^{2}}{x}+\frac {2 \ln \left (-x \right )}{x}-\frac {4}{x}-\frac {\ln \left (\ln \relax (5)-1\right )^{2}}{x}+\frac {2 \ln \left (\ln \relax (5)-1\right ) \ln \left (-x \right )}{x}-\frac {2 \ln \left (\ln \relax (5)-1\right )}{x}+\frac {\left (-2-2 \ln \left (\ln \relax (5)-1\right )\right ) \ln \relax (x )+2 \ln \relax (x ) \ln \left (-x \right )+2 \ln \left (-x \right )-2 \ln \left (\ln \relax (5)-1\right )}{x}+x^{2}-x -\frac {\ln \relax (x )^{2}}{x}-\frac {2 \ln \relax (x )}{x}\) \(123\)
risch \(x^{2}-x +\frac {-4+\pi ^{2}+4 i \pi +2 \pi ^{2} \mathrm {csgn}\left (i x \right )^{3}-\ln \left (\ln \relax (5)-1\right )^{2}+2 i \ln \left (\ln \relax (5)-1\right ) \pi \mathrm {csgn}\left (i x \right )^{3}-2 i \ln \left (\ln \relax (5)-1\right ) \pi \mathrm {csgn}\left (i x \right )^{2}+2 i \pi \ln \left (\ln \relax (5)-1\right )-4 \ln \left (\ln \relax (5)-1\right )+\pi ^{2} \mathrm {csgn}\left (i x \right )^{6}+4 i \pi \mathrm {csgn}\left (i x \right )^{3}-4 i \pi \mathrm {csgn}\left (i x \right )^{2}-2 \pi ^{2} \mathrm {csgn}\left (i x \right )^{2}+\pi ^{2} \mathrm {csgn}\left (i x \right )^{4}-2 \pi ^{2} \mathrm {csgn}\left (i x \right )^{5}}{x}\) \(158\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((ln(x)^2+(-2*ln(-x/(ln(5)-1))+4)*ln(x)+ln(-x/(ln(5)-1))^2-4*ln(-x/(ln(5)-1))+2*x^3-x^2+4)/x^2,x,method=_RE
TURNVERBOSE)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.98, size = 28, normalized size = 0.88 \begin {gather*} x\,\left (x-1\right )-\frac {{\left (\ln \left (\ln \relax (5)-1\right )-\ln \left (-x\right )+\ln \relax (x)+2\right )}^2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [C]  time = 0.32, size = 44, normalized size = 1.38 \begin {gather*} x^{2} - x + \frac {-4 - \log {\left (-1 + \log {\relax (5 )} \right )}^{2} - 4 \log {\left (-1 + \log {\relax (5 )} \right )} + \pi ^{2} + 2 i \pi \log {\left (-1 + \log {\relax (5 )} \right )} + 4 i \pi }{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2 - x + (-4 - log(-1 + log(5))**2 - 4*log(-1 + log(5)) + pi**2 + 2*I*pi*log(-1 + log(5)) + 4*I*pi)/x

________________________________________________________________________________________