\(\int x \log (\sqrt {2+x}) \, dx\) [228]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 34 \[ \int x \log \left (\sqrt {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) \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2442, 45} \[ \int x \log \left (\sqrt {2+x}\right ) \, dx=-\frac {x^2}{8}+\frac {1}{2} x^2 \log \left (\sqrt {x+2}\right )+\frac {x}{2}-\log (x+2) \]

[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 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*} \text {integral}& = \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] (verified)

Time = 0.01 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.88 \[ \int x \log \left (\sqrt {2+x}\right ) \, dx=\frac {1}{2} \left (x-\frac {x^2}{4}-2 \log (2+x)+\frac {1}{2} x^2 \log (2+x)\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.74

method result size
norman \(\frac {x}{2}-\frac {x^{2}}{8}-\ln \left (x +2\right )+\frac {x^{2} \ln \left (x +2\right )}{4}\) \(25\)
risch \(\frac {x}{2}-\frac {x^{2}}{8}-\ln \left (x +2\right )+\frac {x^{2} \ln \left (x +2\right )}{4}\) \(25\)
parts \(\frac {x}{2}-\frac {x^{2}}{8}-\ln \left (x +2\right )+\frac {x^{2} \ln \left (x +2\right )}{4}\) \(25\)
parallelrisch \(\frac {x^{2} \ln \left (x +2\right )}{4}-\frac {x^{2}}{8}+\frac {x}{2}-\ln \left (x +2\right )-1\) \(26\)
derivativedivides \(-\ln \left (x +2\right ) \left (x +2\right )+x +2+\frac {\left (x +2\right )^{2} \ln \left (x +2\right )}{4}-\frac {\left (x +2\right )^{2}}{8}\) \(31\)
default \(-\ln \left (x +2\right ) \left (x +2\right )+x +2+\frac {\left (x +2\right )^{2} \ln \left (x +2\right )}{4}-\frac {\left (x +2\right )^{2}}{8}\) \(31\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.59 \[ \int x \log \left (\sqrt {2+x}\right ) \, dx=-\frac {1}{8} \, x^{2} + \frac {1}{4} \, {\left (x^{2} - 4\right )} \log \left (x + 2\right ) + \frac {1}{2} \, x \]

[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

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.65 \[ \int x \log \left (\sqrt {2+x}\right ) \, dx=\frac {x^{2} \log {\left (x + 2 \right )}}{4} - \frac {x^{2}}{8} + \frac {x}{2} - \log {\left (x + 2 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.71 \[ \int x \log \left (\sqrt {2+x}\right ) \, dx=\frac {1}{4} \, x^{2} \log \left (x + 2\right ) - \frac {1}{8} \, x^{2} + \frac {1}{2} \, x - \log \left (x + 2\right ) \]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.88 \[ \int x \log \left (\sqrt {2+x}\right ) \, dx=\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 \]

[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

Mupad [B] (verification not implemented)

Time = 1.54 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.59 \[ \int x \log \left (\sqrt {2+x}\right ) \, dx=\frac {x}{2}-\frac {x^2}{8}+\frac {\ln \left (x+2\right )\,\left (x^2-4\right )}{4} \]

[In]

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

[Out]

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