3.13.11 \(\int \frac {1+e^x (4 x+4 x^2)+e^{2 x} (2 x^2+2 x^3)}{x} \, dx\) [1211]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 25, normalized size of antiderivative = 0.86, number of steps used = 11, number of rules used = 4, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {14, 2207, 2225, 2227} \begin {gather*} e^{2 x} x^2-4 e^x+4 e^x (x+1)+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-4*E^x + E^(2*x)*x^2 + 4*E^x*(1 + 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 2207

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] &&  !TrueQ[$UseGamma]

Rule 2225

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 2227

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !TrueQ[$UseGamma]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 18, normalized size = 0.62 \begin {gather*} 4 e^x x+e^{2 x} x^2+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

4*E^x*x + E^(2*x)*x^2 + Log[x]

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 17, normalized size = 0.59

method result size
default \(\ln \left (x \right )+4 \,{\mathrm e}^{x} x +{\mathrm e}^{2 x} x^{2}\) \(17\)
norman \(\ln \left (x \right )+4 \,{\mathrm e}^{x} x +{\mathrm e}^{2 x} x^{2}\) \(17\)
risch \(\ln \left (x \right )+4 \,{\mathrm e}^{x} x +{\mathrm e}^{2 x} x^{2}\) \(17\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

ln(x)+4*exp(x)*x+exp(x)^2*x^2

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 41, normalized size = 1.41 \begin {gather*} \frac {1}{2} \, {\left (2 \, x^{2} - 2 \, x + 1\right )} e^{\left (2 \, x\right )} + \frac {1}{2} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} + 4 \, {\left (x - 1\right )} e^{x} + 4 \, e^{x} + \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 16, normalized size = 0.55 \begin {gather*} x^{2} e^{\left (2 \, x\right )} + 4 \, x e^{x} + \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 17, normalized size = 0.59 \begin {gather*} x^{2} e^{2 x} + 4 x e^{x} + \log {\left (x \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2*exp(2*x) + 4*x*exp(x) + log(x)

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 16, normalized size = 0.55 \begin {gather*} x^{2} e^{\left (2 \, x\right )} + 4 \, x e^{x} + \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.87, size = 16, normalized size = 0.55 \begin {gather*} \ln \left (x\right )+x^2\,{\mathrm {e}}^{2\,x}+4\,x\,{\mathrm {e}}^x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x) + x^2*exp(2*x) + 4*x*exp(x)

________________________________________________________________________________________