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

Optimal. Leaf size=25 \[ 5+e^{-9+x}+e^{-x+x^2}+\log \left (2 e^{2+x} x\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 18, normalized size of antiderivative = 0.72, number of steps used = 8, number of rules used = 4, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {14, 2236, 2194, 43} \begin {gather*} e^{x^2-x}+x+e^{x-9}+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(-9 + x) + E^(-x + x^2) + x + Log[x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

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 2236

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(e*F^(a + b*x + c*x^2))/(
2*c*Log[F]), x] /; FreeQ[{F, a, b, c, d, e}, x] && EqQ[b*e - 2*c*d, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 18, normalized size = 0.72 \begin {gather*} e^{-9+x}+e^{-x+x^2}+x+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(-9 + x) + E^(-x + x^2) + x + Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 16, normalized size = 0.64 \begin {gather*} x + e^{\left (x^{2} - x\right )} + e^{\left (x - 9\right )} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + e^(x^2 - x) + e^(x - 9) + log(x)

________________________________________________________________________________________

giac [A]  time = 0.16, size = 24, normalized size = 0.96 \begin {gather*} {\left (x e^{9} + e^{9} \log \relax (x) + e^{\left (x^{2} - x + 9\right )} + e^{x}\right )} e^{\left (-9\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 15, normalized size = 0.60




method result size



risch \(x +{\mathrm e}^{x -9}+{\mathrm e}^{x \left (x -1\right )}+\ln \relax (x )\) \(15\)
norman \(x +{\mathrm e}^{x -9}+{\mathrm e}^{x^{2}-x}+\ln \relax (x )\) \(17\)
default \(x +\ln \relax (x )+{\mathrm e}^{x} {\mathrm e}^{-9}+{\mathrm e}^{x^{2}-x}\) \(18\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x+exp(x-9)+exp(x*(x-1))+ln(x)

________________________________________________________________________________________

maxima [C]  time = 0.39, size = 74, normalized size = 2.96 \begin {gather*} \frac {1}{2} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x - \frac {1}{2} i\right ) e^{\left (-\frac {1}{4}\right )} + \frac {1}{2} \, {\left (\frac {\sqrt {\pi } {\left (2 \, x - 1\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 1\right )}^{2}}} + 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 1\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{4}\right )} + x + e^{\left (x - 9\right )} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*I*sqrt(pi)*erf(I*x - 1/2*I)*e^(-1/4) + 1/2*(sqrt(pi)*(2*x - 1)*(erf(1/2*sqrt(-(2*x - 1)^2)) - 1)/sqrt(-(2*
x - 1)^2) + 2*e^(1/4*(2*x - 1)^2))*e^(-1/4) + x + e^(x - 9) + log(x)

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 16, normalized size = 0.64 \begin {gather*} x+{\mathrm {e}}^{x-9}+{\mathrm {e}}^{x^2-x}+\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + exp(x - 9) + exp(x^2 - x) + log(x)

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 15, normalized size = 0.60 \begin {gather*} x + e^{x - 9} + e^{x^{2} - x} + \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________