3.36.13 \(\int \frac {-40+5 x+4 x^2}{8+2 x} \, dx\)

Optimal. Leaf size=20 \[ -1+(3-x)^2+\frac {x}{2}+\log \left ((4+x)^2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 15, normalized size of antiderivative = 0.75, number of steps used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {698} \begin {gather*} x^2-\frac {11 x}{2}+2 \log (x+4) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-40 + 5*x + 4*x^2)/(8 + 2*x),x]

[Out]

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

Rule 698

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {11}{2}+2 x+\frac {2}{4+x}\right ) \, dx\\ &=-\frac {11 x}{2}+x^2+2 \log (4+x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 18, normalized size = 0.90 \begin {gather*} -38-\frac {11 x}{2}+x^2+2 \log (2 (4+x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-40 + 5*x + 4*x^2)/(8 + 2*x),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.77, size = 13, normalized size = 0.65 \begin {gather*} x^{2} - \frac {11}{2} \, x + 2 \, \log \left (x + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x^2+5*x-40)/(2*x+8),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.12, size = 14, normalized size = 0.70 \begin {gather*} x^{2} - \frac {11}{2} \, x + 2 \, \log \left ({\left | x + 4 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x^2+5*x-40)/(2*x+8),x, algorithm="giac")

[Out]

x^2 - 11/2*x + 2*log(abs(x + 4))

________________________________________________________________________________________

maple [A]  time = 0.06, size = 14, normalized size = 0.70




method result size



default \(x^{2}-\frac {11 x}{2}+2 \ln \left (4+x \right )\) \(14\)
risch \(x^{2}-\frac {11 x}{2}+2 \ln \left (4+x \right )\) \(14\)
norman \(x^{2}-\frac {11 x}{2}+2 \ln \left (2 x +8\right )\) \(16\)
meijerg \(2 \ln \left (1+\frac {x}{4}\right )-\frac {4 x \left (-\frac {3 x}{4}+6\right )}{3}+\frac {5 x}{2}\) \(21\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((4*x^2+5*x-40)/(2*x+8),x,method=_RETURNVERBOSE)

[Out]

x^2-11/2*x+2*ln(4+x)

________________________________________________________________________________________

maxima [A]  time = 0.54, size = 13, normalized size = 0.65 \begin {gather*} x^{2} - \frac {11}{2} \, x + 2 \, \log \left (x + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x^2+5*x-40)/(2*x+8),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.06, size = 13, normalized size = 0.65 \begin {gather*} 2\,\ln \left (x+4\right )-\frac {11\,x}{2}+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x + 4*x^2 - 40)/(2*x + 8),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 14, normalized size = 0.70 \begin {gather*} x^{2} - \frac {11 x}{2} + 2 \log {\left (x + 4 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x**2+5*x-40)/(2*x+8),x)

[Out]

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

________________________________________________________________________________________