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

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

[Out]

ln((5*exp(3)+4)^2*(4+x)*x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.53, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {642} \[ \int \frac {4+2 x}{4 x+x^2} \, dx=\log \left (x^2+4 x\right ) \]

[In]

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

[Out]

Log[4*x + x^2]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps \begin{align*} \text {integral}& = \log \left (4 x+x^2\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.13 \[ \int \frac {4+2 x}{4 x+x^2} \, dx=2 \left (\frac {\log (x)}{2}+\frac {1}{2} \log (4+x)\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.54 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.47

method result size
default \(\ln \left (\left (4+x \right ) x \right )\) \(7\)
norman \(\ln \left (x \right )+\ln \left (4+x \right )\) \(8\)
parallelrisch \(\ln \left (x \right )+\ln \left (4+x \right )\) \(8\)
derivativedivides \(\ln \left (x^{2}+4 x \right )\) \(9\)
risch \(\ln \left (x^{2}+4 x \right )\) \(9\)
meijerg \(\ln \left (x \right )-2 \ln \left (2\right )+\ln \left (1+\frac {x}{4}\right )\) \(14\)

[In]

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

[Out]

ln((4+x)*x)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

log(x^2 + 4*x)

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

log(x**2 + 4*x)

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

log(x^2 + 4*x)

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

log(2*abs(1/2*x^2 + 2*x))

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

log(x*(x + 4))