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\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.27, 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 = {6742, 2418, 2524} \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 2418

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 2524

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 6742

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.10, 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)]

________________________________________________________________________________________

fricas [A]  time = 0.56, 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)

________________________________________________________________________________________

giac [A]  time = 0.14, 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)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 17, normalized size = 0.94




method result size



risch \(\ln \left (3+x \right ) \ln \left (-3 x^{3}-3 x -9\right )\) \(17\)
default \(\ln \relax (3) \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+x)*ln(-3*x^3-3*x-9)

________________________________________________________________________________________

maxima [C]  time = 0.57, size = 24, normalized size = 1.33 \begin {gather*} {\left (i \, \pi + \log \relax (3)\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)

________________________________________________________________________________________

mupad [B]  time = 3.67, size = 19, normalized size = 1.06 \begin {gather*} \ln \left (x+3\right )\,\left (\ln \relax (3)+\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))

________________________________________________________________________________________

sympy [A]  time = 0.33, 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)

________________________________________________________________________________________