3.228 \(\int x \log (\sqrt {2+x}) \, dx\)

Optimal. Leaf size=34 \[ -\frac {x^2}{8}+\frac {1}{2} x^2 \log \left (\sqrt {x+2}\right )+\frac {x}{2}-\log (x+2) \]

[Out]

1/2*x-1/8*x^2-ln(2+x)+1/4*x^2*ln(2+x)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2395, 43} \[ -\frac {x^2}{8}+\frac {1}{2} x^2 \log \left (\sqrt {x+2}\right )+\frac {x}{2}-\log (x+2) \]

Antiderivative was successfully verified.

[In]

Int[x*Log[Sqrt[2 + x]],x]

[Out]

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

Rule 43

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 2395

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 30, normalized size = 0.88 \[ \frac {1}{2} \left (-\frac {x^2}{4}+\frac {1}{2} x^2 \log (x+2)+x-2 \log (x+2)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x*Log[Sqrt[2 + x]],x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 20, normalized size = 0.59 \[ -\frac {1}{8} \, x^{2} + \frac {1}{4} \, {\left (x^{2} - 4\right )} \log \left (x + 2\right ) + \frac {1}{2} \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/8*x^2 + 1/4*(x^2 - 4)*log(x + 2) + 1/2*x

________________________________________________________________________________________

giac [A]  time = 0.15, size = 30, normalized size = 0.88 \[ \frac {1}{4} \, {\left (x + 2\right )}^{2} \log \left (x + 2\right ) - \frac {1}{8} \, {\left (x + 2\right )}^{2} - {\left (x + 2\right )} \log \left (x + 2\right ) + x + 2 \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*x*log(2+x),x, algorithm="giac")

[Out]

1/4*(x + 2)^2*log(x + 2) - 1/8*(x + 2)^2 - (x + 2)*log(x + 2) + x + 2

________________________________________________________________________________________

maple [A]  time = 0.06, size = 31, normalized size = 0.91 \[ -\frac {x^{2}}{8}+\frac {x}{2}-\left (x +2\right ) \ln \left (x +2\right )+\frac {\left (x +2\right )^{2} \ln \left (x +2\right )}{4}+\frac {3}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/2*x*ln(x+2),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 24, normalized size = 0.71 \[ \frac {1}{4} \, x^{2} \log \left (x + 2\right ) - \frac {1}{8} \, x^{2} + \frac {1}{2} \, x - \log \left (x + 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*x^2*log(x + 2) - 1/8*x^2 + 1/2*x - log(x + 2)

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 20, normalized size = 0.59 \[ \frac {x}{2}-\frac {x^2}{8}+\frac {\ln \left (x+2\right )\,\left (x^2-4\right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*log(x + 2))/2,x)

[Out]

x/2 - x^2/8 + (log(x + 2)*(x^2 - 4))/4

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 22, normalized size = 0.65 \[ \frac {x^{2} \log {\left (x + 2 \right )}}{4} - \frac {x^{2}}{8} + \frac {x}{2} - \log {\left (x + 2 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2*log(x + 2)/4 - x**2/8 + x/2 - log(x + 2)

________________________________________________________________________________________