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

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

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 18, normalized size of antiderivative = 0.55, number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2282, 2197} \begin {gather*} 2 x-e^{-x-e^x+2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 18, normalized size = 0.55 \begin {gather*} -e^{2-e^x-x}+2 x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 16, normalized size = 0.48 \begin {gather*} 2 \, x - e^{\left (-x - e^{x} + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.23, size = 16, normalized size = 0.48 \begin {gather*} 2 \, x - e^{\left (-x - e^{x} + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 17, normalized size = 0.52




method result size



norman \(2 x -{\mathrm e}^{-{\mathrm e}^{x}+2-x}\) \(17\)
risch \(2 x -{\mathrm e}^{-{\mathrm e}^{x}+2-x}\) \(17\)
default \(2 x -{\mathrm e}^{2} \expIntegralEi \left (1, {\mathrm e}^{x}\right )+{\mathrm e}^{2} \left (-{\mathrm e}^{-{\mathrm e}^{x}} {\mathrm e}^{-x}+\expIntegralEi \left (1, {\mathrm e}^{x}\right )\right )\) \(32\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x-exp(-exp(x)+2-x)

________________________________________________________________________________________

maxima [A]  time = 0.68, size = 16, normalized size = 0.48 \begin {gather*} 2 \, x - e^{\left (-x - e^{x} + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 17, normalized size = 0.52 \begin {gather*} 2\,x-{\mathrm {e}}^{-x}\,{\mathrm {e}}^2\,{\mathrm {e}}^{-{\mathrm {e}}^x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x - exp(-x)*exp(2)*exp(-exp(x))

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 10, normalized size = 0.30 \begin {gather*} 2 x - e^{- x - e^{x} + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x - exp(-x - exp(x) + 2)

________________________________________________________________________________________