3.47.6 \(\int \frac {-2+3 x+2 x^2+\frac {e^{12-2 x} (6 x+2 x^2)}{(4+2 x)^2}}{2 x+x^2} \, dx\)

Optimal. Leaf size=24 \[ 2 x-\frac {e^{12-2 x}}{(4+2 x)^2}-\log (x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.36, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.068, Rules used = {1593, 6688, 2197} \begin {gather*} 2 x-\frac {e^{12-2 x}}{4 (x+2)^2}-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-2 + 3*x + 2*x^2 + (E^(12 - 2*x)*(6*x + 2*x^2))/(4 + 2*x)^2)/(2*x + x^2),x]

[Out]

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

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 2197

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[(g*u^(m + 1)*F^(c*v))/(b*c
*e*Log[F]), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 45, normalized size = 1.88 \begin {gather*} 2 x-\frac {e^{12-2 x}}{2 (2+x)}+\frac {e^{12-2 x} (3+2 x)}{4 (2+x)^2}-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-2 + 3*x + 2*x^2 + (E^(12 - 2*x)*(6*x + 2*x^2))/(4 + 2*x)^2)/(2*x + x^2),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.66, size = 24, normalized size = 1.00 \begin {gather*} 2 \, x - e^{\left (-2 \, x - 2 \, \log \left (2 \, x + 4\right ) + 12\right )} - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2+6*x)*exp(-log(2*x+4)-x+6)^2+2*x^2+3*x-2)/(x^2+2*x),x, algorithm="fricas")

[Out]

2*x - e^(-2*x - 2*log(2*x + 4) + 12) - log(x)

________________________________________________________________________________________

giac [B]  time = 0.13, size = 50, normalized size = 2.08 \begin {gather*} \frac {8 \, x^{3} - 4 \, x^{2} \log \relax (x) + 32 \, x^{2} - 16 \, x \log \relax (x) + 32 \, x - e^{\left (-2 \, x + 12\right )} - 16 \, \log \relax (x)}{4 \, {\left (x^{2} + 4 \, x + 4\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2+6*x)*exp(-log(2*x+4)-x+6)^2+2*x^2+3*x-2)/(x^2+2*x),x, algorithm="giac")

[Out]

1/4*(8*x^3 - 4*x^2*log(x) + 32*x^2 - 16*x*log(x) + 32*x - e^(-2*x + 12) - 16*log(x))/(x^2 + 4*x + 4)

________________________________________________________________________________________

maple [A]  time = 0.09, size = 22, normalized size = 0.92




method result size



risch \(2 x -\ln \relax (x )-\frac {{\mathrm e}^{-2 x +12}}{4 \left (2+x \right )^{2}}\) \(22\)
default \(2 x -\ln \relax (x )-\frac {{\mathrm e}^{-2 x +12}}{\left (-2 x -4\right )^{2}}\) \(24\)
norman \(2 x -\ln \relax (x )-\frac {{\mathrm e}^{-2 x +12}}{\left (2 x +4\right )^{2}}\) \(27\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^2+6*x)*exp(-ln(2*x+4)-x+6)^2+2*x^2+3*x-2)/(x^2+2*x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} 2 \, x - \frac {x e^{\left (-2 \, x + 12\right )}}{4 \, {\left (x^{3} + 6 \, x^{2} + 12 \, x + 8\right )}} - \frac {3 \, e^{16} E_{3}\left (2 \, x + 4\right )}{2 \, {\left (x + 2\right )}^{2}} - 2 \, \int \frac {{\left (x e^{12} - e^{12}\right )} e^{\left (-2 \, x\right )}}{4 \, {\left (x^{4} + 8 \, x^{3} + 24 \, x^{2} + 32 \, x + 16\right )}}\,{d x} - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2+6*x)*exp(-log(2*x+4)-x+6)^2+2*x^2+3*x-2)/(x^2+2*x),x, algorithm="maxima")

[Out]

2*x - 1/4*x*e^(-2*x + 12)/(x^3 + 6*x^2 + 12*x + 8) - 3/2*e^16*exp_integral_e(3, 2*x + 4)/(x + 2)^2 - 2*integra
te(1/4*(x*e^12 - e^12)*e^(-2*x)/(x^4 + 8*x^3 + 24*x^2 + 32*x + 16), x) - log(x)

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 28, normalized size = 1.17 \begin {gather*} 2\,x-\ln \relax (x)-\frac {{\mathrm {e}}^{-2\,x}\,{\mathrm {e}}^{12}}{4\,x^2+16\,x+16} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x + exp(12 - 2*log(2*x + 4) - 2*x)*(6*x + 2*x^2) + 2*x^2 - 2)/(2*x + x^2),x)

[Out]

2*x - log(x) - (exp(-2*x)*exp(12))/(16*x + 4*x^2 + 16)

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 22, normalized size = 0.92 \begin {gather*} 2 x - \log {\relax (x )} - \frac {e^{12 - 2 x}}{4 x^{2} + 16 x + 16} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**2+6*x)*exp(-ln(2*x+4)-x+6)**2+2*x**2+3*x-2)/(x**2+2*x),x)

[Out]

2*x - log(x) - exp(12 - 2*x)/(4*x**2 + 16*x + 16)

________________________________________________________________________________________