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

Optimal. Leaf size=20 \[ 6-\frac {e^{3-2 x}}{x}+x+e^4 x \]

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {6688, 2197} \begin {gather*} \left (1+e^4\right ) x-\frac {e^{3-2 x}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 19, normalized size = 0.95 \begin {gather*} -\frac {e^{3-2 x}}{x}+x+e^4 x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 22, normalized size = 1.10 \begin {gather*} \frac {x^{2} e^{4} + x^{2} - e^{\left (-2 \, x + 3\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 18, normalized size = 0.90




method result size



risch \(x +x \,{\mathrm e}^{4}-\frac {{\mathrm e}^{3-2 x}}{x}\) \(18\)
norman \(\frac {\left (\left ({\mathrm e}^{4}+1\right ) x^{2} {\mathrm e}^{2 x}-{\mathrm e}^{3}\right ) {\mathrm e}^{-2 x}}{x}\) \(26\)
default \(x +{\mathrm e}^{3} \left (-\frac {{\mathrm e}^{-2 x}}{x}+2 \expIntegralEi \left (1, 2 x \right )\right )-2 \,{\mathrm e}^{3} \expIntegralEi \left (1, 2 x \right )+x \,{\mathrm e}^{4}\) \(36\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.39, size = 23, normalized size = 1.15 \begin {gather*} x e^{4} + 2 \, {\rm Ei}\left (-2 \, x\right ) e^{3} - 2 \, e^{3} \Gamma \left (-1, 2 \, x\right ) + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*e^4 + 2*Ei(-2*x)*e^3 - 2*e^3*gamma(-1, 2*x) + x

________________________________________________________________________________________

mupad [B]  time = 4.03, size = 18, normalized size = 0.90 \begin {gather*} x\,\left ({\mathrm {e}}^4+1\right )-\frac {{\mathrm {e}}^{3-2\,x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 15, normalized size = 0.75 \begin {gather*} x \left (1 + e^{4}\right ) - \frac {e^{3} e^{- 2 x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________