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

Optimal. Leaf size=22 \[ \frac {e x (1+x)+\left (-e^x+x\right )^2}{2+e} \]

________________________________________________________________________________________

Rubi [B]  time = 0.03, antiderivative size = 61, normalized size of antiderivative = 2.77, number of steps used = 5, number of rules used = 3, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {12, 2194, 2176} \begin {gather*} \frac {x^2}{2+e}+\frac {e (2 x+1)^2}{4 (2+e)}-\frac {2 e^x (x+1)}{2+e}+\frac {2 e^x}{2+e}+\frac {e^{2 x}}{2+e} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(2*E^x)/(2 + E) + E^(2*x)/(2 + E) + x^2/(2 + E) - (2*E^x*(1 + x))/(2 + E) + (E*(1 + 2*x)^2)/(4*(2 + E))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 29, normalized size = 1.32 \begin {gather*} \frac {e^{2 x}+e x-2 e^x x+x^2+e x^2}{2+e} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(E^(2*x) + E*x - 2*E^x*x + x^2 + E*x^2)/(2 + E)

________________________________________________________________________________________

fricas [A]  time = 0.66, size = 28, normalized size = 1.27 \begin {gather*} \frac {x^{2} + {\left (x^{2} + x\right )} e - 2 \, x e^{x} + e^{\left (2 \, x\right )}}{e + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2 + (x^2 + x)*e - 2*x*e^x + e^(2*x))/(e + 2)

________________________________________________________________________________________

giac [A]  time = 0.44, size = 28, normalized size = 1.27 \begin {gather*} \frac {x^{2} + {\left (x^{2} + x\right )} e - 2 \, x e^{x} + e^{\left (2 \, x\right )}}{e + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2 + (x^2 + x)*e - 2*x*e^x + e^(2*x))/(e + 2)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 29, normalized size = 1.32




method result size



default \(\frac {-2 \,{\mathrm e}^{x} x +\left (x^{2}+x \right ) {\mathrm e}+x^{2}+{\mathrm e}^{2 x}}{{\mathrm e}+2}\) \(29\)
norman \(\frac {{\mathrm e}^{2 x}}{{\mathrm e}+2}+\frac {\left (1+{\mathrm e}\right ) x^{2}}{{\mathrm e}+2}+\frac {{\mathrm e} x}{{\mathrm e}+2}-\frac {2 x \,{\mathrm e}^{x}}{{\mathrm e}+2}\) \(48\)
risch \(\frac {x^{2} {\mathrm e}}{{\mathrm e}+2}+\frac {{\mathrm e} x}{{\mathrm e}+2}+\frac {x^{2}}{{\mathrm e}+2}-\frac {2 x \,{\mathrm e}^{x}}{{\mathrm e}+2}+\frac {{\mathrm e}^{2 x}}{{\mathrm e}+2}\) \(56\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/(exp(1)+2)*(-2*exp(x)*x+(x^2+x)*exp(1)+x^2+exp(x)^2)

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 28, normalized size = 1.27 \begin {gather*} \frac {x^{2} + {\left (x^{2} + x\right )} e - 2 \, x e^{x} + e^{\left (2 \, x\right )}}{e + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^2 + (x^2 + x)*e - 2*x*e^x + e^(2*x))/(e + 2)

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 29, normalized size = 1.32 \begin {gather*} \frac {{\mathrm {e}}^{2\,x}+x\,\mathrm {e}-2\,x\,{\mathrm {e}}^x+x^2\,\left (\mathrm {e}+1\right )}{\mathrm {e}+2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(exp(2*x) + x*exp(1) - 2*x*exp(x) + x^2*(exp(1) + 1))/(exp(1) + 2)

________________________________________________________________________________________

sympy [B]  time = 0.14, size = 58, normalized size = 2.64 \begin {gather*} \frac {x^{2} \left (1 + e\right )}{2 + e} + \frac {e x}{2 + e} + \frac {\left (- 2 e x - 4 x\right ) e^{x} + \left (2 + e\right ) e^{2 x}}{4 + e^{2} + 4 e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2*(1 + E)/(2 + E) + E*x/(2 + E) + ((-2*E*x - 4*x)*exp(x) + (2 + E)*exp(2*x))/(4 + exp(2) + 4*E)

________________________________________________________________________________________