3.49.14 \(\int \frac {2+2 x+x^2+e^{8-2 x} (-1+3 x^2+2 x^3)-\log (7)}{1+2 x+x^2} \, dx\)

Optimal. Leaf size=25 \[ x-e^{8-2 x} x+\frac {x (x+\log (7))}{x+x^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.35, antiderivative size = 42, normalized size of antiderivative = 1.68, number of steps used = 8, number of rules used = 6, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.140, Rules used = {27, 6741, 6742, 2176, 2194, 683} \begin {gather*} \frac {1}{2} e^{8-2 x} (1-2 x)-\frac {1}{2} e^{8-2 x}+x-\frac {1-\log (7)}{x+1} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(2 + 2*x + x^2 + E^(8 - 2*x)*(-1 + 3*x^2 + 2*x^3) - Log[7])/(1 + 2*x + x^2),x]

[Out]

-1/2*E^(8 - 2*x) + (E^(8 - 2*x)*(1 - 2*x))/2 + x - (1 - Log[7])/(1 + 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 683

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] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 6741

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

Rule 6742

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 22, normalized size = 0.88 \begin {gather*} x-e^{8-2 x} x+\frac {-1+\log (7)}{1+x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(2 + 2*x + x^2 + E^(8 - 2*x)*(-1 + 3*x^2 + 2*x^3) - Log[7])/(1 + 2*x + x^2),x]

[Out]

x - E^(8 - 2*x)*x + (-1 + Log[7])/(1 + x)

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 27, normalized size = 1.08 \begin {gather*} \frac {x^{2} - {\left (x^{2} + x\right )} e^{\left (-2 \, x + 8\right )} + x + \log \relax (7) - 1}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2 - (x^2 + x)*e^(-2*x + 8) + x + log(7) - 1)/(x + 1)

________________________________________________________________________________________

giac [A]  time = 0.23, size = 39, normalized size = 1.56 \begin {gather*} -\frac {x^{2} e^{\left (-2 \, x + 8\right )} - x^{2} + x e^{\left (-2 \, x + 8\right )} - x - \log \relax (7) + 1}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x^2*e^(-2*x + 8) - x^2 + x*e^(-2*x + 8) - x - log(7) + 1)/(x + 1)

________________________________________________________________________________________

maple [A]  time = 0.19, size = 27, normalized size = 1.08




method result size



risch \(x +\frac {\ln \relax (7)}{x +1}-\frac {1}{x +1}-x \,{\mathrm e}^{-2 x +8}\) \(27\)
norman \(\frac {x^{2}-x \,{\mathrm e}^{-2 x +8}-x^{2} {\mathrm e}^{-2 x +8}-2+\ln \relax (7)}{x +1}\) \(38\)
derivativedivides \(x -4+\frac {1}{-x -1}-\frac {\ln \relax (7)}{-x -1}-4 \,{\mathrm e}^{-2 x +8}+{\mathrm e}^{-2 x +8} \left (-x +4\right )\) \(46\)
default \(x -4+\frac {1}{-x -1}-\frac {\ln \relax (7)}{-x -1}-4 \,{\mathrm e}^{-2 x +8}+{\mathrm e}^{-2 x +8} \left (-x +4\right )\) \(46\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x+1/(x+1)*ln(7)-1/(x+1)-x*exp(-2*x+8)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -x e^{\left (-2 \, x + 8\right )} + x + \frac {e^{10} E_{2}\left (2 \, x + 2\right )}{x + 1} + \frac {\log \relax (7)}{x + 1} - \frac {1}{x + 1} + \int \frac {e^{\left (-2 \, x + 8\right )}}{x^{2} + 2 \, x + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x*e^(-2*x + 8) + x + e^10*exp_integral_e(2, 2*x + 2)/(x + 1) + log(7)/(x + 1) - 1/(x + 1) + integrate(e^(-2*x
 + 8)/(x^2 + 2*x + 1), x)

________________________________________________________________________________________

mupad [B]  time = 3.42, size = 22, normalized size = 0.88 \begin {gather*} \frac {\ln \relax (7)-1}{x+1}-x\,\left ({\mathrm {e}}^{8-2\,x}-1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x - log(7) + exp(8 - 2*x)*(3*x^2 + 2*x^3 - 1) + x^2 + 2)/(2*x + x^2 + 1),x)

[Out]

(log(7) - 1)/(x + 1) - x*(exp(8 - 2*x) - 1)

________________________________________________________________________________________

sympy [A]  time = 0.18, size = 17, normalized size = 0.68 \begin {gather*} - x e^{8 - 2 x} + x + \frac {-1 + \log {\relax (7 )}}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x*exp(8 - 2*x) + x + (-1 + log(7))/(x + 1)

________________________________________________________________________________________