3.54.82 \(\int \frac {(3+x+9 x^2+3 x^3) \log (3+x)+(3+x+x^3) \log (-9-3 x-3 x^3)}{9+6 x+x^2+3 x^3+x^4} \, dx\) [5382]

Optimal. Leaf size=18 \[ \log (3+x) \log \left (3 \left (-3-x-x^3\right )\right ) \]

[Out]

ln(3+x)*ln(-3*x^3-3*x-9)

________________________________________________________________________________________

Rubi [A]
time = 0.29, antiderivative size = 14, normalized size of antiderivative = 0.78, number of steps used = 7, number of rules used = 3, integrand size = 56, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.054, Rules used = {6874, 2465, 2604} \begin {gather*} \log (x+3) \log \left (-3 \left (x^3+x+3\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[3 + x]*Log[-3*(3 + x + x^3)]

Rule 2465

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 2604

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[Log[d + e*x]*((a + b
*Log[c*RFx^p])^n/e), x] - Dist[b*n*(p/e), Int[Log[d + e*x]*(a + b*Log[c*RFx^p])^(n - 1)*(D[RFx, x]/RFx), x], x
] /; FreeQ[{a, b, c, d, e, p}, x] && RationalFunctionQ[RFx, x] && IGtQ[n, 0]

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 {\left (1+3 x^2\right ) \log (3+x)}{3+x+x^3}+\frac {\log \left (-3 \left (3+x+x^3\right )\right )}{3+x}\right ) \, dx\\ &=\int \frac {\left (1+3 x^2\right ) \log (3+x)}{3+x+x^3} \, dx+\int \frac {\log \left (-3 \left (3+x+x^3\right )\right )}{3+x} \, dx\\ &=\log (3+x) \log \left (-3 \left (3+x+x^3\right )\right )-\int \frac {\left (1+3 x^2\right ) \log (3+x)}{3+x+x^3} \, dx+\int \left (\frac {\log (3+x)}{3+x+x^3}+\frac {3 x^2 \log (3+x)}{3+x+x^3}\right ) \, dx\\ &=\log (3+x) \log \left (-3 \left (3+x+x^3\right )\right )+3 \int \frac {x^2 \log (3+x)}{3+x+x^3} \, dx+\int \frac {\log (3+x)}{3+x+x^3} \, dx-\int \left (\frac {\log (3+x)}{3+x+x^3}+\frac {3 x^2 \log (3+x)}{3+x+x^3}\right ) \, dx\\ &=\log (3+x) \log \left (-3 \left (3+x+x^3\right )\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 14, normalized size = 0.78 \begin {gather*} \log (3+x) \log \left (-3 \left (3+x+x^3\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[3 + x]*Log[-3*(3 + x + x^3)]

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 25, normalized size = 1.39

method result size
risch \(\ln \left (3+x \right ) \ln \left (-3 x^{3}-3 x -9\right )\) \(17\)
default \(\ln \left (3\right ) \ln \left (3+x \right )+\ln \left (3+x \right ) \ln \left (-x^{3}-x -3\right )\) \(25\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

ln(3)*ln(3+x)+ln(3+x)*ln(-x^3-x-3)

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.54, size = 24, normalized size = 1.33 \begin {gather*} {\left (i \, \pi + \log \left (3\right )\right )} \log \left (x + 3\right ) + \log \left (x^{3} + x + 3\right ) \log \left (x + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(I*pi + log(3))*log(x + 3) + log(x^3 + x + 3)*log(x + 3)

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 16, normalized size = 0.89 \begin {gather*} \log \left (-3 \, x^{3} - 3 \, x - 9\right ) \log \left (x + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(-3*x^3 - 3*x - 9)*log(x + 3)

________________________________________________________________________________________

Sympy [A]
time = 0.11, size = 17, normalized size = 0.94 \begin {gather*} \log {\left (x + 3 \right )} \log {\left (- 3 x^{3} - 3 x - 9 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x + 3)*log(-3*x**3 - 3*x - 9)

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 16, normalized size = 0.89 \begin {gather*} \log \left (-3 \, x^{3} - 3 \, x - 9\right ) \log \left (x + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(-3*x^3 - 3*x - 9)*log(x + 3)

________________________________________________________________________________________

Mupad [B]
time = 3.67, size = 19, normalized size = 1.06 \begin {gather*} \ln \left (x+3\right )\,\left (\ln \left (3\right )+\ln \left (-x^3-x-3\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x + 3)*(log(3) + log(- x - x^3 - 3))

________________________________________________________________________________________