3.45.53 \(\int \frac {-9+8 x+4 x^3-4 x^4+x^5+(4+x+x^2-x^3) \log (4+x+x^2-x^3)}{4-3 x+4 x^2-x^3+2 x^4-x^5+(-4-x-x^2+x^3) \log (4+x+x^2-x^3)} \, dx\)

Optimal. Leaf size=29 \[ -4-x+\log \left ((-1+x)^2+x-\log \left (4-x \left (-1-x+x^2\right )\right )\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.52, antiderivative size = 27, normalized size of antiderivative = 0.93, number of steps used = 4, number of rules used = 3, integrand size = 96, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.031, Rules used = {6741, 6742, 6684} \begin {gather*} \log \left (x^2-\log \left (-x^3+x^2+x+4\right )-x+1\right )-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + Log[1 - x + x^2 - Log[4 + x + x^2 - x^3]]

Rule 6684

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*Log[RemoveContent[y, x]], x] /;  !Fa
lseQ[q]]

Rule 6741

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

Rule 6742

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

-x + Log[1 - x + x^2 - Log[4 + x + x^2 - x^3]]

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 25, normalized size = 0.86 \begin {gather*} -x + \log \left (-x^{2} + x + \log \left (-x^{3} + x^{2} + x + 4\right ) - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 25, normalized size = 0.86 \begin {gather*} -x + \log \left (-x^{2} + x + \log \left (-x^{3} + x^{2} + x + 4\right ) - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 26, normalized size = 0.90




method result size



risch \(-x +\ln \left (-x^{2}+\ln \left (-x^{3}+x^{2}+x +4\right )+x -1\right )\) \(26\)
norman \(-x +\ln \left (x^{2}-x -\ln \left (-x^{3}+x^{2}+x +4\right )+1\right )\) \(28\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x+ln(-x^2+ln(-x^3+x^2+x+4)+x-1)

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 25, normalized size = 0.86 \begin {gather*} -x + \log \left (-x^{2} + x + \log \left (-x^{3} + x^{2} + x + 4\right ) - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.26, size = 25, normalized size = 0.86 \begin {gather*} \ln \left (x+\ln \left (-x^3+x^2+x+4\right )-x^2-1\right )-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.32, size = 20, normalized size = 0.69 \begin {gather*} - x + \log {\left (- x^{2} + x + \log {\left (- x^{3} + x^{2} + x + 4 \right )} - 1 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________