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

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

________________________________________________________________________________________

Rubi [A]  time = 0.37, antiderivative size = 32, normalized size of antiderivative = 1.14, number of steps used = 9, number of rules used = 7, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.127, Rules used = {1593, 6688, 14, 1802, 2302, 29, 2304} \begin {gather*} -x+\frac {2}{x}+2 \log (1-x)+3 \log (x+1)+\log (\log (x))+\frac {\log (x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2/x - x + 2*Log[1 - x] + Log[x]/x + 3*Log[1 + x] + Log[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 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 2302

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 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 6688

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 32, normalized size = 1.14 \begin {gather*} \frac {2}{x}-x+2 \log (1-x)+\frac {\log (x)}{x}+3 \log (1+x)+\log (\log (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2/x - x + 2*Log[1 - x] + Log[x]/x + 3*Log[1 + x] + Log[Log[x]]

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 34, normalized size = 1.21 \begin {gather*} -\frac {x^{2} - 3 \, x \log \left (x + 1\right ) - 2 \, x \log \left (x - 1\right ) - x \log \left (\log \relax (x)\right ) - \log \relax (x) - 2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 30, normalized size = 1.07 \begin {gather*} -x + \frac {\log \relax (x)}{x} + \frac {2}{x} + 3 \, \log \left (x + 1\right ) + 2 \, \log \left (x - 1\right ) + \log \left (\log \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.36, size = 30, normalized size = 1.07




method result size



norman \(\frac {2-x^{2}+\ln \relax (x )}{x}+2 \ln \left (x -1\right )+3 \ln \left (x +1\right )+\ln \left (\ln \relax (x )\right )\) \(30\)
default \(\ln \left (\ln \relax (x )\right )+\frac {\ln \relax (x )}{x}+\frac {2}{x}-x +3 \ln \left (x +1\right )+2 \ln \left (x -1\right )\) \(31\)
risch \(\frac {\ln \relax (x )}{x}+\frac {3 \ln \left (x +1\right ) x +2 \ln \left (x -1\right ) x -x^{2}+2}{x}+\ln \left (\ln \relax (x )\right )\) \(36\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.79, size = 30, normalized size = 1.07 \begin {gather*} -\frac {x^{2} - \log \relax (x) - 2}{x} + 3 \, \log \left (x + 1\right ) + 2 \, \log \left (x - 1\right ) + \log \left (\log \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.22, size = 27, normalized size = 0.96 \begin {gather*} 2\,\ln \left (x-1\right )-x+3\,\ln \left (x+1\right )+\ln \left (\ln \relax (x)\right )+\frac {\ln \relax (x)+2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 27, normalized size = 0.96 \begin {gather*} - x + 2 \log {\left (x - 1 \right )} + 3 \log {\left (x + 1 \right )} + \log {\left (\log {\relax (x )} \right )} + \frac {\log {\relax (x )}}{x} + \frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________