3.3.69 \(\int \frac {-2+2 x+x^2+e^{10+5 x} (-5-10 x-5 x^2)+e^x (1+2 x+x^2)}{1+2 x+x^2} \, dx\)

Optimal. Leaf size=29 \[ e^x-e^{5 (2+x)}+x+\frac {3}{1+x}+\frac {4}{-3+\log (2)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.21, antiderivative size = 21, normalized size of antiderivative = 0.72, number of steps used = 7, number of rules used = 4, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.082, Rules used = {27, 6742, 2194, 683} \begin {gather*} x+e^x-e^{5 x+10}+\frac {3}{x+1} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-2 + 2*x + x^2 + E^(10 + 5*x)*(-5 - 10*x - 5*x^2) + E^x*(1 + 2*x + x^2))/(1 + 2*x + x^2),x]

[Out]

E^x - E^(10 + 5*x) + x + 3/(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 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 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^{10+5 x} \left (-5-10 x-5 x^2\right )+e^x \left (1+2 x+x^2\right )}{(1+x)^2} \, dx\\ &=\int \left (e^x-5 e^{10+5 x}+\frac {-2+2 x+x^2}{(1+x)^2}\right ) \, dx\\ &=-\left (5 \int e^{10+5 x} \, dx\right )+\int e^x \, dx+\int \frac {-2+2 x+x^2}{(1+x)^2} \, dx\\ &=e^x-e^{10+5 x}+\int \left (1-\frac {3}{(1+x)^2}\right ) \, dx\\ &=e^x-e^{10+5 x}+x+\frac {3}{1+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 21, normalized size = 0.72 \begin {gather*} e^x-e^{10+5 x}+x+\frac {3}{1+x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-2 + 2*x + x^2 + E^(10 + 5*x)*(-5 - 10*x - 5*x^2) + E^x*(1 + 2*x + x^2))/(1 + 2*x + x^2),x]

[Out]

E^x - E^(10 + 5*x) + x + 3/(1 + x)

________________________________________________________________________________________

fricas [A]  time = 0.77, size = 29, normalized size = 1.00 \begin {gather*} \frac {x^{2} - {\left (x + 1\right )} e^{\left (5 \, x + 10\right )} + {\left (x + 1\right )} e^{x} + x + 3}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-5*x^2-10*x-5)*exp(5*x+10)+(x^2+2*x+1)*exp(x)+x^2+2*x-2)/(x^2+2*x+1),x, algorithm="fricas")

[Out]

(x^2 - (x + 1)*e^(5*x + 10) + (x + 1)*e^x + x + 3)/(x + 1)

________________________________________________________________________________________

giac [A]  time = 0.39, size = 35, normalized size = 1.21 \begin {gather*} \frac {x^{2} - x e^{\left (5 \, x + 10\right )} + x e^{x} + x - e^{\left (5 \, x + 10\right )} + e^{x} + 3}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-5*x^2-10*x-5)*exp(5*x+10)+(x^2+2*x+1)*exp(x)+x^2+2*x-2)/(x^2+2*x+1),x, algorithm="giac")

[Out]

(x^2 - x*e^(5*x + 10) + x*e^x + x - e^(5*x + 10) + e^x + 3)/(x + 1)

________________________________________________________________________________________

maple [A]  time = 0.49, size = 20, normalized size = 0.69




method result size



risch \(x +\frac {3}{x +1}-{\mathrm e}^{5 x +10}+{\mathrm e}^{x}\) \(20\)
norman \(\frac {x^{2}+{\mathrm e}^{x} x -{\mathrm e}^{5 x} {\mathrm e}^{10}-{\mathrm e}^{5 x} {\mathrm e}^{10} x +2+{\mathrm e}^{x}}{x +1}\) \(35\)
default \(x +\frac {3}{x +1}+{\mathrm e}^{x}-5 \,{\mathrm e}^{10} \left (-\frac {{\mathrm e}^{5 x}}{x +1}-5 \,{\mathrm e}^{-5} \expIntegralEi \left (1, -5 x -5\right )\right )-10 \,{\mathrm e}^{10} \left (4 \,{\mathrm e}^{-5} \expIntegralEi \left (1, -5 x -5\right )+\frac {{\mathrm e}^{5 x}}{x +1}\right )-5 \,{\mathrm e}^{10} \left (\frac {{\mathrm e}^{5 x}}{5}-3 \,{\mathrm e}^{-5} \expIntegralEi \left (1, -5 x -5\right )-\frac {{\mathrm e}^{5 x}}{x +1}\right )\) \(98\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-5*x^2-10*x-5)*exp(5*x+10)+(x^2+2*x+1)*exp(x)+x^2+2*x-2)/(x^2+2*x+1),x,method=_RETURNVERBOSE)

[Out]

x+3/(x+1)-exp(5*x+10)+exp(x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-5*x^2-10*x-5)*exp(5*x+10)+(x^2+2*x+1)*exp(x)+x^2+2*x-2)/(x^2+2*x+1),x, algorithm="maxima")

[Out]

x - e^(-1)*exp_integral_e(2, -x - 1)/(x + 1) + (x^2*e^x - (x^2*e^10 + 2*x*e^10 + e^10)*e^(5*x))/(x^2 + 2*x + 1
) + 2*e^x/(x + 1) + 3/(x + 1) - 2*integrate(x*e^x/(x^3 + 3*x^2 + 3*x + 1), x)

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 19, normalized size = 0.66 \begin {gather*} x-{\mathrm {e}}^{5\,x+10}+{\mathrm {e}}^x+\frac {3}{x+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x + exp(x)*(2*x + x^2 + 1) - exp(5*x + 10)*(10*x + 5*x^2 + 5) + x^2 - 2)/(2*x + x^2 + 1),x)

[Out]

x - exp(5*x + 10) + exp(x) + 3/(x + 1)

________________________________________________________________________________________

sympy [A]  time = 0.18, size = 17, normalized size = 0.59 \begin {gather*} x - e^{10} e^{5 x} + e^{x} + \frac {3}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-5*x**2-10*x-5)*exp(5*x+10)+(x**2+2*x+1)*exp(x)+x**2+2*x-2)/(x**2+2*x+1),x)

[Out]

x - exp(10)*exp(5*x) + exp(x) + 3/(x + 1)

________________________________________________________________________________________