3.80.7 \(\int \frac {54+90 x+45 x^2+7 x^3+(9 x^2+2 x^3) \log (x)+(27+18 x+3 x^2) \log (x^2)}{27+18 x+3 x^2} \, dx\) [7907]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.16, antiderivative size = 34, normalized size of antiderivative = 1.21, number of steps used = 17, number of rules used = 9, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {27, 12, 6874, 45, 2404, 2332, 2341, 2351, 31} \begin {gather*} x^2+\frac {1}{3} x^2 \log (x)+x \log \left (x^2\right )+\frac {3 x \log (x)}{x+3}-x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(54 + 90*x + 45*x^2 + 7*x^3 + (9*x^2 + 2*x^3)*Log[x] + (27 + 18*x + 3*x^2)*Log[x^2])/(27 + 18*x + 3*x^2),x
]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2341

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 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp[x*(d + e*x^r)^(q +
 1)*((a + b*Log[c*x^n])/d), x] - Dist[b*(n/d), Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q,
r}, x] && EqQ[r*(q + 1) + 1, 0]

Rule 2404

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 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 \frac {54+90 x+45 x^2+7 x^3+\left (9 x^2+2 x^3\right ) \log (x)+\left (27+18 x+3 x^2\right ) \log \left (x^2\right )}{3 (3+x)^2} \, dx\\ &=\frac {1}{3} \int \frac {54+90 x+45 x^2+7 x^3+\left (9 x^2+2 x^3\right ) \log (x)+\left (27+18 x+3 x^2\right ) \log \left (x^2\right )}{(3+x)^2} \, dx\\ &=\frac {1}{3} \int \left (\frac {54}{(3+x)^2}+\frac {90 x}{(3+x)^2}+\frac {45 x^2}{(3+x)^2}+\frac {7 x^3}{(3+x)^2}+\frac {x^2 (9+2 x) \log (x)}{(3+x)^2}+3 \log \left (x^2\right )\right ) \, dx\\ &=-\frac {18}{3+x}+\frac {1}{3} \int \frac {x^2 (9+2 x) \log (x)}{(3+x)^2} \, dx+\frac {7}{3} \int \frac {x^3}{(3+x)^2} \, dx+15 \int \frac {x^2}{(3+x)^2} \, dx+30 \int \frac {x}{(3+x)^2} \, dx+\int \log \left (x^2\right ) \, dx\\ &=-2 x-\frac {18}{3+x}+x \log \left (x^2\right )+\frac {1}{3} \int \left (-3 \log (x)+2 x \log (x)+\frac {27 \log (x)}{(3+x)^2}\right ) \, dx+\frac {7}{3} \int \left (-6+x-\frac {27}{(3+x)^2}+\frac {27}{3+x}\right ) \, dx+15 \int \left (1+\frac {9}{(3+x)^2}-\frac {6}{3+x}\right ) \, dx+30 \int \left (-\frac {3}{(3+x)^2}+\frac {1}{3+x}\right ) \, dx\\ &=-x+\frac {7 x^2}{6}+x \log \left (x^2\right )+3 \log (3+x)+\frac {2}{3} \int x \log (x) \, dx+9 \int \frac {\log (x)}{(3+x)^2} \, dx-\int \log (x) \, dx\\ &=x^2-x \log (x)+\frac {1}{3} x^2 \log (x)+\frac {3 x \log (x)}{3+x}+x \log \left (x^2\right )+3 \log (3+x)-3 \int \frac {1}{3+x} \, dx\\ &=x^2-x \log (x)+\frac {1}{3} x^2 \log (x)+\frac {3 x \log (x)}{3+x}+x \log \left (x^2\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[(54 + 90*x + 45*x^2 + 7*x^3 + (9*x^2 + 2*x^3)*Log[x] + (27 + 18*x + 3*x^2)*Log[x^2])/(27 + 18*x + 3*
x^2),x]

[Out]

((x^3*Log[x])/(3 + x) + 3*x*(x + Log[x^2]))/3

________________________________________________________________________________________

Maple [A]
time = 1.85, size = 33, normalized size = 1.18

method result size
default \(x^{2}+\frac {x^{2} \ln \left (x \right )}{3}-x \ln \left (x \right )+\frac {3 \ln \left (x \right ) x}{3+x}+x \ln \left (x^{2}\right )\) \(33\)
risch \(\frac {\left (x^{3}+6 x^{2}+9 x -27\right ) \ln \left (x \right )}{3 x +9}-\frac {i \pi x \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )}{2}+i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-\frac {i \pi x \mathrm {csgn}\left (i x^{2}\right )^{3}}{2}+x^{2}+3 \ln \left (x \right )\) \(83\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((3*x^2+18*x+27)*ln(x^2)+(2*x^3+9*x^2)*ln(x)+7*x^3+45*x^2+90*x+54)/(3*x^2+18*x+27),x,method=_RETURNVERBOSE
)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.31, size = 47, normalized size = 1.68 \begin {gather*} \frac {7}{6} \, x^{2} + x - \frac {x^{3} + 9 \, x^{2} - 2 \, {\left (x^{3} + 6 \, x^{2} + 9 \, x - 27\right )} \log \left (x\right ) + 18 \, x}{6 \, {\left (x + 3\right )}} + 3 \, \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^2+18*x+27)*log(x^2)+(2*x^3+9*x^2)*log(x)+7*x^3+45*x^2+90*x+54)/(3*x^2+18*x+27),x, algorithm="m
axima")

[Out]

7/6*x^2 + x - 1/6*(x^3 + 9*x^2 - 2*(x^3 + 6*x^2 + 9*x - 27)*log(x) + 18*x)/(x + 3) + 3*log(x)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 33, normalized size = 1.18 \begin {gather*} \frac {3 \, x^{3} + 9 \, x^{2} + {\left (x^{3} + 6 \, x^{2} + 18 \, x\right )} \log \left (x\right )}{3 \, {\left (x + 3\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^2+18*x+27)*log(x^2)+(2*x^3+9*x^2)*log(x)+7*x^3+45*x^2+90*x+54)/(3*x^2+18*x+27),x, algorithm="f
ricas")

[Out]

1/3*(3*x^3 + 9*x^2 + (x^3 + 6*x^2 + 18*x)*log(x))/(x + 3)

________________________________________________________________________________________

Sympy [A]
time = 0.09, size = 29, normalized size = 1.04 \begin {gather*} x^{2} + 3 \log {\left (x \right )} + \frac {\left (x^{3} + 6 x^{2} + 9 x - 27\right ) \log {\left (x \right )}}{3 x + 9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x**2+18*x+27)*ln(x**2)+(2*x**3+9*x**2)*ln(x)+7*x**3+45*x**2+90*x+54)/(3*x**2+18*x+27),x)

[Out]

x**2 + 3*log(x) + (x**3 + 6*x**2 + 9*x - 27)*log(x)/(3*x + 9)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x^2+18*x+27)*log(x^2)+(2*x^3+9*x^2)*log(x)+7*x^3+45*x^2+90*x+54)/(3*x^2+18*x+27),x, algorithm="g
iac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 5.50, size = 37, normalized size = 1.32 \begin {gather*} \frac {x\,\left (9\,x+9\,\ln \left (x^2\right )+3\,x\,\ln \left (x^2\right )+x^2\,\ln \left (x\right )+3\,x^2\right )}{3\,\left (x+3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((90*x + log(x)*(9*x^2 + 2*x^3) + log(x^2)*(18*x + 3*x^2 + 27) + 45*x^2 + 7*x^3 + 54)/(18*x + 3*x^2 + 27),x
)

[Out]

(x*(9*x + 9*log(x^2) + 3*x*log(x^2) + x^2*log(x) + 3*x^2))/(3*(x + 3))

________________________________________________________________________________________