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

Optimal. Leaf size=21 \[ \left (1+e^x+x\right ) \log \left (\frac {e^{e^x+3 x}}{x}\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.45, antiderivative size = 45, normalized size of antiderivative = 2.14, number of steps used = 29, number of rules used = 8, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {14, 2194, 6742, 2199, 2178, 2176, 2554, 2548} \begin {gather*} 3 x+e^x+x \log \left (\frac {e^{3 x+e^x}}{x}\right )+e^x \log \left (\frac {e^{3 x+e^x}}{x}\right )-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x + 3*x + E^x*Log[E^(E^x + 3*x)/x] + x*Log[E^(E^x + 3*x)/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 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 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$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]

Rule 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rule 2548

Int[Log[u_], x_Symbol] :> Simp[x*Log[u], x] - Int[SimplifyIntegrand[(x*D[u, x])/u, x], x] /; InverseFunctionFr
eeQ[u, x]

Rule 2554

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[(w*D[u, x]
)/u, x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, 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 \left (e^{2 x}+\frac {e^x \left (-1+4 x+x^2+x \log \left (\frac {e^{e^x+3 x}}{x}\right )\right )}{x}+\frac {-1+2 x+3 x^2+x \log \left (\frac {e^{e^x+3 x}}{x}\right )}{x}\right ) \, dx\\ &=\int e^{2 x} \, dx+\int \frac {e^x \left (-1+4 x+x^2+x \log \left (\frac {e^{e^x+3 x}}{x}\right )\right )}{x} \, dx+\int \frac {-1+2 x+3 x^2+x \log \left (\frac {e^{e^x+3 x}}{x}\right )}{x} \, dx\\ &=\frac {e^{2 x}}{2}+\int \left (\frac {-1+2 x+3 x^2}{x}+\log \left (\frac {e^{e^x+3 x}}{x}\right )\right ) \, dx+\int \left (\frac {e^x \left (-1+4 x+x^2\right )}{x}+e^x \log \left (\frac {e^{e^x+3 x}}{x}\right )\right ) \, dx\\ &=\frac {e^{2 x}}{2}+\int \frac {e^x \left (-1+4 x+x^2\right )}{x} \, dx+\int \frac {-1+2 x+3 x^2}{x} \, dx+\int \log \left (\frac {e^{e^x+3 x}}{x}\right ) \, dx+\int e^x \log \left (\frac {e^{e^x+3 x}}{x}\right ) \, dx\\ &=\frac {e^{2 x}}{2}+e^x \log \left (\frac {e^{e^x+3 x}}{x}\right )+x \log \left (\frac {e^{e^x+3 x}}{x}\right )+\int \left (2-\frac {1}{x}+3 x\right ) \, dx+\int \left (4 e^x-\frac {e^x}{x}+e^x x\right ) \, dx-\int \left (-1+\left (3+e^x\right ) x\right ) \, dx-\int \frac {e^x \left (-1+\left (3+e^x\right ) x\right )}{x} \, dx\\ &=\frac {e^{2 x}}{2}+3 x+\frac {3 x^2}{2}+e^x \log \left (\frac {e^{e^x+3 x}}{x}\right )+x \log \left (\frac {e^{e^x+3 x}}{x}\right )-\log (x)+4 \int e^x \, dx-\int \frac {e^x}{x} \, dx+\int e^x x \, dx-\int \left (3+e^x\right ) x \, dx-\int \left (e^{2 x}+\frac {e^x (-1+3 x)}{x}\right ) \, dx\\ &=4 e^x+\frac {e^{2 x}}{2}+3 x+e^x x+\frac {3 x^2}{2}-\text {Ei}(x)+e^x \log \left (\frac {e^{e^x+3 x}}{x}\right )+x \log \left (\frac {e^{e^x+3 x}}{x}\right )-\log (x)-\int e^x \, dx-\int e^{2 x} \, dx-\int \frac {e^x (-1+3 x)}{x} \, dx-\int \left (3 x+e^x x\right ) \, dx\\ &=3 e^x+3 x+e^x x-\text {Ei}(x)+e^x \log \left (\frac {e^{e^x+3 x}}{x}\right )+x \log \left (\frac {e^{e^x+3 x}}{x}\right )-\log (x)-\int \left (3 e^x-\frac {e^x}{x}\right ) \, dx-\int e^x x \, dx\\ &=3 e^x+3 x-\text {Ei}(x)+e^x \log \left (\frac {e^{e^x+3 x}}{x}\right )+x \log \left (\frac {e^{e^x+3 x}}{x}\right )-\log (x)-3 \int e^x \, dx+\int e^x \, dx+\int \frac {e^x}{x} \, dx\\ &=e^x+3 x+e^x \log \left (\frac {e^{e^x+3 x}}{x}\right )+x \log \left (\frac {e^{e^x+3 x}}{x}\right )-\log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 31, normalized size = 1.48 \begin {gather*} e^x+3 x+\left (e^x+x\right ) \log \left (\frac {e^{e^x+3 x}}{x}\right )-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x + 3*x + (E^x + x)*Log[E^(E^x + 3*x)/x] - Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 18, normalized size = 0.86 \begin {gather*} {\left (x + e^{x} + 1\right )} \log \left (\frac {e^{\left (3 \, x + e^{x}\right )}}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + e^x + 1)*log(e^(3*x + e^x)/x)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 35, normalized size = 1.67 \begin {gather*} 3 \, x^{2} + 4 \, x e^{x} - x \log \relax (x) - e^{x} \log \relax (x) + 3 \, x + e^{\left (2 \, x\right )} + e^{x} - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.10, size = 65, normalized size = 3.10




method result size



default \({\mathrm e}^{2 x}+\left (\ln \left (\frac {{\mathrm e}^{3 x +{\mathrm e}^{x}}}{x}\right )-3 x -{\mathrm e}^{x}+\ln \relax (x )\right ) {\mathrm e}^{x}+3 \,{\mathrm e}^{x} x -{\mathrm e}^{x} \ln \relax (x )+3 x -\ln \relax (x )+\ln \left (\frac {{\mathrm e}^{3 x +{\mathrm e}^{x}}}{x}\right ) x +{\mathrm e}^{x}\) \(65\)
risch \(\left ({\mathrm e}^{x}+x \right ) \ln \left ({\mathrm e}^{3 x +{\mathrm e}^{x}}\right )-x \ln \relax (x )-{\mathrm e}^{x} \ln \relax (x )-\frac {i \pi x \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{3 x +{\mathrm e}^{x}}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{3 x +{\mathrm e}^{x}}}{x}\right )}{2}+\frac {i \pi x \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{3 x +{\mathrm e}^{x}}}{x}\right )^{2}}{2}+\frac {i \pi x \,\mathrm {csgn}\left (i {\mathrm e}^{3 x +{\mathrm e}^{x}}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{3 x +{\mathrm e}^{x}}}{x}\right )^{2}}{2}-\frac {i \pi x \mathrm {csgn}\left (\frac {i {\mathrm e}^{3 x +{\mathrm e}^{x}}}{x}\right )^{3}}{2}+3 x -\ln \relax (x )-\frac {i \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{3 x +{\mathrm e}^{x}}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{3 x +{\mathrm e}^{x}}}{x}\right ) {\mathrm e}^{x}}{2}+\frac {i \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{3 x +{\mathrm e}^{x}}}{x}\right )^{2} {\mathrm e}^{x}}{2}+\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{3 x +{\mathrm e}^{x}}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{3 x +{\mathrm e}^{x}}}{x}\right )^{2} {\mathrm e}^{x}}{2}-\frac {i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{3 x +{\mathrm e}^{x}}}{x}\right )^{3} {\mathrm e}^{x}}{2}+{\mathrm e}^{x}\) \(275\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(x)^2+(ln(exp(3*x+exp(x))/x)-3*x-exp(x)+ln(x))*exp(x)+3*exp(x)*x-exp(x)*ln(x)+3*x-ln(x)+ln(exp(3*x+exp(x))/
x)*x+exp(x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-e^x*log(x) + x*log(e^(3*x + e^x)/x) + 3*x - Ei(x) + e^(2*x) + 4*e^x + integrate((3*x^2 + 1)*e^x/x, x) - log(x
)

________________________________________________________________________________________

mupad [B]  time = 1.61, size = 37, normalized size = 1.76 \begin {gather*} 3\,x+{\mathrm {e}}^{2\,x}+{\mathrm {e}}^x-\ln \relax (x)+x\,\ln \left (\frac {1}{x}\right )+\ln \left (\frac {1}{x}\right )\,{\mathrm {e}}^x+4\,x\,{\mathrm {e}}^x+3\,x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________