\(\int \frac {x}{4+4 x+x^2} \, dx\) [187]

   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 = 12, antiderivative size = 12 \[ \int \frac {x}{4+4 x+x^2} \, dx=\frac {2}{2+x}+\log (2+x) \]

[Out]

2/(2+x)+ln(2+x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 12, 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.167, Rules used = {27, 45} \[ \int \frac {x}{4+4 x+x^2} \, dx=\frac {2}{x+2}+\log (x+2) \]

[In]

Int[x/(4 + 4*x + x^2),x]

[Out]

2/(2 + x) + Log[2 + 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 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])

Rubi steps \begin{align*} \text {integral}& = \int \frac {x}{(2+x)^2} \, dx \\ & = \int \left (-\frac {2}{(2+x)^2}+\frac {1}{2+x}\right ) \, dx \\ & = \frac {2}{2+x}+\log (2+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \frac {x}{4+4 x+x^2} \, dx=\frac {2}{2+x}+\log (2+x) \]

[In]

Integrate[x/(4 + 4*x + x^2),x]

[Out]

2/(2 + x) + Log[2 + x]

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08

method result size
default \(\frac {2}{2+x}+\ln \left (2+x \right )\) \(13\)
norman \(\frac {2}{2+x}+\ln \left (2+x \right )\) \(13\)
risch \(\frac {2}{2+x}+\ln \left (2+x \right )\) \(13\)
meijerg \(-\frac {x}{2 \left (1+\frac {x}{2}\right )}+\ln \left (1+\frac {x}{2}\right )\) \(18\)
parallelrisch \(\frac {\ln \left (2+x \right ) x +2+2 \ln \left (2+x \right )}{2+x}\) \(21\)

[In]

int(x/(x^2+4*x+4),x,method=_RETURNVERBOSE)

[Out]

2/(2+x)+ln(2+x)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.33 \[ \int \frac {x}{4+4 x+x^2} \, dx=\frac {{\left (x + 2\right )} \log \left (x + 2\right ) + 2}{x + 2} \]

[In]

integrate(x/(x^2+4*x+4),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.67 \[ \int \frac {x}{4+4 x+x^2} \, dx=\log {\left (x + 2 \right )} + \frac {2}{x + 2} \]

[In]

integrate(x/(x**2+4*x+4),x)

[Out]

log(x + 2) + 2/(x + 2)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \frac {x}{4+4 x+x^2} \, dx=\frac {2}{x + 2} + \log \left (x + 2\right ) \]

[In]

integrate(x/(x^2+4*x+4),x, algorithm="maxima")

[Out]

2/(x + 2) + log(x + 2)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08 \[ \int \frac {x}{4+4 x+x^2} \, dx=\frac {2}{x + 2} + \log \left ({\left | x + 2 \right |}\right ) \]

[In]

integrate(x/(x^2+4*x+4),x, algorithm="giac")

[Out]

2/(x + 2) + log(abs(x + 2))

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \frac {x}{4+4 x+x^2} \, dx=\ln \left (x+2\right )+\frac {2}{x+2} \]

[In]

int(x/(4*x + x^2 + 4),x)

[Out]

log(x + 2) + 2/(x + 2)