3.3.85 \(\int x^2 \log (1+x) \, dx\) [285]

Optimal. Leaf size=39 \[ -\frac {x}{3}+\frac {x^2}{6}-\frac {x^3}{9}+\frac {1}{3} \log (1+x)+\frac {1}{3} x^3 \log (1+x) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2442, 45} \begin {gather*} -\frac {x^3}{9}+\frac {1}{3} x^3 \log (x+1)+\frac {x^2}{6}-\frac {x}{3}+\frac {1}{3} \log (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*Log[1 + x],x]

[Out]

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

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 2442

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

Rubi steps

\begin {align*} \int x^2 \log (1+x) \, dx &=\frac {1}{3} x^3 \log (1+x)-\frac {1}{3} \int \frac {x^3}{1+x} \, dx\\ &=\frac {1}{3} x^3 \log (1+x)-\frac {1}{3} \int \left (1+\frac {1}{-1-x}-x+x^2\right ) \, dx\\ &=-\frac {x}{3}+\frac {x^2}{6}-\frac {x^3}{9}+\frac {1}{3} \log (1+x)+\frac {1}{3} x^3 \log (1+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 28, normalized size = 0.72 \begin {gather*} \frac {1}{18} \left (x \left (-6+3 x-2 x^2\right )+6 \left (1+x^3\right ) \log (1+x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*Log[1 + x],x]

[Out]

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

________________________________________________________________________________________

Mathics [A]
time = 1.85, size = 29, normalized size = 0.74 \begin {gather*} -\frac {x}{3}+\frac {x^2}{6}-\frac {x^3}{9}+\frac {x^3 \text {Log}\left [1+x\right ]}{3}+\frac {\text {Log}\left [1+x\right ]}{3} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[x^2*Log[1 + x],x]')

[Out]

-x / 3 + x ^ 2 / 6 - x ^ 3 / 9 + x ^ 3 Log[1 + x] / 3 + Log[1 + x] / 3

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 50, normalized size = 1.28

method result size
meijerg \(-\frac {x \left (4 x^{2}-6 x +12\right )}{36}+\frac {\left (4 x^{3}+4\right ) \ln \left (1+x \right )}{12}\) \(28\)
norman \(-\frac {x}{3}+\frac {x^{2}}{6}-\frac {x^{3}}{9}+\frac {\ln \left (1+x \right )}{3}+\frac {x^{3} \ln \left (1+x \right )}{3}\) \(30\)
risch \(-\frac {x}{3}+\frac {x^{2}}{6}-\frac {x^{3}}{9}+\frac {\ln \left (1+x \right )}{3}+\frac {x^{3} \ln \left (1+x \right )}{3}\) \(30\)
derivativedivides \(\frac {\left (1+x \right )^{3} \ln \left (1+x \right )}{3}-\frac {\left (1+x \right )^{3}}{9}-\ln \left (1+x \right ) \left (1+x \right )^{2}+\frac {\left (1+x \right )^{2}}{2}+\left (1+x \right ) \ln \left (1+x \right )-1-x\) \(50\)
default \(\frac {\left (1+x \right )^{3} \ln \left (1+x \right )}{3}-\frac {\left (1+x \right )^{3}}{9}-\ln \left (1+x \right ) \left (1+x \right )^{2}+\frac {\left (1+x \right )^{2}}{2}+\left (1+x \right ) \ln \left (1+x \right )-1-x\) \(50\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*ln(1+x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 29, normalized size = 0.74 \begin {gather*} \frac {1}{3} \, x^{3} \log \left (x + 1\right ) - \frac {1}{9} \, x^{3} + \frac {1}{6} \, x^{2} - \frac {1}{3} \, x + \frac {1}{3} \, \log \left (x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*log(1+x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 25, normalized size = 0.64 \begin {gather*} -\frac {1}{9} \, x^{3} + \frac {1}{6} \, x^{2} + \frac {1}{3} \, {\left (x^{3} + 1\right )} \log \left (x + 1\right ) - \frac {1}{3} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*log(1+x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*ln(1+x),x)

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 52, normalized size = 1.33 \begin {gather*} -\frac {\left (x+1\right )^{3}}{9}+\frac {\left (x+1\right )^{2}}{2}-\left (x+1\right )^{2} \ln \left (x+1\right )+\frac {1}{3} \left (x+1\right )^{3} \ln \left (x+1\right )+\left (x+1\right ) \ln \left (x+1\right )-x-1 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*log(1+x),x)

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 25, normalized size = 0.64 \begin {gather*} \frac {x^2}{6}-\frac {x}{3}-\frac {x^3}{9}+\frac {\ln \left (x+1\right )\,\left (x^3+1\right )}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*log(x + 1),x)

[Out]

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

________________________________________________________________________________________