3.77.64 \(\int \frac {(-2-2 x^2+4 x^3) \log (\frac {1+3 x-x^2+x^3}{x})}{x+3 x^2-x^3+x^4} \, dx\) [7664]

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

[Out]

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

________________________________________________________________________________________

Rubi [F]
time = 16.19, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {\left (-2-2 x^2+4 x^3\right ) \log \left (\frac {1+3 x-x^2+x^3}{x}\right )}{x+3 x^2-x^3+x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

-Log[x]^2 - 2*Log[x]*Log[(1 + 3*x - x^2 + x^3)/x] + 6*Defer[Int][Log[x]/(1 + 3*x - x^2 + x^3), x] - 4*Defer[In
t][(x*Log[x])/(1 + 3*x - x^2 + x^3), x] + 6*Defer[Int][(x^2*Log[x])/(1 + 3*x - x^2 + x^3), x] + 6*Defer[Int][L
og[3 + x^(-1) - x + x^2]/(1 + 3*x - x^2 + x^3), x] - 4*Defer[Int][(x*Log[3 + x^(-1) - x + x^2])/(1 + 3*x - x^2
 + x^3), x] + 6*Defer[Int][(x^2*Log[3 + x^(-1) - x + x^2])/(1 + 3*x - x^2 + x^3), x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.15, size = 14, normalized size = 0.74 \begin {gather*} \log ^2\left (3+\frac {1}{x}-x+x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[3 + x^(-1) - x + x^2]^2

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 1.55, size = 558, normalized size = 29.37

method result size
norman \(\ln \left (\frac {x^{3}-x^{2}+3 x +1}{x}\right )^{2}\) \(21\)
default \(\text {Expression too large to display}\) \(558\)
risch \(\text {Expression too large to display}\) \(5048\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*Sum(ln(x-_alpha)*ln((x^3-x^2+3*x+1)/x)-ln(x-_alpha)*ln((_alpha-1-(-3*_alpha^2+2*_alpha-11)^(1/2)+2*x)/(3*_al
pha-1-(-3*_alpha^2+2*_alpha-11)^(1/2)))-ln(x-_alpha)*ln((_alpha-1+(-3*_alpha^2+2*_alpha-11)^(1/2)+2*x)/(3*_alp
ha-1+(-3*_alpha^2+2*_alpha-11)^(1/2)))-dilog((_alpha-1-(-3*_alpha^2+2*_alpha-11)^(1/2)+2*x)/(3*_alpha-1-(-3*_a
lpha^2+2*_alpha-11)^(1/2)))-dilog((_alpha-1+(-3*_alpha^2+2*_alpha-11)^(1/2)+2*x)/(3*_alpha-1+(-3*_alpha^2+2*_a
lpha-11)^(1/2)))-1/2*ln(x-_alpha)^2+dilog(x/_alpha)+ln(x-_alpha)*ln(x/_alpha),_alpha=RootOf(_Z^3-_Z^2+3*_Z+1))
-2*ln(x)*ln((x^3-x^2+3*x+1)/x)+2*ln(x)*ln((RootOf(_Z^3-_Z^2+3*_Z+1,index=1)-x)/RootOf(_Z^3-_Z^2+3*_Z+1,index=1
))+2*dilog((RootOf(_Z^3-_Z^2+3*_Z+1,index=1)-x)/RootOf(_Z^3-_Z^2+3*_Z+1,index=1))+2*ln(x)*ln((RootOf(_Z^3-_Z^2
+3*_Z+1,index=2)-x)/RootOf(_Z^3-_Z^2+3*_Z+1,index=2))+2*dilog((RootOf(_Z^3-_Z^2+3*_Z+1,index=2)-x)/RootOf(_Z^3
-_Z^2+3*_Z+1,index=2))+2*ln(x)*ln((RootOf(_Z^3-_Z^2+3*_Z+1,index=3)-x)/RootOf(_Z^3-_Z^2+3*_Z+1,index=3))+2*dil
og((RootOf(_Z^3-_Z^2+3*_Z+1,index=3)-x)/RootOf(_Z^3-_Z^2+3*_Z+1,index=3))-ln(x)^2

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 82 vs. \(2 (18) = 36\).
time = 0.28, size = 82, normalized size = 4.32 \begin {gather*} -\log \left (x^{3} - x^{2} + 3 \, x + 1\right )^{2} + 2 \, \log \left (x^{3} - x^{2} + 3 \, x + 1\right ) \log \left (x\right ) - \log \left (x\right )^{2} + 2 \, {\left (\log \left (x^{3} - x^{2} + 3 \, x + 1\right ) - \log \left (x\right )\right )} \log \left (\frac {x^{3} - x^{2} + 3 \, x + 1}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 20, normalized size = 1.05 \begin {gather*} \log \left (\frac {x^{3} - x^{2} + 3 \, x + 1}{x}\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 5.24, size = 14, normalized size = 0.74 \begin {gather*} {\ln \left (\frac {1}{x}-x+x^2+3\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________